diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-01-14 15:19:18 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-01-14 15:19:23 +0000 |
commit | 84d4ed242ac0ca9cc9ade4c09539d71edd061541 (patch) | |
tree | 825f273b2ff4e264433216dae242366882f1934e | |
parent | 5b6369d783e3415561c13a6b03bb17c06b90824e (diff) | |
parent | 297919ae6189af3db9eb8b16488102fd0d2f5a43 (diff) |
Merge branch 'tmp'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32854
-rwxr-xr-x | cmake/cross-compile.sh | 15 | ||||
-rw-r--r-- | configure.in | 20 |
2 files changed, 18 insertions, 17 deletions
diff --git a/cmake/cross-compile.sh b/cmake/cross-compile.sh index c1821bdbf..49e66e500 100755 --- a/cmake/cross-compile.sh +++ b/cmake/cross-compile.sh @@ -28,8 +28,13 @@ else exit 1 fi +if ! TEMP=`mktemp --tmpdir -d dbus-cross-compile.XXXXXX`; then + echo "mktemp failed, try with coreutils 6.10 or later?" >&2 + exit 1 +fi + # make cmake happy -export TEMP=/tmp +export TEMP HOST_CC=gcc; export HOST_CC; @@ -67,10 +72,10 @@ done; unset x i ; if ! test -f "$cross_root/lib/libexpat.dll.a"; then - (cd /tmp; wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-bin.zip) - (cd /tmp; wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-lib.zip) - (cd $cross_root; unzip -x /tmp/expat-2.0.1-bin.zip) - (cd $cross_root; unzip -x /tmp/expat-2.0.1-lib.zip) + (cd $TEMP && wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-bin.zip) + (cd $TEMP && wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-lib.zip) + (cd $cross_root && unzip -x $TMP/expat-2.0.1-bin.zip) + (cd $cross_root && unzip -x $TMP/expat-2.0.1-lib.zip) fi if test -f "$cross_root/lib/libexpat.dll.a"; then diff --git a/configure.in b/configure.in index b0ba4637d..ea110987f 100644 --- a/configure.in +++ b/configure.in @@ -1085,17 +1085,13 @@ fi #### gcc warning flags cc_supports_flag() { - AC_MSG_CHECKING(whether $CC supports "$@") - Cfile=/tmp/foo${$} - touch ${Cfile}.c - $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1 - rc=$? - rm -f ${Cfile}.c ${Cfile}.o - case $rc in - 0) AC_MSG_RESULT(yes);; - *) AC_MSG_RESULT(no);; - esac - return $rc + AC_MSG_CHECKING(whether $CC supports "$*") + save_CFLAGS="$CFLAGS" + CFLAGS="$*" + AC_TRY_COMPILE([], [], [rc=yes], [rc=no]) + CFLAGS="$save_CFLAGS" + AC_MSG_RESULT([$rc]) + test "x$rc" = xyes } ld_supports_flag() { @@ -1174,7 +1170,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wfloat-equal[\ \ ]*) ;; - *) if cc_supports_flag -Wfloat-equals; then + *) if cc_supports_flag -Wfloat-equal; then CFLAGS="$CFLAGS -Wfloat-equal" fi ;; |