X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=config%2Fkernel.m4;h=2fb3fc91b6c5b35f1b825471238f08aacb7f84b3;hb=319a99a3d440480fe9c37f637cb9cac8e0f20ded;hp=c65c58cc0ff1416cb4188d8ed014dde0a5c6b6e8;hpb=739a1a82e0f366923e8d9bc8f9ad4b1c680a780b;p=zfs.git diff --git a/config/kernel.m4 b/config/kernel.m4 index c65c58c..2fb3fc9 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -4,6 +4,7 @@ dnl # AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL ZFS_AC_SPL + ZFS_AC_TEST_MODULE ZFS_AC_KERNEL_CONFIG ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS ZFS_AC_KERNEL_TYPE_FMODE_T @@ -86,7 +87,7 @@ dnl # AC_DEFUN([ZFS_AC_MODULE_SYMVERS], [ modpost=$LINUX/scripts/Makefile.modpost AC_MSG_CHECKING([kernel file name for module symbols]) - AS_IF([test -f "$modpost"], [ + AS_IF([test "x$enable_linux_builtin" != xyes -a -f "$modpost"], [ AS_IF([grep -q Modules.symvers $modpost], [ LINUX_SYMBOLS=Modules.symvers ], [ @@ -191,7 +192,13 @@ AC_DEFUN([ZFS_AC_KERNEL], [ ]) ], [ AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) + if test "x$enable_linux_builtin" != xyes; then + AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) + else + AC_MSG_ERROR([ + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree.]) + fi ]) AC_MSG_RESULT([$kernsrcver]) @@ -313,6 +320,25 @@ AC_DEFUN([ZFS_AC_SPL], [ ]) dnl # +dnl # Basic toolchain sanity check. +dnl # +AC_DEFUN([ZFS_AC_TEST_MODULE], + [AC_MSG_CHECKING([whether modules can be built]) + ZFS_LINUX_TRY_COMPILE([],[],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + if test "x$enable_linux_builtin" != xyes; then + AC_MSG_ERROR([*** Unable to build an empty module.]) + else + AC_MSG_ERROR([ + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree.]) + fi + ]) +]) + +dnl # dnl # Certain kernel build options are not supported. These must be dnl # detected at configure time and cause a build failure. Otherwise dnl # modules may be successfully built that behave incorrectly.