diff options
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2020-08-02 17:43:03 +0200 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2020-08-09 01:57:01 +0000 |
commit | b657cff40078564e97d05663166a091832d588a6 (patch) | |
tree | d6494078da62429ee5eb884052825c7243e823e7 | |
parent | af5ae60b333d743cff941620c51e3cb2a9aee64a (diff) |
build: Make alsadatadir configurable
Pipewire has started shipping copies of PulseAudio's ALSA card profiles.
It would be useful if both projects could share the same profiles and
this patch is a step toward that.
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | meson.build | 7 | ||||
-rw-r--r-- | meson_options.txt | 3 | ||||
-rw-r--r-- | src/Makefile.am | 4 |
4 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index a708d6d5b..b96bf2808 100644 --- a/configure.ac +++ b/configure.ac @@ -1512,6 +1512,13 @@ AC_SUBST(modlibexecdir) AX_DEFINE_DIR(PA_DLSEARCHPATH, modlibexecdir, [Modules dir]) AC_ARG_WITH( + [alsa-data-dir], + AS_HELP_STRING([--with-alsa-data-dir],[Directory for ALSA card profiles (defaults to ${datadir}/pulseaudio/alsa-mixer)]), + [alsadatadir=$withval], [alsadatadir="${datadir}/pulseaudio/alsa-mixer"]) + +AC_SUBST(alsadatadir) + +AC_ARG_WITH( [udev-rules-dir], AS_HELP_STRING([--with-udev-rules-dir],[Directory where to install udev rules to (defaults to /lib/udev/rules.d)]), [udevrulesdir=$withval], [udevrulesdir="/lib/udev/rules.d"]) @@ -1656,6 +1663,7 @@ echo " sysconfdir: ${sysconfdir} localstatedir: ${localstatedir} modlibexecdir: ${modlibexecdir} + alsadatadir: ${alsadatadir} System Runtime Path: ${PA_SYSTEM_RUNTIME_PATH} System State Path: ${PA_SYSTEM_STATE_PATH} System Config Path: ${PA_SYSTEM_CONFIG_PATH} diff --git a/meson.build b/meson.build index b055a92c8..a40846479 100644 --- a/meson.build +++ b/meson.build @@ -66,7 +66,11 @@ localedir = join_paths(prefix, get_option('localedir')) localstatedir = join_paths(prefix, get_option('localstatedir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) privlibdir = join_paths(libdir, 'pulseaudio') -alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer') + +alsadatadir = get_option('alsadatadir') +if alsadatadir == '' + alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer') +endif pkgconfigdir = join_paths(libdir, 'pkgconfig') pulselibexecdir = join_paths(libexecdir, 'pulse') @@ -788,6 +792,7 @@ summary = [ 'sysconfdir: @0@'.format(sysconfdir), 'localstatedir: @0@'.format(localstatedir), 'modlibexecdir: @0@'.format(modlibexecdir), + 'alsadatadir: @0@'.format(alsadatadir), 'System Runtime Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_RUNTIME_PATH')), 'System State Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_STATE_PATH')), 'System Config Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_CONFIG_PATH')), diff --git a/meson_options.txt b/meson_options.txt index c11b67ea8..8f8a383ec 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -51,6 +51,9 @@ option('pulsedsp-location', option('modlibexecdir', type : 'string', description : 'Specify location where modules will be installed') +option('alsadatadir', + type : 'string', + description : 'Directory for ALSA card profiles (defaults to ${datadir}/pulseaudio/alsa-mixer)') option('systemduserunitdir', type : 'string', description : 'Directory for systemd user service files') diff --git a/src/Makefile.am b/src/Makefile.am index 1ee899789..f9f26f520 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,8 +28,8 @@ if HAVE_X11 xdgautostartdir=$(sysconfdir)/xdg/autostart endif if HAVE_ALSA -alsaprofilesetsdir=$(datadir)/pulseaudio/alsa-mixer/profile-sets -alsapathsdir=$(datadir)/pulseaudio/alsa-mixer/paths +alsaprofilesetsdir=$(alsadatadir)/profile-sets +alsapathsdir=$(alsadatadir)/paths endif if HAVE_DBUS dbuspolicydir=$(sysconfdir)/dbus-1/system.d |