-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Matěj Týč on 3/23/2009 5:25 PM: > Hello, I have found out that having this in configure.ac is a problem: > > AC_DEFUN([foo], > [echo "#" ]) The bug is in your code - # starts a comment in m4, hence, the ]) is still part of the comment, and you haven't finished the AC_DEFUN. > However, this is OK: > > AC_DEFUN([foo], > [echo "#" dnl > ]) Yes, but there, the dnl is unexpanded, because it is output as part of the comment instead of its normal role of stripping output to the next newline. And that can in turn cause surprises. > > This is not nice since for instance > AC_DEFUN([foo], > [echo "#define foo" > $somwhere ]) > fails as well... Use proper quoting. Fully quoted (if there are no other macros): AC_DEFUN([foo], [[echo "#define foo" > $somewhere]]) or minimally quoted (so that echo and somewhere can still be replaced by macros): AC_DEFUN([foo], [echo "[#]define foo" > $somewhere]) or use quadrigraphs: AC_DEFUN([foo], [echo "@%:@define foo" > $somewhere]) and reread this section of the manual: http://www.gnu.org/software/autoconf/manual/autoconf.html#M4-Quotation - -- 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 iEYEARECAAYFAknIJJgACgkQ84KuGfSFAYB0pACfRksTPMfMhfSE0DnbPx1mJn0i dXwAnibDTCsglizp2VKIqUvXZAEya0TN =mrWb -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf