[Pcre-svn] [753] code/trunk: Remove -L from pcre-config when…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [753] code/trunk: Remove -L from pcre-config when install is into /usr/lib (fixes
Revision: 753
          http://vcs.pcre.org/viewvc?view=rev&revision=753
Author:   ph10
Date:     2011-11-19 17:03:35 +0000 (Sat, 19 Nov 2011)


Log Message:
-----------
Remove -L from pcre-config when install is into /usr/lib (fixes
cross-compiling).

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre-config.in


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2011-11-19 15:28:29 UTC (rev 752)
+++ code/trunk/ChangeLog    2011-11-19 17:03:35 UTC (rev 753)
@@ -46,7 +46,11 @@


11. JIT should use pcre_malloc/pcre_free for allocation.

+12. Updated pcre-config so that it no longer shows -L/usr/lib, which seems
+    best practice nowadays, and helps with cross-compiling. (If the exec_prefix 
+    is anything other than /usr, -L is still shown). 


+
Version 8.20 21-Oct-2011
------------------------


Modified: code/trunk/pcre-config.in
===================================================================
--- code/trunk/pcre-config.in    2011-11-19 15:28:29 UTC (rev 752)
+++ code/trunk/pcre-config.in    2011-11-19 17:03:35 UTC (rev 753)
@@ -25,6 +25,11 @@
   ;;
 esac


+libS=
+if test @libdir@ != /usr/lib ; then
+  libS=-L@libdir@
+fi
+
 while test $# -gt 0; do
   case "$1" in
   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@@ -58,10 +63,10 @@
       echo $includes @PCRE_STATIC_CFLAG@
       ;;
     --libs-posix)
-      echo -L@libdir@$libR -lpcreposix -lpcre
+      echo $libS$libR -lpcreposix -lpcre
       ;;
     --libs)
-      echo -L@libdir@$libR -lpcre
+      echo $libS$libR -lpcre
       ;;
     --libs-cpp)
       if test @enable_cpp@ = yes ; then