summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-03-14 16:27:03 +0100
committerColin Guthrie <cguthrie@mandriva.org>2011-03-18 09:22:07 +0000
commit1afd233630186e8bcd1f41bac732b029adf40423 (patch)
treecc58374c0e90c6c7d88e1c838b73a75692bb0a15 /configure.ac
parent684b89c639e89cd411dad802c975fc5784951f3b (diff)
Make pulse compile with clang
This fixes the checking of supported compiler flags and the following error message for svolume_mmx: pulsecore/svolume_mmx.c:157:76: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions : "+r" (samples), "+r" (volumes), "+r" (length), "=D" ((pa_reg_x86)channel), "=&r" (temp) ~~~~~~~~~~~~^~~~~~~
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9b73bc1f..5a78ffb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,13 @@ if test "x$M4" = xno ; then
fi
dnl Compiler flags
+
+# Some compilers (e.g. clang) default to a warning on an unkown command line option.
+# Change that temporarily to an error, for the CC_CHECK_CFLAGS_APPEND macro to work.
+save_CC="$CC"
+CC="$CC -Werror"
CC_CHECK_CFLAGS_APPEND([-Wall -W -Wextra -pipe -Wno-long-long -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option])
+CC="$save_CC"
dnl Linker flags.
dnl Check whether the linker supports the -version-script option.