SConstruct (3053:b0c9652cf9b9) | SConstruct (3118:3f4d39e125ae) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 187 unchanged lines hidden (view full) --- 196env.Append(CCFLAGS='-pipe') 197env.Append(CCFLAGS='-fno-strict-aliasing') 198env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef')) 199if sys.platform == 'cygwin': 200 # cygwin has some header file issues... 201 env.Append(CCFLAGS=Split("-Wno-uninitialized")) 202env.Append(CPPPATH=[Dir('ext/dnet')]) 203 | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 187 unchanged lines hidden (view full) --- 196env.Append(CCFLAGS='-pipe') 197env.Append(CCFLAGS='-fno-strict-aliasing') 198env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef')) 199if sys.platform == 'cygwin': 200 # cygwin has some header file issues... 201 env.Append(CCFLAGS=Split("-Wno-uninitialized")) 202env.Append(CPPPATH=[Dir('ext/dnet')]) 203 |
204# Find Python include and library directories for embedding the 205# interpreter. For consistency, we will use the same Python 206# installation used to run scons (and thus this script). If you want 207# to link in an alternate version, see above for instructions on how 208# to invoke scons with a different copy of the Python interpreter. 209 210# Get brief Python version name (e.g., "python2.4") for locating 211# include & library files 212py_version_name = 'python' + sys.version[:3] 213 214# include path, e.g. /usr/local/include/python2.4 215env.Append(CPPPATH = os.path.join(sys.exec_prefix, 'include', py_version_name)) 216env.Append(LIBS = py_version_name) 217# add library path too if it's not in the default place 218if sys.exec_prefix != '/usr': 219 env.Append(LIBPATH = os.path.join(sys.exec_prefix, 'lib')) 220 | |
221# Check for SWIG 222if not env.has_key('SWIG'): 223 print 'Error: SWIG utility not found.' 224 print ' Please install (see http://www.swig.org) and retry.' 225 Exit(1) 226 227# Check for appropriate SWIG version 228swig_version = os.popen('swig -version').read().split() --- 21 unchanged lines hidden (view full) --- 250env.Append(SCANNERS = swig_scanner) 251 252# Platform-specific configuration. Note again that we assume that all 253# builds under a given build root run on the same host platform. 254conf = Configure(env, 255 conf_dir = os.path.join(build_root, '.scons_config'), 256 log_file = os.path.join(build_root, 'scons_config.log')) 257 | 204# Check for SWIG 205if not env.has_key('SWIG'): 206 print 'Error: SWIG utility not found.' 207 print ' Please install (see http://www.swig.org) and retry.' 208 Exit(1) 209 210# Check for appropriate SWIG version 211swig_version = os.popen('swig -version').read().split() --- 21 unchanged lines hidden (view full) --- 233env.Append(SCANNERS = swig_scanner) 234 235# Platform-specific configuration. Note again that we assume that all 236# builds under a given build root run on the same host platform. 237conf = Configure(env, 238 conf_dir = os.path.join(build_root, '.scons_config'), 239 log_file = os.path.join(build_root, 'scons_config.log')) 240 |
241# Find Python include and library directories for embedding the 242# interpreter. For consistency, we will use the same Python 243# installation used to run scons (and thus this script). If you want 244# to link in an alternate version, see above for instructions on how 245# to invoke scons with a different copy of the Python interpreter. 246 247# Get brief Python version name (e.g., "python2.4") for locating 248# include & library files 249py_version_name = 'python' + sys.version[:3] 250 251# include path, e.g. /usr/local/include/python2.4 252py_header_path = os.path.join(sys.exec_prefix, 'include', py_version_name) 253env.Append(CPPPATH = py_header_path) 254# verify that it works 255if not conf.CheckHeader('Python.h', '<>'): 256 print "Error: can't find Python.h header in", py_header_path 257 Exit(1) 258 259# add library path too if it's not in the default place 260py_lib_path = None 261if sys.exec_prefix != '/usr': 262 py_lib_path = os.path.join(sys.exec_prefix, 'lib') 263elif sys.platform == 'cygwin': 264 # cygwin puts the .dll in /bin for some reason 265 py_lib_path = '/bin' 266if py_lib_path: 267 env.Append(LIBPATH = py_lib_path) 268 print 'Adding', py_lib_path, 'to LIBPATH for', py_version_name 269if not conf.CheckLib(py_version_name): 270 print "Error: can't find Python library", py_version_name 271 Exit(1) 272 |
|
258# Check for zlib. If the check passes, libz will be automatically 259# added to the LIBS environment variable. 260if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++'): 261 print 'Error: did not find needed zlib compression library '\ 262 'and/or zlib.h header file.' 263 print ' Please install zlib and try again.' 264 Exit(1) 265 --- 281 unchanged lines hidden --- | 273# Check for zlib. If the check passes, libz will be automatically 274# added to the LIBS environment variable. 275if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++'): 276 print 'Error: did not find needed zlib compression library '\ 277 'and/or zlib.h header file.' 278 print ' Please install zlib and try again.' 279 Exit(1) 280 --- 281 unchanged lines hidden --- |