[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFE: configure -> dependency list on exit.
From: |
Stepan Kasal |
Subject: |
Re: RFE: configure -> dependency list on exit. |
Date: |
Tue, 1 Mar 2005 14:16:07 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi,
let me formulate a proposal. I try to be as specific as possible.
AC_MSG_NEED(PACKAGE, TEXT)
------------------------------
Prints a message and saves it for later usage.
Example: AC_MSG_NEED(foo, [grab the latest foo from foo.org])
prints:
Suggestion:
foo grab the latest foo from foo.org
AC_MSG_COND_NEED(CONDITION, PACKAGE, TEXT)
------------------------------------------
Prints a message and saves it for later usage.
Example: AC_MSG_COND_NEED(--with-graphs, libxy,
[use the latest xy library from http://www.xylib.net/])
prints:
Suggestion (for --with-graphs):
libxy use the latest xy library from http://www.xylib.net/
AC_OUTPUT
---------
If there were any call to AC_MSG_NEED or AC_MSG_COND_NEED, all the
suggestions are printed, and then configure exits; it doesn't create
config.status in this case.
Example:
Suggestions:
foo grab the latest foo from foo.org
bar grab the latest bar from http://www.barbar.com
(for --with-graphs):
libxy use the latest xy library from http://www.xylib.net/
Thats all. I think implementing this proposal is a good step forward.
The most difficult part is the documentation, of course. I don't
volunteer for it. Hugh, could you please write a patch to autoconf.texi,
which would document these macros, and, most importantly, encouradge
their usage?
I could then add some macros and patch autoconf's own configure.ac.
A few comments:
Comment #1:
-----------
I chose AC_MSG_NEED instead of a combination of AC_MSG_END and
AS_SUGGEST_STRING. I think the macro should be as simple as possible,
so that mor people use it.
Comment #2:
-----------
This proposal doesn't handle dependencies among the requirements.
This is intentional; I think a maintainer should only specify the
list of requirements. Only sysadmins and distribution builders are
allowed to think about a "dependency tree".
In most cases, we can check for all requirements independently.
In the rare case when it is impossible to perform a check for "bar"
if "foo" wasn't found, we can use this pattern:
# check for foo and set have_foo
if test $have_foo = no; then
AC_MSG_NEED(foo, [grab foo from ...])
fi
have_bar=no
if test $have_foo = yes; then
# check for bar
# and set have_bar appropriately
fi
if test $have_bar = no; then
AC_MSG_NEED(bar, [grab bar from ...])
fi
Hugh, are you willing to work on this proposal, and make a patch to
autoconf.texi?
Stepan
- Re: RFE: configure -> dependency list on exit., Stepan Kasal, 2005/03/01
- Re: RFE: configure -> dependency list on exit.,
Stepan Kasal <=
- Re: RFE: configure -> dependency list on exit., Hugh Sasse Staff Elec Eng, 2005/03/01
- Re: RFE: configure -> dependency list on exit., Paul Eggert, 2005/03/01
- Re: RFE: configure -> dependency list on exit., Stepan Kasal, 2005/03/02
- Re: RFE: configure -> dependency list on exit., Paul Eggert, 2005/03/02
- Re: RFE: configure -> dependency list on exit., Stepan Kasal, 2005/03/03
- Re: RFE: configure -> dependency list on exit., Hugh Sasse Staff Elec Eng, 2005/03/03
- Re: RFE: configure -> dependency list on exit., Stepan Kasal, 2005/03/04
- Re: RFE: configure -> dependency list on exit., Hugh Sasse Staff Elec Eng, 2005/03/04