${foo} into $foo.
* aclang.m4 (AC_LANG(C), AC_LANG(C++)): Move some internal
comments into the header comment.
* acgeneral.m4 (AC_TRY_CPP): Likewise.
+2000-08-07 Akim Demaille <akim@epita.fr>
+
+ * acfunctions.m4 (_AC_LIBOBJ_ALLOCA, AC_REPLACE_FUNCS): Simplify
+ ${foo} into $foo.
+ * aclang.m4 (AC_LANG(C), AC_LANG(C++)): Move some internal
+ comments into the header comment.
+ * acgeneral.m4 (AC_TRY_CPP): Likewise.
+
2000-08-07 Akim Demaille <akim@epita.fr>
* tests/tools.m4 (undefined macros): New test.
# -----------------------------
AC_DEFUN([AC_REPLACE_FUNCS],
[AC_FOREACH([AC_Func], [$1], [AC_LIBOBJ_DECL(AC_Func)])dnl
-AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ(${ac_func})])
+AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ($ac_func)])
])
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
AC_LIBOBJ_DECL(alloca)
-AC_SUBST(ALLOCA, alloca.${ac_objext})dnl
+AC_SUBST(ALLOCA, alloca.$ac_objext)dnl
AC_DEFINE(C_ALLOCA, 1, [Define if using `alloca.c'.])
AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------
-# INCLUDES are not defaulted.
-AC_DEFUN([AC_TRY_CPP],
-[AC_REQUIRE_CPP()dnl
-AC_LANG_CONFTEST([AC_LANG_SOURCE([[$1]])])
# Capture the stderr of cpp. eval is necessary to expand ac_cpp. We
# used to copy stderr to stdout and capture it in a variable, but that
# breaks under sh -x, which writes compile commands starting with ` +'
# to stderr in eval and subshells.
+#
+# INCLUDES are not defaulted.
+AC_DEFUN([AC_TRY_CPP],
+[AC_REQUIRE_CPP()dnl
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[$1]])])
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
AC_TRY_EVAL(ac_try)
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.$ac_ext\$"`
if test -z "$ac_err"; then
m4_default([$2], :)
else
AC_DEFUN([AC_RUN_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
if AC_TRY_EVAL(ac_link) &&
- test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
+ test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
m4_default([$2], :)
else
echo "configure: failed program was:" >&AC_FD_LOG
# AC_LANG(C)
# ----------
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C)],
[ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# AC_LANG(C++)
# ------------
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C++)],
[ac_ext=cc
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# AC_LANG(C)
# ----------
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C)],
[ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# AC_LANG(C++)
# ------------
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C++)],
[ac_ext=cc
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# AC_LANG(C)
# ----------
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C)],
[ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# AC_LANG(C++)
# ------------
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C++)],
[ac_ext=cc
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# -----------------------------
AC_DEFUN([AC_REPLACE_FUNCS],
[AC_FOREACH([AC_Func], [$1], [AC_LIBOBJ_DECL(AC_Func)])dnl
-AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ(${ac_func})])
+AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ($ac_func)])
])
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
AC_LIBOBJ_DECL(alloca)
-AC_SUBST(ALLOCA, alloca.${ac_objext})dnl
+AC_SUBST(ALLOCA, alloca.$ac_objext)dnl
AC_DEFINE(C_ALLOCA, 1, [Define if using `alloca.c'.])
AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------
-# INCLUDES are not defaulted.
-AC_DEFUN([AC_TRY_CPP],
-[AC_REQUIRE_CPP()dnl
-AC_LANG_CONFTEST([AC_LANG_SOURCE([[$1]])])
# Capture the stderr of cpp. eval is necessary to expand ac_cpp. We
# used to copy stderr to stdout and capture it in a variable, but that
# breaks under sh -x, which writes compile commands starting with ` +'
# to stderr in eval and subshells.
+#
+# INCLUDES are not defaulted.
+AC_DEFUN([AC_TRY_CPP],
+[AC_REQUIRE_CPP()dnl
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[$1]])])
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
AC_TRY_EVAL(ac_try)
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.$ac_ext\$"`
if test -z "$ac_err"; then
m4_default([$2], :)
else
AC_DEFUN([AC_RUN_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
if AC_TRY_EVAL(ac_link) &&
- test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
+ test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
m4_default([$2], :)
else
echo "configure: failed program was:" >&AC_FD_LOG
# AC_LANG(C)
# ----------
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C)],
[ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# AC_LANG(C++)
# ------------
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
define([AC_LANG(C++)],
[ac_ext=cc
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'