autoconf: Compat checks no longer support multiple files.
authorJesse Gross <jesse@nicira.com>
Wed, 3 Nov 2010 17:14:06 +0000 (10:14 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 3 Nov 2010 17:23:19 +0000 (10:23 -0700)
We now test that a file exists before grepping but that doesn't
work if there are multiple possible files.  For the one case that
needs this (kmemdup) break the test into two: check the first file
and if the pattern isn't found check the second file.

acinclude.m4

index 2296dbd979950b0a8c51559c94facef5d4fc4418..260812384eb995b43aca713683ee64094ef5d022 100644 (file)
@@ -191,8 +191,10 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [
   OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_warn_if_lro],
                   [OVS_DEFINE([HAVE_SKB_WARN_LRO])])
 
-  OVS_GREP_IFELSE([$KSRC26/include/linux/string.h $KSRC26/include/linux/slab.h],
-                  [kmemdup], [OVS_DEFINE([HAVE_KMEMDUP])])
+  OVS_GREP_IFELSE([$KSRC26/include/linux/string.h], [kmemdup],
+                  [OVS_DEFINE([HAVE_KMEMDUP])],
+                  [OVS_GREP_IFELSE([$KSRC26/include/linux/slab.h], [kmemdup],
+                                   [OVS_DEFINE([HAVE_KMEMDUP])])])
 
   OVS_GREP_IFELSE([$KSRC26/include/linux/types.h], [bool],
                   [OVS_DEFINE([HAVE_BOOL_TYPE])])