summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-01-14 15:19:18 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-01-14 15:19:23 +0000
commit84d4ed242ac0ca9cc9ade4c09539d71edd061541 (patch)
tree825f273b2ff4e264433216dae242366882f1934e /configure.in
parent5b6369d783e3415561c13a6b03bb17c06b90824e (diff)
parent297919ae6189af3db9eb8b16488102fd0d2f5a43 (diff)
Merge branch 'tmp'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32854
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 8 insertions, 12 deletions
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
;;