From: Arran Cudbard-Bell Date: Sun, 4 Jan 2015 20:32:51 +0000 (-0500) Subject: Allow building with PCRE to be explicitly disabled (mostly for travis) X-Git-Tag: release_3_0_7~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a339319f5b975b560449c886cb1f647f8dcb87a;p=thirdparty%2Ffreeradius-server.git Allow building with PCRE to be explicitly disabled (mostly for travis) --- diff --git a/configure b/configure index f36cf9ef48c..ea5d832bbcc 100755 --- 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 diff --git a/configure.ac b/configure.ac index d3ce70725e1..cb66aa09303 100644 --- a/configure.ac +++ b/configure.ac @@ -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