Am Mit, 2002-06-19 um 04.36 schrieb Harlan Stenn: > I've been looking thru the docs and I I haven't found a way to do the > following. > > I am using automake and autoconf. > > I am assuming: > > - "build" means the arch of the build machine > - "host" the arch of the place where built stuff gets run > > autoconf detects build != host and sets up for a cross-compile. > > This is a Good Thing, and CC=host_cpu-host_vendor-host_os-gcc when I am > cross-compiling. > > However, I am coming across a case where the software package has some > tools that are designed to be used as part of the build process and > therefore need to use build-cc instead of host-cc. Welcome to the wonderful world of mixed-cross compilation :) > So how do I tell automake that for some PROGRAMS it should use host-cc > instead of build-cc? This is an autoconf problem, not an automake one.
The short answer is: It currently is not possible without further tricks. One way to accomplish this is to: 1. Separate each of such directories into separate config-subdirs. 2. Implement a toplevel configure-script to parse build/host/target and to setup build/host/target for each config-subdir individually. One example of how I apply this approach can be found inside of the toplevel configure of RTEMS: ftp://ftp.oarcorp.com/pub/rtems/snapshots/rtems/ss-20020528/rtems-ss-20020528.tar.bz2 Another example using this approach is the toplevel configure script of the unified GNU-toolchain. Another (IMO hackerish) approach would be to apply tricks with presetting CC inside of tools's config-subdirs. E.g. to pub something similar to this into the configure.acs of build-host-compiled config-subdirs: CC=${CC_FOR_BUILD-$CC} AC_PATH_PROG Ralf
