version 1.18, 2014/05/07 18:45:36
|
version 1.19, 2014/05/22 23:01:34
|
Line 679 def configureComps(defs, mDefs): |
|
Line 679 def configureComps(defs, mDefs): |
|
| |
# Try gcc. | # Try gcc. |
if not hasicc: | if not hasicc: |
|
rv = bool(0) |
cmd = 'gcc -v 2>&1' | cmd = 'gcc -v 2>&1' |
try: | try: |
ret = check_output(cmd, shell=True) | ret = check_output(cmd, shell=True) |
Line 687 def configureComps(defs, mDefs): |
|
Line 688 def configureComps(defs, mDefs): |
|
print('Command ' + "'" + cmd + "'" + ' ran improperly.') | print('Command ' + "'" + cmd + "'" + ' ran improperly.') |
rv = bool(1) | rv = bool(1) |
| |
if rv == bool(0): |
if not rv: |
regexp = re.compile(r".+gcc\s+version\s+(\d+)\.(\d+)", re.DOTALL) | regexp = re.compile(r".+gcc\s+version\s+(\d+)\.(\d+)", re.DOTALL) |
matchobj = regexp.match(ret) | matchobj = regexp.match(ret) |
if matchobj is None: | if matchobj is None: |
Line 699 def configureComps(defs, mDefs): |
|
Line 700 def configureComps(defs, mDefs): |
|
hasgcc = bool(1) | hasgcc = bool(1) |
| |
# Try ifort. | # Try ifort. |
|
rv = bool(0) |
cmd = 'ifort --version 2>&1' | cmd = 'ifort --version 2>&1' |
try: | try: |
ret = check_output(cmd, shell=True) | ret = check_output(cmd, shell=True) |
Line 720 def configureComps(defs, mDefs): |
|
Line 722 def configureComps(defs, mDefs): |
|
| |
# Try gfortran | # Try gfortran |
if not hasifort: | if not hasifort: |
|
rv = bool(0) |
cmd = 'gfortran -v 2>&1' | cmd = 'gfortran -v 2>&1' |
try: | try: |
ret = check_output(cmd, shell=True) | ret = check_output(cmd, shell=True) |
Line 728 def configureComps(defs, mDefs): |
|
Line 731 def configureComps(defs, mDefs): |
|
print('Command ' + "'" + cmd + "'" + ' ran improperly.') | print('Command ' + "'" + cmd + "'" + ' ran improperly.') |
rv = bool(1) | rv = bool(1) |
| |
if rv == bool(0): |
if not rv: |
regexp = re.compile(r".+gcc\s+version\s+(\d+)\.(\d+)", re.DOTALL) | regexp = re.compile(r".+gcc\s+version\s+(\d+)\.(\d+)", re.DOTALL) |
matchobj = regexp.match(ret) | matchobj = regexp.match(ret) |
if matchobj is None: | if matchobj is None: |
Line 740 def configureComps(defs, mDefs): |
|
Line 743 def configureComps(defs, mDefs): |
|
hasgfort = bool(1) | hasgfort = bool(1) |
| |
# Append the compiler make variables to the make file | # Append the compiler make variables to the make file |
|
rv = bool(0) |
|
|
if not hasicc and not hasgcc: | if not hasicc and not hasgcc: |
print('Fatal error: Acceptable C compiler not found! You will be unable to build the DRMS library.', file=sys.stderr) | print('Fatal error: Acceptable C compiler not found! You will be unable to build the DRMS library.', file=sys.stderr) |
rv = bool(1) | rv = bool(1) |