[Numpy-svn] r4709 - branches/build_with_scons/numpy/core

numpy-svn@scip... numpy-svn@scip...
Tue Jan 8 07:31:25 CST 2008


Author: cdavid
Date: 2008-01-08 07:31:21 -0600 (Tue, 08 Jan 2008)
New Revision: 4709

Modified:
   branches/build_with_scons/numpy/core/SConstruct
Log:
Add groupe of math functions availability in generated config header

Modified: branches/build_with_scons/numpy/core/SConstruct
===================================================================
--- branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:10:52 UTC (rev 4708)
+++ branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:31:21 UTC (rev 4709)
@@ -82,6 +82,9 @@
     ('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 @@
         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
 #-------------------------------------------------------



More information about the Numpy-svn mailing list