[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditional building of Modules
From: |
Ralf Wildenhues |
Subject: |
Re: Conditional building of Modules |
Date: |
Thu, 19 Apr 2007 00:48:04 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* 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,address@hidden)
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