Index: server/Makefile.in =================================================================== --- server/Makefile.in (revision 1328718) +++ server/Makefile.in (working copy) @@ -21,9 +21,14 @@ include $(top_builddir)/build/rules.mk include $(top_srcdir)/build/library.mk +ifdef CC_FOR_BUILD +gen_test_char: gen_test_char.c + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< +else gen_test_char_OBJECTS = gen_test_char.lo gen_test_char: $(gen_test_char_OBJECTS) $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS) +endif test_char.h: gen_test_char ./gen_test_char > test_char.h Index: srclib/pcre/Makefile.in =================================================================== --- srclib/pcre/Makefile.in (revision 1328718) +++ srclib/pcre/Makefile.in (working copy) @@ -11,8 +11,13 @@ $(LTLIBRARY_OBJECTS) dftables.lo: config.h +ifdef CC_FOR_BUILD +dftables: dftables.c + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ $< +else dftables: dftables.lo $(LINK) $(EXTRA_LDFLAGS) dftables.lo $(EXTRA_LIBS) +endif $(srcdir)/chartables.c: dftables ./dftables $@ Index: configure.in =================================================================== --- configure.in (revision 1328718) +++ configure.in (working copy) @@ -154,6 +154,14 @@ AC_PROG_CC AC_PROG_CPP +dnl In case of cross compilation we set CC_FOR_BUILD to cc unless +dnl we got already CC_FOR_BUILD from environment. +if test "x${build_alias}" != "x${host_alias}"; then + if test "x${CC_FOR_BUILD}" = "x"; then + CC_FOR_BUILD=cc + fi +fi + if test "x${cache_file}" = "x/dev/null"; then # Likewise, ensure that CC and CPP are passed through to the pcre # configure script iff caching is disabled (the autoconf 2.5x default). Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 1328718) +++ acinclude.m4 (working copy) @@ -53,6 +53,8 @@ APACHE_SUBST(CPPFLAGS) APACHE_SUBST(CFLAGS) APACHE_SUBST(CXXFLAGS) + APACHE_SUBST(CC_FOR_BUILD) + APACHE_SUBST(CFLAGS_FOR_BUILD) APACHE_SUBST(LTFLAGS) APACHE_SUBST(LDFLAGS) APACHE_SUBST(LT_LDFLAGS) @@ -568,7 +570,7 @@ { return sizeof(void *) < sizeof(long); }], [ap_cv_void_ptr_lt_long=no], [ap_cv_void_ptr_lt_long=yes], - [ap_cv_void_ptr_lt_long=yes])]) + [ap_cv_void_ptr_lt_long="cross compile - not checked"])]) if test "$ap_cv_void_ptr_lt_long" = "yes"; then AC_MSG_ERROR([Size of "void *" is less than size of "long"])