summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-26 19:59:26 +0200
committerraveit65 <[email protected]>2019-10-01 14:14:44 +0200
commit54f10719ae236f67db8505a0217c190bac32c13b (patch)
tree16c7f25f01ce1238b97ab9014943a035b1bbeb69
parent744f9ff68b10b168bcceb20e550ac0b8239e7fea (diff)
downloadmarco-54f10719ae236f67db8505a0217c190bac32c13b.tar.bz2
marco-54f10719ae236f67db8505a0217c190bac32c13b.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
-rw-r--r--configure.ac12
-rw-r--r--src/Makefile.am3
-rw-r--r--src/tools/Makefile.am7
-rw-r--r--src/wm-tester/Makefile.am4
4 files changed, 11 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index d20745f1..0e8e19ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE([subdir-objects no-dist-gzip dist-xz check-news])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AX_CHECK_ENABLE_DEBUG()
+MATE_COMPILE_WARNINGS
dnl **************************************************************************
dnl Library version information
@@ -54,17 +55,6 @@ AC_CHECK_SIZEOF(__int64)
## byte order
AC_C_BIGENDIAN
-#### Warnings
-AX_APPEND_COMPILE_FLAGS([-Wall -Wcast-align -Wchar-subscripts -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wsign-compare -Wshadow], [CFLAGS])
-AC_ARG_ENABLE(more-warnings,
- AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
- set_more_warnings="$enableval",
- set_more_warnings=no
-)
-if test "$set_more_warnings" != "no"; then
- AX_APPEND_COMPILE_FLAGS([-Wextra], [CFLAGS])
-fi
-
GIO_MIN_VERSION=2.25.10
GTK_MIN_VERSION=3.22.0
diff --git a/src/Makefile.am b/src/Makefile.am
index 0bdba31c..cb7c0043 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,7 +11,8 @@ AM_CPPFLAGS = \
-DMARCO_DATADIR=\"$(datadir)\" \
-DG_LOG_DOMAIN=\"marco\" \
-DSN_API_NOT_YET_FROZEN=1 \
- @MARCO_CFLAGS@
+ @MARCO_CFLAGS@ \
+ $(WARN_CFLAGS)
marco_SOURCES= \
core/main.c \
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 0a1da4b6..d88f571f 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -1,9 +1,12 @@
icondir=$(pkgdatadir)/icons
icon_DATA=marco-window-demo.png
-AM_CPPFLAGS=@MARCO_WINDOW_DEMO_CFLAGS@ @MARCO_MESSAGE_CFLAGS@ \
+AM_CPPFLAGS = \
+ @MARCO_WINDOW_DEMO_CFLAGS@ \
+ @MARCO_MESSAGE_CFLAGS@ \
-DMARCO_ICON_DIR=\"$(pkgdatadir)/icons\" \
- -DMARCO_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
+ -DMARCO_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" \
+ $(WARN_CFLAGS)
marco_message_SOURCES= \
marco-message.c
diff --git a/src/wm-tester/Makefile.am b/src/wm-tester/Makefile.am
index 0faed456..8383556f 100644
--- a/src/wm-tester/Makefile.am
+++ b/src/wm-tester/Makefile.am
@@ -1,5 +1,7 @@
-AM_CPPFLAGS=@MARCO_CFLAGS@
+AM_CPPFLAGS = \
+ @MARCO_CFLAGS@ \
+ $(WARN_CFLAGS)
wm_tester_SOURCES= \
main.c