From: Akim Demaille Date: Tue, 14 Nov 2000 10:38:57 +0000 (+0000) Subject: * acfunctions.m4 (AC_FUNC_ALLOCA): Don't require AC_PROG_CPP, X-Git-Tag: autoconf-2.50~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8ce12b0d6445161c3d91db6956f81c920122307;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 58a32b075..79d1ac1c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-11-14 Akim Demaille + + * 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 Create acheaders.m4. diff --git a/acfunctions.m4 b/acfunctions.m4 index 3222460de..bd4b10872 100644 --- a/acfunctions.m4 +++ b/acfunctions.m4 @@ -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 ], diff --git a/acgeneral.m4 b/acgeneral.m4 index 86482aac8..fca4d6098 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -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. ## diff --git a/acheaders.m4 b/acheaders.m4 index bb93fab71..a91109e87 100644 --- a/acheaders.m4 +++ b/acheaders.m4 @@ -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 #include #include diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 3222460de..bd4b10872 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -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 ], diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 86482aac8..fca4d6098 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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. ## diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index bb93fab71..a91109e87 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -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 #include #include