Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
dff4b436
Commit
dff4b436
authored
Oct 26, 2018
by
Sebastian Ohlmann
Browse files
Add switch --enable-python to configure.ac
By default, python wrapper is not built, only if this switch is specified.
parent
eafc2a15
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
dff4b436
...
...
@@ -613,6 +613,7 @@ endif
#test_c_cannon@SUFFIX@_CFLAGS = $(test_program_cflags)
# python wrapper
if
WITH_PYTHON
pyelpadir
=
$(pythondir)
/pyelpa
pyelpa_PYTHON
=
python/__init__.py python/distributedmatrix.py
pyelpa_LTLIBRARIES
=
wrapper.la
...
...
@@ -623,6 +624,7 @@ wrapper_la_CFLAGS = -I$(PYTHON_INCLUDE) $(AM_CFLAGS)
python/wrapper.c
:
python/wrapper.pyx
cython
$<
endif
# test scripts
...
...
configure.ac
View file @
dff4b436
...
...
@@ -1275,21 +1275,39 @@ else
AC_MSG_RESULT([no])
fi
AM_PATH_PYTHON([3.6])
AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config])
AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
AS_IF([test -z "$PYTHON_INCLUDE"], [
AS_IF([test -z "$PYTHON_CONFIG"], [
AC_PATH_PROGS([PYTHON_CONFIG],
[python$PYTHON_VERSION-config python-config],
[no],
[`dirname $PYTHON`])
AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])])
])
AC_MSG_CHECKING([python include flags])
PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
AC_MSG_RESULT([$PYTHON_INCLUDE])
])
AC_MSG_CHECKING(whether --enable-python is specified)
AC_ARG_ENABLE([python],
AS_HELP_STRING([--enable-python],
[build and install python wrapper, default no.]),
[
if test x"$enableval" = x"yes"; then
enable_python=yes
else
enable_python=no
fi
],
[enable_python=no])
AC_MSG_RESULT([${enable_python}])
AM_CONDITIONAL([WITH_PYTHON],[test x"$enable_python" = x"yes"])
if test x"${enable_python}" = x"yes"; then
AC_DEFINE([WITH_PYTHON], [1], [build and install python wrapper])
# check for python and dependencies
AM_PATH_PYTHON([3.6])
AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config])
AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
AS_IF([test -z "$PYTHON_INCLUDE"], [
AS_IF([test -z "$PYTHON_CONFIG"], [
AC_PATH_PROGS([PYTHON_CONFIG],
[python$PYTHON_VERSION-config python-config],
[no],
[`dirname $PYTHON`])
AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])])
])
AC_MSG_CHECKING([python include flags])
PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
AC_MSG_RESULT([$PYTHON_INCLUDE])
])
fi
AC_OUTPUT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment