summaryrefslogtreecommitdiffstats
path: root/patches/valgrind-3.14.0/0002-make-kernel-version-a-autoconf-cache-variable.patch
blob: 9142dcf2ea485ea8a385272371bf0cb25450e62a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Mon, 8 Aug 2011 08:57:32 +0200
Subject: [PATCH] make kernel version a autoconf cache variable

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 configure.ac | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 935474f8b88b..0dffe27862ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,16 +341,17 @@ case "${host_os}" in
         # Ok, this is linux. Check the kernel version
         AC_MSG_CHECKING([for the kernel version])
 
-        kernel=`uname -r`
+        AC_CACHE_VAL([valgrind_cv_sys_kernel_version],
+	    [valgrind_cv_sys_kernel_version=`uname -r`])
 
-        case "${kernel}" in
+        case "${valgrind_cv_sys_kernel_version}" in
              0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*) 
-        	    AC_MSG_RESULT([unsupported (${kernel})])
-        	    AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6])
+		    AC_MSG_RESULT([unsupported (${valgrind_cv_sys_kernel_version})])
+		    AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6])
         	    ;;
 
              *)
-        	    AC_MSG_RESULT([2.6 or later (${kernel})])
+		    AC_MSG_RESULT([2.6 or later (${valgrind_cv_sys_kernel_version})])
                     ;;
         esac