Commit b57bae0b authored by Philip Withnall's avatar Philip Withnall

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
parent 8dd71464
# 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment