On 21 Apr 2000, Alexandre Oliva wrote:

> On Apr 21, 2000, Mo DeJong <[EMAIL PROTECTED]> wrote:
> 
> > There are a couple of problems with this approach. It compares the
> > result of running config.guess to what the user passed in with
> > --host, but I am not sure we actually want the configure script to
> > continue to think it is running on a i686-pc-linux-gnu host when it
> > is actually using a cross compiler.

Ok, let me see if I have my terms straight here. In my case,
i686-pc-linux-gnu would be my "build" platform and i586-cygwin32
would be my "host" platform.
 
> configure is run on the *build* platform, so setting host to NONE as
> you do is totally wrong, because it will cause configure to assume
> host and build are the same platform.  When the user specifies --host,
> he's explicitly telling configure they're not.  What you want to do is
> to compare $host with $build.
> 
> > If the autoconf script uses host values to make compile time
> > decisions, then they will be wrong because we are using a cross
> > compiler.
> 
> If it uses *host* values, it will be right, because the *host*
> platform is that on which the built program will run.  You probably
> mean *build* values here, and then you're right, and it is indeed
> something the developer should worry about.
> 
> > http://peti.cys.de/autoconf-archive/Miscellaneous/acx_check_pathname_style.html
> 
> > This test will break if you use a cross compiler with cygwin.
> 
> No, it is correct, because it decides what pathname style to use
> depending on *host*.  If it depended on the *build* platform, it would
> indeed be broken.
> 
> > So who is at fault here?
> 
> You're just misunderstanding the nomenclature.
> 
> > Should autoconf know about the host it is running under and the
> > cross "host" info?

Humm, I have never used this AC_CANONICAL_BUILD macro.

The documentation seems to indicate that the only macro I
would need was AC_CANONICAL_HOST? Are the docs wrong about that?

`AC_CANONICAL_HOST' is all that is
     needed for programs that are not part of a compiler tool chain.

No that you mention it, the 2.13 docs do not even mention
AC_CANONICAL_HOST. Was this something that was added recently?


> Yep.  That's what AC_CANONICAL_BUILD is for.


So I added AC_CANONICAL_BUILD my configure.in script, removed my hacks
and ran it again. Now I am seeing the following. This has got to
be a bug.

mo(~/foo)% ./configure --host=i586-cygwin32
checking host system type... i586-pc-cygwin32
checking build system type... i586-pc-cygwin32
checking for c++... c++


Mo DeJong
Red Hat Inc.
 
> -- 
> Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
> Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
> Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
> oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

Reply via email to