]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* sh.m4 (_AS_EXPR_PREPARE): Don't rely on the exit status of a
authorAkim Demaille <akim@epita.fr>
Thu, 30 Nov 2000 16:30:53 +0000 (16:30 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 30 Nov 2000 16:30:53 +0000 (16:30 +0000)
back quote evaluation since the very system for which the test was
written does not propagate it.  Groumph!

ChangeLog
configure
lib/m4sugar/m4sh.m4
m4sh.m4

index f09904f7c4bb502273e6eeb88f22d4ad7c3479b1..87bdf51063431761736e08e0b849aac7a548d7a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-30  Akim Demaille  <akim@epita.fr>
+
+       * sh.m4 (_AS_EXPR_PREPARE): Don't rely on the exit status of a
+       back quote evaluation since the very system for which the test was
+       written does not propagate it.  Groumph!
+
 2000-11-30  Akim Demaille  <akim@epita.fr>
 
        * acspecific.m4 (_AC_EXEEXT): Also remove conftest$ac_exeext.
index eb8a26b4e181cc255143cc73a29db100c5b67248..2b0dc744de37c1ee195495df8253195cf7a77f95 100755 (executable)
--- a/configure
+++ b/configure
@@ -17,11 +17,11 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
 
-as_expr=`expr a : '\(a\)'`
-case $as_expr,$? in
-  a,0) as_expr=expr;;
-    *) as_expr=false;;
-esac
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 # Support unset when possible.
 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
   as_unset=unset
@@ -1496,11 +1496,11 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
 
-as_expr=`expr a : '\(a\)'`
-case $as_expr,$? in
-  a,0) as_expr=expr;;
-    *) as_expr=false;;
-esac
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 # Support unset when possible.
 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
   as_unset=unset
index 39e778c173fd286955ef8063574c30e81d6e0931..e1970f242e15608c51b83ba0e67bb88d4d0eb43b 100644 (file)
@@ -295,11 +295,11 @@ AS_DIRNAME_SED([$1])])
 # but exit with failure.  When a fall back to expr (as in AS_DIRNAME)
 # is provided, you get twice the result.  Prevent this.
 m4_defun([_AS_EXPR_PREPARE],
-[as_expr=`expr a : '\(a\)'`
-case $as_expr,$? in
-  a,0) as_expr=expr;;
-    *) as_expr=false;;
-esac[]dnl
+[if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi[]dnl
 ])# _AS_EXPR_PREPARE
 
 
diff --git a/m4sh.m4 b/m4sh.m4
index 39e778c173fd286955ef8063574c30e81d6e0931..e1970f242e15608c51b83ba0e67bb88d4d0eb43b 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -295,11 +295,11 @@ AS_DIRNAME_SED([$1])])
 # but exit with failure.  When a fall back to expr (as in AS_DIRNAME)
 # is provided, you get twice the result.  Prevent this.
 m4_defun([_AS_EXPR_PREPARE],
-[as_expr=`expr a : '\(a\)'`
-case $as_expr,$? in
-  a,0) as_expr=expr;;
-    *) as_expr=false;;
-esac[]dnl
+[if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi[]dnl
 ])# _AS_EXPR_PREPARE