[geocode-glib] build: Port from GNOME_COMPILE_WARNINGS to AX_COMPILER_FLAGS



commit e5fc19d2b1fe632b7147a2b1feecb8b5a40194ab
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Oct 13 12:22:21 2016 +0100

    build: Port from GNOME_COMPILE_WARNINGS to AX_COMPILER_FLAGS
    
    AX_COMPILER_FLAGS uses a standard set of warnings across all projects,
    and a standard build API for enabling and disabling whether they are
    warnings or errors.
    
    Drop GNOME_CXX_WARNINGS because the project doesn’t use C++.
    
    https://wiki.gnome.org/Projects/GnomeCommon/Migration
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756311

 configure.ac             |   13 +------------
 geocode-glib/Makefile.am |    5 ++++-
 2 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 06b2ebe..091c7b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,22 +70,11 @@ AC_SUBST(GLIB_GENMARSHAL)
 
 GOBJECT_INTROSPECTION_CHECK([0.6.3])
 
-GNOME_COMPILE_WARNINGS([maximum])
-GNOME_CXX_WARNINGS
+AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
 
 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
 AC_SUBST(GLIB_MKENUMS)
 
-if test "$GCC" = "yes" ; then
-       CFLAGS="\
-       -Wall \
-       -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-       -Wnested-externs -Wpointer-arith \
-       -Wcast-align -Wsign-compare -Wredundant-decls \
-       -fno-strict-aliasing \
-       $CFLAGS"
-fi
-
 AC_CONFIG_FILES([
           Makefile
          geocode-glib-1.0.pc
diff --git a/geocode-glib/Makefile.am b/geocode-glib/Makefile.am
index 224d007..8259c41 100644
--- a/geocode-glib/Makefile.am
+++ b/geocode-glib/Makefile.am
@@ -27,6 +27,7 @@ libgeocode_glib_la_LIBADD = $(GEOCODE_LIBS) $(LIBS)
 libgeocode_glib_la_LDFLAGS =                           \
        -version-info $(GCLIB_LT_VERSION)               \
        -no-undefined                                   \
+       $(WARN_LDFLAGS)                                 \
        $(AM_LDFLAGS)                                   \
        -export-symbols $(srcdir)/geocode-glib.symbols
 
@@ -94,7 +95,9 @@ GeocodeGlib_1_0_gir_SCANNERFLAGS = \
        --symbol-prefix=geocode \
        --identifier-prefix=Geocode \
        --pkg-export=geocode-glib-1.0 \
-       --c-include="geocode-glib/geocode-glib.h"
+       --c-include="geocode-glib/geocode-glib.h" \
+       $(WARN_SCANNERFLAGS) \
+       $(NULL)
 GeocodeGlib_1_0_gir_FILES = $(introspection_files)
 INTROSPECTION_GIRS += GeocodeGlib-1.0.gir
 


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