Re: autoconf/configure information sources?
Dale Scheetz <dwarf@polaris.net> writes:
> Just how many options can I put on the command line?
Lots. Included below is a patch to implement a --enable-SOMETHING for
all the questions they define. Putting an --enable-SOMETHING or
--disable-SOMETHING will turn off that question and enable or disable
the feature. Any feature which doesn't have an --enable or --disable
on the command line still gets the question asked.
> Could I add one more "feature" that would control them all (like
> SET_DEFAULTS) and then modify the macro to check for this and use
> the defaults instead of asking the question.
You could, but I don't like that solutions because you can't
selectively override the defaults. Besides, I've already implemented
the above, and don't want to implement the lesser solution. 8^)
This solution does require that you keep track of what options are
used in each version, but grep ASK_FEATURE configure.in will tell
you. You can safely put --enable/--disables on the command line, even
if they aren't being used by a specific target.
Pass the patch upstream, it looks fine to me.
>> It may be that the upstream really wants to ask questions, so instead
>> you could lobby for some kind of "configure config file" or something,
>> that the debian packaging could put into place before running
>> configure. This would require changes to their ASK_FEATURE macro.
>>
> I'm not sure I'm following you here. How would this differ from my above
> example solution?
Well, this would let you selectively override the defaults for a
specific option (by putting it in the file). But I don't like it as
much as the below.
--- configure.in.ats Thu Oct 18 19:13:32 2001
+++ configure.in Thu Oct 18 19:13:36 2001
@@ -220,6 +220,14 @@
dnl ask user about configure option
AC_DEFUN(ASK_FEATURE,
[
+AC_ARG_ENABLE($1, [ --enable-$1 $2 ],
+[ if test "$enableval" = "yes" ; then
+ AC_MSG_RESULT([Enabling $1])
+ AC_DEFINE($1)
+ else
+ AC_MSG_RESULT([Disabling $1])
+ fi
+],[
if test -n "$ac_cv_a800_$1"; then
a800_defans=$ac_cv_a800_$1
else
@@ -234,6 +242,7 @@
AC_DEFINE($1)
fi
ac_cv_a800_$1=$a800_ans
+])
])
--
Alan Shutko <ats@acm.org> - In a variety of flavors!
Time is an illusion perpetrated by the manufacturers of space.
Reply to: