[4.1] 52d5d99 Use AC_COMPILE_IFELSE

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 14 15:15:05 CET 2016


commit 52d5d99394b09ec07873d2f09c16e7708f2a56f4
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu Nov 12 01:22:18 2015 +0000

    Use AC_COMPILE_IFELSE
    
    AC_PREPROC_IFELSE is frowned upon.  Take into account installations
    outside the compiler's default search path.

diff --git a/configure.ac b/configure.ac
index 4357c3c..d4f1923 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,7 +159,9 @@ AC_ARG_ENABLE(pcre-jit,
     [enable_pcre_jit=yes])
 if test "$enable_pcre_jit" = yes; then
   AC_MSG_CHECKING(for PCRE JIT usability)
-  AC_PREPROC_IFELSE(
+  save_CFLAGS="${CFLAGS}"
+  CFLAGS="${PCRE_CFLAGS}"
+  AC_COMPILE_IFELSE(
     [AC_LANG_PROGRAM([[#include "pcre.h"
                        #if PCRE_MAJOR != 8 || PCRE_MINOR < 32
                        #error no jit
@@ -169,6 +171,7 @@ if test "$enable_pcre_jit" = yes; then
     ],
     [AC_MSG_RESULT(no)]
   )
+  CFLAGS="${save_CFLAGS}"
 fi
 
 



More information about the varnish-commit mailing list