autoconf
[Top][All Lists]
Advanced

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

Re: AC_HELP_STRING Help


From: Guido Draheim
Subject: Re: AC_HELP_STRING Help
Date: Thu, 23 Jan 2003 21:26:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020826

Roger Leigh schrieb:
Bill Wendling <address@hidden> writes:


I want to produce a help string like this:

   --with-foo[=DIR]            Use the foo package

(note the []s around the =DIR bit). When I use the option like this:

AC_ARG_WITH([foo],
           [AC_HELP_STRING([--with-foo[=DIR]],
                           [Use the foo package])],,)

It produces:

   --with-foo=DIR            Use the foo package

Is there a way to make it produce the []s that I want?


I've used quadrigraphs in the past, but AC_HELP_STRING is doing
something wierd with the quoting (I've tried changing the quotes,
extra quoting, etc., but without success).  When I have managed to get
`[' and `]' to appear, the formatting is then broken...


exactly! I did just have a look into some of my projects and noticed
that every of those --with-off[=DIR] was done without AC_HELP_STRING.
I had just trying various combinations in the last hour, and it
seems that the "[" are counted for the length of the first argument
but they will not be printed - here is an example where I did only
try to change the first _WITH to use AC_HELP_STRING:

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-pic              try to use only PIC/non-PIC objects default=use both
  --with-pcre=prefix  compile xmlpcre part (via libpcre check)
  --with-pfe[=prefix]    scan pfe documentation (the C files)

That's actually quite weird - so the ac_help_string macro will count
the chars of the argument literal in full glory but the [] brackets get
interpreted as m4 quotations later - after the indent computations. hmmm.

(using 2.52...)





reply via email to

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