+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.
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
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
# 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
# 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