From 6a6084f8fd44dc65dce40536198ec5d282deb126 Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Sat, 12 May 2012 09:11:28 -0400 Subject: pcre-config support. Remove a couple of stray references to PCRE_CFLAGS too (dating from when PCRE was bundled). --- src/OS/Makefile-SunOS4 | 5 ----- src/OS/Makefile-mips | 1 - src/scripts/Configure-Makefile | 15 ++++++++++++++- src/src/EDITME | 9 ++++++--- 4 files changed, 20 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/OS/Makefile-SunOS4 b/src/OS/Makefile-SunOS4 index 63db9c5df..c876998e5 100644 --- a/src/OS/Makefile-SunOS4 +++ b/src/OS/Makefile-SunOS4 @@ -2,11 +2,6 @@ CFLAGS=-O -# Don't need -DSTRERROR_FROM_ERRLIST in PCRE_CFLAGS, because it is in os.h -# for SunOS4, which gets included for pcre. - -PCRE_CFLAGS=-DUSE_BCOPY - CHOWN_COMMAND=/usr/etc/chown HOSTNAME_COMMAND=/usr/bin/hostname EXIT_FAILURE=1 diff --git a/src/OS/Makefile-mips b/src/OS/Makefile-mips index dbc101cd6..ff3313937 100644 --- a/src/OS/Makefile-mips +++ b/src/OS/Makefile-mips @@ -8,7 +8,6 @@ LIBS=-liberty -lm XINCLUDE=-I/usr/X11R6/include CFLAGS=-O -PCRE_CFLAGS=-DUSE_BCOPY -DSTRERROR_FROM_ERRLIST EXIWHAT_PS_ARG=-ax EXIWHAT_EGREP_ARG='/exim( |$$)' diff --git a/src/scripts/Configure-Makefile b/src/scripts/Configure-Makefile index 5ef0ff7f0..3e901e6a6 100755 --- a/src/scripts/Configure-Makefile +++ b/src/scripts/Configure-Makefile @@ -117,7 +117,7 @@ done >> $mft || exit 1 egrep "^[$st]*(AUTH|LOOKUP)_[A-Z0-9_]*[$st]*=[$st]*" $mft | \ sed "s/[$st]*=/='/" | \ sed "s/\$/'/" > $mftt -egrep "^[$st]*((USE_(OPENSSL|GNUTLS)_PC)|SUPPORT_TLS|USE_GNUTLS)[$st]*=[$st]*" $mft | \ +egrep "^[$st]*((USE_(OPENSSL|GNUTLS)_PC)|SUPPORT_TLS|USE_GNUTLS|PCRE_CONFIG)[$st]*=[$st]*" $mft | \ sed "s/[$st]*=/='/" | \ sed "s/\$/'/" >> $mftt if test -s $mftt @@ -173,6 +173,19 @@ then fi ;; + PCRE_CONFIG) + case $PCRE_CONFIG in + yes|YES|y|Y) + cflags=`pcre-config --cflags` + libs=`pcre-config --libs` + if [ ".$cflags" != "." ]; then + echo "INCLUDE += $cflags" + fi + echo "PCRE_LIBS=$libs" + ;; + esac + ;; + esac done echo "# End of pkg-config fixups" diff --git a/src/src/EDITME b/src/src/EDITME index f247f44a9..d972e9c15 100644 --- a/src/src/EDITME +++ b/src/src/EDITME @@ -342,10 +342,13 @@ LOOKUP_DNSDB=yes # In either case you must specify the library link info here. If the # PCRE header files are not in the standard search path you must also # modify the INCLUDE path (above) -# The default setting of PCRE_LIBS should work on the vast majority of -# systems +# +# Use PCRE_CONFIG to query the pcre-config command (first found in $PATH) +# to find the include files and libraries, else use PCRE_LIBS and set INCLUDE +# too if needed. -PCRE_LIBS=-lpcre +# PCRE_CONFIG=yes +# PCRE_LIBS=-lpcre #------------------------------------------------------------------------------ -- cgit v1.2.3