[cig-commits] commit: Setting a flag that should force 64 bit libraries

Mercurial hg at geodynamics.org
Mon Nov 24 11:22:49 PST 2008


changeset:   37:349fbe7c9d4e
user:        LukeHodkinson
date:        Sun Feb 17 21:09:29 2008 +0000
files:       SConfigure
description:
Setting a flag that should force 64 bit libraries
on a 64 bit machine.


diff -r 2b49f13a6025 -r 349fbe7c9d4e SConfigure
--- a/SConfigure	Fri Feb 15 02:26:37 2008 +0000
+++ b/SConfigure	Sun Feb 17 21:09:29 2008 +0000
@@ -293,11 +293,15 @@ if not 'help' in COMMAND_LINE_TARGETS:
     # Print out a message about what architecture we're
     # planning on using.
     print 'Configuring for %s' % platform.system(),
-    if env._dict.get('force32bit', None):
+    if env._dict.get('force32bit', None) or \
+           platform.architecture()[0].find('32') != -1:
         bits = 32
+    elif env._dict.get('force64bit', None) or \
+             platform.architecture()[0].find('64') != -1:
+        bits = 64
+        env.Append(CFLAGS='-m64')
     else:
-        bits = 64 if \
-            platform.architecture()[0].find('64') != -1 else 32
+        bite = 32
     print '%dbit ...' % bits
 
     # Need to modify building shared libraries when on Mac OS X.
@@ -436,7 +440,7 @@ if 'config' in COMMAND_LINE_TARGETS:
 if 'config' in COMMAND_LINE_TARGETS:
     print "\nWriting out 'config.state' ... ",
     env.dump_cfg('config.state',
-                 opts.keys() + ['CPPPATH', 'CPPDEFINES',
+                 opts.keys() + ['CFLAGS', 'CPPPATH', 'CPPDEFINES',
                                 'LIBPATH', 'LIBS', 'RPATH',
                                 'FRAMEWORKS'])
     print 'done\n'



More information about the CIG-COMMITS mailing list