summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/alsa/Makefile.am18
-rw-r--r--backends/null/Makefile.am15
-rw-r--r--backends/oss/Makefile.am18
-rw-r--r--backends/pulse/Makefile.am18
-rw-r--r--configure.ac51
-rw-r--r--examples/Makefile.am13
-rw-r--r--libmatemixer/Makefile.am18
7 files changed, 72 insertions, 79 deletions
diff --git a/backends/alsa/Makefile.am b/backends/alsa/Makefile.am
index 0e6b6d0..06e04a7 100644
--- a/backends/alsa/Makefile.am
+++ b/backends/alsa/Makefile.am
@@ -1,15 +1,19 @@
+NULL =
+
backenddir = $(libdir)/libmatemixer
backend_LTLIBRARIES = libmatemixer-alsa.la
-AM_CPPFLAGS = \
- -Wno-unknown-pragmas \
- -I$(top_srcdir) \
- -DG_LOG_DOMAIN=\"libmatemixer-alsa\"
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"libmatemixer-alsa\" \
+ $(GLIB_CFLAGS) \
+ $(ALSA_CFLAGS) \
+ $(NULL)
-libmatemixer_alsa_la_CFLAGS = \
- $(GLIB_CFLAGS) \
- $(ALSA_CFLAGS)
+libmatemixer_alsa_la_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(NULL)
libmatemixer_alsa_la_SOURCES = \
alsa-backend.c \
diff --git a/backends/null/Makefile.am b/backends/null/Makefile.am
index 9c4fd4c..f0371a7 100644
--- a/backends/null/Makefile.am
+++ b/backends/null/Makefile.am
@@ -1,13 +1,18 @@
+NULL =
+
backenddir = $(libdir)/libmatemixer
backend_LTLIBRARIES = libmatemixer-null.la
-AM_CPPFLAGS = \
- -Wno-unknown-pragmas \
- -I$(top_srcdir) \
- -DG_LOG_DOMAIN=\"libmatemixer-null\"
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"libmatemixer-null\" \
+ $(GLIB_CFLAGS) \
+ $(NULL)
-libmatemixer_null_la_CFLAGS = $(GLIB_CFLAGS)
+libmatemixer_null_la_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(NULL)
libmatemixer_null_la_SOURCES = \
null-backend.c \
diff --git a/backends/oss/Makefile.am b/backends/oss/Makefile.am
index 360082f..d9e1fa7 100644
--- a/backends/oss/Makefile.am
+++ b/backends/oss/Makefile.am
@@ -1,15 +1,19 @@
+NULL =
+
backenddir = $(libdir)/libmatemixer
backend_LTLIBRARIES = libmatemixer-oss.la
-AM_CPPFLAGS = \
- -Wno-unknown-pragmas \
- -I$(top_srcdir) \
- -DG_LOG_DOMAIN=\"libmatemixer-oss\"
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"libmatemixer-oss\" \
+ $(GLIB_CFLAGS) \
+ $(OSS_CFLAGS) \
+ $(NULL)
-libmatemixer_oss_la_CFLAGS = \
- $(GLIB_CFLAGS) \
- $(OSS_CFLAGS)
+libmatemixer_oss_la_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(NULL)
libmatemixer_oss_la_SOURCES = \
oss-common.h \
diff --git a/backends/pulse/Makefile.am b/backends/pulse/Makefile.am
index 74fe128..b07cc7e 100644
--- a/backends/pulse/Makefile.am
+++ b/backends/pulse/Makefile.am
@@ -1,15 +1,19 @@
+NULL =
+
backenddir = $(libdir)/libmatemixer
backend_LTLIBRARIES = libmatemixer-pulse.la
-AM_CPPFLAGS = \
- -Wno-unknown-pragmas \
- -I$(top_srcdir) \
- -DG_LOG_DOMAIN=\"libmatemixer-pulse\"
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"libmatemixer-pulse\" \
+ $(GLIB_CFLAGS) \
+ $(PULSEAUDIO_CFLAGS) \
+ $(NULL)
-libmatemixer_pulse_la_CFLAGS = \
- $(GLIB_CFLAGS) \
- $(PULSEAUDIO_CFLAGS)
+libmatemixer_pulse_la_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(NULL)
libmatemixer_pulse_la_SOURCES = \
pulse-backend.c \
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
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 5e6d7ac..1eea367 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,11 +1,18 @@
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- $(GLIB_CFLAGS)
+NULL =
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ $(GLIB_CFLAGS) \
+ $(NULL)
noinst_PROGRAMS = matemixer-monitor
matemixer_monitor_SOURCES = monitor.c
+matemixer_monitor_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(NULL)
+
matemixer_monitor_LDADD = \
$(GLIB_LIBS) \
$(top_builddir)/libmatemixer/libmatemixer.la
diff --git a/libmatemixer/Makefile.am b/libmatemixer/Makefile.am
index 431729e..e47d223 100644
--- a/libmatemixer/Makefile.am
+++ b/libmatemixer/Makefile.am
@@ -1,10 +1,14 @@
+NULL =
+
lib_LTLIBRARIES = libmatemixer.la
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/libmatemixer \
- -DG_LOG_DOMAIN=\"libmatemixer\" \
- -DLIBMATEMIXER_BACKEND_DIR=\"$(libdir)/libmatemixer\"
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libmatemixer \
+ -DG_LOG_DOMAIN=\"libmatemixer\" \
+ -DLIBMATEMIXER_BACKEND_DIR=\"$(libdir)/libmatemixer\" \
+ $(GLIB_CFLAGS) \
+ $(NULL)
libmatemixer_includedir = $(includedir)/mate-mixer/libmatemixer
@@ -26,7 +30,9 @@ libmatemixer_include_HEADERS = \
matemixer-types.h \
matemixer-version.h
-libmatemixer_la_CFLAGS = $(GLIB_CFLAGS)
+libmatemixer_la_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(NULL)
libmatemixer_la_SOURCES = \
matemixer.c \