Making 'bin2c' to be built with the compiler for the local system.

I copied the configure.ac code about CC_FOR_BUILD from libX11.
This commit is contained in:
Lluís Batlle i Rossell 2010-03-11 20:56:25 +00:00
parent 05e15049a5
commit 13cce8ec45
2 changed files with 12 additions and 0 deletions

View file

@ -86,6 +86,15 @@ fi
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
# To build programs to be run in the build machine
if test "$CC_FOR_BUILD" = ""; then
if test "$cross_compiling" = "yes"; then
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
else
CC_FOR_BUILD="$CC"
fi
fi
AC_SUBST([CC_FOR_BUILD])
# We are going to use libtool. # We are going to use libtool.
AC_DISABLE_STATIC AC_DISABLE_STATIC

View file

@ -1,3 +1,6 @@
noinst_PROGRAMS = bin2c noinst_PROGRAMS = bin2c
bin2c_SOURCES = bin2c.c bin2c_SOURCES = bin2c.c
bin2c: bin2c.c
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o bin2c bin2c.c