summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Tapsell <johnflux@gmail.com>2008-09-23 17:30:13 +0300
committerDaniel Stone <daniel@fooishbar.org>2008-09-23 17:30:13 +0300
commit58bf3aa746908f01c37be7045699e43a4e270944 (patch)
tree28968549a2b38e0098cf15a6a05ae94284fcf30d
parent340422a5c7a413faef18666cada27cee14615250 (diff)
Build: Use native compiler for makekeys
makekeys needs to be run during the build process, as opposed to on the target, so build it with either of gcc or cc to fix cross-compiling. This can be overridden by setting $CC_FOR_BUILD.
-rw-r--r--configure.ac6
-rw-r--r--src/util/Makefile.am3
2 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6be37b2f..97e3156e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,12 @@ XORG_MACROS_VERSION(1.1)
AC_PROG_LIBTOOL
AC_PROG_CC
+if test x"$CC_FOR_BUILD" = x && test x"$cross_compiling" = xyes; then
+ AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
+else
+ CC_FOR_BUILD="$CC"
+fi
+
XORG_PROG_RAWCPP
# Build with XCB support?
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 3ff421d0..c9e81c04 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -4,8 +4,7 @@ noinst_PROGRAMS=makekeys
makekeys_CFLAGS=$(X11_CFLAGS)
-#override CC = gcc
-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CC = @CC_FOR_BUILD@
EXTRA_DIST = mkks.sh