[PATCH] fix static linking (was: Re: [syslog-ng]syslog-ng 1.9.2/1.6.5 static linking)

Balazs Scheidler syslog-ng@lists.balabit.hu
Thu, 03 Feb 2005 10:22:07 +0100


On Wed, 2005-02-02 at 16:19 +0100, Roberto Nibali wrote:
> Hi Bazsi,
> 
> > I have added a configure option called --enable-full-static which links
> > everything statically:
> > 
> > AC_ARG_ENABLE(full-statuc,
>                          ^^^
>                  you need a break ;)
> 
> >    [  --enable-full-static    Link everything in statically],,
> >    enable_full_static=no)
> 
> This patch fixes the typo plus finishes what you maybe wanted to say:

Thanks ;)

> 
> --- syslog-ng-1.6.5+20050202/configure.in       2005-01-21 17:50:49.000000000 +0100
> +++ syslog-ng-1.6.5+20050202-fixed/configure.in 2005-02-02 16:15:58.000000000 +0100
> @@ -59,8 +59,8 @@
>      [  --enable-spoof-source    enable spoof_source feature],,
>      enable_spoof_source=no)
> 
> -AC_ARG_ENABLE(full-statuc,
> -   [  --enable-full-static    Link everything in statically],,
> +AC_ARG_ENABLE(full-static,
> +   [  --enable-full-static    Link everything in /usr statically],,
>      enable_full_static=no)
> 
>   sysconfdir="${sysconfdir}/syslog-ng"

This is not correct. With --enable-full-static everything becomes
static, thus it is not needed to set LDFLAGS in any way.

/usr libraries are linked in statically by default:

if test "$enable_full_static" = "yes"; then
        LIBS="-static $LIBS $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS $LIBOL_LIBS"
else
        LIBS="$LIBS -Wl,-static $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS  $LIBOL_LIBS -Wl,-call_shared"
fi


-- 
Bazsi