From 7852aae1d265f466198e15e9781ab325a5172a4c Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Tue, 30 May 2017 05:12:54 +0530 Subject: [PATCH] lalburst should not depend on Numpy if Python is not enabled Use the Numpy compiler and linker flags detected for the SWIG build, as is done in lalinference/python/lalinference/bayestar/Makefile.am. --- lalburst/configure.ac | 11 ----------- lalburst/python/lalburst/Makefile.am | 7 +++---- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lalburst/configure.ac b/lalburst/configure.ac index 34717b6e6e..461169127e 100644 --- a/lalburst/configure.ac +++ b/lalburst/configure.ac @@ -116,17 +116,6 @@ AC_CHECK_LIB([m],[main],,[AC_MSG_ERROR([could not find the math library])]) LALSUITE_CHECK_PYTHON([2.6]) AX_PYTHON_DEVEL() -# check for NumPy -AX_PYTHON_MODULE(numpy, fatal) -NUMPY_CFLAGS=-I`$PYTHON -c "import numpy;print (numpy.get_include());"` -old_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS ${PYTHON_CPPFLAGS} ${NUMPY_CFLAGS}" -AC_CHECK_HEADER([numpy/arrayobject.h], - [PYTHON_CPPFLAGS="${PYTHON_CPPFLAGS} ${NUMPY_CFLAGS}"], - [AC_MSG_ERROR([Numpy extension header not found])], - [#include "Python.h"]) -CFLAGS="$old_CFLAGS" - # check for gsl PKG_CHECK_MODULES([GSL],[gsl],[true],[false]) LALSUITE_ADD_FLAGS([C],[${GSL_CFLAGS}],[${GSL_LIBS}]) diff --git a/lalburst/python/lalburst/Makefile.am b/lalburst/python/lalburst/Makefile.am index c4a1b1c098..1769494d77 100644 --- a/lalburst/python/lalburst/Makefile.am +++ b/lalburst/python/lalburst/Makefile.am @@ -31,9 +31,8 @@ pymodule_PYTHON = \ pkgpython_LTLIBRARIES = \ cs_gamma.la cs_gamma_la_SOURCES = cs_gamma.c -cs_gamma_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/src -cs_gamma_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS) $(GSL_CFLAGS) $(LAL_CFLAGS) -Wno-cast-qual -cs_gamma_la_LIBADD = $(top_builddir)/src/liblalburst.la -cs_gamma_la_LDFLAGS = $(AM_LDFLAGS) $(LIBS) $(GSL_LIBS) $(LAL_LIBS) $(PYTHON_LIBS) -module -avoid-version +cs_gamma_la_CPPFLAGS = $(AM_CPPFLAGS) $(SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/src +cs_gamma_la_CFLAGS = $(AM_CFLAGS) $(SWIG_PYTHON_CFLAGS) $(GSL_CFLAGS) $(LAL_CFLAGS) -Wno-cast-qual +cs_gamma_la_LDFLAGS = $(top_builddir)/src/liblalburst.la $(AM_LDFLAGS) $(LIBS) $(GSL_LIBS) $(LAL_LIBS) $(PYTHON_LIBS) -module -avoid-version endif -- 2.13.0