Hello John, * John Lumby wrote on Sat, Jul 17, 2010 at 08:09:32PM CEST: > > This is a beginner question. I am modifying a package and would > like to introduce a new configure option to set a value which had been > previously hardcoded. > > So - for example - I want to provide an optional configure option > > --foo-barian-characteristic=VALUE > > and place a default definition in config.h.in > > #undef FOO_BARIAN_CHARACTERISTIC > > and then write something in configure.ac which would respond to the > user specifying the option by replacing #undef by > > #define FOO_BARIAN_CHARACTERISTIC=VALUE you mean a space not = here. > in config.h > > How can I do this? I can see how by using AC_ARG_ENABLE and > AC_DEFINE_UNQUOTED, but that would require that my option appear to be > an --enable-xxx kind - the user would have to specify > configure ... --enable-foo-barian-characteristic=VALUE > which is slightly misleading since this is a setting for a default feature. But your description in the second argument of AC_ARG_ENABLE can help clarify that, right? There is a reason configure does not accept arbitrary arguments: API consistency. For example, it should be possible to configure a number of (even unrelated) packages with the same command line, and developers should be able to stack packages using AC_CONFIG_SUBDIRS. The extension mechanisms are provided by --enable-* and --with-* arguments, and you shouldn't try to change that. Hope that helps. Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf