[passepartout] use the gnome compile flags macro



commit 74f1f67ad789b87fa823a26ca85e89e9427a81bd
Author: Sven Herzberg <herzi lanedo com>
Date:   Sun Apr 12 13:18:02 2009 +0200

    use the gnome compile flags macro
    
    * configure.ac: enable the maximum warnings by default; turn on -Werror for
      distcheck
    * src/fonts/Makefile.am,
    * src/pptout/Makefile.am,
    * src/pptout/document/Makefile.am,
    * src/pptout/widget/Makefile.am,
    * src/ps/Makefile.am,
    * src/testbed/Makefile.am,
    * src/util/Makefile.am,
    * src/xml2ps/Makefile.am: added WARN_CFLAGS to the preprocessor flags
---
 configure.ac                    |   11 ++++++++---
 src/fonts/Makefile.am           |    4 ++--
 src/pptout/Makefile.am          |    2 +-
 src/pptout/document/Makefile.am |    2 +-
 src/pptout/widget/Makefile.am   |    2 +-
 src/ps/Makefile.am              |    6 +++---
 src/testbed/Makefile.am         |    2 +-
 src/util/Makefile.am            |    2 +-
 src/xml2ps/Makefile.am          |    4 ++--
 9 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/configure.ac b/configure.ac
index 34a879d..6028875 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,9 +9,14 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_CONFIG_HEADER(src/defines.h)
 # AC_CONFIG_HEADER(src/defines.h)
 
-# Define global compiler flags:
-MY_CXXFLAGS="-Wall"
-CXXFLAGS="$CXXFLAGS $MY_CXXFLAGS"
+dnl  ----------------
+dnl | compiler flags |
+dnl  ----------------
+
+GNOME_COMPILE_WARNINGS([maximum])
+
+DISTCHECK_CONFIGURE_FLAGS="${DISTCHECK_CONFIGURE_FLAGS} --enable-compile-warnings=error"
+AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
 
 # Checks for programs.
 AC_PROG_CXX
diff --git a/src/fonts/Makefile.am b/src/fonts/Makefile.am
index 49cf2c4..b321762 100644
--- a/src/fonts/Makefile.am
+++ b/src/fonts/Makefile.am
@@ -8,6 +8,6 @@ libfonts_a_SOURCES = fontinfo.cc fontmanager.cc afm.cc freetype.cc
 libfonts_a_CPPFLAGS = -I$(top_srcdir)/src
 
 # for Glib::ustring
-libfonts_a_CPPFLAGS += $(GTKMM_CFLAGS) $(FREETYPE_CFLAGS)
+libfonts_a_CPPFLAGS += $(GTKMM_CFLAGS) $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
 
-#libfonts_a_LIBADD = $(top_srcdir)/src/util/libpptutil.a
\ No newline at end of file
+#libfonts_a_LIBADD = $(top_srcdir)/src/util/libpptutil.a
diff --git a/src/pptout/Makefile.am b/src/pptout/Makefile.am
index 7d9f2fc..6f2287f 100644
--- a/src/pptout/Makefile.am
+++ b/src/pptout/Makefile.am
@@ -35,7 +35,7 @@ passepartout_SOURCES = inspiration.cc streamdialog.cc pagesel.cc	\
 passepartout_CPPFLAGS = -I$(top_srcdir)/src -D'XMLPATH=$(xmldir)'
 
 passepartout_CPPFLAGS += $(XMLPP_CFLAGS) $(GTKMM_CFLAGS) $(GNOMECANVAS_CFLAGS) \
-	$(GNOME_CFLAGS) $(GNOMEVFS_CFLAGS)
+	$(GNOME_CFLAGS) $(GNOMEVFS_CFLAGS) $(WARN_CFLAGS)
 
 passepartout_LDADD = $(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS) \
 		$(GTHREAD_LIBS) $(GNOME_LIBS) $(GNOMEVFS_LIBS)
diff --git a/src/pptout/document/Makefile.am b/src/pptout/document/Makefile.am
index e342217..91b8150 100644
--- a/src/pptout/document/Makefile.am
+++ b/src/pptout/document/Makefile.am
@@ -12,4 +12,4 @@ libdocument_a_SOURCES = basicframe.cc cachedframe.cc document.cc	\
 
 libdocument_a_CPPFLAGS = -I$(top_srcdir)/src
 
-libdocument_a_CPPFLAGS += $(GTKMM_CFLAGS) $(XMLPP_CFLAGS)
+libdocument_a_CPPFLAGS += $(GTKMM_CFLAGS) $(XMLPP_CFLAGS) $(WARN_CFLAGS)
diff --git a/src/pptout/widget/Makefile.am b/src/pptout/widget/Makefile.am
index 17ed8ae..707607a 100644
--- a/src/pptout/widget/Makefile.am
+++ b/src/pptout/widget/Makefile.am
@@ -10,4 +10,4 @@ libwidget_a_SOURCES = spinner.cc filesel.cc imagefilesel.cc		\
 
 libwidget_a_CPPFLAGS = -I$(top_srcdir)/src -D'DOCDIR=$(docdir)'
 
