Hi Simon, > However if I remove the following from all gnulib-common.m4 (there are > three of them): > > > +AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], > > +[ > > + dnl Override gl_WARN_ON_USE_PREPARE. > > + AC_DEFUN([gl_WARN_ON_USE_PREPARE], []) > > +]) > > Then building works fine. > > Any ideas why this happens?
If you compare the generated aclocal.m4 file in the buggy situation and in the working situation, you will see this difference: $ diff -u gss/aclocal.m4 gss1/aclocal.m4 --- gss/aclocal.m4 2011-03-31 18:10:38.000000000 +0200 +++ gss1/aclocal.m4 2011-03-31 18:05:06.000000000 +0200 @@ -991,6 +991,7 @@ m4_include([lib/gl/m4/stddef_h.m4]) m4_include([lib/gl/m4/string_h.m4]) m4_include([lib/gl/m4/strverscmp.m4]) +m4_include([lib/gl/m4/warn-on-use.m4]) m4_include([gl/m4/00gnulib.m4]) m4_include([gl/m4/autobuild.m4]) m4_include([gl/m4/gnulib-common.m4]) In other words, 'aclocal' had decided to not include warn-on-use.m4 because it found the gl_WARN_ON_USE_PREPARE macro already defined in gnulib-common.m4. The fix is to hide this definition from 'aclocal'. I'm applying this fix. Not pretty, but it works. 2011-03-31 Bruno Haible <br...@clisp.org> Fix bug with gl_WARN_ON_USE_PREPARE, introduced on 2011-01-23. * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): Hide the gl_WARN_ON_USE_PREPARE definition from 'aclocal'. Reported by Simon Josefsson <si...@josefsson.org>. --- ChangeLog.orig Thu Mar 31 18:18:11 2011 +++ ChangeLog Thu Mar 31 18:17:52 2011 @@ -2629,7 +2629,7 @@ 2011-01-23 Paul Eggert <egg...@cs.ucla.edu> - Allow the user to avoid the GNULIB_TEST_* macros. + Allow the user to avoid the HAVE_RAW_DECL_* macros. * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): New macro. 2011-01-23 Bruno Haible <br...@clisp.org> --- m4/gnulib-common.m4.orig Thu Mar 31 18:18:11 2011 +++ m4/gnulib-common.m4 Thu Mar 31 18:14:46 2011 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 23 +# gnulib-common.m4 serial 24 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -109,7 +109,8 @@ AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], [ dnl Override gl_WARN_ON_USE_PREPARE. - AC_DEFUN([gl_WARN_ON_USE_PREPARE], []) + dnl But hide this definition from 'aclocal'. + AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) ]) # gl_ASSERT_NO_GNULIB_TESTS -- In memoriam Selena Quintanilla <http://en.wikipedia.org/wiki/Selena>