summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-10-01 22:52:44 +0200
committerraveit65 <[email protected]>2019-10-08 21:40:10 +0200
commitd864be60f48776db19ffd6d35d478fe75b62c81e (patch)
tree9d52a7080db4287b11cf4e55ca8922aeccba1e9f /configure.ac
parentd9d68dd74c9ccd2800cff759290b52abfff389f2 (diff)
downloadmate-media-d864be60f48776db19ffd6d35d478fe75b62c81e.tar.bz2
mate-media-d864be60f48776db19ffd6d35d478fe75b62c81e.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.ac52
1 files changed, 5 insertions, 47 deletions
diff --git a/configure.ac b/configure.ac
index 7d3baaf..9418ae3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,9 @@ AC_CONFIG_MACRO_DIR([m4])
IT_PROG_INTLTOOL([0.35.0])
+MATE_MAINTAINER_MODE_DEFINES
+MATE_COMPILE_WARNINGS([yes])
+
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
@@ -79,10 +82,6 @@ dnl ---------------------------------------------------------------------------
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-MATE_MAINTAINER_MODE_DEFINES
-MATE_COMPILE_WARNINGS([maximum])
-MATE_CXX_WARNINGS
-
AC_ARG_ENABLE(deprecated,
[AS_HELP_STRING([--enable-deprecated],
[warn about deprecated usages [default=yes]])],,
@@ -133,48 +132,6 @@ if test "x$enable_statusicon" = "xno" && test "x$enable_panelapplet" = "xno"; th
AC_MSG_ERROR([must build either volume control status icon or volume control applet])
fi
-# 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)
-
AC_CONFIG_FILES([
Makefile
data/Makefile
@@ -208,7 +165,8 @@ echo "
Prefix: ${prefix}
Source code location: ${srcdir}
Compiler: ${CC}
- CFLAGS: ${CFLAGS}
+ Compiler flags: ${CFLAGS}
+ Warning flags: ${WARN_CFLAGS}
"
#this is needed to get any output when the default is used
#rather than explicitly specifying whether to build the applet or the tray icon