summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libpcre/libpcre/out-of-tree.patch
blob: d56789615fccfdaafa32bd63b5d6c52ee5352bc6 (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
In out-of-tree builds the #include fails because $srcdir isn't in the include path.  Set CPPFLAGS so that it is.

Upstream-Status: Backport [r1750]
Signed-off-by: Ross Burton <ross.burton@intel.com>

Index: configure.ac
===================================================================
--- a/configure.ac	(revision 1749)
+++ b/configure.ac	(working copy)
@@ -159,6 +159,8 @@
 
 if test "$enable_jit" = "auto"; then
   AC_LANG(C)
+  SAVE_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS=-I$srcdir
   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
   #define SLJIT_CONFIG_AUTO 1
   #include "sljit/sljitConfigInternal.h"
@@ -165,6 +167,7 @@
   #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
   #error unsupported
   #endif]])], enable_jit=yes, enable_jit=no)
+  CPPFLAGS=$SAVE_CPPFLAGS
 fi
 
 # Handle --disable-pcregrep-jit (enabled by default)