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, basecflags, ccshared, ldshared, so_ext, |
150 |
get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', |
150 |
cxxflags) = ( |
151 |
'CCSHARED', 'LDSHARED', 'SO') |
151 |
get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'BASECFLAGS', |
|
|
152 |
'CCSHARED', 'LDSHARED', 'SO', 'CXXFLAGS')) |
152 |
|
153 |
|
153 |
if os.environ.has_key('CC'): |
154 |
if os.environ.has_key('CC'): |
154 |
cc = os.environ['CC'] |
155 |
cc = os.environ['CC'] |
Lines 163-181
def customize_compiler(compiler):
Link Here
|
163 |
if os.environ.has_key('LDFLAGS'): |
164 |
if os.environ.has_key('LDFLAGS'): |
164 |
ldshared = ldshared + ' ' + os.environ['LDFLAGS'] |
165 |
ldshared = ldshared + ' ' + os.environ['LDFLAGS'] |
165 |
if os.environ.has_key('CFLAGS'): |
166 |
if os.environ.has_key('CFLAGS'): |
166 |
cflags = opt + ' ' + os.environ['CFLAGS'] |
167 |
cflags = basecflags + ' ' + os.environ['CFLAGS'] |
167 |
ldshared = ldshared + ' ' + os.environ['CFLAGS'] |
168 |
ldshared = ldshared + ' ' + os.environ['CFLAGS'] |
168 |
if os.environ.has_key('CPPFLAGS'): |
169 |
if os.environ.has_key('CPPFLAGS'): |
169 |
cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
170 |
cpp = cpp + ' ' + os.environ['CPPFLAGS'] |
170 |
cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
171 |
cflags = cflags + ' ' + os.environ['CPPFLAGS'] |
171 |
ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
172 |
ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] |
|
|
173 |
if os.environ.has_key('CXXFLAGS'): |
174 |
cxxflags = basecflags + ' ' + os.environ['CXXFLAGS'] |
172 |
|
175 |
|
173 |
cc_cmd = cc + ' ' + cflags |
176 |
cc_cmd = cc + ' ' + cflags |
|
|
177 |
cxx_cmd = cxx + ' ' + cxxflags |
174 |
compiler.set_executables( |
178 |
compiler.set_executables( |
175 |
preprocessor=cpp, |
179 |
preprocessor=cpp, |
176 |
compiler=cc_cmd, |
180 |
compiler=cc_cmd, |
177 |
compiler_so=cc_cmd + ' ' + ccshared, |
181 |
compiler_so=cc_cmd + ' ' + ccshared, |
178 |
compiler_cxx=cxx, |
182 |
compiler_cxx=cxx_cmd, |
|
|
183 |
compiler_cxx_so=cxx_cmd + ' ' + ccshared, |
179 |
linker_so=ldshared, |
184 |
linker_so=ldshared, |
180 |
linker_exe=cc) |
185 |
linker_exe=cc) |
181 |
|
186 |
|
Lines 512-517
def get_config_vars(*args):
Link Here
|
512 |
for key in ('LDFLAGS', 'BASECFLAGS', |
517 |
for key in ('LDFLAGS', 'BASECFLAGS', |
513 |
# a number of derived variables. These need to be |
518 |
# a number of derived variables. These need to be |
514 |
# patched up as well. |
519 |
# patched up as well. |
|
|
520 |
'CXXFLAGS', |
515 |
'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): |
521 |
'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): |
516 |
|
522 |
|
517 |
flags = _config_vars[key] |
523 |
flags = _config_vars[key] |