On 06/12/2016 05:25 AM, Gavin Smith wrote: > Hello, Apologies for just now noticing this thread.
> > In the Autoconf manual we read: Any reason you mailed this to the automake list, and not autoconf, then? > > ==== > > When you use the same text in a macro argument, you must therefore > have an extra quotation level (since one is stripped away by the macro > substitution). In general, then, it is a good idea to use double > quoting for all literal string arguments, either around just the > problematic portions, or over the entire argument: > > AC_MSG_WARN([[AC_DC] stinks --Iron Maiden]) > AC_MSG_WARN([[AC_DC stinks --Iron Maiden]]) > > > Note what it says: "triggers a warning". However, it seems in some > cases, using a word that looks like it could be a macro triggers a > hard error, not just a warning: > > $ autoreconf -iv > autoreconf: Entering directory `.' > autoreconf: configure.ac: not using Gettext > autoreconf: running: aclocal > configure.ac:4: warning: macro 'AM_DC' not found in library AM_DC is not the name used in the example, but falls into the namespace reserved by automake, so I guess I see why you are testing it instead of AC_DC. > autoreconf: configure.ac: tracing > autoreconf: configure.ac: not using Libtool > autoreconf: running: /usr/bin/autoconf > configure.ac:4: error: possibly undefined macro: AM_DC > If this token and others are legitimate, please use m4_pattern_allow. > See the Autoconf documentation. > autoreconf: /usr/bin/autoconf failed with exit status: 1 However, the error message says that it is autoconf (not automake) that is failing, so I don't see how this is applicable to automake. > > Any ideas which it is: is it actually forbidden, or should it be just a > warning? So I guess you are pointing out a documentation error in the autoconf manual, and that the manual should call it an error, not a warning? Sure, I can do that. > > I intend to put information about this here: > http://buildsystem-manual.sourceforge.net/Macro-name-quoting.html#Macro-name-quoting > , which I've adapted from the test in the automake manual. > > Contents of files: > > $ cat configure.ac > AC_INIT([helloprog], [1.0]) > AM_INIT_AUTOMAKE > > echo AM_DC rocks > > AC_CONFIG_FILES([Makefile]) > AC_OUTPUT > $ cat Makefile.am > AUTOMAKE_OPTIONS=foreign dist-xz > $ > > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature