* Adam Mercer wrote on Tue, Dec 01, 2009 at 09:27:33PM CET:
> On Tue, Dec 1, 2009 at 12:54, Ralf Wildenhues wrote:
> > --disable-shared does not disable linking against shared libraries,
> > it only disables creating shared libraries.  To disable dynamic linking
> > against uninstalled libtool libraries, use -static in the link flags, to
> > disable dynamic linking against any libtool libraries, use
> > -static-libtool-libs, and to disable dynamic linking against all
> > libraries, use -all-static; e.g.,
> >  foo_LDFLAGS = $(AM_LDFLAGS) -all-static
> 
> Thanks, adding the above to src/Makefile.am results in a successful
> build, so it looks like I need to ensure that -all-static is passed to
> each program when linking. Is there a way I can ensure that this is
> done without adding it to _LDFLAGS for every program?

As developer, add it to AM_LDFLAGS.  You can AC_SUBST([AM_LDFLAGS]) from
configure.ac if you need it in multiple Makefile.am files.  Note that
target_LDFLAGS override AM_LDFLAGS unless you add the latter to the
former.

As user, you probably need something like
  make LDFLAGS=-all-static

(specifying it at configure time doesn't work, unfortunately).

Cheers,
Ralf


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to