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?



MODULE_LIST="mod_coreaudio.la mod_dummy.la mod_jack.la"


        mod_coreaudio.la \
        mod_dummy.la \
        mod_jack.la \
        mod_portaudio.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'


Reply via email to