[Pcre-svn] [843] code/trunk: Update pcre-config for 16-bit l…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [843] code/trunk: Update pcre-config for 16-bit library and correct type on libpcre16.pc.in.
Revision: 843
          http://vcs.pcre.org/viewvc?view=rev&revision=843
Author:   ph10
Date:     2012-01-01 14:36:56 +0000 (Sun, 01 Jan 2012)


Log Message:
-----------
Update pcre-config for 16-bit library and correct type on libpcre16.pc.in.

Modified Paths:
--------------
    code/trunk/configure.ac
    code/trunk/libpcre16.pc.in
    code/trunk/pcre-config.in


Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac    2011-12-31 15:19:04 UTC (rev 842)
+++ code/trunk/configure.ac    2012-01-01 14:36:56 UTC (rev 843)
@@ -109,12 +109,14 @@
               AS_HELP_STRING([--disable-pcre8],
                              [enable 8 bit character support]),
               , enable_pcre8=unset)
+AC_SUBST(enable_pcre8)


 # Handle --enable-pcre16 (disabled by default)
 AC_ARG_ENABLE(pcre16,
               AS_HELP_STRING([--enable-pcre16],
                              [enable 16 bit character support]),
               , enable_pcre16=unset)
+AC_SUBST(enable_pcre16)


# Handle --disable-cpp. The substitution of enable_cpp is needed for use in
# pcre-config.

Modified: code/trunk/libpcre16.pc.in
===================================================================
--- code/trunk/libpcre16.pc.in    2011-12-31 15:19:04 UTC (rev 842)
+++ code/trunk/libpcre16.pc.in    2012-01-01 14:36:56 UTC (rev 843)
@@ -8,5 +8,5 @@
 Name: libpcre16
 Description: PCRE - Perl compatible regular expressions C library with 16 bit character support
 Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lpcre
+Libs: -L${libdir} -lpcre16
 Cflags: -I${includedir} @PCRE_STATIC_CFLAG@


Modified: code/trunk/pcre-config.in
===================================================================
--- code/trunk/pcre-config.in    2011-12-31 15:19:04 UTC (rev 842)
+++ code/trunk/pcre-config.in    2012-01-01 14:36:56 UTC (rev 843)
@@ -4,12 +4,25 @@
 exec_prefix=@exec_prefix@
 exec_prefix_set=no


+cflags="[--cflags]"
+
 if test @enable_cpp@ = yes ; then
-  usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--libs-cpp] [--cflags] [--cflags-posix]"
+  libs="[--libs-cpp]"
 else
-  usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
+  libs=
+fi      
+
+if test @enable_pcre16@ = yes ; then
+  libs="[--libs16] $libs"
 fi


+if test @enable_pcre8@ = yes ; then
+  libs="[--libs] [--libs-posix] $libs"
+  cflags="$cflags [--cflags-posix]" 
+fi
+
+usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
+
 if test $# -eq 0; then
       echo "${usage}" 1>&2
       exit 1
@@ -56,18 +69,43 @@
     --version)
       echo @PACKAGE_VERSION@
       ;;
-    --cflags | --cflags-posix)
+    --cflags)
       if test @includedir@ != /usr/include ; then
         includes=-I@includedir@
       fi
       echo $includes @PCRE_STATIC_CFLAG@
       ;;
+    --cflags-posix)
+      if test @enable_pcre8@ = yes ; then
+        if test @includedir@ != /usr/include ; then
+          includes=-I@includedir@
+        fi
+        echo $includes @PCRE_STATIC_CFLAG@
+      else
+        echo "${usage}" 1>&2
+      fi
+      ;;
     --libs-posix)
-      echo $libS$libR -lpcreposix -lpcre
+      if test @enable_pcre8@ = yes ; then
+        echo $libS$libR -lpcreposix -lpcre
+      else
+        echo "${usage}" 1>&2
+      fi
       ;;
     --libs)
-      echo $libS$libR -lpcre
+      if test @enable_pcre8@ = yes ; then
+        echo $libS$libR -lpcre
+      else
+        echo "${usage}" 1>&2
+      fi
       ;;
+    --libs16)
+      if test @enable_pcre16@ = yes ; then
+        echo $libS$libR -lpcre16
+      else
+        echo "${usage}" 1>&2
+      fi
+      ;;
     --libs-cpp)
       if test @enable_cpp@ = yes ; then
         echo $libS$libR -lpcrecpp -lpcre