From b794e155b0cc5f8c1d118045fa54f74f76c6412e Mon Sep 17 00:00:00 2001 From: Nelson Rush Date: Thu, 6 Jan 2000 17:29:23 +0000 Subject: [PATCH] applied tim's patch The following patch allows Quakeforge to be compiled with the native compilers on Solaris, Irix, and AIX. --- configure.in | 21 +++++++++++++++++++++ qw_client/Makefile.in | 2 +- qw_client/cl_main.c | 4 ++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 45aaf2e..3d07a92 100644 --- a/configure.in +++ b/configure.in @@ -400,6 +400,27 @@ if test "x$RELEASE" = xyes; then fi fi +dnl Quakeforge code has lots of C++ comments, which cause +dnl problems with any compiler that is ANSI/ISO-C compliant. +dnl Make the compiler swallow its pride... +if test "x$GCC" != xyes; then + case "$target" in + *-aix*) + CFLAGS="$CFLAGS -qcpluscmt" + ;; + *-irix6*) + CFLAGS="$CFLAGS -Xcpluscomm" + ;; + *-solaris*) + CFLAGS="$CFLAGS -xCC" + ;; + esac +fi + +dnl We want warnings, lots of warnings... +if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -Wall -pedantic" +fi dnl Check for ia32 AC_MSG_CHECKING(for an ia32 machine) diff --git a/qw_client/Makefile.in b/qw_client/Makefile.in index 58aa1be..d4141b7 100644 --- a/qw_client/Makefile.in +++ b/qw_client/Makefile.in @@ -195,7 +195,7 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ # Directory specific stuff # DEFS = @DEFS@ -CFLAGS = @CFLAGS@ -Wall -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. \ +CFLAGS = @CFLAGS@ -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. \ $(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_ODIR) -I$(COMMON_DIR) GENERAL_SRC = $(CL_COMMON_SRC) \ diff --git a/qw_client/cl_main.c b/qw_client/cl_main.c index bb1d3d6..ac0b0a3 100644 --- a/qw_client/cl_main.c +++ b/qw_client/cl_main.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include "winquake.h" -#ifdef __sun__ +#ifdef __sun /* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */ #define model_t sunmodel_t #endif @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#ifdef __sun__ +#ifdef __sun #undef model_t #endif