[syslog-ng]syslog-ng 1.9.2/1.6.5 static linking

Roberto Nibali syslog-ng@lists.balabit.hu
Fri, 21 Jan 2005 09:13:29 +0100


Jos=E9 Pedro Oliveira wrote:
> Balazs,
>=20
> The attachment is a new patch against syslog-1.6.5 configure.in.
> It will static link the flex, the tcpwrappers and libnet libraries.

I'm not sure I understand your patch but to me the essential part seems t=
o be:

> -LIBS=3D"$LIBS $LEXLIB $LIBOL_LIBS"
> +LIBS=3D"$LIBS -Wl,-static $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS -Wl,-call=
_shared $LIBOL_LIBS"
>  AC_SUBST(YFLAGS)
> =20
>  AC_SUBST(MAKE_CLASS)

I wonder however why you need this, as it's perfectly ok (at least for me=
) to=20
statically link syslog-ng and its components setting the LDFLAGS when cal=
ling make:

# ./configure ...
# make LDFLAGS=3D-static
# ldd src/src/syslog-ng
         not a dynamic executable

What am I missing?

Another thing I'd like to have fixed when you already fiddling with confi=
gure.in=20
  :), is the sysconfdir stuff. src/config.h which is generated does not c=
ontain=20
the correct PATH_SYSCONFDIR when configure is invoked with --sysconfdir. =
We have=20
to manually patch it like so (excerpt from our Makefile):

# ./configure --prefix=3D/usr --sysconfdir=3D/etc
# echo "#undef PATH_SYSCONFDIR"             >> src/config.h
# echo "#define PATH_SYSCONFDIR \"/etc/\""  >> src/config.h

Anyone with the same problem?

Cheers,
Roberto Nibali, ratz
--=20
-------------------------------------------------------------
addr://Rathausgasse 31, CH-5001 Aarau  tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------