From: Paolo Bonzini Date: Mon, 24 Nov 2003 10:40:58 +0000 (+0000) Subject: 2003-11-24 Paolo Bonzini X-Git-Tag: AUTOCONF-2.59c~787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e56967aa48a575ed2d2d9ef76ace0a208ba623f;p=thirdparty%2Fautoconf.git 2003-11-24 Paolo Bonzini * TODO: Remove already done things. Update the part about finding tools for the target. 2003-11-24 Paolo Bonzini * lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H, AC_DIR_HEADER): Make wording more consistent. * lib/autoconf/specific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): Explain the transition better. * lib/autoconf/types.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Explain the transition better. 2003-11-24 Paolo Bonzini * doc/autoconf.texi (Obsoleting Macros): Don't document the third parameter of AU_DEFUN. * lib/autoconf/autoupdate.m4 (AU_DEFINE): Remove. (AU_DEFUN): Remove the third parameter, it was not used. Use AC_DEFUN directly, not AU_DEFINE. * lib/autoconf/status.m4 (AC_LINK_FILES): Move the message into the expanded body, consistently with other macros such as AC_USG. --- diff --git a/ChangeLog b/ChangeLog index 9d65bbfd7..0ba260ac1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2003-11-24 Paolo Bonzini + + * TODO: Remove already done things. Update the part + about finding tools for the target. + +2003-11-24 Paolo Bonzini + + * lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H, + AC_DIR_HEADER): Make wording more consistent. + * lib/autoconf/specific.m4 (AC_CYGWIN, AC_EMXOS2, + AC_MINGW32): Explain the transition better. + * lib/autoconf/types.m4 (AC_INT_16_BITS, + AC_LONG_64_BITS): Explain the transition better. + +2003-11-24 Paolo Bonzini + + * doc/autoconf.texi (Obsoleting Macros): Don't + document the third parameter of AU_DEFUN. + * lib/autoconf/autoupdate.m4 (AU_DEFINE): Remove. + (AU_DEFUN): Remove the third parameter, it was not used. + Use AC_DEFUN directly, not AU_DEFINE. + * lib/autoconf/status.m4 (AC_LINK_FILES): Move the message + into the expanded body, consistently with other macros + such as AC_USG. + 2003-11-17 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put at least 14 bytes diff --git a/TODO b/TODO index 756184631..673e6e4da 100644 --- a/TODO +++ b/TODO @@ -359,10 +359,6 @@ require a specific AC_ tests, but a specialized AS_ macro. ------------------------------------------------------------------------------ -* Support creating both config.h and DEFS in the same configure. - ------------------------------------------------------------------------------- - * Select the right CONFIG_SHELL automatically (for Ultrix, Lynx especially.) ------------------------------------------------------------------------------ @@ -405,44 +401,11 @@ In config.status comment, put the host/target/build types, if used. ------------------------------------------------------------------------------ -on hal.gnu.ai.mit.edu, configure is getting the wrong answer for -AC_CHECK_FUNCS(select). - -The problem here is that there's severe name space pollution: when -conftest.c includes to pick up any __stub macro definitions, -it's getting a prototype declaration for select(), which collides -with the dummy declaration in conftest.c. (The chain of includes -is conftest.c -> -> -> --> -> .) - - #define $ac_func __dummy_$ac_func - #include - #undef $ac_func -From: kwzh@gnu.ai.mit.edu (Karl Heuer) - -The test for the isascii function was failing because that function is -also a macro. He proposed that the test file look like this: - -/* Remove any macro definition. */ -#undef isascii -/* Override any gcc2 internal prototype to avoid an error. */ -char isascii(); isascii(); - -Andreas Schwab - ------------------------------------------------------------------------------- - It would be nice if I could (in the Makefile.in files) set the path to config.h. You have config.h ../config.h ../../config.h's all over the place, in the findutils-4.1 directory. From: "Randall S. Winchester" ------------------------------------------------------------------------------- - -In a future version (after 2.2), make AC_PROG_{CC,RANLIB,anything else} -use AC_CHECK_TOOL. -From Roland McGrath. - ------------------------------------------------------------------------------ ls -lt configure configure.in | sort @@ -506,18 +469,19 @@ etc. with GCC_FOR_TARGET instead of CC Here is one simple test if test "x$host" != "x$target"; then -AC_PROGRAMS_CHECK(AR_FOR_TARGET, $target-ar, $target-ar, ar) -AC_PROGRAMS_CHECK(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib, ranlib) -AC_PROGRAMS_CHECK(GCC_FOR_TARGET, $target-gcc, $target-gcc, gcc) +AC_CHECK_PROGS(AR_FOR_TARGET, + [$target-ar, $prefix/$target/bin/ar], $target-ar) +AC_CHECK_PROGS(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib) + [$target-ranlib, $prefix/$target/bin/ranlib], $target-ranlib) +AC_CHECK_PROGS(GCC_FOR_TARGET, $target-gcc, $target-gcc) + [$target-gcc, $prefix/$target/bin/gcc], $target-gcc) fi -This could be improved to also look for gcc in PATH, but require the -prefix to contain the target e.g.: - -target=m68k-coff -->GCC_FOR_TARGET = /usr/gnu/m68k-coff/bin/gcc - From: nennker@cs.tu-berlin.DE (Axel Nennker) +(also look in the autoconf mailing list archives for the proposed +CHECK_TARGET_TOOL macro from Natanael Nerode, a gcc configury guru). + ------------------------------------------------------------------------------ The problem occurs with the following libc functions in SunOS 5.4: diff --git a/doc/autoconf.texi b/doc/autoconf.texi index b2c16dbe4..5aa216806 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8840,16 +8840,18 @@ with their modern implementation. Autoconf provides a simple means to obsolete a macro. -@defmac AU_DEFUN (@var{old-macro}, @var{implementation}, @ovar{message}) +@defmac AU_DEFUN (@var{old-macro}, @var{implementation}) @acindex{DEFUN} @acindex{AU_DEFUN} Define @var{old-macro} as @var{implementation}. The only difference with @code{AC_DEFUN} is that the user will be warned that -@var{old-macro} is now obsolete. +@var{old-macro} is now obsolete; if she then uses @command{autoupdate}, +the call to @var{old-macro} will be replaced by the modern +@var{implementation}. -If she then uses @command{autoupdate}, the call to @var{old-macro} will be -replaced by the modern @var{implementation}. The additional -@var{message} is then printed. +Note that you can provide another definition with @code{AC_DEFUN} in +order to update the way a macro is used without making it completely +obsolete. @end defmac @node Coding Style diff --git a/lib/autoconf/autoupdate.m4 b/lib/autoconf/autoupdate.m4 index b2ce1ee7a..62bb3bcf9 100644 --- a/lib/autoconf/autoupdate.m4 +++ b/lib/autoconf/autoupdate.m4 @@ -50,22 +50,12 @@ # Roland McGrath, Noah Friedman, david d zuhn, and many others. -## --------------------------------- ## -## Defining macros in autoupdate::. ## -## --------------------------------- ## +## ----------------------------------- ## +## Defining macros to be autoupdated. ## +## ----------------------------------- ## -# AU_DEFINE(NAME, GLUE-CODE, [MESSAGE]) -# ------------------------------------- -# -# Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed -# wrapping actions required by `autoupdate'. -# We do not define anything in `autoconf::'. -m4_define([AU_DEFINE], -[AC_DEFUN([$1], [$2])]) - - -# AU_DEFUN(NAME, NEW-CODE, [MESSAGE]) +# AU_DEFUN(NAME, NEW-CODE) # ----------------------------------- # Declare that the macro NAME is now obsoleted, and should be replaced # by NEW-CODE. Tell the user she should run autoupdate, and include @@ -77,12 +67,10 @@ m4_define([AU_DEFINE], # and to update a configure.ac. # See `acobsolete.m4' for a longer description. m4_define([AU_DEFUN], -[AU_DEFINE([$1], +[AC_DEFUN([$1], [AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete. You should run autoupdate.])dnl -$2], - [$3])dnl -]) +$2])]) # AU_ALIAS(OLD-NAME, NEW-NAME) diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 9609ad158..10504f98c 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -732,7 +732,7 @@ AU_DEFUN([AC_UNISTD_H], # Define `USG' if string functions are in strings.h. AU_DEFUN([AC_USG], [AC_DIAGNOSE([obsolete], -[$0: Remove `AC_MSG_CHECKING', `AC_LINK_IFELSE' and this `AC_WARNING' +[$0: Remove `AC_MSG_CHECKING', `AC_LINK_IFELSE' and this `AC_DIAGNOSE' when you adjust your code to use HAVE_STRING_H.])dnl AC_MSG_CHECKING([for BSD string and memory functions]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], @@ -761,7 +761,7 @@ AC_CHECK_HEADERS(string.h) # But it is better to check for both headers, and alias NEED_MEMORY_H to # HAVE_MEMORY_H. AU_DEFUN([AC_MEMORY_H], -[AC_DIAGNOSE([obsolete], [$0: Remove this warning and +[AC_DIAGNOSE([obsolete], [$0: Remove this `AC_DIAGNOSE' and `AC_CHECK_HEADER(memory.h, AC_DEFINE(...))' when you adjust your code to use and HAVE_STRING_H and HAVE_MEMORY_H, not NEED_MEMORY_H.])dnl AC_CHECK_HEADER(memory.h, @@ -780,7 +780,7 @@ AU_DEFUN([AC_DIR_HEADER], [AC_HEADER_DIRENT AC_FUNC_CLOSEDIR_VOID AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the four `AC_DEFINE' when you +[$0: Remove this `AC_DIAGNOSE' and the four `AC_DEFINE' when you adjust your code to use `AC_HEADER_DIRENT'.]) test ac_cv_header_dirent_dirent_h && AC_DEFINE([DIRENT], 1, [Same as `HAVE_DIRENT_H', don't depend on me.]) diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 9b57442b4..45ad1d3d4 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -355,7 +355,7 @@ AC_DEFINE([_GNU_SOURCE]) AU_DEFUN([AC_CYGWIN], [AC_CANONICAL_HOST AC_DIAGNOSE([obsolete], - [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl + [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os matches *cygwin*])dnl case $host_os in *cygwin* ) CYGWIN=yes;; * ) CYGWIN=no;; @@ -370,7 +370,7 @@ esac AU_DEFUN([AC_EMXOS2], [AC_CANONICAL_HOST AC_DIAGNOSE([obsolete], - [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl + [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os matches *emx*])dnl case $host_os in *emx* ) EMXOS2=yes;; * ) EMXOS2=no;; @@ -385,7 +385,7 @@ esac AU_DEFUN([AC_MINGW32], [AC_CANONICAL_HOST AC_DIAGNOSE([obsolete], - [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl + [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os matches *mingw32*])dnl case $host_os in *mingw32* ) MINGW32=yes;; * ) MINGW32=no;; diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 355c7cf71..64def7fc5 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -735,7 +735,12 @@ m4_define([AC_LIST_LINKS_COMMANDS]) # # _AC_LINK_CNT is used to be robust to multiple calls. AU_DEFUN([AC_LINK_FILES], -[m4_if($#, 2, , +[AC_DIAGNOSE([obsolete], [ +It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES +to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant +update, you should probably tune the result yourself and remove this +warning.]) +m4_if($#, 2, , [m4_fatal([$0: incorrect number of arguments])])dnl m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl ac_sources="$1" @@ -746,11 +751,7 @@ while test -n "$ac_sources"; do [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source" done AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl -], -[ - It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES - to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant - update, you should probably tune the result yourself.])# AC_LINK_FILES +]) # Initialize. diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 21bd65444..26e8b9f1c 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -417,7 +417,7 @@ AU_DEFUN([AC_INT_16_BITS], [AC_CHECK_SIZEOF([int]) AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `INT_16_BITS', but upon - `SIZEOF_INT'. Remove this warning and the `AC_DEFINE' when you + `SIZEOF_INT == 2'. Remove this warning and the `AC_DEFINE' when you adjust the code.])dnl test $ac_cv_sizeof_int = 2 && AC_DEFINE(INT_16_BITS, 1, @@ -431,7 +431,7 @@ AU_DEFUN([AC_LONG_64_BITS], [AC_CHECK_SIZEOF([long int]) AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `LONG_64_BITS', but upon - `SIZEOF_LONG_INT'. Remove this warning and the `AC_DEFINE' when + `SIZEOF_LONG_INT == 8'. Remove this warning and the `AC_DEFINE' when you adjust the code.])dnl test $ac_cv_sizeof_long_int = 8 && AC_DEFINE(LONG_64_BITS, 1,