summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-03-13 05:11:05 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-03-13 05:11:05 +0000
commitff7d5122a42bc1bb0aa45a44a0ac6baab049fed1 (patch)
treecaa1c09be4d4cdbad1475ae74e1de6889fafd14d
parent2626ceabbc90c7e30aa4b86d91aa8d8a3bb0863e (diff)
downloadnumpy-ff7d5122a42bc1bb0aa45a44a0ac6baab049fed1.tar.gz
Check for the inline keywork in numscons build.
-rw-r--r--numpy/core/SConscript8
-rw-r--r--numpy/core/include/numpy/numpyconfig.h.in2
2 files changed, 8 insertions, 2 deletions
diff --git a/numpy/core/SConscript b/numpy/core/SConscript
index 9280e539e..460d6c77e 100644
--- a/numpy/core/SConscript
+++ b/numpy/core/SConscript
@@ -11,7 +11,7 @@ from numscons import CheckCBLAS
from numscons import write_info
from scons_support import CheckBrokenMathlib, define_no_smp, \
- check_mlib, check_mlibs, is_npy_no_signal
+ check_mlib, check_mlibs, is_npy_no_signal, CheckInline
from scons_support import array_api_gen_bld, ufunc_api_gen_bld, template_bld, \
umath_bld
from setup_common import *
@@ -29,7 +29,7 @@ if os.name == 'nt':
# Starting Configuration
#=======================
config = env.NumpyConfigure(custom_tests = {'CheckBrokenMathlib' : CheckBrokenMathlib,
- 'CheckCBLAS' : CheckCBLAS}, config_h = pjoin('config.h'))
+ 'CheckCBLAS' : CheckCBLAS, 'CheckInline': CheckInline}, config_h = pjoin('config.h'))
# numpyconfig_sym will keep the values of some configuration variables, the one
# needed for the public numpy API.
@@ -180,6 +180,10 @@ for f in ["isnan", "isinf", "signbit", "isfinite"]:
'#define NPY_HAVE_DECL_%s' % f.upper()))
+inline = config.CheckInline()
+config.Define('inline', inline)
+numpyconfig_sym.append(('NPY_INLINE', inline))
+
#-------------------------------------------------------
# Define the function PyOS_ascii_strod if not available
#-------------------------------------------------------
diff --git a/numpy/core/include/numpy/numpyconfig.h.in b/numpy/core/include/numpy/numpyconfig.h.in
index 4dba4e11e..20fcc9f9a 100644
--- a/numpy/core/include/numpy/numpyconfig.h.in
+++ b/numpy/core/include/numpy/numpyconfig.h.in
@@ -20,6 +20,8 @@
@DEFINE_NPY_SIZEOF_LONGLONG@
@DEFINE_NPY_SIZEOF_PY_LONG_LONG@
+#define NPY_INLINE @NPY_INLINE@
+
#define NPY_USE_C99_FORMATS @USE_C99_FORMATS@
/* Ugly, but we can't test this in a proper manner without requiring a C++