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

aquadran at users.sourceforge.net aquadran at users.sourceforge.net
Fri Jul 25 08:32:39 CEST 2008


Revision: 33271
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33271&view=rev
Author:   aquadran
Date:     2008-07-25 06:32:38 +0000 (Fri, 25 Jul 2008)

Log Message:
-----------
detect 64bits target

Modified Paths:
--------------
    residual/trunk/configure

Modified: residual/trunk/configure
===================================================================
--- residual/trunk/configure	2008-07-25 02:37:55 UTC (rev 33270)
+++ residual/trunk/configure	2008-07-25 06:32:38 UTC (rev 33271)
@@ -253,6 +253,24 @@
 echo $datatype
 }
 
+#
+# Determine a size of pointer type
+#
+find_pointer_size ()
+{
+cat <<EOF >tmp_find_pointer_size.cpp
+int main() {
+	void *p;
+	int v = (int)p;
+	return 0;
+}
+EOF
+$CXX $CXXFLAGS -c -o tmp_find_pointer_size$EXEEXT tmp_find_pointer_size.cpp 2>/dev/null
+status=$?
+rm -f tmp_find_pointer_size$EXEEXT tmp_find_pointer_size.cpp
+return $status
+}
+
 # Show the configure help line for an option
 option_help() {
         tmpopt=`echo $1 | sed 's/_/-/g'`
@@ -660,6 +678,16 @@
 	_def_64bit_type_unsigned="typedef unsigned $type_8_byte uint64;"
 fi
 
+echo_n "Target 64 bits... "
+find_pointer_size
+if test $? -eq 0; then
+	echo "no"
+	add_line_to_config_h "/* #define TARGET_64BITS */"
+else
+	echo "yes"
+	add_line_to_config_h "#define TARGET_64BITS"
+fi
+
 #
 # 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