[Top][All Lists]

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

[Roland Illig <address@hidden>] Bug#222163: autoconf: quoting strings wi

From: Ben Pfaff
Subject: [Roland Illig <address@hidden>] Bug#222163: autoconf: quoting strings with AC_HELP_STRING
Date: 02 Dec 2003 21:36:56 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

[I don't know what the heck is going on, but it's like none of my
mail to any account at gnu.org goes through.  What's up with
that?  Please let me know if you saw either copy of this email
that I sent already.  This third one is being posted via
gmane.org's news server, so maybe it has a better chance.]

Hi.  The following bug report was filed against the Debian
packaging of Autoconf 2.58.  I took a stab at fixing it, but in
the end I was defeated by the arcane semantics of m4 quoting.

My thought was that we could add to the AS_HELP_STRING
documentation a suggestion to use quadrigraphs in place of
problematic characters.  Then the difficulty is that the
right-hand half of the help message doesn't start in the correct
column, because quadrigraph replacement in the left-hand half
makes that string shorter than it appears.  It is pretty easy to
replace quadrigraphs by single characters using m4_bpatsubst, but
then I couldn't figure out how to quote properly to keep commas
in the replaced argument from screwing everything up when I
called m4_len.  Here's one of my failed attempts:

# _m4_printed_len(STRING)
# ----------------------
# Returns the length that STRING will have when it is printed.
# Normally this is simply STRING's length in characters, but
# we also consider the effect of quadrigraph replacement.
[m4_len(m4_bpatsubst([$1], [,\|@<:@\|@:>@\|@S|@\|@%:@\|@&address@hidden, [x]))])

Anyhow, does anyone else think that this is worth fixing, either
in the documentation or in the source?  (Should it simply be
documented that five levels (or whatever) of quoting are

From: Roland Illig <address@hidden>
Subject: Bug#222163: autoconf: quoting strings with AC_HELP_STRING

Package: autoconf
Version: 2.58-7
Severity: minor

When I type

    AC_HELP_STRING([--enable-foo[=value]], [enable foo (default: def)]),

I expect that a line

    --enable-foo[=value]     enable foo (default: def)

is generated. But the brackets are omitted. To get the brackets, I have
to type

    [AC_HELP_STRING([--enable-gcc-warnings[[[[=error]]]]], [enable additional 
gcc warning flags])],

I think I have quoted everything correctly. Because this behaviour is
not intuitive (I don't know where the three quoting levels disappear), I
consider it a bug.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux wwid 2.4.21-3-k7 #1 Sun Jul 20 19:23:36 EST 2003 i686
Locale: address@hidden, address@hidden (ignored: LC_ALL set to address@hidden)

Versions of packages autoconf depends on:
ii  debianutils                   2.6        Miscellaneous utilities specific t
ii  m4                            1.4-17     a macro processing language
ii  perl                          5.8.1-4    Larry Wall's Practical Extraction 

-- no debconf information


<address@hidden> <address@hidden> <address@hidden> <address@hidden>
 Stanford Ph.D. Candidate - MSU Alumnus - Debian Maintainer - GNU Developer

reply via email to

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