1 From bb5cc9cee1963362fe56b4fac65fed4912da4215 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 30 Jul 2016 22:30:01 +0200
4 Subject: [PATCH] configure: add cache variable for Linux proc filesystem check
6 When cross-compiling, whether the /proc filesystem is available in the
7 build environment does not give any indication as to whether it will
8 be available in the execution environment.
10 This commit therefore adjust the AF_LINUX_PROCFS macro to use
11 AC_CACHE_CHECK(), so that an ac_cv_linux_procfs variable can be
12 preseeded in the environment to force the result of this check.
14 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 aclocal.m4 | 15 +++++----------
17 1 file changed, 5 insertions(+), 10 deletions(-)
19 diff --git a/aclocal.m4 b/aclocal.m4
20 index 2115204..333699c 100644
23 @@ -80,16 +80,11 @@ dnl
24 dnl Check for the Linux /proc filesystem
25 dnl --------------------------------------------------------------------------
26 AC_DEFUN(AF_LINUX_PROCFS,
27 -[AC_MSG_CHECKING(for Linux proc filesystem)
28 -if test "x`cat /proc/sys/kernel/ostype 2>&-`" = "xLinux"
34 -AC_MSG_RESULT($linux_procfs)
35 -if test $linux_procfs = yes
37 +[AC_CACHE_CHECK([for Linux proc filesystem], [ac_cv_linux_procfs],
38 + [ac_cv_linux_procfs=no
39 + test "x`cat /proc/sys/kernel/ostype 2>&-`" = "xLinux" && ac_cv_linux_procfs=yes])
40 + if test $ac_cv_linux_procfs = yes
42 AC_DEFINE(HAVE_LINUX_PROCFS, 1,
43 [Define if you have the Linux /proc filesystem.])