Mark D. Baushke wrote: > It is probably a good idea to just quote the variable > arguments to test in this case to ensure that the > '=' operator is used in a binary operator context.
I agree with the first line of your patch, but not with the second one. Blindly putting double-quotes around variable references has the tendency of sweeping other bugs under the rug (either bugs in gnulib, or in autoconf). Actually when looking where the gl_cv_header_inttypes_h variable comes from and what its possible values are, I found a major bug that I did on 2006-06-04 and brought into gnulib on 2006-07-22: Two different macros, gl_HEADER_INTTYPES_H and gl_AC_HEADER_INTTYPES_H, were using the same cache variable, with different meanings! Apologies. I now fixed this by removing one of the two macros. 2006-09-18 Bruno Haible <[EMAIL PROTECTED]> * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro. * m4/inttypes-pri.m4: Require autoconf >= 2.52. (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h. * m4/gettext.m4: Require autoconf >= 2.52. (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h. * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h. * modules/inttypes (Files): Remove m4/inttypes-h.m4. *** m4/inttypes-h.m4 22 Jul 2006 13:17:22 -0000 1.1 --- m4/inttypes-h.m4 18 Sep 2006 19:20:11 -0000 *************** *** 1,25 **** ! # inttypes-h.m4 serial 1 (gettext-0.15) ! dnl Copyright (C) 1997-2002, 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. ! ! dnl From Paul Eggert. ! ! # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with ! # <sys/types.h>. ! ! AC_DEFUN([gl_HEADER_INTTYPES_H], ! [ ! AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, ! [ ! AC_TRY_COMPILE( ! [#include <sys/types.h> ! #include <inttypes.h>], ! [], gl_cv_header_inttypes_h=yes, gl_cv_header_inttypes_h=no) ! ]) ! if test $gl_cv_header_inttypes_h = yes; then ! AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, ! [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) ! fi ! ]) --- 1 ---- ! /* This file will go away when gettext-0.15.1 is released. */ *** m4/inttypes-pri.m4 28 Aug 2006 12:54:47 -0000 1.6 --- m4/inttypes-pri.m4 18 Sep 2006 19:20:11 -0000 *************** *** 1,4 **** ! # inttypes-pri.m4 serial 3 (gettext-0.15.1) dnl Copyright (C) 1997-2002, 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, --- 1,4 ---- ! # inttypes-pri.m4 serial 4 (gettext-0.15.1) dnl Copyright (C) 1997-2002, 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, *************** *** 6,18 **** dnl From Bruno Haible. # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ ! AC_REQUIRE([gl_HEADER_INTTYPES_H]) ! if test $gl_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ --- 6,20 ---- dnl From Bruno Haible. + AC_PREREQ(2.52) + # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ ! AC_CHECK_HEADERS([inttypes.h]) ! if test $ac_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ *** m4/gettext.m4 22 Jul 2006 13:18:28 -0000 1.33 --- m4/gettext.m4 18 Sep 2006 19:20:11 -0000 *************** *** 1,4 **** ! # gettext.m4 serial 53 (gettext-0.15) dnl Copyright (C) 1995-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, --- 1,4 ---- ! # gettext.m4 serial 53.1 dnl Copyright (C) 1995-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, *************** *** 17,22 **** --- 17,24 ---- dnl Ulrich Drepper <[EMAIL PROTECTED]>, 1995-2000. dnl Bruno Haible <[EMAIL PROTECTED]>, 2000-2005. + AC_PREREQ(2.52) + dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). *************** *** 497,503 **** AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gl_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_REQUIRE([gl_LOCK])dnl --- 499,504 ---- *************** *** 507,513 **** [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, [Define to 1 if the compiler understands __builtin_expect.])]) ! AC_CHECK_HEADERS([argz.h limits.h unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ argz_next __fsetlocking]) --- 508,514 ---- [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, [Define to 1 if the compiler understands __builtin_expect.])]) ! AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ argz_next __fsetlocking]) *** m4/inttypes.m4 18 Sep 2006 17:45:51 -0000 1.14 --- m4/inttypes.m4 18 Sep 2006 19:20:11 -0000 *************** *** 24,30 **** dnl - some additional tests. gl_cv_header_working_inttypes_h=no if test "$gl_cv_header_working_stdint_h" = yes \ ! && test "$gl_cv_header_inttypes_h" = yes \ && test "$ac_cv_have_decl_imaxabs" = yes \ && test "$ac_cv_have_decl_imaxdiv" = yes \ && test "$ac_cv_have_decl_strtoimax" = yes \ --- 24,30 ---- dnl - some additional tests. gl_cv_header_working_inttypes_h=no if test "$gl_cv_header_working_stdint_h" = yes \ ! && test $ac_cv_header_inttypes_h = yes \ && test "$ac_cv_have_decl_imaxabs" = yes \ && test "$ac_cv_have_decl_imaxdiv" = yes \ && test "$ac_cv_have_decl_strtoimax" = yes \ *** modules/inttypes 8 Sep 2006 12:26:35 -0000 1.11 --- modules/inttypes 18 Sep 2006 19:20:11 -0000 *************** *** 4,10 **** Files: lib/inttypes_.h m4/absolute-header.m4 - m4/inttypes-h.m4 m4/inttypes-pri.m4 m4/inttypes.m4 --- 4,9 ----