summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-10-01 22:37:49 +0200
committerraveit65 <[email protected]>2019-10-09 09:11:58 +0200
commitea214684aeee170dc2a95cb1df751ef4bd0b82c4 (patch)
treeb2f4ce62ffe36789969e7af0d921b5a5103a19c1 /configure.ac
parent5f8bf42dc4b5bae6627bafb850e90fc8d25e8f5f (diff)
downloadlibmatemixer-ea214684aeee170dc2a95cb1df751ef4bd0b82c4.tar.bz2
libmatemixer-ea214684aeee170dc2a95cb1df751ef4bd0b82c4.tar.xz
Use WARN_CFLAGS which are only set with --enable-compiler-warnings
It removes --enable-more-warnings, since it is recommended to use --enable-compile-warnings=maximum It updates configure summary.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac51
1 files changed, 7 insertions, 44 deletions
diff --git a/configure.ac b/configure.ac
index c5f3528..508ffe1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,11 @@ m4_ifdef([AM_SILENT_RULES],
[AM_SILENT_RULES([yes])],
[AM_DEFAULT_VERBOSITY=1 AC_SUBST(AM_DEFAULT_VERBOSITY)])
+# =======================================================================
+# Compiler warnings
+# =======================================================================
+MATE_COMPILE_WARNINGS([yes])
+
# Checks for required programs.
AC_PROG_CC
AM_PROG_CC_C_O
@@ -229,49 +234,6 @@ AC_SUBST(OSS_CFLAGS)
AC_SUBST(OSS_LIBS)
# =======================================================================
-# Compiler warnings
-# =======================================================================
-MATE_COMPILE_WARNINGS([maximum])
-MATE_CXX_WARNINGS
-
-# Turn on the additional warnings last, so warnings don't affect other tests.
-AC_ARG_ENABLE(more-warnings,
- [AC_HELP_STRING([--enable-more-warnings],
- [Maximum compiler warnings])],
- set_more_warnings="$enableval",[
- if test -d $srcdir/.git; then
- set_more_warnings=yes
- else
- set_more_warnings=no
- fi
- ])
-
-AC_MSG_CHECKING(for more warnings)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- AC_MSG_RESULT(yes)
- CFLAGS="-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare $CFLAGS"
-
- for option in -Wno-unused-parameter -Wno-strict-aliasing -Wno-sign-compare; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- if test $has_option = no; then
- CFLAGS="$SAVE_CFLAGS"
- fi
- AC_MSG_RESULT($has_option)
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST(CFLAGS)
-
-# =======================================================================
# Finish
# =======================================================================
AC_CONFIG_FILES([
@@ -302,7 +264,8 @@ echo "
Prefix: ${prefix}
Source code location: ${srcdir}
Compiler: ${CC}
- CFLAGS: ${CFLAGS}
+ Compiler flags: ${CFLAGS}
+ Warning flags: ${WARN_CFLAGS}
Build Null module: $have_null
Build PulseAudio module: $have_pulseaudio