On 21 Apr 2000, Alexandre Oliva wrote:
> On Apr 20, 2000, Mo DeJong <[EMAIL PROTECTED]> wrote:
>
> > But when I try to run ./configure with a target argument, it does not
> > use the right compiler.
>
> --target is used only for compilers, linkers, etc, to specify the
> platform *for which* the programs should generate code. I think what
> you want is to set --host, that specifies the platform on which you
> intend the program to run. I'm not sure this will look for the
> appropriate compilers, though.
>
> > My question is, why on earth do I need to give the name of
> > the compiler I want to use in the CC or CXX variable?
>
> Because autoconf always looks for a C compiler named gcc or cc. When
> it looks for a C compiler, it doesn't even know if it's cross
> compiling; this is only tested after a C program is compiled.
>
> > Why not have autoconf just take the --target argument
> > (i586-cygwin32) and slap a -c++ onto that?
Ok, I can buy that --host argument, but then why does using
--host also not work?
mo(~/foo)% cat configure.in
AC_INIT(foo.cpp)
AC_PREREQ(2.14)
AC_CANONICAL_HOST
AC_LANG_CPLUSPLUS
AC_PROG_CXX
mo(~/foo)% ./configure --host=i586-cygwin32
checking host system type... i586-pc-cygwin32
checking for c++... c++
checking whether the C++ compiler (c++ ) works... yes
checking whether the C++ compiler (c++ ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
I really need to get a better sig:)
Mo Dejong
Red Hat Inc.
> Seems like a good idea, as long as you replace --target for --host.
>
> --
> 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