-libwidget_a_CPPFLAGS += $(GTKMM_CFLAGS) $(GNOMEVFS_CFLAGS) $(GNOME_CFLAGS)
+libwidget_a_CPPFLAGS += $(GTKMM_CFLAGS) $(GNOMEVFS_CFLAGS) $(GNOME_CFLAGS) $(WARN_CFLAGS)
diff --git a/src/ps/Makefile.am b/src/ps/Makefile.am
index 646d94e..6cf5595 100644
--- a/src/ps/Makefile.am
+++ b/src/ps/Makefile.am
@@ -12,9 +12,9 @@ examinepdf_SOURCES = examinepdf.cc
 libps_a_CPPFLAGS = -I$(top_srcdir)/src
 
 # for Glib::ustring
-libps_a_CPPFLAGS += $(GTKMM_CFLAGS) $(FREETYPE_CFLAGS)
+libps_a_CPPFLAGS += $(GTKMM_CFLAGS) $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
 
-examinepdf_CPPFLAGS = $(libps_a_CPPFLAGS)
+examinepdf_CPPFLAGS = $(libps_a_CPPFLAGS) $(WARN_CFLAGS)
 examinepdf_LDADD = $(GTKMM_LIBS) \
 	-L. -lps -L../fonts -lfonts -lps -L../util -lpptutil
 examinepdf_DEPENDENCIES = libps.a
@@ -25,7 +25,7 @@ TESTS = runtest
 check_PROGRAMS = runtest
 runtest_SOURCES = test_glyphlist.cc
 runtest_CPPFLAGS = -I$(top_srcdir)/src
-runtest_CPPFLAGS += $(GTKMM_CFLAGS)
+runtest_CPPFLAGS += $(GTKMM_CFLAGS) $(WARN_CFLAGS)
 runtest_DEPENDENCIES = ../util/libpptutil.a $(noinst_LIBRARIES)
 runtest_LDADD = -L../testbed -lppttest -L. -lps -L../util -lpptutil \
 		$(GTKMM_LIBS)
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am
index 6720276..b3717d1 100644
--- a/src/testbed/Makefile.am
+++ b/src/testbed/Makefile.am
@@ -8,4 +8,4 @@ libppttest_a_CPPFLAGS = -I$(top_srcdir)/src
 
 # Just because Glib::Exception is stupid and doesn't inherit the standard
 # exception the testbed has to know about glib!
-libppttest_a_CPPFLAGS += $(GTKMM_CFLAGS)
+libppttest_a_CPPFLAGS += $(GTKMM_CFLAGS) $(WARN_CFLAGS)
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index b5474d2..9b8a969 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -12,7 +12,7 @@ libpptutil_a_SOURCES = stringutil.cc filesys.cc warning.cc os.cc \
 	cmdline.cc xmlwrap.cc
 
 # gtkmm and gnomecanvas flags is needed just to get RefPtr and AffineTrans.
-AM_CPPFLAGS = $(XMLPP_CFLAGS) $(GTKMM_CFLAGS) $(GNOMECANVAS_CFLAGS)
+AM_CPPFLAGS = $(XMLPP_CFLAGS) $(GTKMM_CFLAGS) $(GNOMECANVAS_CFLAGS) $(WARN_CFLAGS)
 
 TESTS =	runtest
 check_PROGRAMS = runtest
diff --git a/src/xml2ps/Makefile.am b/src/xml2ps/Makefile.am
index 296b4e7..260299f 100644
--- a/src/xml2ps/Makefile.am
+++ b/src/xml2ps/Makefile.am
@@ -16,9 +16,9 @@ xml2ps_SOURCES = main.cc
 libxml2ps_a_CPPFLAGS = -I$(top_srcdir)/src
 
 libxml2ps_a_CPPFLAGS += $(XMLPP_CFLAGS) $(GTKMM_CFLAGS)	\
-		$(GNOMECANVAS_CFLAGS)
+		$(GNOMECANVAS_CFLAGS) $(WARN_CFLAGS)
 
-xml2ps_CPPFLAGS = $(libxml2ps_a_CPPFLAGS)
+xml2ps_CPPFLAGS = $(libxml2ps_a_CPPFLAGS) $(WARN_CFLAGS)
 
 xml2ps_LDADD = $(XMLPP_LIBS) $(GTKMM_LIBS) $(GNOMECANVAS_LIBS)\
 	libxml2ps.a ../fonts/libfonts.a ../ps/libps.a ../util/libpptutil.a 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]