[Numpy-svn] r4737 - branches/build_with_scons/numpy/core
numpy-svn at scipy.org
numpy-svn at scipy.org
Mon Jan 21 12:02:19 EST 2008
Author: cdavid
Date: 2008-01-21 11:02:06 -0600 (Mon, 21 Jan 2008)
New Revision: 4737
Modified:
branches/build_with_scons/numpy/core/SConstruct
Log:
Fixes for config and numpyconfig header generation:
- Replace CheckFunc by CheckDeclaration + CheckFunc for math functions, to
stay compatible with numpy.distutils.
Modified: branches/build_with_scons/numpy/core/SConstruct
===================================================================
--- branches/build_with_scons/numpy/core/SConstruct 2008-01-21 06:07:50 UTC (rev 4736)
+++ branches/build_with_scons/numpy/core/SConstruct 2008-01-21 17:02:06 UTC (rev 4737)
@@ -65,6 +65,7 @@
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 @@
# TODO: checklib vs checkfunc ?
def check_func(f):
- """Check that f is available in mlib, and add the symbol appropriately.
+ """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
- f is expected to be a tuble (symbol, cpp define)."""
- st = config.CheckFunc(f, language = 'C')
- mfuncs_defined[f] = 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')
+ 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
More information about the Numpy-svn
mailing list