From: Akim Demaille Date: Tue, 1 Aug 2000 12:20:14 +0000 (+0000) Subject: AC_VALIDATE_CACHED_SYSTEM_TUPLE no longer works properly since the X-Git-Tag: autoconf-2.50~677 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3385e2beaca8d37f7749926ea15a4f26bfe2bc94;p=thirdparty%2Fautoconf.git AC_VALIDATE_CACHED_SYSTEM_TUPLE no longer works properly since the AC_CANONICAL_* revamping. Reported by Peter Eisentraut. In fact, let's just use the precious variables handling. * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Obsoleted. (_AC_ARG_VAR_PRECIOUS): New macro, eved from... (AC_ARG_VAR): this macro. Adjust. (_AC_INIT_PREPARE): `build_alias', `host_alias', and `target_alias' are precious. * doc/autoconf.texi: Adjust. --- diff --git a/ChangeLog b/ChangeLog index 0027f033c..a274686d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2000-08-01 Akim Demaille + + AC_VALIDATE_CACHED_SYSTEM_TUPLE no longer works properly since the + AC_CANONICAL_* revamping. + Reported by Peter Eisentraut. + In fact, let's just use the precious variables handling. + + * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Obsoleted. + (_AC_ARG_VAR_PRECIOUS): New macro, eved from... + (AC_ARG_VAR): this macro. Adjust. + (_AC_INIT_PREPARE): `build_alias', `host_alias', and + `target_alias' are precious. + * doc/autoconf.texi: Adjust. + 2000-08-01 Akim Demaille * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Neutralize also diff --git a/acgeneral.m4 b/acgeneral.m4 index 0362c4f09..8578a9dc7 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1929,6 +1929,9 @@ echo >confdefs.h AC_SITE_LOAD AC_CACHE_LOAD _AC_ARG_VAR_VALIDATE +_AC_ARG_VAR_PRECIOUS(build_alias)dnl +_AC_ARG_VAR_PRECIOUS(host_alias)dnl +_AC_ARG_VAR_PRECIOUS(target_alias)dnl AC_LANG(C) _AC_PROG_ECHO()dnl @@ -2076,13 +2079,11 @@ AU_DEFUN([AC_WITH], ## ----------------------------------------- ## - -# AC_ARG_VAR(VARNAME, DOCUMENTATION) -# ---------------------------------- -# Register VARNAME as a variable configure should remember, and -# document it in `configure --help' (but only once). +# _AC_ARG_VAR_PRECIOUS(VARNAME) +# ----------------------------- +# Declare VARNAME is precious. # -# Try to diagnose when precious variables have changed. To do this, +# We try to diagnose when precious variables have changed. To do this, # make two early snapshots (after the option processing to take # explicit variables into account) of those variables: one (ac_env_) # which represents the current run, and a second (ac_cv_env_) which, @@ -2092,19 +2093,13 @@ AU_DEFUN([AC_WITH], # # In subsequent runs, after having loaded the cache, compare # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE. -AC_DEFUN([AC_ARG_VAR], -[AC_DIVERT_ONCE([HELP_VAR], [ -Some influential environment variables:])dnl -AC_DIVERT_ONCE([HELP_VAR_END], [ -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations.])dnl -AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [ ])])dnl -AC_DIVERT_ONCE([PARSE_ARGS], +define([_AC_ARG_VAR_PRECIOUS], +[AC_DIVERT_ONCE([PARSE_ARGS], [ac_env_$1_set=${$1+set} -ac_env_$1_value="$$1" +ac_env_$1_value=$$1 ac_cv_env_$1_set=${$1+set} -ac_cv_env_$1_value="$$1"]) -])# AC_ARG_VAR +ac_cv_env_$1_value=$$1])dnl +]) # _AC_ARG_VAR_VALIDATE @@ -2143,6 +2138,24 @@ fi ])# _AC_ARG_VAR_VALIDATE +# AC_ARG_VAR(VARNAME, DOCUMENTATION) +# ---------------------------------- +# Register VARNAME as a precious variable, and document it in +# `configure --help' (but only once). +AC_DEFUN([AC_ARG_VAR], +[AC_DIVERT_ONCE([HELP_VAR], [ +Some influential environment variables:])dnl +AC_DIVERT_ONCE([HELP_VAR_END], [ +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations.])dnl +AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [ ])])dnl +_AC_ARG_VAR_PRECIOUS([$1])dnl +])# AC_ARG_VAR + + + + + ## ---------------------------- ## ## Transforming program names. ## ## ---------------------------- ## @@ -2338,30 +2351,12 @@ test -n "$target_alias" && AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET]) -# AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD]) -# -------------------------------------- +# AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD]) +# ------------------------------------------ # If the cache file is inconsistent with the current host, # target and build system types, execute CMD or print a default -# error message. -AC_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], -[AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl -AC_MSG_CHECKING([cached system tuple]) -if { test x"${ac_cv_host_system_type+set}" = x"set" && - test x"$ac_cv_host_system_type" != x"$host"; } || - { test x"${ac_cv_build_system_type+set}" = x"set" && - test x"$ac_cv_build_system_type" != x"$build"; } || - { test x"${ac_cv_target_system_type+set}" = x"set" && - test x"$ac_cv_target_system_type" != x"$target"; }; then - AC_MSG_RESULT([different]) - m4_default([$1], - [AC_MSG_ERROR([remove config.cache and re-run configure])]) -else - AC_MSG_RESULT(ok) -fi -ac_cv_host_system_type=$host -ac_cv_build_system_type=$build -ac_cv_target_system_type=$target[]dnl -]) +# error message. Now handled via _AC_ARG_VAR_PRECIOUS. +AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) ## ---------------------- ## diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a408c562c..3e4e7801a 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -7147,13 +7147,6 @@ canonicalization of @code{target_alias} by @command{config.sub}, otherwise it defaults to @code{host}. @end defmac -@defmac AC_VALIDATE_CACHED_SYSTEM_TUPLE (@ovar{cmd}) -@maindex VALIDATE_CACHED_SYSTEM_TUPLE -If the cache file is inconsistent with the current host, target and -build system types, execute @var{cmd} or print a default error message. -@end defmac - - @node Using System Type, , Canonicalizing, Manual Configuration @section Using the System Type @@ -8623,6 +8616,15 @@ Define @code{USG} if the @sc{bsd} string functions are defined in @code{AC_FUNC_UTIME_NULL} @end defmac +@defmac AC_VALIDATE_CACHED_SYSTEM_TUPLE (@ovar{cmd}) +@maindex VALIDATE_CACHED_SYSTEM_TUPLE +If the cache file is inconsistent with the current host, target and +build system types, it used to execute @var{cmd} or print a default +error message. + +This is now handled by default. +@end defmac + @defmac AC_VERBOSE (@var{result-description}) @maindex VERBOSE This macro is similar to @code{AC_MSG_RESULT}, except that it is meant diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 0362c4f09..8578a9dc7 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1929,6 +1929,9 @@ echo >confdefs.h AC_SITE_LOAD AC_CACHE_LOAD _AC_ARG_VAR_VALIDATE +_AC_ARG_VAR_PRECIOUS(build_alias)dnl +_AC_ARG_VAR_PRECIOUS(host_alias)dnl +_AC_ARG_VAR_PRECIOUS(target_alias)dnl AC_LANG(C) _AC_PROG_ECHO()dnl @@ -2076,13 +2079,11 @@ AU_DEFUN([AC_WITH], ## ----------------------------------------- ## - -# AC_ARG_VAR(VARNAME, DOCUMENTATION) -# ---------------------------------- -# Register VARNAME as a variable configure should remember, and -# document it in `configure --help' (but only once). +# _AC_ARG_VAR_PRECIOUS(VARNAME) +# ----------------------------- +# Declare VARNAME is precious. # -# Try to diagnose when precious variables have changed. To do this, +# We try to diagnose when precious variables have changed. To do this, # make two early snapshots (after the option processing to take # explicit variables into account) of those variables: one (ac_env_) # which represents the current run, and a second (ac_cv_env_) which, @@ -2092,19 +2093,13 @@ AU_DEFUN([AC_WITH], # # In subsequent runs, after having loaded the cache, compare # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE. -AC_DEFUN([AC_ARG_VAR], -[AC_DIVERT_ONCE([HELP_VAR], [ -Some influential environment variables:])dnl -AC_DIVERT_ONCE([HELP_VAR_END], [ -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations.])dnl -AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [ ])])dnl -AC_DIVERT_ONCE([PARSE_ARGS], +define([_AC_ARG_VAR_PRECIOUS], +[AC_DIVERT_ONCE([PARSE_ARGS], [ac_env_$1_set=${$1+set} -ac_env_$1_value="$$1" +ac_env_$1_value=$$1 ac_cv_env_$1_set=${$1+set} -ac_cv_env_$1_value="$$1"]) -])# AC_ARG_VAR +ac_cv_env_$1_value=$$1])dnl +]) # _AC_ARG_VAR_VALIDATE @@ -2143,6 +2138,24 @@ fi ])# _AC_ARG_VAR_VALIDATE +# AC_ARG_VAR(VARNAME, DOCUMENTATION) +# ---------------------------------- +# Register VARNAME as a precious variable, and document it in +# `configure --help' (but only once). +AC_DEFUN([AC_ARG_VAR], +[AC_DIVERT_ONCE([HELP_VAR], [ +Some influential environment variables:])dnl +AC_DIVERT_ONCE([HELP_VAR_END], [ +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations.])dnl +AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [ ])])dnl +_AC_ARG_VAR_PRECIOUS([$1])dnl +])# AC_ARG_VAR + + + + + ## ---------------------------- ## ## Transforming program names. ## ## ---------------------------- ## @@ -2338,30 +2351,12 @@ test -n "$target_alias" && AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET]) -# AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD]) -# -------------------------------------- +# AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD]) +# ------------------------------------------ # If the cache file is inconsistent with the current host, # target and build system types, execute CMD or print a default -# error message. -AC_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], -[AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl -AC_MSG_CHECKING([cached system tuple]) -if { test x"${ac_cv_host_system_type+set}" = x"set" && - test x"$ac_cv_host_system_type" != x"$host"; } || - { test x"${ac_cv_build_system_type+set}" = x"set" && - test x"$ac_cv_build_system_type" != x"$build"; } || - { test x"${ac_cv_target_system_type+set}" = x"set" && - test x"$ac_cv_target_system_type" != x"$target"; }; then - AC_MSG_RESULT([different]) - m4_default([$1], - [AC_MSG_ERROR([remove config.cache and re-run configure])]) -else - AC_MSG_RESULT(ok) -fi -ac_cv_host_system_type=$host -ac_cv_build_system_type=$build -ac_cv_target_system_type=$target[]dnl -]) +# error message. Now handled via _AC_ARG_VAR_PRECIOUS. +AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) ## ---------------------- ##