Fallback to strerror() when strerror_l() isn't available
[zfs.git] / config / user-udev.m4
blobe6120fc8fef615074fd87b32ee8e4a59bf0f52d7
1 AC_DEFUN([ZFS_AC_CONFIG_USER_UDEV], [
2         AC_MSG_CHECKING(for udev directories)
3         AC_ARG_WITH(udevdir,
4                 AS_HELP_STRING([--with-udevdir=DIR],
5                 [install udev helpers @<:@default=check@:>@]),
6                 [udevdir=$withval],
7                 [udevdir=check])
9         AS_IF([test "x$udevdir" = xcheck], [
10                 path1=/lib/udev
11                 path2=/usr/lib/udev
12                 default=$path2
14                 AS_IF([test -d "$path1"], [udevdir="$path1"], [
15                         AS_IF([test -d "$path2"], [udevdir="$path2"],
16                                 [udevdir="$default"])
17                 ])
18         ])
20         AC_ARG_WITH(udevruledir,
21                 AS_HELP_STRING([--with-udevruledir=DIR],
22                 [install udev rules [[UDEVDIR/rules.d]]]),
23                 [udevruledir=$withval],
24                 [udevruledir="${udevdir}/rules.d"])
26         AC_SUBST(udevdir)
27         AC_SUBST(udevruledir)
28         AC_MSG_RESULT([$udevdir;$udevruledir])