[Numpy-svn] r8541 - in trunk/numpy/core: . include/numpy

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Jul 28 21:38:14 EDT 2010


Author: cdavid
Date: 2010-07-28 20:38:14 -0500 (Wed, 28 Jul 2010)
New Revision: 8541

Modified:
   trunk/numpy/core/SConscript
   trunk/numpy/core/include/numpy/_numpyconfig.h.in
   trunk/numpy/core/setup.py
Log:
BUG: look for endian.h.

We should use this header in npy_endian.h if available.

Modified: trunk/numpy/core/SConscript
===================================================================
--- trunk/numpy/core/SConscript	2010-07-28 22:32:55 UTC (rev 8540)
+++ trunk/numpy/core/SConscript	2010-07-29 01:38:14 UTC (rev 8541)
@@ -78,6 +78,10 @@
 Configuration error log says: \n\n%s""" % ''.join(errmsg)
     Exit(-1)
 
+st = config.CheckHeader("endian.h")
+if st:
+    numpyconfig_sym.append(('DEFINE_NPY_HAVE_ENDIAN_H', '#define NPY_HAVE_ENDIAN_H 1'))
+
 def check_type(type, include = None):
     st = config.CheckTypeSize(type, includes = include)
     type = type.replace(' ', '_')

Modified: trunk/numpy/core/include/numpy/_numpyconfig.h.in
===================================================================
--- trunk/numpy/core/include/numpy/_numpyconfig.h.in	2010-07-28 22:32:55 UTC (rev 8540)
+++ trunk/numpy/core/include/numpy/_numpyconfig.h.in	2010-07-29 01:38:14 UTC (rev 8541)
@@ -40,6 +40,8 @@
 #define NPY_ABI_VERSION @NPY_ABI_VERSION@
 #define NPY_API_VERSION @NPY_API_VERSION@
 
+ at DEFINE_NPY_HAVE_ENDIAN_H@
+
 /* Ugly, but we can't test this in a proper manner without requiring a C++
  * compiler at the configuration stage of numpy ? */
 #ifndef __STDC_FORMAT_MACROS

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2010-07-28 22:32:55 UTC (rev 8540)
+++ trunk/numpy/core/setup.py	2010-07-29 01:38:14 UTC (rev 8541)
@@ -259,6 +259,10 @@
         raise SystemError(
                 "Cannot compile 'Python.h'. Perhaps you need to "\
                 "install python-dev|python-devel.")
+    res = config_cmd.check_header("endian.h")
+    if res:
+        private_defines.append(('HAVE_ENDIAN_H', 1))
+        public_defines.append(('NPY_HAVE_ENDIAN_H', 1))
 
     # Check basic types sizes
     for type in ('short', 'int', 'long'):




More information about the Numpy-svn mailing list