From 8e1cdc4ce49c40313996f5dffa534c7236c3e08a Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 15 Dec 2011 00:04:08 +0000 Subject: [PATCH] Fixed attempt to link against libm with MSVC --- SConstruct | 2 ++ ext/SConscript | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 511f35774..389bdb7f6 100644 --- a/SConstruct +++ b/SConstruct @@ -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 diff --git a/ext/SConscript b/ext/SConscript index 1f83711de..959725e37 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -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')