summaryrefslogtreecommitdiff
path: root/numpy/core/SConstruct
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-01-08 13:31:21 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-01-08 13:31:21 +0000
commit4904ae7f18b760a1ac0738ab252c1e3be8220cb4 (patch)
treefebf0fd694fba2b473a3328154997771d5a57b4e /numpy/core/SConstruct
parent7812e46b1a87f54cc783bb71f15da24c5d9fbb2b (diff)
downloadnumpy-4904ae7f18b760a1ac0738ab252c1e3be8220cb4.tar.gz
Add groupe of math functions availability in generated config header
Diffstat (limited to 'numpy/core/SConstruct')
-rw-r--r--numpy/core/SConstruct20
1 files changed, 20 insertions, 0 deletions
diff --git a/numpy/core/SConstruct b/numpy/core/SConstruct
index 0b0c48010..70305e2ea 100644
--- a/numpy/core/SConstruct
+++ b/numpy/core/SConstruct
@@ -82,6 +82,9 @@ mfuncs = [('expl', 'HAVE_LONGDOUBLE_FUNCS'),
('rint', 'HAVE_RINT'),
]
+# Set value to 1 for each defined function (in math lib)
+mfuncs_defined = dict([(f[0], 0) for f in mfuncs])
+
# TODO: checklib vs checkfunc ?
mlibs = [[], ['m'], ['cpml']]
mathlib = os.environ.get('MATHLIB')
@@ -102,10 +105,27 @@ def check_func(f):
config_sym.append((f[1], 1))
else:
config_sym.append((f[1], 0))
+ mfuncs_defined[f[0]] = 1
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')
+if mfuncs_defined['expf'] == 1:
+ config.Define('HAVE_FLOAT_FUNCS', 1,
+ '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')
+if mfuncs_defined['atanhf'] == 1:
+ config.Define('HAVE_INVERSE_HYPERBOLIC_FLOAT', 1,
+ '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')
+
#-------------------------------------------------------
# Define the function PyOS_ascii_strod if not available
#-------------------------------------------------------