autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf linking with shared object


From: Ralf Wildenhues
Subject: Re: autoconf linking with shared object
Date: Wed, 29 Mar 2006 10:02:11 +0200
User-agent: Mutt/1.5.11

Hi Matt,

* Matt Kowalczyk wrote on Wed, Mar 29, 2006 at 12:33:54AM CEST:
> 
> I am using the gtk library and to compile it properly with automake I have
> to do this:
> 
> AM_LDFLAGS =  -lcrypto -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0
> -latk-1.0-lgdk_pixbuf-
> 2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0-
> lgmodule-2.0 -ldl -lglib-2.0
> AM_CPPFLAGS = $(DEPS_CFLAGS)

You definitely want to put dependent libraries (those `-lfoolib' flags)
into one of the automake Makefile macros LIBS, someprogram_LDADD,
libsomelibrary_LIBADD, or similar, and not into *_LDFLAGS.  With library
search paths (the `-Lsome/path' flags) it may depend, but adding them to
the appropriate *_LDFLAGS macro is usually the right thing.
  info Autoconf "Preset Output Variables"
and, more generally, both the Autoconf and the Automake manual, have
more information on this.

Please don't top-post, thank you.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]