Re: prepare for autoconf-2.60
Paul Eggert wrote: + But about AC_CHECK_DECLS_ONCE: note that in + autoconf = 2.60 the symbol separator is a comma, whereas here it is + whitespace. I hadn't noticed this incompatibility. It is a real hassle. The comma separator in autoconf's AC_CHECK_DECLS is a hassle, because it's the delimiter between different arguments in m4. That's why I used normal space-separated lists in the gnulib macro. Anyway, for the time of migration, we can limit our uses of AC_CHECK_DECLS_ONCE to a single function name; see attached patch. gnulib-tool assumes Autoconf 2.57 through 2.59, since it copies m4/onceonly_2_57.m4. Does m4/onceonly_2_57.m4 break with autoconf-2.60? It produces smaller code, by using some undocumented hooks of autoconf. (I had actually hoped to see this implementation be moved to autoconf-2.60, rather than the less optimized m4/onceonly.m4.) If we could assume Autoconf 2.60, we could remove the following files, modules/assert modules/extensions m4/assert.m4 m4/d-ino.m4 m4/extensions.m4 m4/onceonly.m4 m4/onceonly_2_57.m4 and install something like the following patch Yes, thanks for having moved all these to autoconf. However, I think it's wise to wait a few months until autoconf-2.60 has stabilized before forcing everyone to jump from 2.59 to it. Bruno diff -c -3 -r1.8 argp.m4 *** argp.m4 10 Dec 2005 21:37:44 - 1.8 --- argp.m4 20 Apr 2006 11:56:08 - *** *** 1,5 ! # argp.m4 serial 5 ! dnl Copyright (C) 2003-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,5 ! # argp.m4 serial 6 ! dnl Copyright (C) 2003-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *** *** 43,53 AC_MSG_RESULT(yes)], [ AC_MSG_RESULT(no)] ) ! AC_CHECK_DECLS_ONCE( ! [clearerr_unlocked feof_unlocked ferror_unlocked ! fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked ! fread_unlocked fwrite_unlocked getc_unlocked ! getchar_unlocked putc_unlocked putchar_unlocked]) AC_CHECK_FUNCS_ONCE([flockfile funlockfile]) AC_CHECK_HEADERS_ONCE([features.h linewrap.h]) ]) --- 43,61 AC_MSG_RESULT(yes)], [ AC_MSG_RESULT(no)] ) ! AC_CHECK_DECLS_ONCE([clearerr_unlocked]) ! AC_CHECK_DECLS_ONCE([feof_unlocked]) ! AC_CHECK_DECLS_ONCE([ferror_unlocked]) ! AC_CHECK_DECLS_ONCE([fflush_unlocked]) ! AC_CHECK_DECLS_ONCE([fgets_unlocked]) ! AC_CHECK_DECLS_ONCE([fputc_unlocked]) ! AC_CHECK_DECLS_ONCE([fputs_unlocked]) ! AC_CHECK_DECLS_ONCE([fread_unlocked]) ! AC_CHECK_DECLS_ONCE([fwrite_unlocked]) ! AC_CHECK_DECLS_ONCE([getc_unlocked]) ! AC_CHECK_DECLS_ONCE([getchar_unlocked]) ! AC_CHECK_DECLS_ONCE([putc_unlocked]) ! AC_CHECK_DECLS_ONCE([putchar_unlocked]) AC_CHECK_FUNCS_ONCE([flockfile funlockfile]) AC_CHECK_HEADERS_ONCE([features.h linewrap.h]) ]) diff -c -3 -r1.2 getlogin_r.m4 *** getlogin_r.m4 4 Sep 2005 00:05:33 - 1.2 --- getlogin_r.m4 20 Apr 2006 11:56:08 - *** *** 1,6 ! #serial 1 ! # Copyright (C) 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, --- 1,6 ! #serial 2 ! # Copyright (C) 2005-2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, *** *** 29,33 AC_DEFUN([gl_PREREQ_GETLOGIN_R], [ AC_CHECK_HEADERS_ONCE([unistd.h]) ! AC_CHECK_DECLS_ONCE([getlogin getlogin_r]) ]) --- 29,34 AC_DEFUN([gl_PREREQ_GETLOGIN_R], [ AC_CHECK_HEADERS_ONCE([unistd.h]) ! AC_CHECK_DECLS_ONCE([getlogin]) ! AC_CHECK_DECLS_ONCE([getlogin_r]) ]) diff -c -3 -r1.11 getpass.m4 *** getpass.m4 25 Aug 2005 21:19:07 - 1.11 --- getpass.m4 20 Apr 2006 11:56:08 - *** *** 1,5 ! # getpass.m4 serial 6 ! dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,5 ! # getpass.m4 serial 7 ! dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *** *** 37,41
Re: prepare for autoconf-2.60
* Paul Eggert wrote on Thu, Apr 20, 2006 at 01:50:48AM CEST: Bruno Haible [EMAIL PROTECTED] writes: + But about AC_CHECK_DECLS_ONCE: note that in + autoconf = 2.60 the symbol separator is a comma, whereas here it is + whitespace. I hadn't noticed this incompatibility. It is a real hassle. One solution is to forbid _any_ Gnulib (or other non-Autoconf-provided) macro to start with `AC_'. I thought this was a convention agreed upon long ago (much longer than, say, `build-aux' as a directory name). Then one could even write an autoupdate rule to transform gl_CHECK_DECLS_ONCE into AC_CHECK_DECLS_ONCE and change the white-space separated list into a M4 list at the same time (with reasonably safe heuristics).[1] We could scan the argument of Autoconf's AC_CHECK_DECLS_ONCE at M4 time and warn if we find white space but no comma. (Similarly Gnulib's version if we find comma.) Cheers, Ralf [1] You should note that, until recently, autoupdate was really almost unusable; but a couple of nasty bugs in it have been squatted, and maybe it's already good enough for many uses now. :-)
prepare for autoconf-2.60
Hi, It appears that autoconf-2.60 may be released soon. I added comments to longdouble.m4 and onceonly.m4 relating to the new macros in autoconf-2.59d. I also propose a similar comment to extensions.m4, see below. Bruno diff -c -3 -r1.5 longdouble.m4 *** longdouble.m4 18 Jan 2005 13:07:56 - 1.5 --- longdouble.m4 19 Apr 2006 11:35:28 - *** *** 1,5 ! # longdouble.m4 serial 1 (gettext-0.12) ! dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,5 ! # longdouble.m4 serial 2 (gettext-0.15) ! dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *** *** 8,13 --- 8,16 dnl Test whether the compiler supports the 'long double' type. dnl Prerequisite: AC_PROG_CC + dnl This file is only needed in autoconf = 2.59. Newer versions of autoconf + dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics. + AC_DEFUN([gt_TYPE_LONGDOUBLE], [ AC_CACHE_CHECK([for long double], gt_cv_c_long_double, diff -c -3 -r1.6 onceonly.m4 *** onceonly.m4 3 Mar 2005 20:59:01 - 1.6 --- onceonly.m4 19 Apr 2006 11:35:28 - *** *** 1,5 ! # onceonly.m4 serial 3 (gettext-0.12) ! dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,5 ! # onceonly.m4 serial 4 (gettext-0.15) ! dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *** *** 19,24 --- 19,29 dnl empty, and the check will be inserted before the body of the AC_DEFUNed dnl function. + dnl This file is only needed in autoconf = 2.59. Newer versions of autoconf + dnl have this macro built-in. But about AC_CHECK_DECLS_ONCE: note that in + dnl autoconf = 2.60 the symbol separator is a comma, whereas here it is + dnl whitespace. + dnl Autoconf version 2.57 or newer is recommended. AC_PREREQ(2.54) diff -c -3 -r1.9 extensions.m4 *** extensions.m4 2 Mar 2006 00:04:59 - 1.9 --- extensions.m4 19 Apr 2006 11:35:28 - *** *** 5,10 --- 5,13 # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. + # This file is only needed in autoconf = 2.59. Newer versions of autoconf + # have a macro AC_USE_SYSTEM_EXTENSIONS with identical semantics. + # gl_USE_SYSTEM_EXTENSIONS # # Enable extensions on systems that normally disable them,
Re: prepare for autoconf-2.60
Bruno Haible [EMAIL PROTECTED] writes: I also propose a similar comment to extensions.m4, see below. Thanks, I installed that. + But about AC_CHECK_DECLS_ONCE: note that in + autoconf = 2.60 the symbol separator is a comma, whereas here it is + whitespace. I hadn't noticed this incompatibility. It is a real hassle. I suppose it's better to have AC_CHECK_DECLS_ONCE to resemble Autoconf's longstanding AC_CHECK_DECLS macro (which uses commas), but I don't like changing a longstanding Gnulib tradition either. Ouch. Perhaps the Gnulib macro should be renamed to gl_CHECK_DECLS_ONCE, for macros that want to use the Gnulib tradition? (I vaguely recall having this discussion before) I scanned Gnulib for other issues related to Autoconf 2.60, and have the following thoughts. gnulib-tool assumes Autoconf 2.57 through 2.59, since it copies m4/onceonly_2_57.m4. I think we should modify it to assume 2.60, once 2.60 comes out. People who want to maintain packages that assume older Autoconf releases can copy m4/onceonly_2_57.m4 by hand. If we could assume Autoconf 2.60, we could remove the following files, modules/assert modules/extensions m4/assert.m4 m4/d-ino.m4 m4/extensions.m4 m4/onceonly.m4 m4/onceonly_2_57.m4 and install something like the following patch (this is incomplete, but it gives a feeling for the sort of thing involved): Index: gnulib-tool === RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v retrieving revision 1.107 diff -p -u -b -r1.107 gnulib-tool --- gnulib-tool 13 Feb 2006 15:40:25 - 1.107 +++ gnulib-tool 19 Apr 2006 23:50:06 - @@ -530,7 +530,7 @@ func_get_filelist () { sed -n -e /^Files$sed_extract_prog $gnulib_dir/modules/$1 #echo m4/onceonly.m4 - echo m4/onceonly_2_57.m4 + #echo m4/onceonly_2_57.m4 } # func_get_dependencies module @@ -1316,8 +1316,8 @@ func_import () if grep AC_GNU_SOURCE $destdir/$m4base/*.m4 /dev/null; then echo AC_REQUIRE([AC_GNU_SOURCE]) fi -if grep gl_USE_SYSTEM_EXTENSIONS $destdir/$m4base/*.m4 /dev/null; then - echo AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +if grep AC_USE_SYSTEM_EXTENSIONS $destdir/$m4base/*.m4 /dev/null; then + echo AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) fi if grep gl_LOCK $destdir/$m4base/*.m4 /dev/null; then echo AC_REQUIRE([gl_LOCK]) @@ -1546,8 +1546,8 @@ func_create_testdir () echo AC_GNU_SOURCE echo fi - if grep gl_USE_SYSTEM_EXTENSIONS $testdir/m4/*.m4 /dev/null; then - echo gl_USE_SYSTEM_EXTENSIONS + if grep AC_USE_SYSTEM_EXTENSIONS $testdir/m4/*.m4 /dev/null; then + echo AC_USE_SYSTEM_EXTENSIONS echo fi if grep gl_LOCK $testdir/m4/*.m4 /dev/null; then @@ -1627,8 +1627,8 @@ func_create_testdir () echo AC_GNU_SOURCE echo fi - if grep gl_USE_SYSTEM_EXTENSIONS $testdir/m4/*.m4 /dev/null; then - echo gl_USE_SYSTEM_EXTENSIONS + if grep AC_USE_SYSTEM_EXTENSIONS $testdir/m4/*.m4 /dev/null; then + echo AC_USE_SYSTEM_EXTENSIONS echo fi if grep gl_LOCK $testdir/m4/*.m4 /dev/null; then Index: lib/backupfile.c === RCS file: /cvsroot/gnulib/gnulib/lib/backupfile.c,v retrieving revision 1.47 diff -p -u -b -r1.47 backupfile.c --- lib/backupfile.c23 Sep 2005 04:15:13 - 1.47 +++ lib/backupfile.c19 Apr 2006 23:50:06 - @@ -63,7 +63,7 @@ # define HAVE_DIR 0 #endif -#if D_INO_IN_DIRENT +#if HAVE_STRUCT_DIRENT_D_INO # define REAL_DIR_ENTRY(dp) ((dp)-d_ino != 0) #else # define REAL_DIR_ENTRY(dp) 1 Index: lib/c-strtod.c === RCS file: /cvsroot/gnulib/gnulib/lib/c-strtod.c,v retrieving revision 1.5 diff -p -u -b -r1.5 c-strtod.c --- lib/c-strtod.c 14 May 2005 06:03:57 - 1.5 +++ lib/c-strtod.c 19 Apr 2006 23:50:06 - @@ -40,7 +40,7 @@ #endif /* c_strtold falls back on strtod if strtold doesn't conform to C99. */ -#if LONG HAVE_C99_STRTOLD +#if LONG HAVE_STRTOLD # define STRTOD strtold #else # define STRTOD strtod Index: lib/getcwd.c === RCS file: /cvsroot/gnulib/gnulib/lib/getcwd.c,v retrieving revision 1.11 diff -p -u -b -r1.11 getcwd.c --- lib/getcwd.c21 Feb 2006 06:40:34 - 1.11 +++ lib/getcwd.c19 Apr 2006 23:50:06 - @@ -103,7 +103,7 @@ # endif #endif -#if D_INO_IN_DIRENT +#if HAVE_STRUCT_DIRENT_D_INO # define MATCHING_INO(dp, ino) ((dp)-d_ino == (ino)) #else # define MATCHING_INO(dp, ino) true Index: m4/argp.m4 === RCS file: /cvsroot/gnulib/gnulib/m4/argp.m4,v retrieving revision 1.8 diff -p -u -b -r1.8 argp.m4 --- m4/argp.m4 10 Dec 2005 21:37:44 - 1.8 +++ m4/argp.m4 19 Apr 2006 23:50:06 - @@ -7,7 +7,7 @@ dnl with or without