On 21 Apr 2000, Alexandre Oliva wrote:
> On Apr 21, 2000, Mo DeJong <[EMAIL PROTECTED]> wrote:
>
> > The documentation seems to indicate that the only macro I
> > would need was AC_CANONICAL_HOST? Are the docs wrong about that?
>
> You'd seldom need information about the build platform, and you'd only
> need information about the target platform when building the
> toolchain.
>
> > No that you mention it, the 2.13 docs do not even mention
> > AC_CANONICAL_HOST. Was this something that was added recently?
>
> No, it's not recent, but I think it was supposed to be something
> internal.
So if it should have been "internal" then why do I need to add the
AC_CANONICAL_BUILD macro to my configure.in file to get cross
compiling to work?
In looking at the source, I also came across this AC_CHECK_TOOL_PREFIX
macro which seems to be doing exactly what I want, running the
host and build check and then comparing the host and the build.
So it looks like the AC_CHECK_TOOL macro is what I should
have been using all along. This minimal configure.in should
do this trick.
AC_INIT(foo.cpp)
AC_PREREQ(2.14)
AC_LANG_CPLUSPLUS
AC_CHECK_TOOL(CXX, c++)
AC_PROG_CXX
Problem is, it not seem to work. It looks for the right compiler
but it does not actually use it.
mo(~/foo)% ./configure --host=i586-cygwin32
checking host system type... i586-pc-cygwin32
checking build system type... i686-pc-linux-gnu
checking for i586-cygwin32-c++... c++
checking for c++... (cached) 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
Any ideas?
Mo Dejong
Red Hat Inc.