[Scummvm-cvs-logs] CVS: scummvm configure,1.20,1.21 Makefile.new,1.3,1.4

Jonathan Gray khalek at users.sourceforge.net
Sun Jun 1 20:02:07 CEST 2003


Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1:/tmp/cvs-serv31285

Modified Files:
	configure Makefile.new 
Log Message:
add compiler version checking to configure script

Index: configure
===================================================================
RCS file: /cvsroot/scummvm/scummvm/configure,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- configure	26 May 2003 05:18:40 -0000	1.20
+++ configure	2 Jun 2003 03:01:22 -0000	1.21
@@ -20,6 +20,7 @@
 TMPC=scummvm-conf.cpp
 TMPO=scummvm-conf
 TMPLOG=config.log
+CFLAGS=""
 
 # default lib behaviour yes/no/auto
 _vorbis=auto
@@ -181,7 +182,53 @@
     exit 1
 fi
 
+#
+# Determine the compiler version
+
+echocheck "compiler version"
+
+cxx_name=`( $cc -v ) 2>&1 | tail -1 | cut -d ' ' -f 1`
+cxx_version=`( $CXX -dumpversion ) 2>&1`
+if test "$?" -gt 0; then
+	cxx_version="not found"
+fi
+
+case $cxx_version in
+	2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9])
+		_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
+		_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
+		cxx_version="$cxx_version, ok"
+		cxx_verc_fail=no
+		;;
+	'not found')
+		cxx_verc_fail=yes
+		;;
+	*)
+		cxx_version="$cxx_version, bad"
+		cxx_verc_fail=yes
+		;;
+esac
+
+echo "$cxx_version"
+
+if test "$cxx_verc_fail" = yes ; then
+	echo
+	echo "The version of your compiler is not supported at this time"
+	echo "Please ensure you are using GCC 2.95.x or GCC 3.x"
+	exit 1	
+fi
+
+#
+# Do CFLAGS now we know the compiler version
+#
+
+if test "$_cxx_major" -ge "3" ; then
+	CFLAGS="$CFLAGS -ansi -W -Wno-unused-parameter"
+fi;
+
+#
 # Engine selection
+#
 if test "$_build_scumm" = no ; then
 	_def_scumm='#define DISABLE_SCUMM'
 else
@@ -402,6 +449,7 @@
 # -------- Generated by configure -----------
 
 CXX := $CXX
+OPTFLAGS := $CFLAGS
 LIBS := $LIBS
 RANLIB := $_ranlib
 BACKEND := $_backend

Index: Makefile.new
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile.new,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.new	26 May 2003 05:18:40 -0000	1.3
+++ Makefile.new	2 Jun 2003 03:01:22 -0000	1.4
@@ -33,6 +33,7 @@
 # Uncomment this for stricter compile time code verification
 # CXXFLAGS+= -Wshadow -Werror
 
+CXXFLAGS += $(OPTFLAGS)
 
 #######################################################################
 # Misc stuff - you should normally never have to edit this            #





More information about the Scummvm-git-logs mailing list