Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
3d65b710
Commit
3d65b710
authored
Nov 16, 2017
by
lhausamm
Browse files
Add configure option --with-python
parent
b78548a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
3d65b710
...
...
@@ -78,6 +78,38 @@ if test "$enable_ipo" = "yes"; then
fi
fi
# Compiling with Python wrapper
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=PATH],
[Root directory of python3]
)],
[],
[with_python="no"]
)
have_python="no"
if test "x$with_python" != "xno"; then
if test "x$with_python" != "xyes" -a "x$with_python" != "x"; then
PYTHON_INCS="-I$with_python/include/python3.6m/"
else
PYTHON_INCS=""
fi
OLD_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCS"
have_python="yes"
AC_SUBST([PYTHON_INCS])
AC_CHECK_HEADER(
Python.h,
AC_DEFINE([SWIFT_PYTHON_WRAPPER],1,[Enable the python wrapper]),
AC_MSG_ERROR(something is wrong with the python library! PYTHON_INCS=$PYTHON_INCS)
)
CPPFLAGS="$OLD_CPPFLAGS"
fi
# Check for MPI. Need to do this before characterising the compiler (C99 mode),
# as this changes the compiler.
# We should consider using AX_PROG_CC_MPI to replace AC_PROG_CC when compiling
...
...
src/Makefile.am
View file @
3d65b710
...
...
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Add the debug flag to the whole thing
AM_CFLAGS
=
$(HDF5_CPPFLAGS)
AM_CFLAGS
=
$(HDF5_CPPFLAGS)
$(PYTHON_INCS)
# Assign a "safe" version number
AM_LDFLAGS
=
$(HDF5_LDFLAGS)
$(FFTW_LIBS)
-version-info
0:0:0
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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