summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
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 4ec84d5b..584173d1 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
+])])