diff options
author | Martin Mares <mj@ucw.cz> | 2000-05-20 11:00:14 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-05-20 11:00:14 +0000 |
commit | 416e3ee4b07d9ed30ada45eee736d877efe139db (patch) | |
tree | 18b3641db4f6bf22a4d918d357781232780c1206 /aclocal.m4 | |
parent | 2eca3b3a9ce8ea405f81cb1dbf55b79d3b2d3c18 (diff) |
Get Linux version from <linux/version.h>, not `uname -r`.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -128,3 +128,20 @@ if test "$bird_cv_struct_ip_mreqn" = yes ; then AC_DEFINE(HAVE_STRUCT_IP_MREQN) fi ]) + +AC_DEFUN(BIRD_CHECK_LINUX_VERSION, +[AC_CACHE_CHECK([Linux kernel version], bird_cv_sys_linux_version, [ +AC_REQUIRE_CPP()dnl +cat > conftest.$ac_ext <<EOF +[#]line __oline__ "configure" +#include "confdefs.h" +#include <linux/version.h> +VERSION: UTS_RELEASE +EOF +bird_cv_sys_linux_version=`eval "$ac_cpp conftest.$ac_ext" 2>&AC_FD_CC | sed '/^VERSION/!d;s/^VERSION: "//;s/".*//'` +rm -rf conftest* +if test -z "$bird_cv_sys_linux_version" ; then + AC_MSG_RESULT([unknown]) + AC_MSG_ERROR([Cannot determine kernel version]) +fi +])]) |