Re: [PATCH] glib configure.in patches



Art Haas wrote:

+AC_ARG_ENABLE([debug],
+              AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
+	                     [turn on debugging @<:@default=$debug_default@:>@]),
+	      [],
+	      [enable_debug=$debug_default])
Ugh, these 'quadriglyphs' are incredibly unreadable. I assume the
problem is that AC_HELP_STRING does multiple levels of expansion on
it's arguments?

I guess so :-/ ...

I used them so that the output of the "./configure --help"
would still present default values with "[" and "]" ...

  --enable-foo             activates foo [default=on]

If a slight change wasn't unacceptable, the default values
could come out in say "<" and ">" characters ...

  --enable-foo             activates foo <default=on>

... and the quadrigraphs could be removed. As I've changed many
configure.(in|ac) files, I don't find them that difficult to read,
but they are off-putting at first glance.
Putting a set of square brackets around the AC_HELP_STRING() macro gets the quoting to balance correctly (in general, autoconf uniformly strips off one layer of quoting from the arguments to the AC_* macros).

The following line in configure.in:
   AC_ARG_ENABLE([foo], [AC_HELP_STRING([--enable-foo], [a[b]c])])
gives the following in the help output:
 --enable-foo            a[b]c


James.

--
Email: james daa com au              | Linux.conf.au 2003 Call for Papers out
WWW:   http://www.daa.com.au/~james/ |   http://conf.linux.org.au/cfp.html







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