From 65fef7efba36dd75d41344d423283047ce07e818 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Wed, 12 Aug 2009 09:03:32 -0600 Subject: fix pcre build issues Reviewed by: nkinder (Thanks!) --- configure | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'configure') diff --git a/configure b/configure index fdf49b92..40767092 100755 --- a/configure +++ b/configure @@ -27005,28 +27005,8 @@ else echo "${ECHO_T}no" >&6 fi; -if test -z "$pcre_inc"; then - echo "$as_me:$LINENO: checking for pcre.h" >&5 -echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6 - if test -f "/usr/include/pcre.h"; then - echo "$as_me:$LINENO: result: using /usr/include/pcre.h" >&5 -echo "${ECHO_T}using /usr/include/pcre.h" >&6 - pcre_incdir="/usr/include" - pcre_inc="-I/usr/include" - pcre_lib='-L$(libdir)' - pcre_libdir='$(libdir)' - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: pcre not found, specify with --with-pcre." >&5 -echo "$as_me: error: pcre not found, specify with --with-pcre." >&2;} - { (exit 1); exit 1; }; } - fi -fi # # if PCRE is not found yet, try pkg-config - -# last resort if test -z "$pcre_inc" -o -z "$pcre_lib" -o -z "$pcre_libdir"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 @@ -27075,6 +27055,12 @@ echo $ECHO_N "checking for pcre with pkg-config... $ECHO_C" >&6 pcre_lib=`$PKG_CONFIG --libs-only-L pcre` pcre_libdir=`$PKG_CONFIG --libs-only-L pcre | sed -e s/-L// | sed -e s/\ .*$//` echo "$as_me:$LINENO: result: using system PCRE" >&5 +echo "${ECHO_T}using system PCRE" >&6 + elif $PKG_CONFIG --exists libpcre; then + pcre_inc=`$PKG_CONFIG --cflags-only-I libpcre` + pcre_lib=`$PKG_CONFIG --libs-only-L libpcre` + pcre_libdir=`$PKG_CONFIG --libs-only-L libpcre | sed -e s/-L// | sed -e s/\ .*$//` + echo "$as_me:$LINENO: result: using system PCRE" >&5 echo "${ECHO_T}using system PCRE" >&6 else { { echo "$as_me:$LINENO: error: PCRE not found, specify with --with-pcre." >&5 @@ -27084,6 +27070,25 @@ echo "$as_me: error: PCRE not found, specify with --with-pcre." >&2;} fi fi +if test -z "$pcre_inc"; then + echo "$as_me:$LINENO: checking for pcre.h" >&5 +echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6 + if test -f "/usr/include/pcre.h"; then + echo "$as_me:$LINENO: result: using /usr/include/pcre.h" >&5 +echo "${ECHO_T}using /usr/include/pcre.h" >&6 + pcre_incdir="/usr/include" + pcre_inc="-I/usr/include" + pcre_lib='-L$(libdir)' + pcre_libdir='$(libdir)' + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: pcre not found, specify with --with-pcre." >&5 +echo "$as_me: error: pcre not found, specify with --with-pcre." >&2;} + { (exit 1); exit 1; }; } + fi +fi + PACKAGE_BASE_VERSION=`echo $PACKAGE_VERSION | awk -F\. '{print $1"."$2}'` -- cgit