+2000-03-17 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_TRY_COMPILE,
+ AC_TRY_LINK, AC_TRY_RUN_NATIVE): Simplify the removal of the
+ contest files: don't remove them before running the actions, just
+ remove them at the end of the macro.
+
2000-03-16 Akim Demaille <akim@epita.fr>
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use
AC_TRY_EVAL(ac_try)
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
- ifelse([$2], , :, [rm -rf conftest*
- $2])
+ m4_default([$2], :)
else
echo "$ac_err" >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$3], [ rm -rf conftest*
$3
-])dnl
fi
rm -f conftest*])
changequote(, )dnl
egrep "$1" >/dev/null 2>&1; then
changequote([, ])dnl
- ifelse([$3], , :, [rm -rf conftest*
- $3])
+ m4_default([$3], :)
ifval([$4], [else
- rm -rf conftest*
$4
])dnl
fi
}
])EOF
if AC_TRY_EVAL(ac_compile); then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
+ m4_default([$3], :)
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$4], [ rm -rf conftest*
$4
-])dnl
fi
rm -f conftest*])
}
])EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
+ m4_default([$3], :)
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$4], [ rm -rf conftest*
$4
-])dnl
fi
rm -f conftest*
])# AC_TRY_LINK
])dnl
[$1]
EOF
-if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-dnl Don't remove the temporary files here, so they can be examined.
+if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} &&
+ (./conftest; exit) 2>/dev/null; then
m4_default([$2], [:])
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$3], [ rm -fr conftest*
$3
-])dnl
fi
rm -fr conftest*
])# AC_TRY_RUN_NATIVE
AC_TRY_EVAL(ac_try)
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
- ifelse([$2], , :, [rm -rf conftest*
- $2])
+ m4_default([$2], :)
else
echo "$ac_err" >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$3], [ rm -rf conftest*
$3
-])dnl
fi
rm -f conftest*])
changequote(, )dnl
egrep "$1" >/dev/null 2>&1; then
changequote([, ])dnl
- ifelse([$3], , :, [rm -rf conftest*
- $3])
+ m4_default([$3], :)
ifval([$4], [else
- rm -rf conftest*
$4
])dnl
fi
}
])EOF
if AC_TRY_EVAL(ac_compile); then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
+ m4_default([$3], :)
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$4], [ rm -rf conftest*
$4
-])dnl
fi
rm -f conftest*])
}
])EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
+ m4_default([$3], :)
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$4], [ rm -rf conftest*
$4
-])dnl
fi
rm -f conftest*
])# AC_TRY_LINK
])dnl
[$1]
EOF
-if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-dnl Don't remove the temporary files here, so they can be examined.
+if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} &&
+ (./conftest; exit) 2>/dev/null; then
m4_default([$2], [:])
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
-ifval([$3], [ rm -fr conftest*
$3
-])dnl
fi
rm -fr conftest*
])# AC_TRY_RUN_NATIVE