mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
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
This commit is contained in:
+5
-9
@@ -322,19 +322,15 @@ AC_DEFUN([ZFS_AC_KERNEL], [
|
||||
utsrelease2=$kernelbuild/include/linux/utsrelease.h
|
||||
utsrelease3=$kernelbuild/include/generated/utsrelease.h
|
||||
AS_IF([test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1], [
|
||||
utsrelease=linux/version.h
|
||||
utsrelease=$utsrelease1
|
||||
], [test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2], [
|
||||
utsrelease=linux/utsrelease.h
|
||||
utsrelease=$utsrelease2
|
||||
], [test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3], [
|
||||
utsrelease=generated/utsrelease.h
|
||||
utsrelease=$utsrelease3
|
||||
])
|
||||
|
||||
AS_IF([test "$utsrelease"], [
|
||||
kernsrcver=`(echo "#include <$utsrelease>";
|
||||
echo "kernsrcver=UTS_RELEASE") |
|
||||
${CPP} -I $kernelbuild/include - |
|
||||
grep "^kernsrcver=" | cut -d \" -f 2`
|
||||
|
||||
AS_IF([test -n "$utsrelease"], [
|
||||
kernsrcver=$($AWK '/UTS_RELEASE/ { gsub(/"/, "", $[3]); print $[3] }' $utsrelease)
|
||||
AS_IF([test -z "$kernsrcver"], [
|
||||
AC_MSG_RESULT([Not found])
|
||||
AC_MSG_ERROR([
|
||||
|
||||
Reference in New Issue
Block a user