changeset 8780:0c0b84a656fe

Yet another instance of solaris' /bin/sh not happy with the posix "!" boolean operator (``!: not found''). Added a shell utility function "not" and use that instead of operator "!".
author jkeil
date Sat, 04 Jan 2003 19:26:04 +0000
parents 43b2ecb7543c
children 8e3e71a8c414
files configure
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Jan 04 19:23:29 2003 +0000
+++ b/configure	Sat Jan 04 19:26:04 2003 +0000
@@ -84,6 +84,16 @@
   esac
 }
 
+# not boolean test: implement the posix shell "!" operator for a
+# non-posix /bin/sh.
+#   usage:  not {command}
+# returns exit status "success" when the execution of "command"
+# fails.
+not() {
+  eval "$@"
+  test $? -ne 0
+}
+
 # Use this before starting a check
 echocheck() {
   echo "============ Checking for $@ ============" >> "$TMPLOG"
@@ -707,7 +717,7 @@
       cc_check -march=$proc -mcpu=$proc  || proc=k6
     fi
     if test "$proc" = "k6"; then
-      if ! cc_check -march=$proc -mcpu=$proc; then
+      if not cc_check -march=$proc -mcpu=$proc; then
         if cc_check -march=i586 -mcpu=i686; then
           proc=i586-i686
         else 
@@ -5406,7 +5416,7 @@
 EOF
 fi
 
-if x86 && ! cygwin; then
+if x86 && not cygwin; then
   if test "$_win32" = no ; then
     if test "$_win32libdir" ; then
       cat <<EOF