[Scummvm-cvs-logs] SF.net SVN: scummvm:[39605] scummvm/trunk/configure

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Sun Mar 22 12:24:23 CET 2009


Revision: 39605
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39605&view=rev
Author:   jvprat
Date:     2009-03-22 11:24:23 +0000 (Sun, 22 Mar 2009)

Log Message:
-----------
- Grouped default settings
- Grouped related functions
- Add "backends/platform/$_backend" to MODULES for all backends
- Some bits of formatting

Modified Paths:
--------------
    scummvm/trunk/configure

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2009-03-22 09:37:49 UTC (rev 39604)
+++ scummvm/trunk/configure	2009-03-22 11:24:23 UTC (rev 39605)
@@ -30,7 +30,7 @@
 SAVED_CXXFLAGS=$CXXFLAGS
 SAVED_CPPFLAGS=$CPPFLAGS
 
-# use environment vars if set
+# Use environment vars if set
 CXXFLAGS="$CXXFLAGS $CPPFLAGS"
 
 # Backslashes into forward slashes:
@@ -55,23 +55,6 @@
 fi
 
 
-# default lib behaviour yes/no/auto
-_vorbis=auto
-_tremor=auto
-_flac=auto
-_mad=auto
-_alsa=auto
-_zlib=auto
-_mpeg2=no
-_fluidsynth=auto
-_mt32emu=yes
-# default option behaviour yes/no
-_build_hq_scalers=yes
-_build_scalers=yes
-# default vkeybd/keymapper options
-_vkeybd=no
-_keymapper=no
-
 # Add an engine: id name build subengines
 add_engine() {
 	_engines="${_engines} ${1}"
@@ -113,15 +96,35 @@
 add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
 add_engine tucker "Bud Tucker in Double Trouble" yes
 
+
+#
+# Default settings
+#
+# Default lib behaviour yes/no/auto
+_vorbis=auto
+_tremor=auto
+_flac=auto
+_mad=auto
+_alsa=auto
+_zlib=auto
+_mpeg2=no
+_fluidsynth=auto
+_mt32emu=yes
+# Default option behaviour yes/no
+_build_hq_scalers=yes
+_build_scalers=yes
+# Default vkeybd/keymapper options
+_vkeybd=no
+_keymapper=no
+# Default platform settings
+_backend=sdl
 _endian=unknown
 _need_memalign=no
 _have_x86=no
 _dynamic_modules=no
 _plugins_default=static
 _nasm=auto
-
-# more defaults
-_backend=sdl
+# Default commands
 _ranlib=ranlib
 _strip=strip
 _ar="ar cru"
@@ -135,6 +138,12 @@
 NASMFLAGS=""
 NASM=""
 _prefix=/usr/local
+# For cross compiling
+_host=""
+_host_cpu=""
+_host_vendor=""
+_host_os=""
+_host_alias=""
 
 _srcdir=`dirname $0`
 
@@ -147,13 +156,6 @@
 TMPC=${TMPO}.cpp
 TMPLOG=config.log
 
-# For cross compiling
-_host=""
-_host_cpu=""
-_host_vendor=""
-_host_os=""
-_host_alias=""
-
 cc_check() {
 	echo >> "$TMPLOG"
 	cat "$TMPC" >> "$TMPLOG"
@@ -166,6 +168,13 @@
 	return "$TMP"
 }
 
+#
+# Function to provide echo -n for bourne shells that don't have it
+#
+echo_n() {
+	printf "$@"
+}
+
 echocheck() {
 	echo_n "Checking for $@... "
 }
@@ -250,39 +259,29 @@
 	fi
 }
 
+
 #
-# Function to provide echo -n for bourne shells that don't have it
+# Generic options functions
 #
