Re: [RFC] Update to current automake/autoconf/libtool versions.

Maciej W. Rozycki
2002-12-06T13:52:15Z

On Thu, 5 Dec 2002, Nathanael Nerode wrote:

> It was mentioned that autoconf2.5 scripts will have trouble with
> building because of the top level passing down --target unconditionally.
>
> Unfortunately I think some other aspects of the configure scripts
> require --target to be passed down unconditionally. :-/ Otherwise I'd
> just change it.

Well, at least ${tooldir} requires to be set properly (that's typically
${exec_prefix}/${target_alias}) and currently it is done by passing
--target which sets ${target_alias}. However it may be possible to set
${tooldir} based on ${host_alias} or even ${build_alias}, as ${*_alias}
variables are empty if not set by a user. I think the order should be:

if test "x${target_alias}" != x; then
# Cross-tools
tooldir = '${exec_prefix}'/${target_alias}
elif test "x${host_alias}" != x; then
# Native tools for a different host
tooldir = '${exec_prefix}'/${host_alias}
elif test "x${build_alias}" != x; then
# Native tools using an explicit alias
tooldir = '${exec_prefix}'/${build_alias}
else
# Native tools using a default alias
tooldir = '${exec_prefix}'/${build}
fi

And then only pass these of --build, --host, --target to subdirectories
which have their respective ${*_alias} variable set. Obviously
${program_prefix} should either only be set if ${target_alias} is not
empty or use the above outline, too.

I'll check if the approach works for me -- anyone interested is invited
to do that, too.

Maciej

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +