2004-11-23 Stepan Kasal * doc/autoconf.texi (Pretty Help Strings): Fix quoting issues with the examples; fix the bug in MY_ARG_WITH example reported by Alexandre Duret-Lutz. * lib/autoconf/general.m4 (AC_ARG_ENABLE, AC_ARG_ENABLE): Enable expansion of $1 in the comment emitted to configure. Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.841 diff -u -r1.841 autoconf.texi --- doc/autoconf.texi 23 Nov 2004 09:01:01 -0000 1.841 +++ doc/autoconf.texi 23 Nov 2004 11:56:27 -0000 @@ -13053,8 +13053,8 @@ AC_ARG_WITH(foo, [AS_HELP_STRING(--with-foo, [use foo (default is no)])], - [ac_cv_use_foo=$withval], - [ac_cv_use_foo=no]) + [[ac_cv_use_foo=$withval]], + [[ac_cv_use_foo=no]]) @end example The second argument of @code{AS_HELP_STRING} is @@ -13076,11 +13076,8 @@ AC_DEFUN([MY_ARG_WITH], [AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [use $1 (default is $2)])], - [ac_cv_use_$1=$withval], - [ac_cv_use_$1=no]) - AC_CACHE_CHECK([whether to use $1], - [ac_cv_use_$1], - [ac_cv_use_$1=$2])]) + [[ac_cv_use_]$1[=$withval]], + [[ac_cv_use_]$1=$2])]) @end example @end defmac Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.834 diff -u -r1.834 general.m4 --- lib/autoconf/general.m4 20 Aug 2004 22:54:51 -0000 1.834 +++ lib/autoconf/general.m4 23 Nov 2004 11:56:27 -0000 @@ -1299,7 +1299,7 @@ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl m4_divert_once([HELP_ENABLE], [$2])dnl -# Check whether --enable-$1 or --disable-$1 was given. +[#] Check whether --enable-$1 or --disable-$1 was given. if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then enableval="[$enable_]m4_bpatsubst([$1], -, _)" $3 @@ -1327,7 +1327,7 @@ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]]) m4_divert_once([HELP_WITH], [$2])dnl -# Check whether --with-$1 or --without-$1 was given. +[#] Check whether --with-$1 or --without-$1 was given. if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then withval="[$with_]m4_bpatsubst([$1], -, _)" $3