Hello,

On Tue, Oct 25, 2005 at 06:07:47PM -0700, Kristis Makris wrote:
> 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]:@@:>@"

if this were in the outermost level, plain comma would work.

But it seems this is a parameter of a macro.  Then the problem is that
you don't quote its parameters.  Please read the section "M4 Quotattion"
of the Autoconf manual, or at least the "Quotation Rule of Thumb".

You need something like:

AC_FOO([..], [..],
  [DEVEL_CONFIG_TEMPLATE_BUGID_SPLIT_REGEX="@<:@,[EMAIL PROTECTED]:@@:>@"])

Actually, you don't need quadrigraphs at all, just quote the literal
string (that makes two pairs of quotes, together with the usual
parameter quoting:

AC_FOO([..], [..],
  [[DEVEL_CONFIG_TEMPLATE_BUGID_SPLIT_REGEX="[,\s#]"]])

or, if the parameter combines literal shell code with macros:

AC_FOO([..], [..],
  [AC_THIS
   [DEVEL_CONFIG_TEMPLATE_BUGID_SPLIT_REGEX="[,\s#]"]
   AC_THAT
  ])

HTH,
        Stepan Kasal


_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to