summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2009-09-01 16:29:46 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2009-09-01 16:29:46 +0000
commit1dde538aa47f1971bcc1b62c4d151e9b0ab91c39 (patch)
treee1b8460b9154a33f30ab988363445fd143d21f2b
parentdbbbb5f823318e1665b0ae6fb2f7c12d71f66e84 (diff)
downloadpcre-1dde538aa47f1971bcc1b62c4d151e9b0ab91c39.tar.gz
Add -DPCRE_STATIC to configuration files when no shared library is built.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@430 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac3
-rw-r--r--libpcre.pc.in2
-rw-r--r--libpcrecpp.pc.in2
-rw-r--r--libpcreposix.pc.in2
-rw-r--r--pcre-config.in2
6 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cd16d76..77fd807 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,10 @@ Version 8.00 ??-???-??
so that the demonstration program is easily available in environments where
PCRE has not been installed from source.
+14. Arranged to add -DPCRE_STATIC to cflags in libpcre.pc, libpcreposix.cp,
+ libpcrecpp.pc and pcre-config when PCRE is not compiled as a shared
+ library.
+
Version 7.9 11-Apr-09
---------------------
diff --git a/configure.ac b/configure.ac
index b835571..a4bda76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -379,10 +379,13 @@ AC_CHECK_LIB([readline], [readline], [HAVE_LIB_READLINE=1])
# This facilitates -ansi builds under Linux
dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc])
+PCRE_STATIC_CFLAG=""
if test "x$enable_shared" = "xno" ; then
AC_DEFINE([PCRE_STATIC], [1], [
Define if linking statically (TODO: make nice with Libtool)])
+ PCRE_STATIC_CFLAG="-DPCRE_STATIC"
fi
+AC_SUBST(PCRE_STATIC_CFLAG)
# Here is where pcre specific defines are handled
diff --git a/libpcre.pc.in b/libpcre.pc.in
index 0683cb0..2c3fa19 100644
--- a/libpcre.pc.in
+++ b/libpcre.pc.in
@@ -9,4 +9,4 @@ Name: libpcre
Description: PCRE - Perl compatible regular expressions C library
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre
-Cflags: -I${includedir}
+Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
diff --git a/libpcrecpp.pc.in b/libpcrecpp.pc.in
index 204a144..ef006fe 100644
--- a/libpcrecpp.pc.in
+++ b/libpcrecpp.pc.in
@@ -9,4 +9,4 @@ Name: libpcrecpp
Description: PCRECPP - C++ wrapper for PCRE
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre -lpcrecpp
-Cflags: -I${includedir}
+Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
diff --git a/libpcreposix.pc.in b/libpcreposix.pc.in
index 73bae52..c6c0b0c 100644
--- a/libpcreposix.pc.in
+++ b/libpcreposix.pc.in
@@ -9,5 +9,5 @@ Name: libpcreposix
Description: PCREPosix - Posix compatible interface to libpcre
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcreposix
-Cflags: -I${includedir}
+Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
Requires.private: libpcre
diff --git a/pcre-config.in b/pcre-config.in
index 3b52101..a555744 100644
--- a/pcre-config.in
+++ b/pcre-config.in
@@ -52,7 +52,7 @@ while test $# -gt 0; do
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
fi
- echo $includes
+ echo $includes @PCRE_STATIC_CFLAG@
;;
--libs-posix)
echo -L@libdir@$libR -lpcreposix -lpcre