Revision: 492
http://vcs.pcre.org/viewvc?view=rev&revision=492
Author: ph10
Date: 2010-03-02 11:26:55 +0000 (Tue, 02 Mar 2010)
Log Message:
-----------
Added --libs-cpp to pcre-config, but only when C++ support is configured.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/configure.ac
code/trunk/pcre-config.in
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2010-03-01 17:45:08 UTC (rev 491)
+++ code/trunk/ChangeLog 2010-03-02 11:26:55 UTC (rev 492)
@@ -6,7 +6,10 @@
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
------------------------
Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac 2010-03-01 17:45:08 UTC (rev 491)
+++ code/trunk/configure.ac 2010-03-02 11:26:55 UTC (rev 492)
@@ -104,11 +104,13 @@
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,
Modified: code/trunk/pcre-config.in
===================================================================
--- code/trunk/pcre-config.in 2010-03-01 17:45:08 UTC (rev 491)
+++ code/trunk/pcre-config.in 2010-03-02 11:26:55 UTC (rev 492)
@@ -4,8 +4,11 @@
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 @@
--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