bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#372179: AC_CANONICAL_SYSTEM overwrites $@


From: Tollef Fog Heen
Subject: Re: Bug#372179: AC_CANONICAL_SYSTEM overwrites $@
Date: Sun, 18 Jun 2006 16:45:21 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

(Trimmed Cc list a fair bit)

* Ralf Wildenhues 

| Hello Justin, Tollef, everyone,
| 
| * Justin Erenkrantz wrote on Fri, Jun 16, 2006 at 09:12:11PM CEST:
| > 
| > The point of our autoconf macro is to allow 'shortcuts', such that the 
| > argument
| > 
| > --with-layout=Foo
| > 
| > rewrites prefix/libexec/etc to a specific set of values (dictated by
| > our file config.layout) and then have explicit passed parameters
| > override those 'layout' files.
| 
| Yes.  But I think you would agree that having your own parsing routine
| that is almost a complete copy of the Autoconf one is not a common,
| usual way of using Autoconf, and that it's not encouraged by the
| Autoconf documentation to override the settings this way, nor do your
| own argument parsing at all.  Right?  The common way to do argument
| parsing with Autoconf is to use AC_ARG_WITH and AC_ARG_ENABLE.

I think the problem with that is APR wants a way to switch the
defaults for prefix, exec_prefix, etc.  Autoconf provides a set of
defaults here.  Those can be overridden by passing --prefix=,
--exec-prefix=, etc to the configure script.  For APR's --with-layout
option to work correctly, it must be able to hook in between the
defaults setup code and the option parsing code.  Except that means it
needs to parse the command line arguments itself (which isn't really a
big deal when it's just looking for --with-layout=$opt or
--enable-layout=$opt, but still a bit wrong).

So, since this is hard and would require APR to reimplement parts of
autoconf (the option-parsing code as well as doing the necessary hacks
to get --with-layout into the --help output, for instance), it's not
really an option.

Currently, if configure is passed --sbindir=, it just overrides
$sbindir without flagging that at all.  If it, in addition to changing
$sbindir, it'd set ac_param_sbindir either to 1 to show that sbindir
is derviced from a command line argument or to the value passed on the
command line.  If we had this, APR_LAYOUT could check if
ac_param_sbindir was set, and if so skip setting sbindir from the
layout.

Would this be an acceptable solution for both the APR and the autoconf
people?

-- 
Tollef Fog Heen                                                        ,''`.
UNIX is user friendly, it's just picky about who its friends are      : :' :
                                                                      `. `' 
                                                                        `-  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]