[cig-commits] r13869 - cs/autoconf/trunk

brad at geodynamics.org brad at geodynamics.org
Wed Jan 14 10:30:17 PST 2009


Author: brad
Date: 2009-01-14 10:30:17 -0800 (Wed, 14 Jan 2009)
New Revision: 13869

Added:
   cs/autoconf/trunk/cit_numpy.m4
Log:
Added macros for python numpy module.

Added: cs/autoconf/trunk/cit_numpy.m4
===================================================================
--- cs/autoconf/trunk/cit_numpy.m4	                        (rev 0)
+++ cs/autoconf/trunk/cit_numpy.m4	2009-01-14 18:30:17 UTC (rev 13869)
@@ -0,0 +1,33 @@
+# -*- Autoconf -*-
+
+
+## --------------------------- ##
+## Autoconf macros for Numpy. ##
+## --------------------------- ##
+
+# CIT_NUMPY_PYTHON_MODULE
+# Determine whether the numpy Python module is available.
+AC_DEFUN([CIT_NUMPY_PYTHON_MODULE], [
+AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for numpy python module)
+$PYTHON -c "import numpy" 2>/dev/null
+if test $? == 0; then
+  AC_MSG_RESULT(found)
+else
+  AC_MSG_FAILURE(not found)
+fi
+]) dnl CIT_NUMPY_PYTHON_MODULE
+
+# NUMPY_INCDIR
+# -----------------
+# Determine the directory containing <numpy/arrayobject.h>
+AC_DEFUN([CIT_NUMPY_INCDIR], [
+AC_REQUIRE([AM_PATH_PYTHON])
+AC_CACHE_CHECK([for numpy include directory],
+    [NUMPY_INCDIR],
+    [NUMPY_INCDIR=`$PYTHON -c "import numpy; numpypath=numpy.__path__[[0]]; print '%s/core/include' % numpypath"`])
+AC_SUBST([NUMPY_INCDIR], [$NUMPY_INCDIR])
+])dnl CIT_NUMPY_INCDIR
+
+
+dnl end of file



More information about the CIG-COMMITS mailing list