My gnulib-comp.m4 contains, from modules/stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC dnl shouldn't hurt, though installers are on their own to set c99 mode. AC_REQUIRE([AC_PROG_CC_STDC])
This puts the compiler in gnu99 mode with gcc. This causes problems on Mac OS X if the package (e.g., gnutls) is linked with code that was not compiled in gnu99 mode, for example GMP or Guile. The problem appears to be conflicting linker behaviour for 'extern inline' and a problem with the Mac OS X linker. See: http://thread.gmane.org/gmane.network.gnutls.general/1061/focus=1136 The current solution in stdarg for the va_copy problem seems ugly to me. For example, it doesn't test for a missing feature before applying a workaround. Can't we make the code do a feature-test, so it only puts the compiler in gnu99 mode if va_copy doesn't work? Or move all this to a specific 'va_copy' module? Not everyone needs va_copy. Thanks, /Simon