[Zlib-devel] [PATCH 01/13] Add architecture detection in configure script.

Jim Kukunas james.t.kukunas at linux.intel.com
Mon Nov 25 17:21:37 EST 2013


This allows for per-architecture build tuning.
---
 configure |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index b77a8a8..07ed27f 100755
--- a/configure
+++ b/configure
@@ -22,6 +22,9 @@ date >> configure.log
 if [ -n "${CHOST}" ]; then
     uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`"
     CROSS_PREFIX="${CHOST}-"
+    ARCH="`echo "${CHOST}" | sed -e 's/-.*//'`"
+else
+    ARCH="`uname -p`"
 fi
 
 # destination name for static library
@@ -740,6 +743,18 @@ EOF
   fi
 fi
 
+# Set ARCH specific FLAGS
+case "${ARCH}" in
+    x86_64)
+        OBJC="${OBJC}"
+        PIC_OBJC="${PIC_OBJC}"
+    ;;
+    i386 | i486 | i586 | i686)
+        OBJC="${OBJC}"
+        PIC_OBJC="${PIC_OBJC}"
+    ;;
+esac
+
 # show the results in the log
 echo >> configure.log
 echo ALL = $ALL >> configure.log
-- 
1.7.1





More information about the Zlib-devel mailing list