Improve configure.raw for cross build.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/ChangeLog b/ChangeLog
index 5ba1b03..2ea0543 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,14 @@
-2009-09-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve configure.raw for cross build.
+
+ * builds/unix/configure.raw: Remove temporal files created by
+ the suffix checking for CC_BUILD. Set XX_ANSIFLAGS and
+ XX_CFLAGS when cross compiler is GCC. AC_PROG_CC checks
+ whether the cross compiler is GCC, its result is stored in
+ GCC.
+
+2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[BDF] Modify hash API to take size_t value instead of void *.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 3317d03..cbb82f4 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -55,6 +55,7 @@ if test ${cross_compiling} = yes; then
elif test -x conftest.* ; then
EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\././'`
fi
+ rm -f a.* b.* a_out.exe conftest.*
AC_MSG_RESULT($EXEEXT_BUILD)
else
CC_BUILD=${CC}
@@ -68,7 +69,7 @@ AC_SUBST(EXEEXT_BUILD)
# get compiler flags right
-if test "x$CC" = xgcc; then
+if test "x$GCC" = xyes; then
XX_CFLAGS="-Wall"
XX_ANSIFLAGS="-pedantic -ansi"
else