-echo_n() {
-	printf "$@"
+
+# Show the configure help line for an option
+option_help() {
+        tmpopt=`echo $1 | sed 's/_/-/g'`
+	option=`echo "--${tmpopt}                       " | sed "s/\(.\{23\}\).*/\1/"`
+	echo "  ${option}  ${2}"
 }
 
+# Show an error about an unknown option
+option_error() {
+	echo "error: unrecognised option: $ac_option
+Try \`$0 --help' for more information." >&2
+	exit 1
+}
+
+
 #
-# Determine a data type with the given length
+# Engine handling functions
 #
-find_type_with_size() {
-	for datatype in int short char long unknown; do
-	cat <<EOF >tmp_find_type_with_size.cpp
-typedef $datatype ac__type_sizeof_;
-int main() {
-	static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) == $1)];
-	test_array [0] = 0;
-	return 0;
-}
-EOF
-	if $CXX $CXXFLAGS -c -o tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp 2>/dev/null ; then
-		break
-	else
-		if test "$datatype" = "unknown"; then
-			echo "couldn't find data type with $1 bytes"
-			exit 1
-		fi
-		continue
-	fi
-	done
-	rm -f tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp
-	echo $datatype
-}
 
 # Get the name of the engine
 get_engine_name() {
@@ -367,13 +366,6 @@
 	fi
 }
 
-# Show the configure help line for an option
-option_help() {
-        tmpopt=`echo $1 | sed 's/_/-/g'`
-	option=`echo "--${tmpopt}                       " | sed "s/\(.\{23\}\).*/\1/"`
-	echo "  ${option}  ${2}"
-}
-
 # Show the configure help line for a given engine
 show_engine_help() {
 	if test `get_engine_build $1` = yes ; then
@@ -507,7 +499,6 @@
 #
 # Greet user
 #
-
 echo "Running ScummVM configure..."
 echo "Configure run on" `date` > $TMPLOG
 
@@ -608,12 +599,6 @@
 
 DEBFLAGS="-g"
 
-option_error() {
-	echo "error: unrecognised option: $ac_option
-Try \`$0 --help' for more information." >&2
-	exit 1
-}
-
 for ac_option in $@; do
 	case "$ac_option" in
 	--disable-hq-scalers)     _build_hq_scalers=no ;;
@@ -849,7 +834,6 @@
 #
 # Platform specific sanity checks
 #
-
 case $_host_os in
 wii | gamecube)
 	if test -z "$DEVKITPRO"; then
@@ -894,9 +878,9 @@
 CXX=
 for compiler in $compilers; do
 	if test_compiler $compiler; then
-	CXX=$compiler
-	echo $CXX
-	break
+		CXX=$compiler
+		echo $CXX
+		break
 	fi
 done
 if test -z "$CXX"; then
@@ -973,6 +957,33 @@
 rm -f tmp_endianness_check.o tmp_endianness_check.cpp
 
 #
+# Determine a data type with the given length
+#
+find_type_with_size() {
+	for datatype in int short char long unknown; do
+	cat <<EOF >tmp_find_type_with_size.cpp
+typedef $datatype ac__type_sizeof_;
+int main() {
+	static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) == $1)];
+	test_array [0] = 0;
+	return 0;
+}
+EOF
+	if $CXX $CXXFLAGS -c -o tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp 2>/dev/null ; then
+		break
+	else
+		if test "$datatype" = "unknown"; then
+			echo "couldn't find data type with $1 bytes"
+			exit 1
+		fi
+		continue
+	fi
+	done
+	rm -f tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp
+	echo $datatype
+}
+
+#
 # Determine data type sizes
 #
 echo_n "Type with 1 byte... "
@@ -1731,7 +1742,7 @@
 fi
 
 #
-# figure out installation directories
+# Figure out installation directories
 #
 test -z "$_bindir" && _bindir="$_prefix/bin"
 test -z "$_mandir" && _mandir="$_prefix/share/man"
@@ -1773,14 +1784,12 @@
 case $_backend in
 	null)
 		DEFINES="$DEFINES -DUSE_NULL_DRIVER"
-		MODULES="$MODULES backends/platform/null"
 		;;
 	sdl)
 		find_sdlconfig
 		INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`"
 		LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
 		DEFINES="$DEFINES -DSDL_BACKEND"
-		MODULES="$MODULES backends/platform/sdl"
 		;;
 	gp2x)
 		find_sdlconfig
@@ -1788,23 +1797,19 @@
 		LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
 		LDFLAGS="$LDFLAGS -static"
 		CXXFLAGS="$CXXFLAGS -march=armv4t"
-		MODULES="$MODULES backends/platform/gp2x"
 		;;
 	iphone)
 		OBJCFLAGS="$OBJCFLAGS --std=c99"
 		LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework CoreSurface -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio"
 		DEFINES="$DEFINES -DIPHONE_BACKEND"
-		MODULES="$MODULES backends/platform/iphone"
 		;;
 	dc)
 		INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include'
 		LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib'
 		LIBS="$LIBS -lronin -lm"
-		MODULES="$MODULES backends/platform/dc"
 		;;
 	wii)
 		DEFINES="$DEFINES -D__WII__ -DGEKKO"
-		MODULES="$MODULES backends/platform/wii"
 		case $_host_os in
 		gamecube)
 			DEFINES="$DEFINES -DGAMECUBE"
@@ -1820,6 +1825,7 @@
 		exit 1
 		;;
 esac
+MODULES="$MODULES backends/platform/$_backend"
 
 #
 # Do CXXFLAGS now we know the compiler version


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list