From 7d12beb1332bf07e17eb8df412cd20dbbbf62c22 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 3 May 2007 20:58:05 +0200 Subject: Add plugin directory configure option Added --with-plugindir configure option to specify the directory for plugin objects. --- a52/Makefile.am | 2 +- configure.in | 19 +++++++++++++++++++ jack/Makefile.am | 2 +- maemo/Makefile.am | 4 ++-- mix/Makefile.am | 4 ++-- oss/Makefile.am | 4 ++-- pph/Makefile.am | 10 +++++----- pulse/Makefile.am | 4 ++-- rate-lavc/Makefile.am | 14 +++++++------- rate/Makefile.am | 12 ++++++------ 10 files changed, 47 insertions(+), 28 deletions(-) diff --git a/a52/Makefile.am b/a52/Makefile.am index 4021496..ea0078f 100644 --- a/a52/Makefile.am +++ b/a52/Makefile.am @@ -1,6 +1,6 @@ asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la -asound_module_pcm_a52dir = $(libdir)/alsa-lib +asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic diff --git a/configure.in b/configure.in index 1e606da..88484b1 100644 --- a/configure.in +++ b/configure.in @@ -52,6 +52,25 @@ AM_CONDITIONAL(HAVE_AVCODEC, test x$HAVE_AVCODEC = xyes) CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" +dnl ALSA plugin directory +test "x$exec_prefix" = xNONE && exec_prefix=$prefix + +AC_ARG_WITH(plugindir, + AS_HELP_STRING([--with-plugindir=dir], + [path where ALSA plugin files are stored]), + plugindir="$withval", plugindir="") +if test -z "$plugindir"; then + eval dir="$libdir" + case "$dir" in + /*) ;; + *) dir="$dir" + esac + plugindir="$dir/alsa-lib" +fi +AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "plugindir", [directory containing ALSA add-on modules]) +ALSA_PLUGIN_DIR="$plugindir" +AC_SUBST(ALSA_PLUGIN_DIR) + SAVE_PLUGINS_VERSION AC_OUTPUT([ diff --git a/jack/Makefile.am b/jack/Makefile.am index 6b5ddb0..d7de5fd 100644 --- a/jack/Makefile.am +++ b/jack/Makefile.am @@ -1,6 +1,6 @@ asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la -asound_module_pcm_jackdir = $(libdir)/alsa-lib +asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic diff --git a/maemo/Makefile.am b/maemo/Makefile.am index 3a7f476..fb59bce 100644 --- a/maemo/Makefile.am +++ b/maemo/Makefile.am @@ -1,8 +1,8 @@ asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la -asound_module_pcm_alsa_dspdir = $(libdir)/alsa-lib -asound_module_ctl_dsp_ctldir = $(libdir)/alsa-lib +asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@ +asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -fPIC -DPIC -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS) AM_LDFLAGS = -shared -lm -ldl -lpthread -module -avoid-version -export-dynamic $(DBUS_LIBS) diff --git a/mix/Makefile.am b/mix/Makefile.am index c830043..a9d3756 100644 --- a/mix/Makefile.am +++ b/mix/Makefile.am @@ -1,8 +1,8 @@ asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la -asound_module_pcm_upmixdir = $(libdir)/alsa-lib -asound_module_pcm_vdownmixdir = $(libdir)/alsa-lib +asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@ +asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic diff --git a/oss/Makefile.am b/oss/Makefile.am index 84223bc..c02ecb9 100644 --- a/oss/Makefile.am +++ b/oss/Makefile.am @@ -1,8 +1,8 @@ asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la -asound_module_pcm_ossdir = $(libdir)/alsa-lib -asound_module_ctl_ossdir = $(libdir)/alsa-lib +asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@ +asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic diff --git a/pph/Makefile.am b/pph/Makefile.am index 0a9808a..8fd5098 100644 --- a/pph/Makefile.am +++ b/pph/Makefile.am @@ -1,6 +1,6 @@ asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la -asound_module_rate_speexratedir = $(libdir)/alsa-lib +asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -DVAR_ARRAYS -DRANDOM_PREFIX=alsa_lib -DOUTSIDE_SPEEX -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic @@ -9,11 +9,11 @@ libasound_module_rate_speexrate_la_SOURCES = rate_speexrate.c resample.c libasound_module_rate_speexrate_la_LIBADD = @ALSA_LIBS@ install-exec-hook: - rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_speexrate_*.so - $(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_speexrate_best.so - $(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_speexrate_medium.so + rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so + $(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_best.so + $(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_medium.so uninstall-hook: - rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_speexrate_*.so + rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h diff --git a/pulse/Makefile.am b/pulse/Makefile.am index 3da25f0..13e18e5 100644 --- a/pulse/Makefile.am +++ b/pulse/Makefile.am @@ -1,8 +1,8 @@ asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la -asound_module_pcmdir = $(libdir)/alsa-lib -asound_module_ctldir = $(libdir)/alsa-lib +asound_module_pcmdir = @ALSA_PLUGIN_DIR@ +asound_module_ctldir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE AM_LDFLAGS = -module -avoid-version -export-dynamic diff --git a/rate-lavc/Makefile.am b/rate-lavc/Makefile.am index ab6f0cb..88f4596 100644 --- a/rate-lavc/Makefile.am +++ b/rate-lavc/Makefile.am @@ -1,6 +1,6 @@ asound_module_rate_lavcrate_LTLIBRARIES = libasound_module_rate_lavcrate.la -asound_module_rate_lavcratedir = $(libdir)/alsa-lib +asound_module_rate_lavcratedir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic @@ -11,11 +11,11 @@ libasound_module_rate_lavcrate_la_LIBADD = @ALSA_LIBS@ @AVCODEC_LIBS@ noinst_HEADERS = gcd.h install-exec-hook: - rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_lavcrate_*.so - $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_lavcrate_higher.so - $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_lavcrate_high.so - $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_lavcrate_fast.so - $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_lavcrate_faster.so + rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_*.so + $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_higher.so + $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_high.so + $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_fast.so + $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_faster.so uninstall-hook: - rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_lavcrate_*.so + rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_*.so diff --git a/rate/Makefile.am b/rate/Makefile.am index 7b63f02..97e479d 100644 --- a/rate/Makefile.am +++ b/rate/Makefile.am @@ -1,6 +1,6 @@ asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la -asound_module_rate_sampleratedir = $(libdir)/alsa-lib +asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS) AM_LDFLAGS = -module -avoid-version -export-dynamic @@ -9,11 +9,11 @@ libasound_module_rate_samplerate_la_SOURCES = rate_samplerate.c libasound_module_rate_samplerate_la_LIBADD = @ALSA_LIBS@ @samplerate_LIBS@ install-exec-hook: - rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_*.so - $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_best.so - $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_medium.so - $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_order.so - $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_linear.so + rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_*.so + $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_best.so + $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_medium.so + $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_order.so + $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_linear.so uninstall-hook: rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_*.so -- cgit