* Makefile.in: Use the variable CC_FOR_BUILD as the native compiler configure.ac: Set a reasonable default for CC_FOR_BUILD if unset. --- Makefile.in | 2 +- configure.ac | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in index 692ccc1..d6bad91 100644 --- a/Makefile.in +++ b/Makefile.in @@ -331,7 +331,7 @@ RANLIB=@RANLIB@ # Define the name of the C compiler (target and host (AUX)) CC=@CC@ -CCAUX=@CC@ +CCAUX=@CC_FOR_BUILD@ # Define the name of the linker for the final link step. # Normally this is the same as the C compiler. diff --git a/configure.ac b/configure.ac index d66f06a..e351afd 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,17 @@ AC_PROG_CC AC_PROG_CPP CFLAGS=$save_cflags +dnl Put a plausible default for CC_FOR_BUILD in Makefile.in +if test -z "$CC_FOR_BUILD"; then + if test "x$cross_compiling" = "xno"; then + CC_FOR_BUILD='$(CC)' + else + CC_FOR_BUILD=cc + fi +fi +AC_SUBST(CC_FOR_BUILD) + + AC_PROG_SED dnl See if it is GNU sed or else. dnl - need more work to tell SED features. -- 1.7.10.4