What do you think of the following patch? This looks useful to me for nailing down an independent issue in lib/inttypes_.h: with this, it actually works to override the test temporarily with ./configure gl_cv_header_working_inttypes_h=yes
(and thus decouple this from other build failures). Cheers, Ralf 2006-11-14 Ralf Wildenhues <[EMAIL PROTECTED]> * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the test for conforming inttypes.h is both announced and cached. Index: m4/inttypes.m4 =================================================================== RCS file: /cvsroot/gnulib/gnulib/m4/inttypes.m4,v retrieving revision 1.15 diff -u -r1.15 inttypes.m4 --- m4/inttypes.m4 18 Sep 2006 19:23:59 -0000 1.15 +++ m4/inttypes.m4 14 Nov 2006 18:46:18 -0000 @@ -1,4 +1,4 @@ -# inttypes.m4 serial 5 +# inttypes.m4 serial 6 dnl Copyright (C) 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, @@ -22,15 +22,18 @@ dnl - the existence of an <inttypes.h>, dnl - that imaxabs, imaxdiv, strtoimax, strtoumax are declared, 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 \ - && test "$ac_cv_have_decl_strtoumax" = yes; then - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([ + AC_CACHE_CHECK([whether inttypes.h conforms to C99], + [gl_cv_header_working_inttypes_h], + [ + 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 \ + && test "$ac_cv_have_decl_strtoumax" = yes; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ #include <stddef.h> #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ @@ -128,9 +131,9 @@ SCNoPTR SCNuPTR SCNxPTR #endif ; - ])], - [gl_cv_header_working_inttypes_h=yes]) - fi + ])], + [gl_cv_header_working_inttypes_h=yes]) + fi]) if test $gl_cv_header_working_inttypes_h = yes; then dnl Use the existing <inttypes.h>. INTTYPES_H=''