summaryrefslogtreecommitdiffstats
path: root/aclocal.m4
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-20 13:00:14 +0200
committerMartin Mares <mj@ucw.cz>2000-05-20 13:00:14 +0200
commit416e3ee4b07d9ed30ada45eee736d877efe139db (patch)
tree18b3641db4f6bf22a4d918d357781232780c1206 /aclocal.m4
parent2eca3b3a9ce8ea405f81cb1dbf55b79d3b2d3c18 (diff)
downloadbird-416e3ee4b07d9ed30ada45eee736d877efe139db.tar
bird-416e3ee4b07d9ed30ada45eee736d877efe139db.zip
Get Linux version from <linux/version.h>, not `uname -r`.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 4ec84d5..584173d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -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
+])])