diff --git a/spkg-install b/spkg-install
a
|
b
|
|
287 | 287 | os.mkdir(BUILD_DIR) |
288 | 288 | os.chdir(BUILD_DIR) |
289 | 289 | |
| 290 | # We need to provide full pathes to FC and CC to ATLAS configure script, |
| 291 | # so that it does not use 'find' and travel around the filesystem to find |
| 292 | # them. |
| 293 | # We first split the compiler executable names from potential options, e.g. |
| 294 | # as in 'gcc -m64', then use 'which' to locate them, and finally add the |
| 295 | # options back. |
| 296 | FC = os.environ['FC'] |
| 297 | FCsplit = FC.find(' ') |
| 298 | if FCsplit != -1: |
| 299 | FCbin, FCopt = FC[:FCsplit], FC[FCsplit:] |
| 300 | else: |
| 301 | FCbin, FCopt = FC, '' |
| 302 | |
| 303 | CC = os.environ['CC'] |
| 304 | CCsplit = CC.find(' ') |
| 305 | if CCsplit != -1: |
| 306 | CCbin, CCopt = CC[:CCsplit], CC[CCsplit:] |
| 307 | else: |
| 308 | CCbin, CCopt = CC, '' |
| 309 | |
290 | 310 | cmd = '../src/configure' |
291 | 311 | cmd += ' --prefix=' + conf['SAGE_LOCAL'] |
292 | 312 | cmd += ' --with-netlib-lapack-tarfile=' + LAPACK_TARFILE |
293 | | cmd += ' --cc="' + os.environ['CC'] + '"' |
| 313 | cmd += ' --cc="' + CC + '"' |
294 | 314 | |
295 | 315 | ## -Si latune 1: enable lapack tuning |
296 | 316 | ## typically adds 3-4 hours of install time |
… |
… |
|
303 | 323 | #cmd += ' -t 0' |
304 | 324 | |
305 | 325 | # set fortran compiler |
306 | | cmd += ' -C if "' + which('sage_fortran') + '"' |
| 326 | cmd += ' -C if "' + which(FCbin) + FCopt + '"' |
307 | 327 | |
308 | 328 | # set C compiler |
309 | | cmd += ' -C acg "' + which(os.environ['CC']) + '"' |
| 329 | cmd += ' -C acg "' + which(CCbin) + CCopt + '"' |
310 | 330 | |
311 | 331 | # set bit width |
312 | 332 | cmd += ' -b ' + conf['bits'][0:2] |