+2000-03-08 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH, AC_PATH_PROG,
+ AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_PREFIX_PROGRAM,
+ AC_EGREP_CPP, AC_TRY_LINK, AC_COMPILE_CHECK, AC_TRY_RUN_NATIVE):
+ Use ifval instead of ifelse.
+
2000-03-07 Mark Elbrecht <snowball3@bigfoot.com>
Support absolute DOS-style paths.
if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
enableval="[$enable_]patsubst([$1], -, _)"
ifelse([$3], , :, [$3])
-ifelse([$4], , , [else
+ifval([$4], [else
$4
])dnl
fi
if test "[${with_]patsubst([$1], -, _)+set}" = set; then
withval="[$with_]patsubst([$1], -, _)"
ifelse([$3], , :, [$3])
-ifelse([$4], , , [else
+ifval([$4], [else
$4
])dnl
fi
IFS="$ac_save_ifs"
dnl If no 3rd arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
-ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
+ifval([$3], [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
])dnl
;;
esac])dnl
AC_PATH_PROG($1, [$]ac_prog, , $4)
test -n "[$]$1" && break
done
-ifelse([$3], , , [test -n "[$]$1" || $1="$3"
+ifval([$3], [test -n "[$]$1" || $1="$3"
])])
AC_DEFUN(AC_PATH_TOOL,
[AC_REQUIRE([_AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
- ifelse([$3], , [$2], ), $4)
-ifelse([$3], , , [
+ ifelse([$3], , [$2]), $4)
+ifval([$3], [
if test -z "$ac_cv_prog_$1"; then
if test -n "$ac_tool_prefix"; then
AC_PATH_PROG($1, $2, $2, $3)
[AC_REQUIRE([_AC_CHECK_TOOL_PREFIX])dnl
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
ifelse([$3], , [$2], ), $4)
-ifelse([$3], , , [
+ifval([$3], [
if test -z "$ac_cv_prog_$1"; then
if test -n "$ac_tool_prefix"; then
AC_CHECK_PROG($1, $2, $2, $3)
echo "$ac_err" >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$3], , , [ rm -rf conftest*
+ifval([$3], [ rm -rf conftest*
$3
])dnl
fi
changequote([, ])dnl
ifelse([$3], , :, [rm -rf conftest*
$3])
-ifelse([$4], , , [else
+ifval([$4], [else
rm -rf conftest*
$4
])dnl
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
+ifval([$4], [ rm -rf conftest*
$4
])dnl
fi
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
+ifval([$4], [ rm -rf conftest*
$4
])dnl
fi
# ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
AU_DEFUN(AC_COMPILE_CHECK,
-[ifelse([$1], , , [AC_CHECKING([for $1])
+[ifval([$1], [AC_CHECKING([for $1])
])dnl
AC_TRY_LINK([$2], [$3], [$4], [$5])
])
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$3], , , [ rm -fr conftest*
+ifval([$3], [ rm -fr conftest*
$3
])dnl
fi
if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
enableval="[$enable_]patsubst([$1], -, _)"
ifelse([$3], , :, [$3])
-ifelse([$4], , , [else
+ifval([$4], [else
$4
])dnl
fi
if test "[${with_]patsubst([$1], -, _)+set}" = set; then
withval="[$with_]patsubst([$1], -, _)"
ifelse([$3], , :, [$3])
-ifelse([$4], , , [else
+ifval([$4], [else
$4
])dnl
fi
IFS="$ac_save_ifs"
dnl If no 3rd arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
-ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
+ifval([$3], [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
])dnl
;;
esac])dnl
AC_PATH_PROG($1, [$]ac_prog, , $4)
test -n "[$]$1" && break
done
-ifelse([$3], , , [test -n "[$]$1" || $1="$3"
+ifval([$3], [test -n "[$]$1" || $1="$3"
])])
AC_DEFUN(AC_PATH_TOOL,
[AC_REQUIRE([_AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
- ifelse([$3], , [$2], ), $4)
-ifelse([$3], , , [
+ ifelse([$3], , [$2]), $4)
+ifval([$3], [
if test -z "$ac_cv_prog_$1"; then
if test -n "$ac_tool_prefix"; then
AC_PATH_PROG($1, $2, $2, $3)
[AC_REQUIRE([_AC_CHECK_TOOL_PREFIX])dnl
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
ifelse([$3], , [$2], ), $4)
-ifelse([$3], , , [
+ifval([$3], [
if test -z "$ac_cv_prog_$1"; then
if test -n "$ac_tool_prefix"; then
AC_CHECK_PROG($1, $2, $2, $3)
echo "$ac_err" >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$3], , , [ rm -rf conftest*
+ifval([$3], [ rm -rf conftest*
$3
])dnl
fi
changequote([, ])dnl
ifelse([$3], , :, [rm -rf conftest*
$3])
-ifelse([$4], , , [else
+ifval([$4], [else
rm -rf conftest*
$4
])dnl
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
+ifval([$4], [ rm -rf conftest*
$4
])dnl
fi
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
+ifval([$4], [ rm -rf conftest*
$4
])dnl
fi
# ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
AU_DEFUN(AC_COMPILE_CHECK,
-[ifelse([$1], , , [AC_CHECKING([for $1])
+[ifval([$1], [AC_CHECKING([for $1])
])dnl
AC_TRY_LINK([$2], [$3], [$4], [$5])
])
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifelse([$3], , , [ rm -fr conftest*
+ifval([$3], [ rm -fr conftest*
$3
])dnl
fi