[pcre-dev] [PATCH] fix cross compiling

Página superior
Eliminar este mensaje
Autor: Raphaël HUCK
Fecha:  
A: ph10, pcre-dev
Asunto: [pcre-dev] [PATCH] fix cross compiling
Hi,

this patch fixes cross compiling and has been used for 6 years in
OpenWrt:

https://dev.openwrt.org/browser/trunk/openwrt/package/pcre/patches/750-pcre_config_cross.patch?rev=1864

Would you consider integrating it into PCRE?

Thanks!

-Raphaël
--- a/pcre-config.in
+++ b/pcre-config.in
@@ -24,6 +24,10 @@ case `uname -s` in
libR=" -Wl,-R@libdir@"
;;
esac
+libS=
+if test @libdir@ != /usr/lib ; then
+ libS=-L@libdir@
+fi

 while test $# -gt 0; do
   case "$1" in
@@ -58,10 +62,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