| On 21 Apr 2000, Akim Demaille wrote:
| > >>>>> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes:
| >
| > Alexandre> Sounds good to me (i.e., you've got one approval; a patch
| > Alexandre> needs two to be installed in the autoconf CVS tree).
| >
| > I confess I'm a bit lost by the change. We're moving from
| >
| > ac_cv_host_alias=`$ac_config_guess`
| > ac_cv_build_alias=$host_alias
| > ac_cv_target_alias=$host_alias
| >
| > to
| >
| > ac_cv_host_alias=`$ac_config_guess`
| > ac_cv_build_alias=`$ac_config_guess`
| > ac_cv_target_alias=$target_alias
|
| The "alias" is the thing that the user could have passed
| in on the command line. In the case of the host you
| could pass in i586-cygwin32 and get the target_alias set
| to that but the target would be i586-pc-cygwin32.
My problem is that I still can't see how you're getting target_alias
:(
Basically, the core of the code for target used to be
| echo "configure:624: checking target system type" >&5
| echo $ECHO_N "checking target system type... $ECHO_C" >&6
| if test "x$ac_cv_target" = "x" ||
| (test "x$target" != "xNONE" &&
| test "x$target" != "x$ac_cv_target_alias"); then
|
| ac_cv_target_alias=$target
| case "$ac_cv_target_alias" in
| NONE)
| case $nonopt in
| NONE)
| ac_cv_target_alias=$host_alias ;;
| *) ac_cv_target_alias=$nonopt ;;
| esac ;;
| esac
|
| target=$ac_cv_target
| target_alias=$ac_cv_target_alias
with $target being the command line input. So if the user gives
$target, when do
| ac_cv_target_alias=$target
and that's all. If no $target is given, then
| ac_cv_target_alias=$host_alias
and that's all (btw, this code seems to need more rewriting: IIUC,
nonopt can only be the host, so the code would be more readable if the
handling of $nonopt was done only in the options handling, and here we
just use $host, right?).
With your change, the code becomes
| echo "configure:624: checking target system type" >&5
| echo $ECHO_N "checking target system type... $ECHO_C" >&6
| if test "x$ac_cv_target" = "x" ||
| (test "x$target" != "xNONE" &&
| test "x$target" != "x$ac_cv_target_alias"); then
|
| ac_cv_target_alias=$target
| case "$ac_cv_target_alias" in
| NONE)
| case $nonopt in
| NONE)
| ac_cv_target_alias=$target_alias ;;
| *) ac_cv_target_alias=$nonopt ;;
| esac ;;
| esac
|
| target=$ac_cv_target
| target_alias=$ac_cv_target_alias
so when run, if $target is not given, then ac_cv_target_alias is empty
(instead of being $host). Is this right?
Maybe it is better to show the output. This is before:
AC_INIT
AC_CANONICAL_TARGET
echo $target_alias
| /tmp % ./configure
| checking host system type... i686-pc-linux-gnu
| checking target system type... i686-pc-linux-gnu
| i686-pc-linux-gnu
| /tmp % ./configure mips-elf
| checking host system type... mips-mips-elf
| checking target system type... mips-mips-elf
| mips-elf
| /tmp % ./configure --target=mips-elf
| checking host system type... i686-pc-linux-gnu
| checking target system type... mips-mips-elf
| mips-elf
and now we have:
| /tmp % ./configure
| checking host system type... i686-pc-linux-gnu
| checking target system type... Configuration name missing.
| Usage: ./config.sub CPU-MFR-OPSYS
| or ./config.sub ALIAS
| where ALIAS is a recognized configuration type.
| /tmp % ./configure mips-elf
| checking host system type... mips-mips-elf
| checking target system type... mips-mips-elf
| mips-elf
| /tmp % ./configure --target=mips-elf
| checking host system type... i686-pc-linux-gnu
| checking target system type... mips-mips-elf
| mips-elf
| If the build test was always done then the result of that could
| be used when figuring out the host. The host would not need to
| do another config.guess in that case.
Arg. I'm even more lost :) Up to now the logic was that the host was
the default for target and build, now you seem to mean that the build
should be the default for the host?
And if anyway both are defaulted to the same value (running
config.guess), was it is better to use one instead of the other?
Akim