]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow building with PCRE to be explicitly disabled (mostly for travis)
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 4 Jan 2015 20:32:51 +0000 (15:32 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Jan 2015 01:50:31 +0000 (20:50 -0500)
configure
configure.ac

index f36cf9ef48c5a2e91aea7185fc7479be099f2a46..ea5d832bbcc240c2a128db7d4a2cd4c6a3ca7721 100755 (executable)
--- a/configure
+++ b/configure
@@ -767,6 +767,7 @@ with_cap_lib_dir
 with_cap_include_dir
 with_execinfo_lib_dir
 with_execinfo_include_dir
+with_pcre
 with_pcre_lib_dir
 with_pcre_include_dir
 with_regex
@@ -1459,6 +1460,7 @@ Optional Packages:
   --with-execinfo-include-dir=DIR
                           directory in which to look for execinfo include
                           files
+  --with-pcre             use libpcre (if available). (default=yes)
   --with-pcre-lib-dir=DIR directory in which to look for pcre library files
   --with-pcre-include-dir=DIR
                           directory in which to look for pcre include files
@@ -11189,6 +11191,22 @@ $as_echo "#define HAVE_EXECINFO 1" >>confdefs.h
   fi
 fi
 
+PCRE=yes
+
+# Check whether --with-pcre was given.
+if test "${with_pcre+set}" = set; then :
+  withval=$with_pcre;  case "$withval" in
+    no)
+    PCRE=no
+       ;;
+    yes)
+    PCRE=yes
+       ;;
+  esac
+
+fi
+
+
 pcre_lib_dir=
 
 # Check whether --with-pcre-lib-dir was given.
@@ -11240,7 +11258,7 @@ if test "${with_regex+set}" = set; then :
 fi
 
 
-if test "x$REGEX" = "x"; then
+if test "x$REGEX" != "xno" && test "x$PCRE" != "xno"; then
   smart_try_dir=$pcre_include_dir
 
 
index d3ce70725e15ed9e10441419949e5d73882f5479..cb66aa093038f553eb2cf85c3351af7e99da956e 100644 (file)
@@ -1714,11 +1714,23 @@ if test "x$ac_cv_header_execinfo_h" = "xyes"; then
 fi
 
 dnl #
-dnl #  Check for regular expression support, if were using PCRE it MUST be included
-dnl #  before all others, else we seem to still pickup the posix symbols for regcomp
-dnl #  and regexec, which results in crashes as soon as we call any posix regex
-dnl #  functions.
+dnl #  Check for regular expression support.
 dnl #
+dnl extra argument: --with-pcre
+PCRE=yes
+AC_ARG_WITH(pcre,
+[AS_HELP_STRING([--with-pcre],
+[use libpcre (if available). (default=yes)])],
+[ case "$withval" in
+    no)
+    PCRE=no
+       ;;
+    yes)
+    PCRE=yes
+       ;;
+  esac ]
+)
+
 dnl extra argument: --with-pcre-lib-dir
 pcre_lib_dir=
 AC_ARG_WITH(pcre-lib-dir,
@@ -1770,7 +1782,7 @@ AC_ARG_WITH(regex,
 dnl #
 dnl #  First look for PCRE
 dnl #
-if test "x$REGEX" = "x"; then
+if test "x$REGEX" != "xno" && test "x$PCRE" != "xno"; then
   smart_try_dir=$pcre_include_dir
   FR_SMART_CHECK_INCLUDE(pcre.h)
   if test "x$ac_cv_header_pcre_h" = "xyes"; then