-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Josef Vukovic on 12/10/2009 5:09 AM: > Hello, > > I am reading the autoconf[1] documentation and come to the topic, > 3.1.2 The autoconf language where it says " Arguments should > be enclosed within the m4 quote characters ‘[’ and ‘]’..." but m4 > uses the '`' and ''' as quoting characters. Also defining a Macro > with: > define([stdio_h], [HAVE_STDIO_H])dnl That is the m4sugar/autoconf way. > > don't work as expected with defining it like this: > > define(`stdio_h', `HAVE_STDIO_H')dnl That is the raw m4 way. > > So I'm know somewhat confused could someone be so friendly > to explain the issue? Is there a changequote applied during the > processing of configure.ac wiht autoconf? Yes, Autoconf uses the m4sugar wrapper around m4, which is documented as having done a changequote to [] at the very beginning of the input file. And the autoconf manual even says why: http://www.gnu.org/software/autoconf/manual/autoconf.html#Changequote-is-Evil For instance, by default M4 uses ‘`’ and ‘'’ as quotes, but in the context of shell programming (and actually of most programming languages), that's about the worst choice one can make: because of strings and back-quoted expressions in shell code (such as ‘'this'’ and ‘`that`’), and because of literal characters in usual programming languages (as in ‘'0'’), there are many unbalanced ‘`’ and ‘'’. Proper M4 quotation then becomes a nightmare, if not impossible. In order to make M4 useful in such a context, its designers have equipped it with changequote, which makes it possible to choose another pair of quotes. M4sugar, M4sh, Autoconf, and Autotest all have chosen to use ‘[’ and ‘]’. Not especially because they are unlikely characters, but because they are characters unlikely to be unbalanced. > If so isn't the manual > somewhat ambigious? Which manual (m4 or autoconf), and where? If you found a particular sentence that confused you, point it out so we can improve it. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksg7poACgkQ84KuGfSFAYDXEQCeK0/eaIdZbllXz6AZKA1YIlWM zgMAn0rw0lS0w/5E4saihYYfYbUjD/gx =qBE5 -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf