summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-16 23:16:54 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-21 19:39:37 +0300
commit5ce1b0ec7c0a8267bba7b163af5c7e4556fb3390 (patch)
treef219810e9bfd6bb0f069c28234b1ea6c84502c40 /configure
parent0ed2d09e9aa88af01698707fd701363bdbd92b4b (diff)
downloadhercules-5ce1b0ec7c0a8267bba7b163af5c7e4556fb3390.tar.gz
hercules-5ce1b0ec7c0a8267bba7b163af5c7e4556fb3390.tar.bz2
hercules-5ce1b0ec7c0a8267bba7b163af5c7e4556fb3390.tar.xz
hercules-5ce1b0ec7c0a8267bba7b163af5c7e4556fb3390.zip
Enable pcre by default in configure and show error if pcre missing.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure131
1 files changed, 12 insertions, 119 deletions
diff --git a/configure b/configure
index f9baddbbb..5f46bf0df 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 5a3f06b.
+# From configure.in e2391ea.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -627,9 +627,6 @@ HAVE_PERL
HAVE_DOXYGEN
PLUGINSTATIC
STATIC
-PCRE_CFLAGS
-PCRE_LIBS
-HAVE_PCRE
MYSQL_LIBS
MYSQL_CFLAGS
MYSQL_VERSION
@@ -711,7 +708,6 @@ with_maxconn
with_mysql
with_MYSQL_CFLAGS
with_MYSQL_LIBS
-with_pcre
with_zlib
'
ac_precious_vars='build_alias
@@ -1391,9 +1387,6 @@ Optional Packages:
"mysql_config --include")
--with-MYSQL_LIBS=ARG specify MYSQL_LIBS manually (instead of using
"mysql_config --libs")
- --with-pcre[=ARG] use PCRE library, optionally specify the full path
- of pcre installation directory (by default pcre is
- used if found)
--with-zlib=DIR root directory path of zlib installation (defaults
to /usr/local or /usr if not found in /usr/local).
Assumes that the header files are in DIR/include and
@@ -3819,33 +3812,6 @@ fi
#
-# Enable/disable PCRE and optionally specify the path (optional library)
-#
-
-# Check whether --with-pcre was given.
-if test "${with_pcre+set}" = set; then :
- withval=$with_pcre;
- if test "$withval" = "no" ; then
- want_pcre="no"
- else
- want_pcre="yes"
- require_pcre="yes"
- if test "$withval" != "yes" ; then
- if test ! -d "$withval" ; then
- as_fn_error $? "$withval is not a directoy" "$LINENO" 5
- fi
- PCRE_HOME="$withval"
- fi
- fi
-
-else
- want_pcre="yes" require_pcre="no"
-
-fi
-
-
-
-#
# Specify the path of the zlib library (required library)
#
@@ -8127,16 +8093,10 @@ fi
#
# PCRE library (optional)
#
-##TODO PCRE version
-PCRE_LIBS=""
-PCRE_CFLAGS=""
-if test "$want_pcre" = "no" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ignoring PCRE (optional)" >&5
-$as_echo "$as_me: ignoring PCRE (optional)" >&6;}
-else
- if test -z "$PCRE_HOME" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_study in -lpcre" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PCRE library" >&5
+$as_echo_n "checking PCRE library... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_study in -lpcre" >&5
$as_echo_n "checking for pcre_study in -lpcre... " >&6; }
if ${ac_cv_lib_pcre_pcre_study+:} false; then :
$as_echo_n "(cached) " >&6
@@ -8173,84 +8133,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_study" >&5
$as_echo "$ac_cv_lib_pcre_pcre_study" >&6; }
if test "x$ac_cv_lib_pcre_pcre_study" = xyes; then :
- HAVE_PCRE="yes"
-fi
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPCRE 1
+_ACEOF
- if test "$HAVE_PCRE" = "yes" ; then
- PCRE_LIBS="-lpcre"
- PCRE_CFLAGS="-DPCRE_SUPPORT"
- fi
- else
- PCRE_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$PCRE_HOME/lib"
- PCRE_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$PCRE_HOME/include"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
-$as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
-if ${ac_cv_lib_pcre_pcre_compile+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpcre $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ LIBS="-lpcre $LIBS"
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pcre_compile ();
-int
-main ()
-{
-return pcre_compile ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pcre_pcre_compile=yes
else
- ac_cv_lib_pcre_pcre_compile=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
-$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
-if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
- HAVE_PCRE="yes"
-fi
-
- CPPFLAGS="$PCRE_OLD_CPPFLAGS"
- LDFLAGS="$PCRE_OLD_LDFLAGS"
- if test "$HAVE_PCRE" = "yes" ; then
- PCRE_LIBS="-L$PCRE_HOME/lib -lpcre"
- test -d "$PCRE_HOME/include" && PCRE_CFLAGS="-I$PCRE_HOME/include -DPCRE_SUPPORT"
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking PCRE library (optional)" >&5
-$as_echo_n "checking PCRE library (optional)... " >&6; }
- if test "$HAVE_PCRE" = "yes" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- if test "$require_pcre" = "yes" ; then
- as_fn_error $? "PCRE not found or incompatible (requested)" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: disabling PCRE (optional)" >&5
-$as_echo "$as_me: disabling PCRE (optional)" >&6;}
- fi
- fi
+ as_fn_error $? "PCRE not found or incompatible" "$LINENO" 5
fi
-
-
-
-
+CFLAGS="$CFLAGS -DPCRE_SUPPORT"
#
# static Support test
@@ -8264,9 +8157,9 @@ if test "$enable_static" != "no" ; then
OLD_LDFLAGS="$LDFLAGS"
OLD_LIBS="$LIBS"
- CFLAGS="$OLD_CFLAGS $MYSQL_CFLAGS $PCRE_CFLAGS -static"
+ CFLAGS="$OLD_CFLAGS $MYSQL_CFLAGS -static"
LDFLAGS="$OLD_LDFLAGS -static"
- LIBS="$OLD_LIBS $MYSQL_LIBS $PCRE_LIBS"
+ LIBS="$OLD_LIBS $MYSQL_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -static" >&5
$as_echo_n "checking whether $CC supports -static... " >&6; }