-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
65 lines (52 loc) · 1.67 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# $Id$
AC_PREREQ(2.59)
AC_INIT([c_python.cc])
AM_INIT_AUTOMAKE(gnucap-python, 2009-04-30)
AM_CONFIG_HEADER([config.h])
# Checks for libraries.
# this is a c++ program so use c++ for the tests
AC_LANG([C++])
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([dl], [dlopen])
# Check for python
AC_PYTHON_DEVEL([>= '2.3'])
AC_SUBST(ac_python_soname)
AC_SUBST(ac_python_libdir)
## Libtool init
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
## Check for gnucap
PKG_CHECK_MODULES([DEPS], [libgnucap >= 0.0])
## Check for numpy development file
AC_PYTHON_MODULE(numpy)
NUMPY_DIR="${PYTHON_SITE_PKG}/numpy"
AC_ARG_WITH([numpy], [AC_HELP_STRING([--with-numpy=DIR],
[directory where numpy is installed
[default=${PYLIBDIR}/numpy] ])],
NUMPY_DIR=$withval)
NUMPY_DIR="${NUMPY_DIR}/core/include/numpy"
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS -I$NUMPY_DIR"
AC_CHECK_HEADER([${NUMPY_DIR}/arrayobject.h],
[AC_DEFINE(HAS_NUMPY,,[wether to include numpy support]),
HAS_NUMPY=yes],,
[#include "Python.h"])
CPPFLAGS=$save_CPPFLAGS
AM_CONDITIONAL(NUMPY, test "x$HAS_NUMPY" = "xyes")
AC_PROG_SWIG()
# exports symbols to plugins
LDFLAGS="$LDFLAGS -rdynamic"
AC_OUTPUT([
Makefile
])
AC_MSG_RESULT([
** Configuration summary for $PACKAGE $VERSION:
prefix: $prefix
CPPFLAGS: $CPPFLAGS
CFLAGS: $CFLAGS
CXXFLAGS: $CXXFLAGS
LDFLAGS: $LDFLAGS
LIBS: $LIBS
])