summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.ac9
-rw-r--r--util/Makefile.am2
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 426e178..c576e98 100755
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,15 @@ AC_PROG_CC
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
+if test x"$CC_FOR_BUILD" = x; then
+ test x"$cross_compiling" = xyes; then
+ AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
+ else
+ CC_FOR_BUILD="$CC"
+ fi
+fi
+AC_SUBST([CC_FOR_BUILD])
+
PKG_CHECK_MODULES(XT, sm x11 xproto kbproto)
# Needed for including Xalloca.h
diff --git a/util/Makefile.am b/util/Makefile.am
index 2c13f0b..0d3ff01 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -4,6 +4,8 @@ else
noinst_PROGRAMS = makestrs
endif
+CC = @CC_FOR_BUILD@
+
EXTRA_DIST = \
Shell.ht \
StrDefs.ct \