autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Escaping a ',' in autoconf


From: Stepan Kasal
Subject: Re: Escaping a ',' in autoconf
Date: Wed, 26 Oct 2005 08:26:48 +0200
User-agent: Mutt/1.4.1i

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="@<:@address@hidden:@@:>@"

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="@<:@,address@hidden:@@:>@"])

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]