diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-06 21:28:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-06 21:28:59 +0300 |
commit | 02204cfb8310c3adea07b93ab200b0609f72f26c (patch) | |
tree | cbe6b767c743d64faa493cd5a06e6f8c00d779ab /configure.in | |
parent | dfdf6b91839c88d9ca1071d63337d33757a87f4c (diff) | |
parent | 2f4b1d7f15c8835545c791f09bac94bfae7e43b8 (diff) | |
download | hercules-02204cfb8310c3adea07b93ab200b0609f72f26c.tar.gz hercules-02204cfb8310c3adea07b93ab200b0609f72f26c.tar.bz2 hercules-02204cfb8310c3adea07b93ab200b0609f72f26c.tar.xz hercules-02204cfb8310c3adea07b93ab200b0609f72f26c.zip |
Merge pull request #1143 from MishimaHaruna/usrlocal
Improved ./configure on systems that rely on /usr/local
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/configure.in b/configure.in index b4a5a110c..c8bc3a864 100644 --- a/configure.in +++ b/configure.in @@ -443,27 +443,6 @@ AC_ARG_WITH( ) -# -# 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. # @@ -481,6 +460,18 @@ 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]])], , @@ -1161,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])]) # @@ -1292,7 +1279,8 @@ AC_SUBST([MYSQL_LIBS]) # AC_MSG_CHECKING([PCRE library]) -AC_CHECK_LIB(pcre, pcre_study, , AC_MSG_ERROR([PCRE not found or incompatible])) +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 |