summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorArun Raghavan <git@arunraghavan.net>2016-02-17 19:47:05 +0530
committerArun Raghavan <git@arunraghavan.net>2016-02-25 09:09:13 +0530
commitaa02e1654bcdfa0677e19ab9bb27b44dc8bf26b9 (patch)
tree96274c20b4aac48952cdf27d0458c71fe3b79533 /configure.ac
parent8949ed96c635959ea9d010c5d4b7fcc021486532 (diff)
build-sys: Move to compiling with C11 support
This is needed for building with anonymous unions. A bunch of calls to fail() that used to mysteriously work need fixing -- fail() is a macro that takes a printf-style message as an argument. Not passing this somehow worked with the previous compiler flags, but breaks with -std=c11.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4553d714..8454e4cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,6 @@ AC_PROG_LN_S
# CC
AC_PROG_CC
-AC_PROG_CC_C99
AM_PROG_CC_C_O
# Only required if you want the WebRTC canceller -- no runtime dep on
# libstdc++ otherwise
@@ -177,6 +176,11 @@ esac
#### Compiler flags ####
+AX_CHECK_COMPILE_FLAG([-std=c11],
+ [],
+ [AC_MSG_ERROR([*** Compiler does not support -std=c11])],
+ [-pedantic -Werror])
+
AX_APPEND_COMPILE_FLAGS(
[-Wall -W -Wextra -pipe -Wno-long-long -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 -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto],
[], [-pedantic -Werror])