summaryrefslogtreecommitdiff
path: root/numpy/core/SConstruct
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-01-21 17:02:06 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-01-21 17:02:06 +0000
commit251b760aff9f71838958d740ca1ab30f9a67048b (patch)
tree9f42334c365d1dde61b4aad8aeb087863f092000 /numpy/core/SConstruct
parent606e65471814b648202a3a9bc43f124cfa797e8a (diff)
downloadnumpy-251b760aff9f71838958d740ca1ab30f9a67048b.tar.gz
Fixes for config and numpyconfig header generation:
- Replace CheckFunc by CheckDeclaration + CheckFunc for math functions, to stay compatible with numpy.distutils.
Diffstat (limited to 'numpy/core/SConstruct')
-rw-r--r--numpy/core/SConstruct34
1 files changed, 19 insertions, 15 deletions
diff --git a/numpy/core/SConstruct b/numpy/core/SConstruct
index 43c32143c..1d4bd462b 100644
--- a/numpy/core/SConstruct
+++ b/numpy/core/SConstruct
@@ -65,6 +65,7 @@ else:
if not config.CheckDeclaration('CHAR_BIT', includes= '#include <Python.h>\n'):
raise RuntimeError("Config wo CHAR_BIT is not supported with scons: please contact the maintainer (cdavid)")
+
#----------------------
# Checking signal stuff
#----------------------
@@ -106,30 +107,33 @@ mfuncs_defined = dict([(f, 0) for f in mfuncs])
# TODO: checklib vs checkfunc ?
def check_func(f):
- """Check that f is available in mlib, and add the symbol appropriately.
-
- f is expected to be a tuble (symbol, cpp define)."""
- st = config.CheckFunc(f, language = 'C')
- mfuncs_defined[f] = 1
+ """Check that f is available in mlib, and add the symbol appropriately. """
+ st = config.CheckDeclaration(f, language = 'C', includes = "#include <math.h>")
+ if st:
+ st = config.CheckFunc(f, language = 'C')
+ if st:
+ mfuncs_defined[f] = 1
+ else:
+ mfuncs_defined[f] = 0
for f in mfuncs:
check_func(f)
if mfuncs_defined['expl'] == 1:
- config.Define('HAVE_LONGDOUBLE_FUNCS', 1,
- 'Define to 1 if long double funcs are available')
+ config.Define('HAVE_LONGDOUBLE_FUNCS',
+ comment = 'Define to 1 if long double funcs are available')
if mfuncs_defined['expf'] == 1:
- config.Define('HAVE_FLOAT_FUNCS', 1,
- 'Define to 1 if long double funcs are available')
+ config.Define('HAVE_FLOAT_FUNCS',
+ comment = 'Define to 1 if long double funcs are available')
if mfuncs_defined['asinh'] == 1:
- config.Define('HAVE_INVERSE_HYPERBOLIC', 1,
- 'Define to 1 if inverse hyperbolic funcs are available')
+ config.Define('HAVE_INVERSE_HYPERBOLIC',
+ comment = 'Define to 1 if inverse hyperbolic funcs are available')
if mfuncs_defined['atanhf'] == 1:
- config.Define('HAVE_INVERSE_HYPERBOLIC_FLOAT', 1,
- 'Define to 1 if inverse hyperbolic float funcs are available')
+ config.Define('HAVE_INVERSE_HYPERBOLIC_FLOAT',
+ comment = 'Define to 1 if inverse hyperbolic float funcs are available')
if mfuncs_defined['atanhl'] == 1:
- config.Define('HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE', 1,
- 'Define to 1 if inverse hyperbolic long double funcs are available')
+ config.Define('HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE',
+ comment = 'Define to 1 if inverse hyperbolic long double funcs are available')
#-------------------------------------------------------
# Define the function PyOS_ascii_strod if not available