summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2009-08-12 09:03:32 -0600
committerRich Megginson <rmeggins@redhat.com>2009-08-12 09:10:43 -0600
commit65fef7efba36dd75d41344d423283047ce07e818 (patch)
tree388d6b69415d6c620802c433d11bd7e7db707cbe /m4
parent886d9b9f4fd9bfd72c2c9728f13b8db1ff2793b7 (diff)
downloadds-65fef7efba36dd75d41344d423283047ce07e818.tar.gz
ds-65fef7efba36dd75d41344d423283047ce07e818.tar.xz
ds-65fef7efba36dd75d41344d423283047ce07e818.zip
fix pcre build issues
Reviewed by: nkinder (Thanks!)
Diffstat (limited to 'm4')
-rw-r--r--m4/pcre.m437
1 files changed, 21 insertions, 16 deletions
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index f60123e2..6096108d 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -53,24 +53,8 @@ AC_ARG_WITH(pcre, [ --with-pcre=PATH Perl Compatible Regular Expression direc
],
AC_MSG_RESULT(no))
-dnl - check in system locations
-if test -z "$pcre_inc"; then
- AC_MSG_CHECKING(for pcre.h)
- if test -f "/usr/include/pcre.h"; then
- AC_MSG_RESULT([using /usr/include/pcre.h])
- pcre_incdir="/usr/include"
- pcre_inc="-I/usr/include"
- pcre_lib='-L$(libdir)'
- pcre_libdir='$(libdir)'
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([pcre not found, specify with --with-pcre.])
- 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
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_MSG_CHECKING(for pcre with pkg-config)
@@ -80,8 +64,29 @@ if test -z "$pcre_inc" -o -z "$pcre_lib" -o -z "$pcre_libdir"; then
pcre_lib=`$PKG_CONFIG --libs-only-L pcre`
pcre_libdir=`$PKG_CONFIG --libs-only-L pcre | sed -e s/-L// | sed -e s/\ .*$//`
AC_MSG_RESULT([using system PCRE])
+ 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/\ .*$//`
+ AC_MSG_RESULT([using system PCRE])
else
AC_MSG_ERROR([PCRE not found, specify with --with-pcre.])
fi
fi
fi
+
+dnl last resort
+dnl - check in system locations
+if test -z "$pcre_inc"; then
+ AC_MSG_CHECKING(for pcre.h)
+ if test -f "/usr/include/pcre.h"; then
+ AC_MSG_RESULT([using /usr/include/pcre.h])
+ pcre_incdir="/usr/include"
+ pcre_inc="-I/usr/include"
+ pcre_lib='-L$(libdir)'
+ pcre_libdir='$(libdir)'
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([pcre not found, specify with --with-pcre.])
+ fi
+fi