* Alan W. Irwin <irwin@...> [2003-09-30 22:11]:
> To implement that, I am thinking of putting all the libltdl stuff inside an
> if test block like the following:
> if test "$enable_dyndrivers" != "yes"; then
> Assuming that solution is fine with you I also need some further specific
> advice about the ordering in configure.ac. The problem is that block of
> code occurs before
> in configure.ac which I presume could change $enable_dyndrivers. We cannot
> move the libltdl stuff downward in the file because it has to come before
> AM_PROG_LIBTOOL (IIRC).
Actually, the MY_ARG_ENABLE macro does not introduce code into the configure
script that could change $enable_dyndrivers. MY_ARG_ENABLE is simply a
wrapper for AC_ARG_WITH and AC_ARG_ENABLE. These two later macros just tell
autoconf to do the right initializations and to include the appropriate text
into the --help string.
Indeed, the setting of $enable_* is done at this line:
$ cat -n configure | grep "enable_\$ac_feature='"
753 eval "enable_$ac_feature='$ac_optarg'";;
while the libltdl stuff comes only after:
$ cat -n configure | grep "### Test for programs"
2191 ### Test for programs
To sum up: I did not test all this, but I guess that even if
"MY_ARG_ENABLE(dyndrivers ..." comes after the libltdl initialization block,
everything will work properly.