Hello Vincent, * Vincent Torri wrote on Tue, Jan 26, 2010 at 01:00:22AM CET: > i would like to use AS_HELP_STRING in an m4 macro such that the > description of the help is different according to the value of one > parameter. The macro is the following: > > dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) > AC_DEFUN([ECORE_CHECK_MODULE], > [ > m4_pushdef([UP], m4_toupper([$1]))dnl > m4_pushdef([DOWN], m4_tolower([$1]))dnl > > want_module=$2 > > if test "x${want_module}" = "xyes" ; then > wanted_value="enabled" > else > wanted_value="disabled" > fi > > AC_ARG_ENABLE([ecore-]m4_defn([DOWN]), > [AS_HELP_STRING( > [--enable-ecore-[]m4_defn([DOWN])], > [enable the ecore_]m4_defn([DOWN])[ module. @<:@default=$wanted_value@:>@])], > [want_module="$enableval"], > [want_module="no"]) > > AC_MSG_CHECKING([whether ecore_]m4_defn([DOWN])[ module is to be built]) > > AS_IF([test "x$have_ecore_[]m4_defn([DOWN])" = "xyes"], [$4], [$5]) > > m4_popdef([UP]) > m4_popdef([DOWN]) > ]) > > > What is displayed by --help is: > > --enable-ecore-job enable the ecore_job module. [default=$wanted_value] > > I've searched a lot, tried a lot of things, nothing worked and i > have no more idea. I assume you want $wanted_value to expand to either enabled or disabled? Well, that cannot work: in the generated configure script, the --help text comes before the code that actually deals with the command line arguments. Also, if your default value would depend on the configure command line, then it wouldn't be the "default" value, right? Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf