* Eric Blake wrote on Mon, Jan 26, 2009 at 12:36:25AM CET: > > Backporting within gnulib-common.m4 itself won't work - we have to > redefine AC_DEFUN_ONCE before any other gnulib .m4 file that uses it to > define another macro. Fortunately, Automake collects all m4/*.m4 files in > alphabetical order, so it should be as simple as making a file named > 000-gnulib.m4 (or some-such) which is then guaranteed to be included > before any other gnulib m4 file. Any thoughts on how best to name/include > such a file reliably?
I'd name it 000-gnulib-override.m4. GCC's config/override.m4 uses this to ensure aclocal includes it (the m4_PACKAGE_VERSION is only to avoid errors with older Autoconf): ifdef([m4_PACKAGE_VERSION], [dnl AC_DEFUN a commonly used macro so this file is picked up. m4_copy([AC_PREREQ], [_AC_PREREQ]) AC_DEFUN([AC_PREREQ], [frob]) m4_copy([_AC_PREREQ], [AC_PREREQ]) ...]) Cheers, Ralf