| Hi,
|
| In a package I'm integrating autoconf into, I need to be able to
| support cross-compiling. Specifically, the libraries in the package
| will be cross-compiled. However, the package contains a compiler
| binary that must be run on the build platform, not the host platform.
| This means that I need to use two compilers (1) a cross compiler for
| the libraries and some binaries, and (2) a native compiler for some
| binaries that must be run on the build platform.
|
| However, I don't know of any straightforward way of achieving this.
| Does anyone have any suggestions, other than splitting the package?
|
| BTW, Akim and Paul, this is one example where I can see that it might
| be useful not to exclude detection of a native compiler if
| cross-compiling is enabled. :-) :-)
:)
Well, indeed Autoconf does not provide support for this. Maybe we
should integrate *_FOR_BUILD some day?
I would suggest that you use several configure.in, I see no other
means to cleanly handle this schizophrenia.
In fact, there is another one, but I don't know whether it would
really solve your issue:
| AC_INIT
|
| # Native tools
| (
| host=$build
| cross_compiling=no
| AC_PROG_CC
| cat >conftest.save <<EOF
| CC_FOR_BUILD=$CC
| AC_SUBST(CC_FOR_BUILD)
| EOF
| ) || exit 1
|
| . ./conftest.save
|
| # Cross tools
| AC_PROG_CC
|
| AC_OUTPUT
or something like this. Hm, it's not going to be fun...