+2000-11-14 Akim Demaille <akim@epita.fr>
+
+ * acfunctions.m4 (AC_FUNC_ALLOCA): Don't require AC_PROG_CPP,
+ since (i) you actually need a compiler, (ii) AC_TRY_LINK handles
+ it.
+ * acheaders.m4 (AC_HEADER_STDC): Don't require AC_PROG_CPP,
+ AC_TRY_CPP does it.
+
2000-11-14 Akim Demaille <akim@epita.fr>
Create acheaders.m4.
# AC_FUNC_ALLOCA
# --------------
AC_DEFUN([AC_FUNC_ALLOCA],
-[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+[# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h,
[AC_TRY_LINK([@%:@include <alloca.h>],
# _AC_TRY_CPP
# -----------
# Run cpp and set ac_cpp_err to "yes" for an error, to
-# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if neither
-# warnings nor errors have been detected.
-# eval is necessary to expand ac_cpp. It may put trace lines to conftest.err
-# when run under sh -x (e.g. when zsh is used), so we filter them out.
+# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
+# neither warnings nor errors have been detected. eval is necessary
+# to expand ac_cpp. It may put trace lines to conftest.err when run
+# under sh -x (e.g. when zsh is used), so we filter them out.
+#
+# Do not require AC_PROG_CPP since this macro is also used by AC_PROG_CPP.
AC_DEFUN([_AC_TRY_CPP],
[ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if AC_TRY_EVAL(ac_try); then
])# AC_TRY_CPP
-# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------
-AC_DEFUN([AC_EGREP_HEADER],
-[AC_EGREP_CPP([$1],
-[#include <$2>
-], [$3], [$4])])
-
-
# AC_EGREP_CPP(PATTERN, PROGRAM,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ------------------------------------------------------
])# AC_EGREP_CPP
+# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------
+AC_DEFUN([AC_EGREP_HEADER],
+[AC_EGREP_CPP([$1],
+[#include <$2>
+], [$3], [$4])])
+
+
+
## ------------------ ##
## Examining syntax. ##
# AC_HEADER_STDC
# --------------
AC_DEFUN([AC_HEADER_STDC],
-[AC_REQUIRE_CPP()dnl
-AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
+[AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
[AC_TRY_CPP([#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
# AC_FUNC_ALLOCA
# --------------
AC_DEFUN([AC_FUNC_ALLOCA],
-[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+[# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h,
[AC_TRY_LINK([@%:@include <alloca.h>],
# _AC_TRY_CPP
# -----------
# Run cpp and set ac_cpp_err to "yes" for an error, to
-# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if neither
-# warnings nor errors have been detected.
-# eval is necessary to expand ac_cpp. It may put trace lines to conftest.err
-# when run under sh -x (e.g. when zsh is used), so we filter them out.
+# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
+# neither warnings nor errors have been detected. eval is necessary
+# to expand ac_cpp. It may put trace lines to conftest.err when run
+# under sh -x (e.g. when zsh is used), so we filter them out.
+#
+# Do not require AC_PROG_CPP since this macro is also used by AC_PROG_CPP.
AC_DEFUN([_AC_TRY_CPP],
[ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if AC_TRY_EVAL(ac_try); then
])# AC_TRY_CPP
-# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------
-AC_DEFUN([AC_EGREP_HEADER],
-[AC_EGREP_CPP([$1],
-[#include <$2>
-], [$3], [$4])])
-
-
# AC_EGREP_CPP(PATTERN, PROGRAM,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ------------------------------------------------------
])# AC_EGREP_CPP
+# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------
+AC_DEFUN([AC_EGREP_HEADER],
+[AC_EGREP_CPP([$1],
+[#include <$2>
+], [$3], [$4])])
+
+
+
## ------------------ ##
## Examining syntax. ##
# AC_HEADER_STDC
# --------------
AC_DEFUN([AC_HEADER_STDC],
-[AC_REQUIRE_CPP()dnl
-AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
+[AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
[AC_TRY_CPP([#include <stdlib.h>
#include <stdarg.h>
#include <string.h>