diff options
author | Max Horn | 2007-12-02 20:59:19 +0000 |
---|---|---|
committer | Max Horn | 2007-12-02 20:59:19 +0000 |
commit | 40474c5acbf9210022649890f755cc0df91edeb3 (patch) | |
tree | 9ec521ca28078b321f81cedb3a279d53b9628039 | |
parent | 411688ef8f6b8598201aac8119e925eff0d1870c (diff) | |
download | scummvm-rg350-40474c5acbf9210022649890f755cc0df91edeb3.tar.gz scummvm-rg350-40474c5acbf9210022649890f755cc0df91edeb3.tar.bz2 scummvm-rg350-40474c5acbf9210022649890f755cc0df91edeb3.zip |
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)
svn-id: r29707
-rwxr-xr-x | configure | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -207,9 +207,9 @@ EOF 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 @@ int main() { 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 @@ case $_host_os in 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 @@ rm -f tmp_endianness_check.o tmp_endianness_check.cpp # 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 |