aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-10-04 19:09:39 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-10-04 19:09:39 +0200
commit085398614ad0326d48eb8bfe402e0f4044bf0230 (patch)
tree1174ec154b22ad352043daaa27f9517732f9372e /configure.ac
parentb68380ba3c00f6db0d60ec5fe9ec72bb230ea7ad (diff)
downloadODR-AudioEnc-085398614ad0326d48eb8bfe402e0f4044bf0230.tar.gz
ODR-AudioEnc-085398614ad0326d48eb8bfe402e0f4044bf0230.tar.bz2
ODR-AudioEnc-085398614ad0326d48eb8bfe402e0f4044bf0230.zip
Enable compilation warnings, and switch toolame-dab to using double
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 53ae845..5d0918a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,22 @@ AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([rt], [clock_gettime], [], [AC_MSG_ERROR([library rt is missing])])
+AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [CFLAGS="$CFLAGS -Wduplicated-cond"])
+AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"])
+AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"])
+AX_CHECK_COMPILE_FLAG([-Wrestrict], [CFLAGS="$CFLAGS -Wrestrict"])
+AX_CHECK_COMPILE_FLAG([-Wdouble-promotion], [CFLAGS="$CFLAGS -Wdouble-promotion"])
+AX_CHECK_COMPILE_FLAG(["-Wformat=2"], [CFLAGS="$CFLAGS -Wformat=2"])
+
+AC_LANG_PUSH([C++])
+AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [CXXFLAGS="$CXXFLAGS -Wduplicated-cond"])
+AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CXXFLAGS="$CXXFLAGS -Wduplicated-branches"])
+AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CXXFLAGS="$CXXFLAGS -Wlogical-op"])
+AX_CHECK_COMPILE_FLAG([-Wrestrict], [CXXFLAGS="$CXXFLAGS -Wrestrict"])
+AX_CHECK_COMPILE_FLAG([-Wdouble-promotion], [CXXFLAGS="$CXXFLAGS -Wdouble-promotion"])
+AX_CHECK_COMPILE_FLAG(["-Wformat=2"], [CXXFLAGS="$CXXFLAGS -Wformat=2"])
+AC_LANG_POP([C++])
+
# Check for options
AC_ARG_ENABLE([alsa],
AS_HELP_STRING([--enable-alsa], [Enable ALSA input]))