Next: , Previous: , Up: The Macros  





This macro searches for a C compiler that generates native executables, that is a C compiler that surely is not a cross-compiler. This can be useful if you have to generate source code at compile-time like for example GCC does.

The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD). The value of these variables can be overridden by the user by specifying a compiler with an environment variable (like you do for standard CC).

It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object file extensions for the build platform, and GCC_FOR_BUILD to ‘yes’ if the compiler we found is GCC. All these variables but GCC_FOR_BUILD are substituted in the Makefile.

Source Code

Download the latest version of ax_prog_cc_for_build.m4 or browse the macro’s revision history.


Copyright © 2008 Paolo Bonzini

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.