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
Conditional building of Modules
Hi, 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? Thanks, nick. MODULE_LIST="mod_coreaudio.la mod_dummy.la mod_jack.la" PKGLIBDIR="/usr/local/lib/mpg123" Makefile.am = lib_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 -rpath @PKGLIBDIR@ 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 Result of Running make install test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib" /bin/sh ../libtool --mode=install /sw/bin/ginstall -c 'mod_coreaudio.la' '/usr/local/lib/mod_coreaudio.la' /sw/bin/ginstall -c .libs/mod_coreaudio.0.0.0.so /usr/local/lib/ mod_coreaudio.0.0.0.so (cd /usr/local/lib && { ln -s -f mod_coreaudio.0.0.0.so mod_coreaudio. 0.so || { rm -f mod_coreaudio.0.so && ln -s mod_coreaudio.0.0.0.so mod_coreaudio.0.so; }; }) (cd /usr/local/lib && { ln -s -f mod_coreaudio.0.0.0.so mod_coreaudio.so || { rm -f mod_coreaudio.so && ln -s mod_coreaudio. 0.0.0.so mod_coreaudio.so; }; }) /sw/bin/ginstall -c .libs/mod_coreaudio.lai /usr/local/lib/ mod_coreaudio.la libtool: install: warning: remember to run `libtool --finish /usr/ local/lib/mpg123' /bin/sh ../libtool --mode=install /sw/bin/ginstall -c 'mod_portaudio.la' '/usr/local/lib/mod_portaudio.la' /sw/bin/ginstall -c .libs/mod_portaudio.0.0.0.so /usr/local/lib/ mod_portaudio.0.0.0.so (cd /usr/local/lib && { ln -s -f mod_portaudio.0.0.0.so mod_portaudio. 0.so || { rm -f mod_portaudio.0.so && ln -s mod_portaudio.0.0.0.so mod_portaudio.0.so; }; }) (cd /usr/local/lib && { ln -s -f mod_portaudio.0.0.0.so mod_portaudio.so || { rm -f mod_portaudio.so && ln -s mod_portaudio. 0.0.0.so mod_portaudio.so; }; }) /sw/bin/ginstall -c .libs/mod_portaudio.lai /usr/local/lib/ mod_portaudio.la libtool: install: warning: remember to run `libtool --finish /usr/ local/lib/mpg123' /bin/sh ../libtool --mode=install /sw/bin/ginstall -c 'mod_jack.la' '/usr/local/lib/mod_jack.la' /sw/bin/ginstall -c .libs/mod_jack.0.0.0.so /usr/local/lib/mod_jack. 0.0.0.so (cd /usr/local/lib && { ln -s -f mod_jack.0.0.0.so mod_jack.0.so || { rm -f mod_jack.0.so && ln -s mod_jack.0.0.0.so mod_jack.0.so; }; }) (cd /usr/local/lib && { ln -s -f mod_jack.0.0.0.so mod_jack.so || { rm -f mod_jack.so && ln -s mod_jack.0.0.0.so mod_jack.so; }; }) /sw/bin/ginstall -c .libs/mod_jack.lai /usr/local/lib/mod_jack.la libtool: install: warning: remember to run `libtool --finish /usr/ local/lib/mpg123' /bin/sh ../libtool --mode=install /sw/bin/ginstall -c 'mod_dummy.la' '/usr/local/lib/mod_dummy.la' /sw/bin/ginstall -c .libs/mod_dummy.0.0.0.so /usr/local/lib/mod_dummy. 0.0.0.so (cd /usr/local/lib && { ln -s -f mod_dummy.0.0.0.so mod_dummy.0.so || { rm -f mod_dummy.0.so && ln -s mod_dummy.0.0.0.so mod_dummy.0.so; }; }) (cd /usr/local/lib && { ln -s -f mod_dummy.0.0.0.so mod_dummy.so || { rm -f mod_dummy.so && ln -s mod_dummy.0.0.0.so mod_dummy.so; }; }) /sw/bin/ginstall -c .libs/mod_dummy.lai /usr/local/lib/mod_dummy.la libtool: install: warning: remember to run `libtool --finish /usr/ local/lib/mpg123' ___ http://lists.gnu.org/mailman/listinfo/libtool