[Oracleasm-commits] jlbec commits r314 - in trunk: . vendor/redhat vendor/suse

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Sun Nov 20 03:48:44 CST 2005


Author: jlbec
Date: 2005-11-20 03:48:41 -0600 (Sun, 20 Nov 2005)
New Revision: 314

Added:
   trunk/aclocal.m4
   trunk/mbvendor.m4
   trunk/vendor.guess
   trunk/vendor/redhat/vendor.guess
   trunk/vendor/suse/vendor.guess
Modified:
   trunk/configure.in
Log:
Added vendor guessing

Added: trunk/aclocal.m4
===================================================================
--- trunk/aclocal.m4	2005-11-18 16:09:34 UTC (rev 313)
+++ trunk/aclocal.m4	2005-11-20 09:48:41 UTC (rev 314)
@@ -0,0 +1 @@
+m4_include([mbvendor.m4])

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2005-11-18 16:09:34 UTC (rev 313)
+++ trunk/configure.in	2005-11-20 09:48:41 UTC (rev 314)
@@ -132,8 +132,9 @@
 AC_MSG_RESULT([${MODULEARCH}, ${TOOLSARCH}])
 AC_SUBST(MODULEARCH)
 AC_SUBST(TOOLSARCH)
-    
 
+MB_VENDOR()
+
 if test "x$GCC" != "xyes"; then
   AC_MSG_ERROR(GCC is required)
 fi

Added: trunk/mbvendor.m4
===================================================================
--- trunk/mbvendor.m4	2005-11-18 16:09:34 UTC (rev 313)
+++ trunk/mbvendor.m4	2005-11-20 09:48:41 UTC (rev 314)
@@ -0,0 +1,24 @@
+AC_DEFUN([MB_VENDOR],
+  [AC_MSG_CHECKING([for vendor])
+   AC_ARG_WITH(vendor, [  --with-vendor=VENDOR    Vendor to tailor build defaults and packages to [common]],[
+     mb_vendor="$withval"
+     if test -x "vendor/${mb_vendor}/vendor.guess"; then
+       if "vendor/${mb_vendor}/vendor.guess" >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+         AC_MSG_RESULT([$mb_vendor])
+       else
+         AC_MSG_RESULT([not found])
+         AC_MSG_ERROR([Vendor $mb_vendor not detected])
+       fi
+     else
+       AC_MSG_RESULT([not supported])
+       AC_MSG_ERROR([Vendor $mb_vendor not supported])
+     fi
+  ], [
+    mb_vendor=`./vendor.guess 2>&AS_MESSAGE_LOG_FD`
+    if test -z "$mb_vendor"; then
+       AC_MSG_RESULT([not found])
+    else
+       AC_MSG_RESULT([$mb_vendor])
+    fi
+  ])
+])  # MB_VENDOR

Added: trunk/vendor/redhat/vendor.guess
===================================================================
--- trunk/vendor/redhat/vendor.guess	2005-11-18 16:09:34 UTC (rev 313)
+++ trunk/vendor/redhat/vendor.guess	2005-11-20 09:48:41 UTC (rev 314)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ ! -f /etc/redhat-release ]
+then
+    exit 1
+fi
+
+if [ "`rpm -qf /etc/redhat-release --qf '%{VERSION}' 2>/dev/null`" != "4AS" ]
+then
+    exit 1
+fi
+
+exit 0


Property changes on: trunk/vendor/redhat/vendor.guess
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/vendor/suse/vendor.guess
===================================================================
--- trunk/vendor/suse/vendor.guess	2005-11-18 16:09:34 UTC (rev 313)
+++ trunk/vendor/suse/vendor.guess	2005-11-20 09:48:41 UTC (rev 314)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ ! -f /etc/SuSE-release ]
+then
+    exit 1
+fi
+
+if [ "`rpm -qf /etc/SuSE-release --qf '%{VERSION}' 2>/dev/null`" != "9" ]
+then
+    exit 1
+fi
+
+exit 0


Property changes on: trunk/vendor/suse/vendor.guess
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/vendor.guess
===================================================================
--- trunk/vendor.guess	2005-11-18 16:09:34 UTC (rev 313)
+++ trunk/vendor.guess	2005-11-20 09:48:41 UTC (rev 314)
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+list_vendors()
+{
+    ls -1 vendor | while read -r line
+    do
+        if [ "$line" = "common" ]
+        then
+            continue
+        fi
+        if [ ! -d "vendor/$line" ]
+        then
+            continue
+        fi
+        echo $line
+    done
+
+    # Make common last
+    if [ -d "vendor/common" ]
+    then
+        echo "common"
+    fi
+}
+
+list_vendors | while read -r v
+do
+    if [ -x "vendor/${v}/vendor.guess" ]
+    then
+        if "vendor/${v}/vendor.guess" >/dev/null 2>&1
+        then
+            echo "$v"
+        fi
+    fi
+done


Property changes on: trunk/vendor.guess
___________________________________________________________________
Name: svn:executable
   + *



More information about the Oracleasm-commits mailing list