summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2011-08-21 18:54:44 +0200
committerDavid Cournapeau <cournape@gmail.com>2011-08-29 00:32:28 +0200
commit512df8b5686c70df49f0d51966e76430fe7aa63f (patch)
treeac3d6c32a1edc9e5f5da0a716843f31cde42c897 /numpy
parent5e1cdb6f63dd1fafd3ecc1942d59f3491d61fb84 (diff)
downloadnumpy-512df8b5686c70df49f0d51966e76430fe7aa63f.tar.gz
BUG: check for missing win32-specific format stuff.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/bscript11
1 files changed, 11 insertions, 0 deletions
diff --git a/numpy/core/bscript b/numpy/core/bscript
index 8f2a45dce..24b96902a 100644
--- a/numpy/core/bscript
+++ b/numpy/core/bscript
@@ -252,6 +252,16 @@ def check_complex(conf):
for t in C99_COMPLEX_TYPES:
NUMPYCONFIG_SYM.append(('DEFINE_NPY_HAVE_%s' % numpy.build_utils.waf.sanitize_string(t), ''))
+def check_win32_specifics(conf):
+ from numpy.distutils.misc_util import get_build_architecture
+ arch = get_build_architecture()
+
+ # On win32, force long double format string to be 'g', not
+ # 'Lg', since the MS runtime does not support long double whose
+ # size is > sizeof(double)
+ if arch == "Intel" or arch == "AMD64":
+ conf.define('FORCE_NO_LONG_DOUBLE_FORMATTING', 1)
+
@pre_configure
def configure(context):
conf = context.waf_context
@@ -274,6 +284,7 @@ def configure(context):
check_math_runtime(conf)
numpy.build_utils.waf.check_inline(conf)
check_complex(conf)
+ check_win32_specifics(conf)
if ENABLE_SEPARATE_COMPILATION:
conf.define("ENABLE_SEPARATE_COMPILATION", 1)