Re: Conditional building of Modules
* Nicholas J Humfrey wrote on Wed, Apr 18, 2007 at 04:54:13PM CEST: > > I have been having problems with building modules to be installed > into pkglibdir automatically, but I have been having problems using > pkglib_LTLIBRARIES and EXTRA_LTLIBRARIES to work together. Instead I > have been using lib_LTLIBRARIES and EXTRA_LTLIBRARIES and setting rpath. Sounds good to me. Try this (AC_SUBST(MODULE_LIST), and use $(pkglibdir) which is provided for you). > lib_LTLIBRARIES = @MODULE_LIST@ With this line you're lying to automake -- it should be pkglib_LTLIBRARIES. FWIW, please note that -framework is specific to darwin (I guess you knew that). Hope that helps. Cheers, Ralf configure.ac: AC_INIT(mpg123,1,[EMAIL PROTECTED]) AM_INIT_AUTOMAKE(foreign) AC_PROG_CC AC_PROG_LIBTOOL MODULE_LIST="mod_coreaudio.la mod_dummy.la mod_jack.la" AC_SUBST(MODULE_LIST) AC_CONFIG_FILES(Makefile) AC_OUTPUT Makefile.am: pkglib_LTLIBRARIES = @MODULE_LIST@ EXTRA_LTLIBRARIES = \ mod_coreaudio.la \ mod_dummy.la \ mod_jack.la \ mod_portaudio.la \ mod_pulse.la mod_coreaudio_la_SOURCES = coreaudio.c mod_coreaudio_la_LDFLAGS = -module -rpath $(pkglibdir) \ -framework AudioToolbox \ -framework AudioUnit \ -framework CoreServices mod_dummy_la_SOURCES = dummy.c mod_dummy_la_LDFLAGS = -module mod_pulse_la_SOURCES = pulse.c mod_pulse_la_CFLAGS = @PULSE_CFLAGS@ mod_pulse_la_LDFLAGS = -module -rpath $(pkglibdir) @PULSE_LDFLAGS@ mod_pulse_la_LIBADD = @PULSE_LIBS@ mod_jack_la_SOURCES = jack.c mod_jack_la_CFLAGS = @JACK_CFLAGS@ mod_jack_la_LDFLAGS = -module -rpath $(pkglibdir) @JACK_LDFLAGS@ mod_jack_la_LIBADD = @JACK_LIBS@ mod_portaudio_la_SOURCES = portaudio.c mod_portaudio_la_LDFLAGS = -module -rpath $(pkglibdir) mod_portaudio_la_LIBADD = -lportaudio ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Conditional building of Modules
Aha, so your not using EXTRA_LTLIBRARIES at all. I quite liked having a string list of modules to be built, but perhaps I will have a go at using Automake Conditionals instead. Thanks for your reply, nick. On 18 Apr 2007, at 16:51, David Nečas (Yeti) wrote: On Wed, Apr 18, 2007 at 03:54:13PM +0100, Nicholas J Humfrey wrote: I have been having problems with building modules to be installed into pkglibdir automatically, but I have been having problems using pkglib_LTLIBRARIES and EXTRA_LTLIBRARIES to work together. Instead I have been using lib_LTLIBRARIES and EXTRA_LTLIBRARIES and setting rpath. However the problem I have now is that it isn't the modules in the right place. The modules are being installed into /usr/local/lib instead of /usr/local/lib/mpg123. I have managed to solve the problem by having each module compiled in a seperate directory, and conditionally building the SUBDIRS, however I would rather not do it this way as there is only a single source file per module. Does anyone have a working recipe for doing this sort of thing? I conditionally build modules with various dependences according to which of them are available and install them under pkglibdir -- and build many in a single directory. However, I do not experience any of the described problems so maybe in fact I do something else than you... Anyway, you can have a look at http://gwyddion.svn.sourceforge.net/viewvc/gwyddion/trunk/gwyddion/ modules/file/Makefile.am?view=markup Yeti -- http://gwyddion.net/ ___ http://lists.gnu.org/mailman/listinfo/libtool ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Conditional building of Modules
On Wed, Apr 18, 2007 at 03:54:13PM +0100, Nicholas J Humfrey wrote: > I have been having problems with building modules to be installed > into pkglibdir automatically, but I have been having problems using > pkglib_LTLIBRARIES and EXTRA_LTLIBRARIES to work together. Instead I > have been using lib_LTLIBRARIES and EXTRA_LTLIBRARIES and setting rpath. > > However the problem I have now is that it isn't the modules in the > right place. The modules are being installed into /usr/local/lib > instead of /usr/local/lib/mpg123. I have managed to solve the problem > by having each module compiled in a seperate directory, and > conditionally building the SUBDIRS, however I would rather not do it > this way as there is only a single source file per module. > > Does anyone have a working recipe for doing this sort of thing? I conditionally build modules with various dependences according to which of them are available and install them under pkglibdir -- and build many in a single directory. However, I do not experience any of the described problems so maybe in fact I do something else than you... Anyway, you can have a look at http://gwyddion.svn.sourceforge.net/viewvc/gwyddion/trunk/gwyddion/modules/file/Makefile.am?view=markup Yeti -- http://gwyddion.net/ ___ http://lists.gnu.org/mailman/listinfo/libtool