]> code.delx.au - pulseaudio/blobdiff - configure.ac
Make pulse compile with clang
[pulseaudio] / configure.ac
index 9b73bc1fadf7f40874204847a032330ce6a82a89..5a78ffb9b644ee6423b2e5752d1d99b7fa0e6ff2 100644 (file)
@@ -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.