summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-11-19 17:03:35 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-11-19 17:03:35 +0000
commit8e93f278ded1ac082d15af60dcf24fc6a8d2a672 (patch)
tree72e92ae5cd70f21458845ad2d50c797fa00b5061
parent36199bc966081179ec228c7073d46aa619e9d918 (diff)
downloadpcre-8e93f278ded1ac082d15af60dcf24fc6a8d2a672.tar.gz
Remove -L from pcre-config when install is into /usr/lib (fixes
cross-compiling). git-svn-id: svn://vcs.exim.org/pcre/code/trunk@753 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog4
-rw-r--r--pcre-config.in9
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6717094..7792ca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,10 @@ Version 8.21
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
------------------------
diff --git a/pcre-config.in b/pcre-config.in
index c50c9df..ccbf210 100644
--- a/pcre-config.in
+++ b/pcre-config.in
@@ -25,6 +25,11 @@ case `uname -s` in
;;
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 @@ while test $# -gt 0; do
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