Lines 146-154
def customize_compiler(compiler):
Link Here
|
146 |
varies across Unices and is stored in Python's Makefile. |
146 |
varies across Unices and is stored in Python's Makefile. |
147 |
""" |
147 |
""" |
148 |
if compiler.compiler_type == "unix": |
148 |
if compiler.compiler_type == "unix": |
149 |
(cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ |
149 |
(cc, cxx, opt, cflags, ccshared, ldshared, so_ext, cxxflags) = ( |
150 |
get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', |
150 |
get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', |
151 |
'CCSHARED', 'LDSHARED', 'SO') |
151 |
'LDSHARED', 'SO', 'CXXFLAGS')) |
152 |
|
152 |
|
153 |
if os.environ.has_key('CC'): |
153 |
if os.environ.has_key('CC'): |
154 |
cc = os.environ['CC'] |
154 |
cc = os.environ['CC'] |
Lines 169-181
def customize_compiler(compiler):
Link Here
|
169 |
cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
169 |
cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
170 |
cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
170 |
cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
171 |
ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
171 |
ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
|
|
172 |
if os.environ.has_key('CXXFLAGS'): |
173 |
cxxflags = opt + ' ' + os.environ['CXXFLAGS'] |
172 |
|
174 |
|
173 |
cc_cmd = cc + ' ' + cflags |
175 |
cc_cmd = cc + ' ' + cflags |
|
|
176 |
cxx_cmd = cxx + ' ' + cxxflags |
174 |
compiler.set_executables( |
177 |
compiler.set_executables( |
175 |
preprocessor=cpp, |
178 |
preprocessor=cpp, |
176 |
compiler=cc_cmd, |
179 |
compiler=cc_cmd, |
177 |
compiler_so=cc_cmd + ' ' + ccshared, |
180 |
compiler_so=cc_cmd + ' ' + ccshared, |
178 |
compiler_cxx=cxx, |
181 |
compiler_cxx=cxx_cmd, |
|
|
182 |
compiler_cxx_so=cxx_cmd + ' ' + ccshared, |
179 |
linker_so=ldshared, |
183 |
linker_so=ldshared, |
180 |
linker_exe=cc) |
184 |
linker_exe=cc) |
181 |
|
185 |
|
Lines 512-517
def get_config_vars(*args):
Link Here
|
512 |
for key in ('LDFLAGS', 'BASECFLAGS', |
516 |
for key in ('LDFLAGS', 'BASECFLAGS', |
513 |
# a number of derived variables. These need to be |
517 |
# a number of derived variables. These need to be |
514 |
# patched up as well. |
518 |
# patched up as well. |
|
|
519 |
'CXXFLAGS', |
515 |
'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): |
520 |
'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): |
516 |
|
521 |
|
517 |
flags = _config_vars[key] |
522 |
flags = _config_vars[key] |