* 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.
This commit is contained in:
Akim Demaille 2000-11-14 10:38:57 +00:00
parent e555c2fb78
commit a8ce12b0d6
7 changed files with 44 additions and 34 deletions

View File

@ -1,3 +1,11 @@
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.

View File

@ -197,8 +197,7 @@ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
# 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>],

View File

@ -2771,10 +2771,12 @@ m4_popdef([AC_Lib_Name])dnl
# _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
@ -2812,15 +2814,6 @@ rm -f conftest*
])# 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])
# ------------------------------------------------------
@ -2842,6 +2835,16 @@ rm -f conftest*
])# 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. ##

View File

@ -223,8 +223,7 @@ fi
# 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>

View File

@ -197,8 +197,7 @@ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
# 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>],

View File

@ -2771,10 +2771,12 @@ m4_popdef([AC_Lib_Name])dnl
# _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
@ -2812,15 +2814,6 @@ rm -f conftest*
])# 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])
# ------------------------------------------------------
@ -2842,6 +2835,16 @@ rm -f conftest*
])# 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. ##

View File

@ -223,8 +223,7 @@ fi
# 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>