summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in117
1 files changed, 20 insertions, 97 deletions
diff --git a/configure.in b/configure.in
index bfcc27322..c8bc3a864 100644
--- a/configure.in
+++ b/configure.in
@@ -443,54 +443,6 @@ AC_ARG_WITH(
)
-#
-# Enable/disable PCRE and optionally specify the path (optional library)
-#
-AC_ARG_WITH(
- [pcre],
- AC_HELP_STRING(
- [--with-pcre@<:@=ARG@:>@],
- [use PCRE library, optionally specify the full path of pcre installation directory (by default pcre is used if found)]
- ),
- [
- 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
- AC_MSG_ERROR([$withval is not a directoy])
- fi
- PCRE_HOME="$withval"
- fi
- fi
- ],
- [want_pcre="yes" require_pcre="no"]
-)
-
-
-#
-# Specify the path of the zlib library (required library)
-#
-AC_ARG_WITH(
- [zlib],
- AC_HELP_STRING(
- [--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 the library files are in DIR/lib]
- ),
- [
- test -n "$withval" && ZLIB_HOME="$withval"
- ],
- [
- ZLIB_HOME=/usr/local
- test ! -f "${ZLIB_HOME}/include/zlib.h" && ZLIB_HOME=/usr
- ]
-)
-
-
-
###############################################################################
# Check for programs and types.
#
@@ -504,10 +456,22 @@ AC_PATH_PROG(AR, ar)
AC_LANG([C])
-CFLAGS="$CFLAGS -pipe -ffast-math -fvisibility=hidden -Wall -Wextra -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
LDFLAGS="$LDFLAGS"
+# Add /usr/local to the library and header search path, where appropriate
+case `uname` in
+ Darwin*|*BSD*)
+ if test -d /usr/local/include ; then
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ fi
+ if test -d /usr/local/lib ; then
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ fi
+ ;;
+esac
+
AC_C_BIGENDIAN(
[AC_MSG_ERROR([[bigendian is not supported... stopping]])],
,
@@ -1188,12 +1152,8 @@ fi
#
# zlib library (required)
#
-if test -n "${ZLIB_HOME}" ; then
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
- CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
-fi
-AC_SEARCH_LIBS([inflateEnd], [z], [],[AC_MSG_ERROR([zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR... stopping])])
-AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please specify the correct path with --with-zlib=DIR... stopping])])
+AC_SEARCH_LIBS([inflateEnd], [z], [],[AC_MSG_ERROR([zlib library not found or incompatible... stopping])])
+AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please specify the correct path with... stopping])])
#
@@ -1317,47 +1277,10 @@ AC_SUBST([MYSQL_LIBS])
#
# PCRE library (optional)
#
-##TODO PCRE version
-PCRE_LIBS=""
-PCRE_CFLAGS=""
-
-if test "$want_pcre" = "no" ; then
- AC_MSG_NOTICE([ignoring PCRE (optional)])
-else
- if test -z "$PCRE_HOME" ; then
- AC_CHECK_LIB([pcre], [pcre_study], [HAVE_PCRE="yes"], [])
- 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"
- AC_CHECK_LIB(pcre, pcre_compile, [HAVE_PCRE="yes"], [])
- 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
- AC_MSG_CHECKING([PCRE library (optional)])
- if test "$HAVE_PCRE" = "yes" ; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- if test "$require_pcre" = "yes" ; then
- AC_MSG_ERROR([PCRE not found or incompatible (requested)])
- else
- AC_MSG_NOTICE([disabling PCRE (optional)])
- fi
- fi
-fi
-
-AC_SUBST([HAVE_PCRE])
-AC_SUBST([PCRE_LIBS])
-AC_SUBST([PCRE_CFLAGS])
+AC_MSG_CHECKING([PCRE library])
+AC_CHECK_HEADER([pcre.h], [], [AC_MSG_ERROR([PCRE header not found])])
+AC_SEARCH_LIBS([pcre_study], [pcre], [], AC_MSG_ERROR([PCRE not found or incompatible]))
#
# static Support test
@@ -1371,9 +1294,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"
AC_MSG_CHECKING([whether $CC supports -static])
AC_RUN_IFELSE(