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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Dec 2 21:59:19 CET 2007


Revision: 29707
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29707&view=rev
Author:   fingolfin
Date:     2007-12-02 12:59:19 -0800 (Sun, 02 Dec 2007)

Log Message:
-----------
Abort configure run if no matching datatypes are found; some tweaks for cross compiling (do not try to link when you don't use the resulting binary; but *if* we want to link, we must pass the LDFLAGS in case there are require linker flag modifications)

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

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2007-12-02 14:45:13 UTC (rev 29706)
+++ scummvm/trunk/configure	2007-12-02 20:59:19 UTC (rev 29707)
@@ -207,9 +207,9 @@
 
 if test -n "$_host"; then
 	# In cross-compiling mode, we cannot run the result
-	eval "$1 $CXXFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
+	eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
 else
-	eval "$1 $CXXFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
+	eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
 fi
 }
 
@@ -268,7 +268,7 @@
 	return 0;
 }
 EOF
-if $CXX $CXXFLAGS -o tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp 2>/dev/null ; then
+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
@@ -819,7 +819,6 @@
 esac
 
 
-cxx_name=`( $cc -v ) 2>&1 | $tail -n 1 | cut -d ' ' -f 1`
 cxx_version=`( $CXX -dumpversion ) 2>&1`
 if test "$?" -gt 0; then
 	cxx_version="not found"
@@ -919,15 +918,21 @@
 #
 echo_n "Type with 1 byte... "
 type_1_byte=`find_type_with_size 1`
+TMP="$?"
 echo "$type_1_byte"
+test $TMP -eq 0 || exit 1	# check exit code of subshell
 	
 echo_n "Type with 2 bytes... "
 type_2_byte=`find_type_with_size 2`
+TMP="$?"
 echo "$type_2_byte"
+test $TMP -eq 0 || exit 1	# check exit code of subshell
 	
 echo_n "Type with 4 bytes... "
 type_4_byte=`find_type_with_size 4`
+TMP="$?"
 echo "$type_4_byte"
+test $TMP -eq 0 || exit 1	# check exit code of subshell
 	
 #
 # Check whether we can use x86 asm routines


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