[pcre-dev] [PATCH] Add configure flag for autodetection of J…

Αρχική Σελίδα
Delete this message
Συντάκτης: Shea Levy
Ημερομηνία:  
Προς: pcre-dev
Αντικείμενο: [pcre-dev] [PATCH] Add configure flag for autodetection of JIT support.
Index: configure.ac
===================================================================
--- configure.ac    (revision 1726)
+++ configure.ac    (working copy)
@@ -155,6 +155,16 @@
                              [enable Just-In-Time compiling support]),
               , enable_jit=no)


+if test "$enable_jit" = "auto"; then
+  AC_LANG(C)
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+  #define SLJIT_CONFIG_AUTO 1
+  #include "sljit/sljitConfigInternal.h"
+  #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+  #error unsupported
+  #endif]])], enable_jit=yes, enable_jit=no)
+fi
+
 # Handle --disable-pcregrep-jit (enabled by default)
 AC_ARG_ENABLE(pcregrep-jit,
               AS_HELP_STRING([--disable-pcregrep-jit],