# HG changeset patch # User Florian Pose # Date 1168854547 0 # Node ID c715766e0f8114e026efc7fe5c21a9e3c1279a41 # Parent 330f7f8da9790e4e843277ba2c7f9b57c4c1e5af Fixed bad configure behavior with complex kernel version strings. diff -r 330f7f8da979 -r c715766e0f81 configure.ac --- a/configure.ac Fri Jan 12 15:18:11 2007 +0000 +++ b/configure.ac Mon Jan 15 09:49:07 2007 +0000 @@ -50,10 +50,10 @@ fi # Try to get kernel release string -if test -r ${sourcedir}/.kernelrelease; then +if test -r ${sourcedir}/include/config/kernel.release; then + kernelrelease=`cat $sourcedir/include/config/kernel.release` +elif test -r ${sourcedir}/.kernelrelease; then kernelrelease=`cat $sourcedir/.kernelrelease` -elif test -r ${sourcedir}/include/config/kernel.release; then - kernelrelease=`cat $sourcedir/include/config/kernel.release` elif test -r ${sourcedir}/include/linux/utsrelease.h; then hdr=${sourcedir}/include/linux/utsrelease.h kernelrelease=`grep UTS_RELEASE $hdr | cut -d " " -f 3- | tr -d \"` @@ -68,7 +68,7 @@ fi # Extract three numbers from kernel release string -linuxversion=`echo $kernelrelease | grep -oE [[0-9]]+\.[[0-9]]+\.[[0-9]]+` +linuxversion=`echo $kernelrelease | grep -oE "^[[0-9]]+\.[[0-9]]+\.[[0-9]]+"` AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir]) AC_SUBST(LINUX_KERNEL_RELEASE,[$kernelrelease])