[gnome-builder] library-template: Use AX_COMPILER_FLAGS for determining compiler flags



commit 6de6fd5fb44b4e34f7f128129407956675bfdb4f
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Sun Jan 31 11:42:55 2016 +0100

    library-template: Use AX_COMPILER_FLAGS for determining compiler flags
    
    This uses a standard set of warning flags, and makes them available
    in WARN_CFLAGS, WARN_LDFLAGS, WARN_CXXFLAGS and WARN_SCANNERFLAGS.
    
    http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761356

 .../library_template/shared-library/configure.ac   |    1 +
 .../shared-library/src/Makefile.am                 |   12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/plugins/library-template/library_template/shared-library/configure.ac 
b/plugins/library-template/library_template/shared-library/configure.ac
index 4514e52..d19d765 100644
--- a/plugins/library-template/library_template/shared-library/configure.ac
+++ b/plugins/library-template/library_template/shared-library/configure.ac
@@ -85,6 +85,7 @@ dnl Add extra debugging with --enable-debug
 dnl ***********************************************************************
 AX_CHECK_ENABLE_DEBUG([no],[]
                       [G_DISABLE_ASSERT G_DISABLE_CHECKS G_DISABLE_CAST_CHECKS])
+AX_COMPILER_FLAGS
 
 
 dnl ***********************************************************************
diff --git a/plugins/library-template/library_template/shared-library/src/Makefile.am 
b/plugins/library-template/library_template/shared-library/src/Makefile.am
index bb5c38e..732b03a 100644
--- a/plugins/library-template/library_template/shared-library/src/Makefile.am
+++ b/plugins/library-template/library_template/shared-library/src/Makefile.am
@@ -5,7 +5,15 @@ lib{{name_}}_ API_VERSION@_la_SOURCES = \
        {{name}}.h \
        $(NULL)
 
-lib{{name_}}_ API_VERSION@_la_CFLAGS = $\{{{NAME}}_CFLAGS}
-lib{{name_}}_ API_VERSION@_la_LIBADD = $\{{{NAME}}_LIBS}
+lib{{name_}}_ API_VERSION@_la_CFLAGS =
+       $({{NAME}}_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(NULL)
+lib{{name_}}_ API_VERSION@_la_LIBADD = \
+       $({{NAME}}_LIBS) \
+       $(NULL)
+lib{{name_}}_ API_VERSION@_la_LDFLAGS = \
+       $(WARN_LDFLAGS) \
+       $(NULL)
 
 -include $(top_srcdir)/git.mk


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