summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2013-12-16 20:55:26 +0100
committerinfirit <[email protected]>2013-12-16 21:13:26 +0100
commit72ac788c489c974df04698cb7008ae0ee6a3056d (patch)
tree67f8fc6c771c593f96b2c66ed653febc7c746f23
parentb856d1112a1211fcdcc5678923b32359c7ebfa6c (diff)
downloadmate-power-manager-72ac788c489c974df04698cb7008ae0ee6a3056d.tar.bz2
mate-power-manager-72ac788c489c974df04698cb7008ae0ee6a3056d.tar.xz
Add option to enable deprecations and hide warnings under --enable-extra-warn
-rw-r--r--applets/brightness/Makefile.am1
-rw-r--r--applets/inhibit/Makefile.am1
-rw-r--r--configure.ac26
-rw-r--r--src/Makefile.am1
4 files changed, 28 insertions, 1 deletions
diff --git a/applets/brightness/Makefile.am b/applets/brightness/Makefile.am
index 5e9e834..fd8b54c 100644
--- a/applets/brightness/Makefile.am
+++ b/applets/brightness/Makefile.am
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
-DEGG_LOGGING="\"GPM_LOGGING\"" \
-DEGG_CONSOLE="\"GPM_CONSOLE\"" \
-I$(top_srcdir)/libdbus-glib \
+ $(DISABLE_DEPRECATED)
$(NULL)
libexec_PROGRAMS=mate-brightness-applet
diff --git a/applets/inhibit/Makefile.am b/applets/inhibit/Makefile.am
index fa12b4b..c3244c1 100644
--- a/applets/inhibit/Makefile.am
+++ b/applets/inhibit/Makefile.am
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
-DEGG_LOGGING="\"GPM_LOGGING\"" \
-DEGG_CONSOLE="\"GPM_CONSOLE\"" \
-I$(top_srcdir)/libdbus-glib \
+ $(DISABLE_DEPRECATED) \
$(NULL)
libexec_PROGRAMS=mate-inhibit-applet
diff --git a/configure.ac b/configure.ac
index 89309ff..34e6153 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,31 @@ if test x$enable_strict != xno; then
fi
fi
-if test "$GCC" = "yes"; then
+AC_ARG_ENABLE(deprecated,
+ [AS_HELP_STRING([--enable-deprecated],
+ [Warn about deprecated usages [default=no]])],,
+ [enable_deprecated=no])
+
+if test "x$enable_deprecated" = "xno"; then
+ DISABLE_DEPRECATED=" \
+ -DG_DISABLE_SINGLE_INCLUDES \
+ -DGTK_DISABLE_SINGLE_INCLUDES \
+ -DG_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DGDK_MULTIHEAD_SAFE \
+ -DGTK_MULTIHEAD_SAFE \
+ -DGSEAL_ENABLE"
+
+ CPPFLAGS="$CPPFLAGS $DISABLE_DEPRECATED"
+fi
+
+AC_ARG_ENABLE(extra-warn,
+ [AS_HELP_STRING([--enable-extra-warn],
+ [Enable extra warnings. gcc only. [default=no]])],,
+ [enable_extra_warn=no])
+
+if test "x$enable_extra_warn" = "xyes" && test "$GCC" = "yes"; then
WARNINGFLAGS="$WARNINGFLAGS -Wall"
WARNINGFLAGS="$WARNINGFLAGS -Wcast-align -Wno-uninitialized"
WARNINGFLAGS="$WARNINGFLAGS -Wmissing-declarations"
diff --git a/src/Makefile.am b/src/Makefile.am
index a10b98b..350e0cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,7 @@ AM_CPPFLAGS = \
-DEGG_LOGGING="\"GPM_LOGGING\"" \
-DEGG_CONSOLE="\"GPM_CONSOLE\"" \
-I$(top_srcdir) \
+ $(DISABLE_DEPRECATED) \
$(NULL)
bin_PROGRAMS = \