configure: detect udevdir via pkg-config, fallback to /lib/udev/rules.d

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Ivailo Monev 2013-11-16 14:00:19 +00:00 committed by Takashi Iwai
parent 54a459a884
commit 7d0c2801b3

View file

@ -120,8 +120,14 @@ 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"])
AS_HELP_STRING([--with-udev-rules-dir=DIR],[Directory where to install udev rules to (default=auto)]),
[udevrulesdir="$withval"],
[udevdir=$($PKG_CONFIG udev --variable=udevdir)
if test "x$udevdir" = "x"; then
udevrulesdir="/lib/udev/rules.d"
else
udevrulesdir="$udevdir/rules.d"
fi])
AC_SUBST(udevrulesdir)
dnl Checks for header files.