Rename GNOME_COMPILE_WARNINGS to just COMPILE_WARNINGS.

Poaching someone else's macro name is a really dumb idea, because aclocal
looks in our macros directory only if it can't find the macro in the system
directories. Our config code doesn't work with Gnome's macro, it exports
WARN_CFLAGS rather than modifying CFLAGS directly the way ours does.
This commit is contained in:
John Ralls
2015-10-27 17:25:48 -07:00
parent f3de156e65
commit ce838d3cfc
2 changed files with 10 additions and 9 deletions

View File

@@ -1028,7 +1028,8 @@ then
then
enable_compile_warnings="yes"
fi
GNOME_COMPILE_WARNINGS
COMPILE_WARNINGS
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24.0)
AS_SCRUB_INCLUDE(GTK_CFLAGS)
@@ -1169,7 +1170,7 @@ then
AC_DEFINE(GNOME,,using GNOME)
else
# GNOME_COMPILE_WARNINGS will add -Wall; no need to set it again.
# COMPILE_WARNINGS will add -Wall; no need to set it again.
# also, only add it for GCC.
if test ${GCC}x = yesx
then
@@ -1294,14 +1295,14 @@ AC_ARG_ENABLE(python-bindings,
### Additional compiler warnings (or not) if we're running GCC
###-------------------------------------------------------------------------
# This has to come after AC_PROG_CC _AND_ GNOME_COMPILE_WARNINGS
# This has to come after AC_PROG_CC _AND_ COMPILE_WARNINGS
AC_MSG_CHECKING(what extra warning flags to pass to the C compiler)
if test ${GCC}x = yesx
then
warnFLAGS=
CFLAGS="${CFLAGS} -Wno-unused"
# other flags...
# These next two are included in the GNOME_COMPILE_WARNINGS
# These next two are included in the COMPILE_WARNINGS
#warnFLAGS="${warnFLAGS} -Wmissing-prototypes"
#warnFLAGS="${warnFLAGS} -Wmissing-declarations"
#warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall

View File

@@ -1,8 +1,8 @@
dnl GNOME_COMPILE_WARNINGS
dnl COMPILE_WARNINGS
dnl Turn on many useful compiler warnings
dnl For now, only works on GCC
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
AC_ARG_ENABLE(compile-warnings,
AC_DEFUN([COMPILE_WARNINGS],[
AC_ARG_ENABLE(compile-warnings,
[ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum)
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
@@ -56,8 +56,8 @@ AC_DEFUN([GNOME_COMPILE_WARNINGS],[
dnl For C++, do basically the same thing.
AC_DEFUN([GNOME_CXX_WARNINGS],[
AC_ARG_ENABLE(cxx-warnings,
AC_DEFUN([CXX_WARNINGS],[
AC_ARG_ENABLE(cxx-warnings,
[ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)