[Ocfs2-tools-commits] manish commits r616 - trunk

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Jan 27 19:02:40 CST 2005


Author: manish
Date: 2005-01-27 19:02:38 -0600 (Thu, 27 Jan 2005)
New Revision: 616

Modified:
   trunk/Config.make.in
   trunk/configure.in
Log:
Consistent toolsarch handling


Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in	2005-01-27 23:54:52 UTC (rev 615)
+++ trunk/Config.make.in	2005-01-28 01:02:38 UTC (rev 616)
@@ -1,5 +1,3 @@
-OCFS2_TOOLS = yes
-
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2005-01-27 23:54:52 UTC (rev 615)
+++ trunk/configure.in	2005-01-28 01:02:38 UTC (rev 616)
@@ -37,25 +37,41 @@
     ;;
 esac
 
+AC_MSG_CHECKING(build architectures)
+
+TOOLSARCH=
+
+QUERYFILE=
+if test -f /etc/redhat-release; then
+  QUERYFILE=/etc/redhat-release
+elif test -f /etc/SuSE-release ; then
+  QUERYFILE=/etc/SuSE-release
+fi
+
+RPMARCH="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+if test -n "$RPMARCH" -a "$RPMARCH" != "noarch"; then
+  TOOLSARCH="$RPMARCH"
+fi
+
 if test -z "$TOOLSARCH"; then
-    case "$host_cpu" in
-    x86_64|ppc|ia64|s390x)
-        TOOLSARCH="$host_cpu"
-        ;;
-    i386|i486|i586|i686|i786|k6|k7)
-        TOOLSARCH="i386"
-        ;;
-    ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
-        TOOLSARCH="ppc"
-        ;;
-    *)
-        AC_MSG_RESULT([not found])
-        AC_MSG_WARN([invalid or unsupported CPU type, things may break])
-        ;;
-    esac
+  case "$host_cpu" in
+  x86_64|ppc|ia64|s390x)
+    TOOLSARCH="$host_cpu"
+    ;;
+  i386|i486|i586|i686|i786|k6|k7)
+    TOOLSARCH="i386"
+    ;;
+  ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+    TOOLSARCH="ppc"
+    ;;
+  *)
+    AC_MSG_RESULT([not found])
+    AC_MSG_WARN([invalid or unsupported CPU type, things may break])
+    ;;
+  esac
 fi
 
-AC_SUBST(TOOLSARCH)
+AC_MSG_RESULT($TOOLSARCH)
 
 AC_PROG_CC
 AC_PROG_CPP



More information about the Ocfs2-tools-commits mailing list