alsactl: Add a --with-udev-rules-dir configure option.

After the previous patch to install udev rules it is impossible to do a
non-root, custom-prefix make install. This is generally not a problem
when building official packages but it can be a pain for developers
and debuggers etc.

This is essentially the same patch as was already made in PulseAudio
in commit e8a5746f2fcae59bfd18d39b621509b3ef130453.

Signed-off-by: Colin Guthrie <gmane@colin.guthr.ie>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Colin Guthrie 2010-11-25 21:40:25 +00:00 committed by Jaroslav Kysela
parent 53b08bfc14
commit a97bcd19dc
2 changed files with 6 additions and 2 deletions

View file

@ -11,8 +11,6 @@ alsactl_SOURCES=alsactl.c state.c utils.c init_parse.c
alsactl_CFLAGS=$(AM_CFLAGS) -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\" alsactl_CFLAGS=$(AM_CFLAGS) -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\"
noinst_HEADERS=alsactl.h list.h init_sysdeps.c init_utils_string.c init_utils_run.c init_sysfs.c noinst_HEADERS=alsactl.h list.h init_sysdeps.c init_utils_string.c init_utils_run.c init_sysfs.c
udevrulesdir=/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
90-alsa-restore.rules 90-alsa-restore.rules

View file

@ -112,6 +112,12 @@ if test x"$alsaconf" = xtrue; then
fi fi
AM_CONDITIONAL(USE_XMLTO, test x"$xmlto" = xyes) AM_CONDITIONAL(USE_XMLTO, test x"$xmlto" = xyes)
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"])
AC_SUBST(udevrulesdir)
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
if test x$alsamixer = xtrue; then if test x$alsamixer = xtrue; then