From: Jaroslav Kysela Date: Mon, 16 Apr 2018 15:49:36 +0000 (+0200) Subject: configure: change --with-alsaaddondir to --with-alsagconfdir and --with-alsalconfdir X-Git-Tag: v1.1.7~15 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=4afd4ab0b276b26b965bae3aadaa31cdb52b1df0;p=alsa-plugins.git configure: change --with-alsaaddondir to --with-alsagconfdir and --with-alsalconfdir The local add-on configuration directory (/etc/alsa/conf.d) contains links to the global configuration directory (/usr/share/alsa/alsa.conf.d) now. Signed-off-by: Jaroslav Kysela --- diff --git a/a52/Makefile.am b/a52/Makefile.am index 4ac8edd..cd5ce45 100644 --- a/a52/Makefile.am +++ b/a52/Makefile.am @@ -1,13 +1,21 @@ -EXTRA_DIST = 60-a52-encoder.conf +GCONF_FILES = 60-a52-encoder.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la -asound_module_addon_DATA = 60-a52-encoder.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) libasound_module_pcm_a52_la_SOURCES = pcm_a52.c libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_CODEC_LIBS@ + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/arcam-av/Makefile.am b/arcam-av/Makefile.am index 4a54ccd..c16aec0 100644 --- a/arcam-av/Makefile.am +++ b/arcam-av/Makefile.am @@ -1,13 +1,21 @@ -EXTRA_DIST = 50-arcam-av-ctl.conf +GCONF_FILES = 50-arcam-av-ctl.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la -asound_module_addon_DATA = 50-arcam-av-ctl.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined libasound_module_ctl_arcam_av_la_SOURCES = ctl_arcam_av.c arcam_av.c arcam_av.h libasound_module_ctl_arcam_av_la_LIBADD = @ALSA_LIBS@ + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/configure.ac b/configure.ac index cb1ae2d..f49bb6b 100644 --- a/configure.ac +++ b/configure.ac @@ -210,17 +210,29 @@ AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA dat ALSA_DATA_DIR="$alsadatadir" AC_SUBST(ALSA_DATA_DIR) -dnl ALSA add-on config directory -AC_ARG_WITH(alsaaddondir, - AS_HELP_STRING([--with-alsaaddondir=dir], - [path where ALSA add-on config files are stored]), - alsaaddondir="$withval", alsaaddondir="") -if test -z "$alsaaddondir"; then - alsaaddondir="/etc/alsa/conf.d" +dnl ALSA add-on global config directory +AC_ARG_WITH(alsagconfdir, + AS_HELP_STRING([--with-alsagconfdir=dir], + [path where ALSA global add-on config files are stored]), + alsagconfdir="$withval", alsagconfdir="") +if test -z "$alsagconfdir"; then + alsagconfdir="$ALSA_DATA_DIR/alsa.conf.d" fi -AC_DEFINE_UNQUOTED(ALSA_ADDON_DIR, "$alsaaddondir", [directory containing ALSA add-on config files]) -ALSA_ADDON_DIR="$alsaaddondir" -AC_SUBST(ALSA_ADDON_DIR) +AC_DEFINE_UNQUOTED(ALSA_GCONF_DIR, "$alsagconfdir", [directory containing global ALSA add-on config files]) +ALSA_GCONF_DIR="$alsagconfdir" +AC_SUBST(ALSA_GCONF_DIR) + +dnl ALSA add-on local config directory +AC_ARG_WITH(alsalconfdir, + AS_HELP_STRING([--with-alsalconfdir=dir], + [path where ALSA local add-on config files are stored]), + alsalconfdir="$withval", alsalconfdir="") +if test -z "$alsalconfdir"; then + alsalconfdir="/etc/alsa/conf.d" +fi +AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files]) +ALSA_LCONF_DIR="$alsalconfdir" +AC_SUBST(ALSA_LCONF_DIR) SAVE_PLUGINS_VERSION diff --git a/install-hooks.am b/install-hooks.am new file mode 100644 index 0000000..2d6d383 --- /dev/null +++ b/install-hooks.am @@ -0,0 +1,16 @@ +install-conf-hook: + mkdir -p $(DESTDIR)$(ALSA_LCONF_DIR) + @(echo cd $(DESTDIR)$(ALSA_LCONF_DIR); \ + cd $(DESTDIR)$(ALSA_LCONF_DIR); \ + for i in $(GCONF_FILES); do \ + echo $(RM) $$i";" ln -s $(ALSA_GCONF_DIR)/$$i .; \ + $(RM) $$i; \ + ln -s $(ALSA_GCONF_DIR)/$$i .; \ + done) +uninstall-conf-hook: + @(echo cd $(DESTDIR)$(ALSA_LCONF_DIR); \ + cd $(DESTDIR)$(ALSA_LCONF_DIR); \ + for i in $(GCONF_FILES); do \ + echo $(RM) $$i; \ + $(RM) $$i; \ + done) diff --git a/jack/Makefile.am b/jack/Makefile.am index 0a3d6ae..7801194 100644 --- a/jack/Makefile.am +++ b/jack/Makefile.am @@ -1,13 +1,21 @@ -EXTRA_DIST = 50-jack.conf +GCONF_FILES = 50-jack.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la -asound_module_addon_DATA = 50-jack.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) libasound_module_pcm_jack_la_SOURCES = pcm_jack.c libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@ + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/maemo/Makefile.am b/maemo/Makefile.am index aca481d..7749926 100644 --- a/maemo/Makefile.am +++ b/maemo/Makefile.am @@ -1,12 +1,14 @@ -EXTRA_DIST = 98-maemo.conf +GCONF_FILES = 98-maemo.conf + +EXTRA_DIST = $(GCONF_FILES) 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_addon_DATA = 98-maemo.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@ asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS) AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -19,3 +21,9 @@ libasound_module_ctl_dsp_ctl_la_LIBADD = @ALSA_LIBS@ $(DBUS_LIBS) -lpthread noinst_HEADERS = constants.h debug.h dsp-protocol.h list.h reporting.h \ types.h + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/mix/Makefile.am b/mix/Makefile.am index 710606c..a74c200 100644 --- a/mix/Makefile.am +++ b/mix/Makefile.am @@ -1,12 +1,14 @@ -EXTRA_DIST = 60-upmix.conf 60-vdownmix.conf +GCONF_FILES = 60-upmix.conf 60-vdownmix.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la -asound_module_addon_DATA = 60-upmix.conf 60-vdownmix.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@ asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -15,3 +17,9 @@ libasound_module_pcm_upmix_la_SOURCES = pcm_upmix.c libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@ libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@ + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/oss/Makefile.am b/oss/Makefile.am index df83d20..46dfcac 100644 --- a/oss/Makefile.am +++ b/oss/Makefile.am @@ -1,12 +1,14 @@ -EXTRA_DIST = 50-oss.conf +GCONF_FILEs = 50-oss.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la -asound_module_addon_DATA = 50-oss.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@ asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -16,3 +18,9 @@ libasound_module_pcm_oss_la_LIBADD = @ALSA_LIBS@ libasound_module_ctl_oss_la_SOURCES = ctl_oss.c libasound_module_ctl_oss_la_LIBADD = @ALSA_LIBS@ + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/pph/Makefile.am b/pph/Makefile.am index abb950b..6938b74 100644 --- a/pph/Makefile.am +++ b/pph/Makefile.am @@ -1,10 +1,12 @@ -EXTRA_DIST = 10-speexrate.conf +GCONF_FILES = 10-speexrate.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la -asound_module_addon_DATA = 10-speexrate.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -20,6 +22,10 @@ libasound_module_rate_speexrate_la_SOURCES += resample.c libasound_module_rate_speexrate_la_LIBADD += -lm endif +noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h + +include ../install-hooks.am + install-exec-hook: 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 @@ -28,4 +34,6 @@ install-exec-hook: uninstall-hook: rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so -noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/pulse/Makefile.am b/pulse/Makefile.am index 835808c..c33e702 100644 --- a/pulse/Makefile.am +++ b/pulse/Makefile.am @@ -1,14 +1,19 @@ -EXTRA_DIST = 50-pulseaudio.conf 99-pulseaudio-default.conf.example +GCONF_FILES = 50-pulseaudio.conf +LCONF_FILES = 99-pulseaudio-default.conf.example + +EXTRA_DIST = $(GCONF_FILES) $(LCONF_FILES) asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la -asound_module_addon_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example +asound_module_gconf_DATA = $(GCONF_FILES) +asound_module_lconf_DATA = $(LCONF_FILES) asound_module_pcmdir = @ALSA_PLUGIN_DIR@ asound_module_ctldir = @ALSA_PLUGIN_DIR@ asound_module_confdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ +asound_module_lconfdir = @ALSA_LCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -21,3 +26,9 @@ libasound_module_ctl_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_ libasound_module_conf_pulse_la_SOURCES = conf_pulse.c libasound_module_conf_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_LIBS) + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/rate-lav/Makefile.am b/rate-lav/Makefile.am index 0f6ecb6..eb672b5 100644 --- a/rate-lav/Makefile.am +++ b/rate-lav/Makefile.am @@ -1,10 +1,12 @@ -EXTRA_DIST = 10-rate-lav.conf +GCONF_FILES = 10-rate-lav.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_rate_lavrate_LTLIBRARIES = libasound_module_rate_lavrate.la -asound_module_addon_DATA = 10-rate-lav.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_rate_lavratedir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -14,6 +16,8 @@ libasound_module_rate_lavrate_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_RESAMP noinst_HEADERS = gcd.h +include ../install-hooks.am + install-exec-hook: rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so $(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_higher.so @@ -23,3 +27,6 @@ install-exec-hook: uninstall-hook: rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/rate/Makefile.am b/rate/Makefile.am index 25014d8..488c12a 100644 --- a/rate/Makefile.am +++ b/rate/Makefile.am @@ -1,10 +1,12 @@ -EXTRA_DIST = 10-samplerate.conf +GCONF_FILES = 10-samplerate.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la -asound_module_addon_DATA = 10-samplerate.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS) AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) @@ -12,6 +14,8 @@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUN libasound_module_rate_samplerate_la_SOURCES = rate_samplerate.c libasound_module_rate_samplerate_la_LIBADD = @ALSA_LIBS@ @samplerate_LIBS@ +include ../install-hooks.am + install-exec-hook: 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 @@ -21,3 +25,7 @@ install-exec-hook: uninstall-hook: rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_*.so + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/speex/Makefile.am b/speex/Makefile.am index 7891954..27c4ea5 100644 --- a/speex/Makefile.am +++ b/speex/Makefile.am @@ -1,13 +1,21 @@ -EXTRA_DIST = 60-speex.conf +GCONF_FILES = 60-speex.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la -asound_module_addon_DATA = 60-speex.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) libasound_module_pcm_speex_la_SOURCES = pcm_speex.c libasound_module_pcm_speex_la_LIBADD = @ALSA_LIBS@ @speexdsp_LIBS@ + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook diff --git a/usb_stream/Makefile.am b/usb_stream/Makefile.am index b606d3d..203618b 100644 --- a/usb_stream/Makefile.am +++ b/usb_stream/Makefile.am @@ -1,10 +1,12 @@ -EXTRA_DIST = 98-usb-stream.conf +GCONF_FILES = 98-usb-stream.conf + +EXTRA_DIST = $(GCONF_FILES) asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la -asound_module_addon_DATA = 98-usb-stream.conf +asound_module_gconf_DATA = $(GCONF_FILES) asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@ -asound_module_addondir = @ALSA_ADDON_DIR@ +asound_module_gconfdir = @ALSA_GCONF_DIR@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED) @@ -13,3 +15,9 @@ libasound_module_pcm_usb_stream_la_SOURCES = pcm_usb_stream.c libasound_module_pcm_usb_stream_la_LIBADD = @ALSA_LIBS@ noinst_HEADERS = usb_stream.h + +include ../install-hooks.am + +install-data-hook: install-conf-hook + +uninstall-local: uninstall-conf-hook