Hi Paul, > put the following into configure.in: > > AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) > > This zaps the macro that generates the unwanted GNULIB_TEST_ indicators.
This is a good enough solution, IMO. > * Define a new macro in gnulib that does the above AC_DEFUN, then > invoke that macro in configure.in. This would be slightly better, indeed. > * Add an optional parameter to gl_EARLY that causes it to do the > above AC_DEFUN. I'd like to reserve optional parameters to more important customizations than this one. > * Modify gnulib-tool to generate the above AC_DEFUN if the user > is not importing any test modules. This is not possible, because there may be multiple gnulib-tool invocations in the scope of a single configure.ac; one of the invocations may import test module while the other doesn't. I'm applying this: 2011-01-20 Bruno Haible <br...@clisp.org> Allow the user to avoid the GNULIB_TEST_* macros. * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_TESTS): New macro. Suggested by Paul Eggert. --- m4/gnulib-common.m4.orig Thu Jan 20 10:31:02 2011 +++ m4/gnulib-common.m4 Thu Jan 20 10:30:11 2011 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 21 +# gnulib-common.m4 serial 22 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, @@ -102,6 +102,16 @@ [Define to 1 when the gnulib module $1 should be tested.]) ]) +# gl_ASSERT_NO_GNULIB_TESTS +# asserts that there will be no gnulib tests in the scope of the configure.ac +# and thereby enables an optimization of config.h. +# Used by Emacs. +AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], +[ + dnl Override gl_MODULE_INDICATOR_FOR_TESTS. + AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) +]) + # Test whether <features.h> exists. # Set HAVE_FEATURES_H. AC_DEFUN([gl_FEATURES_H],