Revision: 430
http://vcs.pcre.org/viewvc?view=rev&revision=430
Author: ph10
Date: 2009-09-01 17:29:46 +0100 (Tue, 01 Sep 2009)
Log Message:
-----------
Add -DPCRE_STATIC to configuration files when no shared library is built.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/configure.ac
code/trunk/libpcre.pc.in
code/trunk/libpcrecpp.pc.in
code/trunk/libpcreposix.pc.in
code/trunk/pcre-config.in
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2009-09-01 16:10:16 UTC (rev 429)
+++ code/trunk/ChangeLog 2009-09-01 16:29:46 UTC (rev 430)
@@ -76,6 +76,10 @@
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
---------------------
Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac 2009-09-01 16:10:16 UTC (rev 429)
+++ code/trunk/configure.ac 2009-09-01 16:29:46 UTC (rev 430)
@@ -379,10 +379,13 @@
# 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
Modified: code/trunk/libpcre.pc.in
===================================================================
--- code/trunk/libpcre.pc.in 2009-09-01 16:10:16 UTC (rev 429)
+++ code/trunk/libpcre.pc.in 2009-09-01 16:29:46 UTC (rev 430)
@@ -9,4 +9,4 @@
Description: PCRE - Perl compatible regular expressions C library
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre
-Cflags: -I${includedir}
+Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
Modified: code/trunk/libpcrecpp.pc.in
===================================================================
--- code/trunk/libpcrecpp.pc.in 2009-09-01 16:10:16 UTC (rev 429)
+++ code/trunk/libpcrecpp.pc.in 2009-09-01 16:29:46 UTC (rev 430)
@@ -9,4 +9,4 @@
Description: PCRECPP - C++ wrapper for PCRE
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre -lpcrecpp
-Cflags: -I${includedir}
+Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
Modified: code/trunk/libpcreposix.pc.in
===================================================================
--- code/trunk/libpcreposix.pc.in 2009-09-01 16:10:16 UTC (rev 429)
+++ code/trunk/libpcreposix.pc.in 2009-09-01 16:29:46 UTC (rev 430)
@@ -9,5 +9,5 @@
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
Modified: code/trunk/pcre-config.in
===================================================================
--- code/trunk/pcre-config.in 2009-09-01 16:10:16 UTC (rev 429)
+++ code/trunk/pcre-config.in 2009-09-01 16:29:46 UTC (rev 430)
@@ -52,7 +52,7 @@
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