Blame SOURCES/pth-2.0.7-config-script.patch

af8bc7
diff -Nur pth-2.0.7-orig/pth-config.in pth-2.0.7/pth-config.in
af8bc7
--- pth-2.0.7-orig/pth-config.in	2006-06-08 19:54:02.000000000 +0200
af8bc7
+++ pth-2.0.7/pth-config.in	2007-10-21 14:06:45.000000000 +0200
af8bc7
@@ -46,6 +46,19 @@
af8bc7
 help=no
af8bc7
 version=no
af8bc7
 
af8bc7
+arch=$(uname -i)
af8bc7
+case $arch in
af8bc7
+    x86_64 | ppc64 | ppc64le | ia64 | s390x | sparc64 | aarch64)
af8bc7
+        pth_ldlibdir="/usr/lib64"
af8bc7
+        if [ "$pth_libdir" == "/usr/lib" ] ; then
af8bc7
+            pth_libdir=${pth_libdir}64
af8bc7
+        fi
af8bc7
+        ;;
af8bc7
+    * )
af8bc7
+        pth_ldlibdir="/usr/lib"
af8bc7
+        ;;
af8bc7
+esac
af8bc7
+
af8bc7
 usage="pth-config"
af8bc7
 usage="$usage [--help] [--version] [--all]"
af8bc7
 usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]"
af8bc7
@@ -109,11 +122,15 @@
af8bc7
             output="$output $pth_acdir"
af8bc7
             ;;
af8bc7
         --cflags)
af8bc7
-            output="$output -I$pth_includedir"
af8bc7
+            if [ "$pth_includedir" != "/usr/include" ] ; then
af8bc7
+                output="$output -I$pth_includedir"
af8bc7
+            fi
af8bc7
             output_extra="$output_extra $pth_cflags"
af8bc7
             ;;
af8bc7
         --ldflags)
af8bc7
-            output="$output -L$pth_libdir"
af8bc7
+            if [ "$pth_libdir" != "$pth_ldlibdir" ] ; then
af8bc7
+                output="$output -L$pth_libdir"
af8bc7
+            fi
af8bc7
             output_extra="$output_extra $pth_ldflags"
af8bc7
             ;;
af8bc7
         --libs)