[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configuring sub directories optional
From: |
Eric Siegerman |
Subject: |
Re: configuring sub directories optional |
Date: |
Tue, 29 Oct 2002 12:25:34 -0500 |
User-agent: |
Mutt/1.2.5i |
On Mon, Oct 28, 2002 at 01:04:44PM -0500, Jeff Squyres wrote:
> When you us AC_CONFIG_SUBDIRS, foo/configure is run *after* the main
> configure script completes (I don't know the exact mojo, but its
> definitely run either after or at the end of my top-level configure.ac's
> AC_OUTPUT). [...]
>
> So there's no chance for the top-level configure.ac to analyze and react
> if foo/configure fails.
I guess the ideal solution would be something like
AC_CONFIG_SUBDIRS(dirs [, is_optional_flag])
which somehow provides status to the caller if is_optional_flag
is set.
Hmm, how about this, which is also the usual Autoconf approach:
AC_CONFIG_SUBDIRS(dirs, [action-if-succeeds], [action-if-fails])
with the default actions being the current behaviour:
- action-if-succeeds defaults to "do nothing"
- action-if-fails defaults to "abort"
Or any other wrinkles necessary to stay backward compatible.
Of course, this would require moving the "CONFIG_SUBDIRS section"
to an earlier point in the configure script, to give the parent
configure.ac a chance to do something useful with the returned
status.
Actually, just moving the CONFIG_SUBDIRS section, without any API
changes, would permit a kludgy solution:
- an optional subpackage could use a configure.gnu shell-script
wrapper to lie about the sub-configure's exit status:
#! /bin/sh
$CONFIG_SHELL ./configure ${1+"$@"}
exit 0
- the parent configure.ac could check for the existence of some
generated file in the subdirectory, as someone else suggested
--
| | /\
|-_|/ > Eric Siegerman, Toronto, Ont. address@hidden
| | /
The acronym for "the powers that be" differs by only one letter
from that for "the pointy-haired boss".
- configuring sub directories optional, Stefan Seefeld, 2002/10/28
- Re: configuring sub directories optional, Jeff Squyres, 2002/10/28
- Re: configuring sub directories optional, Earnie Boyd, 2002/10/28
- Re: configuring sub directories optional, Stefan Seefeld, 2002/10/28
- Re: configuring sub directories optional, Jeff Squyres, 2002/10/28
- Re: configuring sub directories optional, Earnie Boyd, 2002/10/28
- Re: configuring sub directories optional, Akim Demaille, 2002/10/28
- Re: configuring sub directories optional, Jeff Squyres, 2002/10/28
- Re: configuring sub directories optional,
Eric Siegerman <=
Re: configuring sub directories optional, Stefan Seefeld, 2002/10/28