diff options
author | Haru <haru@dotalux.com> | 2016-02-06 18:13:03 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-06 18:51:22 +0100 |
commit | 8ca4506ee9ad4bfd490d1e9a7ab2cfb02f1ba3d7 (patch) | |
tree | 65d9aaa4c0c0695fe71c0aaa047d3eb4dafc49e0 /configure | |
parent | 730fede2da1ca573ff716c77a5d9b1d0989adc6e (diff) | |
download | hercules-8ca4506ee9ad4bfd490d1e9a7ab2cfb02f1ba3d7.tar.gz hercules-8ca4506ee9ad4bfd490d1e9a7ab2cfb02f1ba3d7.tar.bz2 hercules-8ca4506ee9ad4bfd490d1e9a7ab2cfb02f1ba3d7.tar.xz hercules-8ca4506ee9ad4bfd490d1e9a7ab2cfb02f1ba3d7.zip |
Changed PCRE to properly use the system-provided pcre.h
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 57 |
1 files changed, 38 insertions, 19 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in dfdf6b9. +# From configure.in 730fede. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -8108,13 +8108,20 @@ fi { $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 : +ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default" +if test "x$ac_cv_header_pcre_h" = xyes; then : + +else + as_fn_error $? "PCRE header not found" "$LINENO" 5 +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_study" >&5 +$as_echo_n "checking for library containing pcre_study... " >&6; } +if ${ac_cv_search_pcre_study+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpcre $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8133,23 +8140,35 @@ return pcre_study (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pcre_pcre_study=yes -else - ac_cv_lib_pcre_pcre_study=no +for ac_lib in '' pcre; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_pcre_study=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_pcre_study+:} false; then : + break 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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPCRE 1 -_ACEOF +done +if ${ac_cv_search_pcre_study+:} false; then : - LIBS="-lpcre $LIBS" +else + ac_cv_search_pcre_study=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre_study" >&5 +$as_echo "$ac_cv_search_pcre_study" >&6; } +ac_res=$ac_cv_search_pcre_study +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "PCRE not found or incompatible" "$LINENO" 5 |