Cleanup configures pcre sljit test.

remotes/origin/master-1.1.x
Victor Julien 14 years ago
parent ece8e5444b
commit 6be38123f0

@ -294,32 +294,33 @@ AC_INIT(configure.in)
AC_ARG_ENABLE(pcre-sljit,
AS_HELP_STRING([--enable-pcre-sljit], [Enable experimental support for PCRE-sljit]),,[enable_pcre_sljit=no])
AS_IF([test "x$enable_pcre_sljit" = "xyes"], [
AC_MSG_CHECKING(for PCRE sljit support)
AC_TRY_COMPILE([ #include <pcre.h> ],
[ const char* regexstr = "(a|b|c|d)";
pcre *re;
const char *error;
pcre_extra *extra;
int err_offset;
re = pcre_compile(regexstr,0, &error, &err_offset,NULL);
extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
if (!(extra->flags & PCRE_EXTRA_EXECUTABLE_FUNC)) {
printf("\nJIT compiler does not support: %s\n", regexstr);
}
return 0;],
[ pcre_sljit_available=yes ], [:]
)
if test "$pcre_sljit_available" = "yes"; then
AC_MSG_RESULT(yes)
CFLAGS="${CFLAGS} -D_PCRE_HAVE_SLJIT"
AC_MSG_CHECKING(for PCRE sljit support)
AC_TRY_COMPILE([ #include <pcre.h> ],
[ const char* regexstr = "(a|b|c|d)";
pcre *re;
const char *error;
pcre_extra *extra;
int err_offset;
re = pcre_compile(regexstr,0, &error, &err_offset,NULL);
extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
if (!(extra->flags & PCRE_EXTRA_EXECUTABLE_FUNC)) {
printf("\nJIT compiler does not support: %s\n", regexstr);
}
return 0;],
[ pcre_sljit_available=yes ], [:]
)
if test "x$pcre_sljit_available" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE([PCRE_HAVE_SLJIT], [1], [Pcre with JIT compiler support enabled])
else
AC_MSG_RESULT(no)
echo
echo " Error! --enable-pcre-sljit set but PCRE_STUDY_JIT_COMPILE not found"
echo " Make sure you use pcre found here "
echo " http://sljit.sourceforge.net/pcre.html"
echo
exit 1
AC_MSG_RESULT(no)
echo
echo " Error! --enable-pcre-sljit set but PCRE_STUDY_JIT_COMPILE not found"
echo " Make sure you use pcre found here "
echo " http://sljit.sourceforge.net/pcre.html"
echo
exit 1
fi
])

Loading…
Cancel
Save