Date: Friday, March 9, 2007 @ 18:41:11
  Author: marc
    Path: /cvsroot/carob/carob

   Added: configure (1.1)

Implemented minimal ./configure based on "uname -s". Automatically
called by GNUMakefile for obvious compatibility reasons.


-----------+
 configure |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+)


Index: carob/configure
diff -u /dev/null carob/configure:1.1
--- /dev/null   Fri Mar  9 18:41:11 2007
+++ carob/configure     Fri Mar  9 18:41:11 2007
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#
+# Sequoia: Database clustering technology.
+# Copyright (C) 2005 Emic Networks
+# Contact: [EMAIL PROTECTED]
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Initial developer(s): Marc Herbert
+# Contributor(s): 
+#
+
+
+set -e
+
+# set -x
+
+CONFIGURED_OS=config.os
+
+guess_and_save()
+{
+    # http://en.wikipedia.org/wiki/Uname
+    printf "OS=" > ${CONFIGURED_OS}
+    uname -s >> ${CONFIGURED_OS}
+}
+
+if [ "$1" == "--clean" ]
+then rm ${CONFIGURED_OS}
+    exit
+fi
+
+## Get configured OS. Terse output here since called by GNUMakefile
+if [ "$1" == "--getos" ]
+then
+    # Guess it and save it not already defined (by user or by us)
+    if [ ! -r ${CONFIGURED_OS} ]
+    then guess_and_save
+    fi
+    . ${CONFIGURED_OS}
+    printf "${OS}"
+    exit
+fi
+
+
+## Fake chatty autoconf just for fun
+
+printf "checking operating system... "
+guess_and_save
+. ${CONFIGURED_OS}
+printf "${OS} (saved in ${CONFIGURED_OS} file)\n"

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to