Linux: get sysname even if kernel module disabled

Fall back to `uname -r` if we aren't probing for kernel sources,
as we still need to know for the rest of the build.  While this
could be worked around by explicitly passing the sysname as an
argument, this seems friendlier.

Change-Id: I0db75ba5fc7d1f5ec08d27dfce6858b968b6ce28
Reviewed-on: http://gerrit.openafs.org/11552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Nathaniel Wesley Filardo 2014-10-19 02:42:08 -04:00 committed by Jeffrey Altman
parent b22c586bcd
commit c11c58646f

View File

@ -428,14 +428,18 @@ case $system in
SUBARCH=default SUBARCH=default
fi fi
AC_MSG_RESULT(linux) AC_MSG_RESULT(linux)
GUESS_LINUX_VERSION=
if test "x$enable_kernel_module" = "xyes"; then if test "x$enable_kernel_module" = "xyes"; then
case "$LINUX_VERSION" in GUESS_LINUX_VERSION=${LINUX_VERSION}
else
GUESS_LINUX_VERSION=`uname -r`
fi
case "$GUESS_LINUX_VERSION" in
2.2.*) AFS_SYSKVERS=22 ;; 2.2.*) AFS_SYSKVERS=22 ;;
2.4.*) AFS_SYSKVERS=24 ;; 2.4.*) AFS_SYSKVERS=24 ;;
2.6.* | 3.*) AFS_SYSKVERS=26 ;; 2.6.* | 3.*) AFS_SYSKVERS=26 ;;
*) AC_MSG_ERROR(Couldn't guess your Linux version [2]) ;; *) AC_MSG_ERROR(Couldn't guess your Linux version [2]) ;;
esac esac
fi
;; ;;
*-solaris*) *-solaris*)
MKAFS_OSTYPE=SOLARIS MKAFS_OSTYPE=SOLARIS