Fixed attempt to link against libm with MSVC

This commit is contained in:
Ray Speth 2011-12-15 00:04:08 +00:00
parent e205c27475
commit 8e1cdc4ce4
2 changed files with 3 additions and 1 deletions

View file

@ -485,8 +485,10 @@ env['FORTRANMODDIR'] = '${TARGET.dir}'
if env['CC'] == 'gcc':
env['WIN32'] = False
env['LIBM'] = ['m']
elif env['CC'] == 'cl':
env['WIN32'] = True
env['LIBM'] = []
else:
assert False

View file

@ -21,7 +21,7 @@ if env['build_with_f2c']:
# TODO: make link flag more general
arithenv.Append(CPPFLAGS='-DNO_FPINIT')
arithenv.Program('f2c_libs/arithchk/arithchk', source='f2c_libs/arithchk/arithchk.c',
LIBS=['m'])
LIBS=env['LIBM'])
arithenv.Command('#ext/f2c_libs/arith.h', 'f2c_libs/arithchk/arithchk$PROGSUFFIX',
'$SOURCE > $TARGET')