Hi Kristis,
* Kristis Makris wrote on Wed, Oct 26, 2005 at 03:07:47AM CEST:
> Hello,
>
> I'm having a hard time escaping a comma (',') in autoconf. I'm trying to
> set to a variable the regular expression: [,\s#]. I can set almost
> everything, except the comma:
>
> DEVEL_CONFIG_TEMPLATE_BUGID_SPLIT_REGEX="@<:@[EMAIL PROTECTED]:@@:>@"
>
> Can anyone recommend how this is done ?
Outside of any macro definitions or calls (the former is really a
special case of the latter), a comma should not hurt at all.
Inside, you should ensure to have quoted enough. The general rule is:
One level of quotation per level of nesting.
Illustrative example:
cat >configure.ac <<EOF
AC_INIT
AC_DEFUN([FOO], [echo look, there is a comma])
AC_DEFUN([BAR], echo hmm, where has it gone now)
AC_DEFUN([BADCHOICE], m4_ifval([$1], [echo argument given, but comma missing],
[echo no argument given]))
AC_DEFUN([GOODCHOICE], [m4_ifval([$1], [echo argument given, now look], [echo
no argument given])])
FOO
BAR
BADCHOICE
BADCHOICE([bla])
GOODCHOICE
GOODCHOICE([bla])
AC_OUTPUT
EOF
autoconf
./configure
For more information, please read
info Autoconf "M4 Quotation"
Cheers,
Ralf
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf