summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-10-10 20:21:39 +0200
committerraveit65 <[email protected]>2019-10-11 17:09:43 +0200
commit1f714672693f637f81ac55cf4f4618c74d10e229 (patch)
tree4b0608984141ac3918fde87e64eea77983a5ff86
parent2aa513e98b1e3ab11a8ed8b3421cc47780f62101 (diff)
downloadmate-notification-daemon-1f714672693f637f81ac55cf4f4618c74d10e229.tar.bz2
mate-notification-daemon-1f714672693f637f81ac55cf4f4618c74d10e229.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. It removes c++ checks as there is no c++ code.
-rw-r--r--configure.ac62
-rw-r--r--src/capplet/Makefile.am2
-rw-r--r--src/daemon/Makefile.am2
-rw-r--r--src/themes/coco/Makefile.am6
-rw-r--r--src/themes/nodoka/Makefile.am2
-rw-r--r--src/themes/slider/Makefile.am2
-rw-r--r--src/themes/standard/Makefile.am1
7 files changed, 19 insertions, 58 deletions
diff --git a/configure.ac b/configure.ac
index ef95213..1313e11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,12 @@ AC_PROG_INSTALL
AC_TYPE_SIZE_T
dnl ---------------------------------------------------------------------------
+dnl Warning flags
+dnl ---------------------------------------------------------------------------
+MATE_MAINTAINER_MODE_DEFINES
+MATE_COMPILE_WARNINGS([yes])
+
+dnl ---------------------------------------------------------------------------
dnl Initialize Libtool
dnl ---------------------------------------------------------------------------
LT_PREREQ([2.2.6])
@@ -176,50 +182,6 @@ AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [Where system.d dir for DB
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
dnl ---------------------------------------------------------------------------
-dnl Turn on the additional warnings last
-dnl ---------------------------------------------------------------------------
-MATE_COMPILE_WARNINGS([maximum])
-MATE_CXX_WARNINGS([yes])
-MATE_MAINTAINER_MODE_DEFINES
-
-AC_ARG_ENABLE(more-warnings,
- AS_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)
- WARNINGCFLAGS="\
- -Wchar-subscripts -Wmissing-declarations \
- -Wcast-align -Wsign-compare -U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2 \
- $WARNINGCFLAGS"
-
- for option in -Wno-strict-aliasing; do
- SAVE_CFLAGS="$WARNINGCFLAGS"
- WARNINGCFLAGS="$WARNINGCFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- if test $has_option = no; then
- WARNINGCFLAGS="$SAVE_CFLAGS"
- fi
- AC_MSG_RESULT($has_option)
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
-fi
-
-dnl ---------------------------------------------------------------------------
dnl Enabel/disable icon cache generation
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(icon-update, AC_HELP_STRING([--disable-icon-update],
@@ -229,12 +191,6 @@ if (test "$enable_icon_update" != no); then
fi
AM_CONDITIONAL([ICON_UPDATE], [test -n "$UPDATE_ICON_CACHE"])
-AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $WARNINGCFLAGS"
-AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
-
-AC_SUBST([AM_CFLAGS])
-AC_SUBST([AM_CXXFLAGS])
-
AC_CONFIG_FILES([
Makefile
data/Makefile
@@ -255,14 +211,16 @@ AC_OUTPUT
echo "
$PACKAGE_NAME $PACKAGE_VERSION
- =========================
+ ================================
prefix: ${prefix}
exec_prefix: ${exec_prefix}
bindir: ${bindir}
datadir: ${datadir}
source code location: ${srcdir}
- cflags: ${AM_CFLAGS}
+ compiler: ${CC}
+ cflags: ${CFLAGS}
+ warning flags: ${WARN_CFLAGS}
dbus-1 system.d $DBUS_SYS_DIR
dbus-1 services $DBUS_SERVICES_DIR
diff --git a/src/capplet/Makefile.am b/src/capplet/Makefile.am
index dfd31f2..12110b1 100644
--- a/src/capplet/Makefile.am
+++ b/src/capplet/Makefile.am
@@ -4,7 +4,7 @@ bin_PROGRAMS = mate-notification-properties
mate_notification_properties_LDADD = $(NOTIFICATION_CAPPLET_LIBS)
mate_notification_properties_SOURCES = mate-notification-properties.c
-
+mate_notification_properties_CFLAGS = $(WARN_CFLAGS)
uidir = $(datadir)/mate-notification-daemon
ui_DATA = mate-notification-properties.ui
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index db1f6be..179e964 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -14,6 +14,8 @@ mate_notification_daemon_SOURCES = \
mate_notification_daemon_LDADD = $(NOTIFICATION_DAEMON_LIBS)
+mate_notification_daemon_CFLAGS = $(WARN_CFLAGS)
+
mate_notification_daemon_built_sources = \
mnd-dbus-generated.h \
mnd-dbus-generated.c \
diff --git a/src/themes/coco/Makefile.am b/src/themes/coco/Makefile.am
index 52f7a6f..78eccbb 100644
--- a/src/themes/coco/Makefile.am
+++ b/src/themes/coco/Makefile.am
@@ -1,9 +1,9 @@
-AM_CPPFLAGS = $(THEME_CFLAGS) -Wall
+AM_CPPFLAGS = $(THEME_CFLAGS)
enginedir = $(libdir)/mate-notification-daemon/engines
engine_LTLIBRARIES = libcoco.la
libcoco_la_SOURCES = coco-theme.c
-
+libcoco_la_CFLAGS = $(WARN_CFLAGS)
libcoco_la_LDFLAGS = -module -avoid-version -no-undefined
-libcoco_la_LIBADD = $(THEME_LIBS)
+libcoco_la_LIBADD = $(THEME_LIBS)
diff --git a/src/themes/nodoka/Makefile.am b/src/themes/nodoka/Makefile.am
index 38b797c..b49bdcf 100644
--- a/src/themes/nodoka/Makefile.am
+++ b/src/themes/nodoka/Makefile.am
@@ -4,6 +4,6 @@ enginedir = $(libdir)/mate-notification-daemon/engines
engine_LTLIBRARIES = libnodoka.la
libnodoka_la_SOURCES = nodoka-theme.c
-
+libnodoka_la_CFLAGS = $(WARN_CFLAGS)
libnodoka_la_LDFLAGS = -module -avoid-version -no-undefined
libnodoka_la_LIBADD = $(THEME_LIBS)
diff --git a/src/themes/slider/Makefile.am b/src/themes/slider/Makefile.am
index 46dcdd2..fc8d7eb 100644
--- a/src/themes/slider/Makefile.am
+++ b/src/themes/slider/Makefile.am
@@ -6,7 +6,7 @@ engine_LTLIBRARIES = libslider.la
AM_CPPFLAGS = $(THEME_CFLAGS)
libslider_la_SOURCES = theme.c
-
+libslider_la_CFLAGS = $(WARN_CFLAGS)
libslider_la_LDFLAGS = -module -avoid-version -no-undefined
libslider_la_LIBADD = \
$(THEME_LIBS) \
diff --git a/src/themes/standard/Makefile.am b/src/themes/standard/Makefile.am
index c31098c..7f82f54 100644
--- a/src/themes/standard/Makefile.am
+++ b/src/themes/standard/Makefile.am
@@ -3,6 +3,7 @@ enginedir = $(libdir)/mate-notification-daemon/engines
engine_LTLIBRARIES = libstandard.la
libstandard_la_SOURCES = theme.c
+libstandard_la_CFLAGS = $(WARN_CFLAGS)
libstandard_la_LDFLAGS = -module -avoid-version -no-undefined
libstandard_la_LIBADD = $(NOTIFICATION_DAEMON_LIBS)