freebsd-nq/config/user-udev.m4
Brian Behlendorf 06346cc5b5
Autoconf 2.70 compatibility
Several m4 macros have been retired in autoconf 2.70.  Update the
the build system to use the new macros provided to replace them.

* Replaced AC_HELP_STRING with AS_HELP_STRING.

* Replaced AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.

* Replaced AC_CANONICAL_SYSTEM with AC_CANONICAL_TARGET

* Replaced AC_PROG_LIBTOOL with LT_INIT

* $CPP is not defined in ZFS_AC_KERNEL and really shouldn't be
  directly used like this.  Replace it with an $AWK command
  to extract the kernel source version.

Reviewed-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #11413 
Closes #11419
2021-01-02 16:55:55 -08:00

30 lines
724 B
Plaintext

AC_DEFUN([ZFS_AC_CONFIG_USER_UDEV], [
AC_MSG_CHECKING(for udev directories)
AC_ARG_WITH(udevdir,
AS_HELP_STRING([--with-udevdir=DIR],
[install udev helpers @<:@default=check@:>@]),
[udevdir=$withval],
[udevdir=check])
AS_IF([test "x$udevdir" = xcheck], [
path1=/lib/udev
path2=/usr/lib/udev
default=$path2
AS_IF([test -d "$path1"], [udevdir="$path1"], [
AS_IF([test -d "$path2"], [udevdir="$path2"],
[udevdir="$default"])
])
])
AC_ARG_WITH(udevruledir,
AS_HELP_STRING([--with-udevruledir=DIR],
[install udev rules [[UDEVDIR/rules.d]]]),
[udevruledir=$withval],
[udevruledir="${udevdir}/rules.d"])
AC_SUBST(udevdir)
AC_SUBST(udevruledir)
AC_MSG_RESULT([$udevdir;$udevruledir])
])