From 3eb6a3f91aee17aa76b629a2cf5c4ffe0789dad9 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Mon, 23 Dec 2002 14:04:34 +0000 Subject: [PATCH] - Added --disable-warn flag to configure for bodgy compilers and OSes with bodgy headers. (Closes: #64) --- configure.in | 16 ++++++++++++++++ src/Makefile.am | 2 +- src/baseq2/Makefile.am | 2 +- src/ctf/Makefile.am | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index a626457..e8baa51 100644 --- a/configure.in +++ b/configure.in @@ -364,6 +364,22 @@ if test "x$USE_OPT" = "xyes"; then fi AC_SUBST(OPT_CFLAGS) +dnl ----------------- +dnl Compiler warnings +dnl ----------------- + +WARN_CFLAGS="" +dnl USE_WARN="" +AC_MSG_CHECKING(whether to enable compiler warnings) +AC_ARG_ENABLE(warn, + [ --disable-warn disable compiler warnings ], + AC_MSG_RESULT(no), + AC_MSG_RESULT(yes) + dnl USE_WARN="yes" + WARN_CFLAGS="$WARN_CFLAGS -Wall -Werror" +) +AC_SUBST(WARN_CFLAGS) + dnl ------------------- dnl Checks for asm junk dnl ------------------- diff --git a/src/Makefile.am b/src/Makefile.am index b9b1bb3..edc1c83 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = . baseq2 ctf xatrix rogue -std_cflags = -Wall -Werror -pipe @OPT_CFLAGS@ +std_cflags = -pipe @WARN_CFLAGS@ @OPT_CFLAGS@ module_ldflags = -module -avoid-version -rpath $(pkglibdir) bin_PROGRAMS = quake2 diff --git a/src/baseq2/Makefile.am b/src/baseq2/Makefile.am index 4d4ba45..6e22449 100644 --- a/src/baseq2/Makefile.am +++ b/src/baseq2/Makefile.am @@ -23,6 +23,6 @@ noinst_HEADERS = g_local.h m_actor.h m_berserk.h m_boss2.h m_boss31.h \ m_rider.h m_soldier.h m_supertank.h m_tank.h -AM_CFLAGS = -fPIC -Wall -Werror -pipe @OPT_CFLAGS@ +AM_CFLAGS = -fPIC -pipe @WARN_CFLAGS@ @OPT_CFLAGS@ AM_CPPFLAGS = -I$(top_srcdir)/src LDFLAGS = -module -avoid-version -rpath $(pkglibdir) diff --git a/src/ctf/Makefile.am b/src/ctf/Makefile.am index 2d0ad89..7ad1f15 100644 --- a/src/ctf/Makefile.am +++ b/src/ctf/Makefile.am @@ -13,6 +13,6 @@ game_la_SOURCES = g_ai.c g_chase.c g_cmds.c g_combat.c g_ctf.c \ noinst_HEADERS = g_ctf.h g_local.h m_player.h p_menu.h -AM_CFLAGS = -fPIC -Wall -Werror -pipe @OPT_CFLAGS@ +AM_CFLAGS = -fPIC -pipe @WARN_CFLAGS@ @OPT_CFLAGS@ AM_CPPFLAGS = -I$(top_srcdir)/src LDFLAGS = -module -avoid-version -rpath $(pkglibdir)