Subject: gnuplot: build documentation generator tools with CC_FOR_BUILD From: Robert Schwebel When cross compiling gnuplot, it tries to build the documentation generation tools in docs/ with the cross compiler, not with CC_FOR_BUILD. Signed-off-by: Robert Schwebel --- # 20091222 rsc: https://sourceforge.net/tracker/?func=detail&aid=2918992&group_id=2055&atid=302055 configure.in | 40 ++++++++++++++++++++++++++++++++++++++++ docs/Makefile.in | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) Index: gnuplot-4.2.4/docs/Makefile.in =================================================================== --- gnuplot-4.2.4.orig/docs/Makefile.in 2009-01-06 18:46:41.000000000 +0100 +++ gnuplot-4.2.4/docs/Makefile.in 2009-01-06 18:46:46.000000000 +0100 @@ -70,7 +70,7 @@ INFO_DEPS = $(srcdir)/gnuplot.info -CC = @CC@ +CC = @CC_FOR_BUILD@ CPP = @CPP@ DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.. -I$(top_builddir) Index: gnuplot-4.2.4/configure.in =================================================================== --- gnuplot-4.2.4.orig/configure.in 2009-01-06 18:46:41.000000000 +0100 +++ gnuplot-4.2.4/configure.in 2009-01-06 18:46:56.000000000 +0100 @@ -12,6 +12,8 @@ AM_CONFIG_HEADER(config.h:config.hin) AM_INIT_AUTOMAKE(1.7.9) +AM_MAINTAINER_MODE + VERSION_MAJOR="`cat $srcdir/VERSION`" PATCHLEVEL="`cat $srcdir/PATCHLEVEL`" @@ -27,6 +29,46 @@ AC_C_INLINE AC_C_STRINGIZE + +if test "${build}" != "${host}" +then + CC=${CC-${host_alias}-gcc} + CFLAGS=${CFLAGS-"-g -O2"} + CXX=${CXX-${host_alias}-c++} + CXXFLAGS=${CXXFLAGS-"-g -O2"} + CC_FOR_BUILD=${CC_FOR_BUILD-gcc} +else + CC_FOR_BUILD="\$(CC)" + AC_PROG_CC + + # We must set the default linker to the linker used by gcc for the correct + # operation of libtool. If LD is not defined and we are using gcc, try to + # set the LD default to the ld used by gcc. + if test -z "$LD" + then + if test "$GCC" = yes + then + case $build in + *-*-mingw*) + gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; + *) + gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;; + esac + case $gcc_prog_ld in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + LD="$gcc_prog_ld" ;; + esac + fi + fi + + CXX=${CXX-"c++"} + CFLAGS=${CFLAGS-"-g -O2"} + CXXFLAGS=${CXXFLAGS-"-g -O2"} +fi +AC_SUBST(CC_FOR_BUILD) + + dnl Various programs dnl X/Emacs for building lisp packages and creating .texi version of docs # If set to t, that means we are running in a shell under Emacs.