[gnome-common] macros2: Deprecate GNOME_COMPILE_WARNINGS



commit b57bae0be3df241220b1fba3120e2f50261258e5
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Jan 16 11:08:32 2015 +0000

    macros2: Deprecate GNOME_COMPILE_WARNINGS
    
    Use AX_COMPILER_FLAGS instead, which comes from the autoconf-archive. It
    supports more compilers than just GCC, has a wider selection of flags,
    supports LDFLAGS, and is maintained for more projects than just GNOME.
    
    GNOME_COMPILE_WARNINGS has not been ported to AX_COMPILER_FLAGS as:
     • the default argument is a little difficult to map to
       AX_COMPILER_FLAGS’ IS-RELEASE argument; and
     • AX_COMPILER_FLAGS depends on some other macros in autoconf-archive
       licenced as GPLv3, which would potentially be tricky to copy into
       gnome-common.
    
    The --enable-iso-c argument is deprecated as well. Projects should
    choose which C standard they want to use, and hard-code that in their
    compiler flags. It is not something which should be set by the
    developer.
    
    GNOME_CXX_WARNINGS is not deprecated, but may be in future.
    
    No further changes should be made to GNOME_COMPILE_WARNINGS: please make
    them to AX_COMPILER_FLAGS instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729407

 macros2/gnome-compiler-flags.m4 |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/macros2/gnome-compiler-flags.m4 b/macros2/gnome-compiler-flags.m4
index ec2d896..810f847 100644
--- a/macros2/gnome-compiler-flags.m4
+++ b/macros2/gnome-compiler-flags.m4
@@ -1,6 +1,6 @@
 # gnome-compiler-flags.m4
 #
-# serial 3
+# serial 4
 #
 
 dnl GNOME_COMPILE_WARNINGS
@@ -12,7 +12,7 @@ dnl the first argument to the macro, defaulting to 'yes'.
 dnl Additional warning/error flags can be passed as an optional second argument.
 dnl
 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
-AC_DEFUN([GNOME_COMPILE_WARNINGS],[
+AU_DEFUN([GNOME_COMPILE_WARNINGS],[
     dnl ******************************
     dnl More compiler warnings
     dnl ******************************
@@ -120,7 +120,10 @@ AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
     WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
     AC_SUBST(WARN_CFLAGS)
-])
+],
+[[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and
+eliminate use of --enable-iso-c.
+See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]])
 
 dnl For C++, do basically the same thing.
 


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