On 09/05/2013 02:20 PM, Eric Blake wrote: > * doc/autoconf.texi (Diversion support) <m4_divert_text>: Add > anchor. > (External Software) <AC_ARG_WITH>: Demonstrate how to use DEFAULTS > diversion, for earlier defaults. > (Package Options) <AC_ARG_ENABLE>: Likewise.
> @@ -22111,7 +22118,7 @@ External Software > [AS_HELP_STRING([--with-readline], > [support fancy command line editing @@<:@@default=check@@:>@@])], > [], > - [with_readline=check]) > + [m4_divert_text([DEFAULTS], [with_readline=check])]) And actually testing this reveals that autoconf generates a syntax error: # Check whether --with-readline was given. if test "${with_readline+set}" = set; then : withval=$with_readline; else fi Looks like AS_IF doesn't know how to optimize out m4_divert_text as not needing an else clause, so the example needs to be tweaked to provide an explicit statement in argument 4 (':' will do), or use the m4_divert_text outside of AC_ARG_WITH. Another good reason why I posted for review first rather than just pushing the patch. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature