diff options
author | David Cournapeau <cournape@gmail.com> | 2008-01-08 13:54:13 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-01-08 13:54:13 +0000 |
commit | 1e9b52e66f97d221b2f9b84de4d585befbcd6492 (patch) | |
tree | 540c7032b7a2ffe3e0ef04ae5648cfde74107807 | |
parent | 9c8ebbf0a26e19494df15deb95e5684685266952 (diff) | |
download | numpy-1e9b52e66f97d221b2f9b84de4d585befbcd6492.tar.gz |
Simplify math funcs check in SConstruct
-rw-r--r-- | numpy/core/SConstruct | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/numpy/core/SConstruct b/numpy/core/SConstruct index d93a06a0f..5f9c4e143 100644 --- a/numpy/core/SConstruct +++ b/numpy/core/SConstruct @@ -71,20 +71,11 @@ if is_npy_no_signal(): # Checking the mathlib and its capabilities #------------------------------------------ # Function to check: -mfuncs = [('expl', 'HAVE_LONGDOUBLE_FUNCS'), - ('expf', 'HAVE_FLOAT_FUNCS'), - ('log1p', 'HAVE_LOG1P'), - ('expm1', 'HAVE_EXPM1'), - ('asinh', 'HAVE_INVERSE_HYPERBOLIC'), - ('atanhf', 'HAVE_INVERSE_HYPERBOLIC_FLOAT'), - ('atanhl', 'HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE'), - ('isnan', 'HAVE_ISNAN'), - ('isinf', 'HAVE_ISINF'), - ('rint', 'HAVE_RINT'), - ] +mfuncs = ('expl', 'expf', 'log1p', 'expm1', 'asinh', 'atanhf', 'atanhl', + 'isnan', 'isinf', 'rint') # Set value to 1 for each defined function (in math lib) -mfuncs_defined = dict([(f[0], 0) for f in mfuncs]) +mfuncs_defined = dict([(f, 0) for f in mfuncs]) # TODO: checklib vs checkfunc ? mlibs = [[], ['m'], ['cpml']] @@ -101,12 +92,12 @@ 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[0], language = 'C') + st = config.CheckFunc(f, language = 'C') if st: - config_sym.append((f[1], 1)) + config_sym.append((f, 1)) else: - config_sym.append((f[1], 0)) - mfuncs_defined[f[0]] = 1 + config_sym.append((f, 0)) + mfuncs_defined[f] = 1 for f in mfuncs: check_func(f) |