diff options
author | John Tapsell <johnflux@gmail.com> | 2008-09-23 19:00:42 +0300 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2008-09-23 19:00:42 +0300 |
commit | 36e9f0d351afbf7fd2595990b2d39e7c551f6420 (patch) | |
tree | b66048ceb2bc62d7308d62b95b5663b9fbf64ed7 | |
parent | ace1676b0630dfe739c3bd712ed2b6e46bdb52f1 (diff) |
configure.ac: Use native compiler for build tools
makestrs is used during the build, so use the native compiler (either
gcc or cc in $PATH, can be overridden as $CC_FOR_BUILD) instead of the
(possibly cross-) compiler.
-rwxr-xr-x | configure.ac | 9 | ||||
-rw-r--r-- | util/Makefile.am | 2 |
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 | |||
36 | AC_PROG_LIBTOOL | 36 | AC_PROG_LIBTOOL |
37 | AM_PROG_CC_C_O | 37 | AM_PROG_CC_C_O |
38 | 38 | ||
39 | if test x"$CC_FOR_BUILD" = x; then | ||
40 | test x"$cross_compiling" = xyes; then | ||
41 | AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) | ||
42 | else | ||
43 | CC_FOR_BUILD="$CC" | ||
44 | fi | ||
45 | fi | ||
46 | AC_SUBST([CC_FOR_BUILD]) | ||
47 | |||
39 | PKG_CHECK_MODULES(XT, sm x11 xproto kbproto) | 48 | PKG_CHECK_MODULES(XT, sm x11 xproto kbproto) |
40 | 49 | ||
41 | # Needed for including Xalloca.h | 50 | # 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 | |||
4 | noinst_PROGRAMS = makestrs | 4 | noinst_PROGRAMS = makestrs |
5 | endif | 5 | endif |
6 | 6 | ||
7 | CC = @CC_FOR_BUILD@ | ||
8 | |||
7 | EXTRA_DIST = \ | 9 | EXTRA_DIST = \ |
8 | Shell.ht \ | 10 | Shell.ht \ |
9 | StrDefs.ct \ | 11 | StrDefs.ct \ |