summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-03-02 11:26:55 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-03-02 11:26:55 +0000
commitf4cccb68307445dfa86c210af8ed079eed8deeb8 (patch)
treeefc405b49c0974861c7bdd843b9998256fddf8c3
parente48c6f09e052dae85940cd492b88ff5c09d16e20 (diff)
downloadpcre-f4cccb68307445dfa86c210af8ed079eed8deeb8.tar.gz
Added --libs-cpp to pcre-config, but only when C++ support is configured.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@492 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac4
-rw-r--r--pcre-config.in14
3 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cc676ca..85d3be3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@ Version 8.02 01-Mar-2010
1. The Unicode data tables have been updated to Unicode 5.2.0.
+2. Added the option --libs-cpp to pcre-config, but only when C++ support is
+ configured.
+
Version 8.01 19-Jan-2010
------------------------
diff --git a/configure.ac b/configure.ac
index 5f91023..f478f43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,11 +104,13 @@ then
htmldir='${docdir}/html'
fi
-# Handle --disable-cpp
+# Handle --disable-cpp. The substitution of enable_cpp is needed for use in
+# pcre-config.
AC_ARG_ENABLE(cpp,
AS_HELP_STRING([--disable-cpp],
[disable C++ support]),
, enable_cpp=yes)
+AC_SUBST(enable_cpp)
# Handle --enable-rebuild-chartables
AC_ARG_ENABLE(rebuild-chartables,
diff --git a/pcre-config.in b/pcre-config.in
index a555744..c50c9df 100644
--- a/pcre-config.in
+++ b/pcre-config.in
@@ -4,8 +4,11 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
-usage="\
-Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
+if test @enable_cpp@ = yes ; then
+ usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--libs-cpp] [--cflags] [--cflags-posix]"
+else
+ usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
+fi
if test $# -eq 0; then
echo "${usage}" 1>&2
@@ -60,6 +63,13 @@ while test $# -gt 0; do
--libs)
echo -L@libdir@$libR -lpcre
;;
+ --libs-cpp)
+ if test @enable_cpp@ = yes ; then
+ echo -L@libdir@$libR -lpcrecpp -lpcre
+ else
+ echo "${usage}" 1>&2
+ fi
+ ;;
*)
echo "${usage}" 1>&2
exit 1