about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-03-11T20·56+0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-03-11T20·56+0000
commit13cce8ec45fd59bd8a1f1101a92576796cba97d2 (patch)
tree16f26bcb00283ae39acb21a445b397b66b6b20f2 /configure.ac
parent05e15049a5f42ca7222c7557d7257352fe711d2e (diff)
Making 'bin2c' to be built with the compiler for the local system.
I copied the configure.ac code about CC_FOR_BUILD from libX11.


Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 708e61968424..4c92bcb5c3ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,15 @@ fi
 AC_PROG_CC
 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.
 AC_DISABLE_STATIC