mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
allow-disabling-kernel-module-compilation-20010705
in response to reports from hartmans@mekinok.com and zacheiss@mit.edu will also autodisable for linux if no --with-linux-kernel-headers specified and none found
This commit is contained in:
parent
290ee43295
commit
62994d919d
@ -28,6 +28,8 @@ LIB_AFSDB=@LIB_AFSDB@
|
||||
WITH_OBSOLETE=@WITH_OBSOLETE@
|
||||
WITH_INSECURE=@WITH_INSECURE@
|
||||
|
||||
ENABLE_KERNEL_MODULE=@ENABLE_KERNEL_MODULE@
|
||||
|
||||
# To compile AFS from scratch in the src tree run "make SYS_NAME=<type>".
|
||||
# This recursively calls "make install ..." and does not depend on the
|
||||
# existence of any non-standard programs.
|
||||
@ -375,7 +377,7 @@ libadmin: libafsauthent bozo
|
||||
echo Not building MT libadmin for ${SYS_NAME} ;; \
|
||||
esac
|
||||
|
||||
finale: project cmd comerr afsd allrcmds butc tbutc libafs libuafs audit kauth log package \
|
||||
finale: project cmd comerr afsd allrcmds butc tbutc @ENABLE_KERNEL_MODULE@ libuafs audit kauth log package \
|
||||
ptserver scout bu_utils ubik uss bozo vfsck volser \
|
||||
venus update xstat afsmonitor dauth tests libafsrpc \
|
||||
libafsauthent libadmin
|
||||
|
52
configure.in
52
configure.in
@ -3,7 +3,7 @@ AM_INIT_AUTOMAKE(openafs,devel)
|
||||
AC_CANONICAL_HOST
|
||||
AC_CONFIG_HEADER(src/config/afsconfig.h)
|
||||
|
||||
#BOZO_SAVE_CORES BOS_RESTRICTED_MODE BOS_NEW_CONFIG pam sia BITMAP_LATER FAST_RESTART
|
||||
#BOZO_SAVE_CORES BOS_RESTRICTED_MODE BOS_NEW_CONFIG pam sia
|
||||
AC_ARG_WITH(afs-sysname,
|
||||
[ --with-afs-sysname=sys use sys for the afs sysname]
|
||||
)
|
||||
@ -24,6 +24,9 @@ AC_ARG_ENABLE( bitmap-later,
|
||||
AC_ARG_WITH(linux-kernel-headers,
|
||||
[ --with-linux-kernel-headers=path use the kernel headers found at path(optional, defaults to /usr/src/linux)]
|
||||
)
|
||||
AC_ARG_ENABLE(kernel-module,
|
||||
[ --disable-kernel-module disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
|
||||
)
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
@ -53,26 +56,34 @@ system=$host
|
||||
case $system in
|
||||
*-linux*)
|
||||
MKAFS_OSTYPE=LINUX
|
||||
if test "x$with_linux_kernel_headers" != "x"; then
|
||||
LINUX_KERNEL_PATH="$with_linux_kernel_headers"
|
||||
else
|
||||
LINUX_KERNEL_PATH="/usr/src/linux"
|
||||
fi
|
||||
if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
|
||||
if test "x$linux_kvers" = "x"; then
|
||||
AC_MSG_ERROR(Linux headers lack version definition)
|
||||
exit 1
|
||||
if test "x$enable_kernel_module" = "xyes"; then
|
||||
if test "x$with_linux_kernel_headers" != "x"; then
|
||||
LINUX_KERNEL_PATH="$with_linux_kernel_headers"
|
||||
else
|
||||
LINUX_VERSION="$linux_kvers"
|
||||
LINUX_KERNEL_PATH="/usr/src/linux"
|
||||
fi
|
||||
if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
|
||||
if test "x$linux_kvers" = "x"; then
|
||||
AC_MSG_ERROR(Linux headers lack version definition)
|
||||
exit 1
|
||||
else
|
||||
LINUX_VERSION="$linux_kvers"
|
||||
fi
|
||||
else
|
||||
if test "x$with_linux_kernel_headers" != "x"; then
|
||||
AC_MSG_ERROR(No linux headers found at $LINUX_KERNEL_PATH)
|
||||
exit 1
|
||||
else
|
||||
AC_MSG_WARN(No linux headers found at $LINUX_KERNEL_PATH so disabling kernel module)
|
||||
enable_kernel_module="no"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR(No linux headers found at $LINUX_KERNEL_PATH)
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT(linux)
|
||||
LINUX_FS_STRUCT_INODE_HAS_I_BYTES
|
||||
LINUX_INODE_SETATTR_RETURN_TYPE
|
||||
AC_MSG_RESULT(linux)
|
||||
if test "x$enable_kernel_module" = "xyes"; then
|
||||
LINUX_FS_STRUCT_INODE_HAS_I_BYTES
|
||||
LINUX_INODE_SETATTR_RETURN_TYPE
|
||||
fi
|
||||
;;
|
||||
*-solaris*)
|
||||
MKAFS_OSTYPE=SOLARIS
|
||||
@ -227,7 +238,12 @@ AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h)
|
||||
|
||||
AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec)
|
||||
|
||||
if test "x$enable_kernel_module" = "xyes"; then
|
||||
ENABLE_KERNEL_MODULE=libafs
|
||||
fi
|
||||
|
||||
AC_SUBST(AFS_SYSNAME)
|
||||
AC_SUBST(ENABLE_KERNEL_MODULE)
|
||||
AC_SUBST(LIB_AFSDB)
|
||||
AC_SUBST(LINUX_KERNEL_PATH)
|
||||
AC_SUBST(LINUX_VERSION)
|
||||
|
Loading…
Reference in New Issue
Block a user