Commit 354c88c7 authored by Leo Pound Singer's avatar Leo Pound Singer

Only use relative imports with swig >= 3.0.0

The -relativeimport version was added in that version.
Original: 7a46d74787f9647def8b6685b43d2cb0f0d15440
parent e91ba194
...@@ -183,7 +183,7 @@ endif # SWIG_BUILD_OCTAVE ...@@ -183,7 +183,7 @@ endif # SWIG_BUILD_OCTAVE
if SWIG_BUILD_PYTHON if SWIG_BUILD_PYTHON
swig_python_flags = -python -py3 -relativeimport -O -builtin -globals globalvar -outdir swiglal_python/ $(swig_flags) swig_python_flags = -python $(SWIG_PYTHON_FLAGS) -outdir swiglal_python/ $(swig_flags)
pkgpyexec_LTLIBRARIES = swiglal_python.la pkgpyexec_LTLIBRARIES = swiglal_python.la
nodist_pkgpyexec_PYTHON = swiglal_python/$(PACKAGE).py nodist_pkgpyexec_PYTHON = swiglal_python/$(PACKAGE).py
......
...@@ -115,6 +115,18 @@ AC_DEFUN([LALSUITE_USE_SWIG],[ ...@@ -115,6 +115,18 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
SWIG="env CCACHE_DISABLE=1 ${ac_cv_path_SWIG}" SWIG="env CCACHE_DISABLE=1 ${ac_cv_path_SWIG}"
]) ])
# determine SWIG Python flags
AC_SUBST([SWIG_PYTHON_FLAGS],[])
SWIG_PYTHON_FLAGS="-O -builtin -globals globalvar"
AC_MSG_CHECKING([if SWIG supports relative Python imports])
LALSUITE_VERSION_COMPARE([${swig_version}],[<],[3.0.0],
[AC_MSG_RESULT([no])],
[
AC_MSG_RESULT([yes])
SWIG_PYTHON_FLAGS="-py3 -relativeimport ${SWIG_PYTHON_FLAGS}"
]
)
# extract -I and -D flags from LALSuite library preprocessor flags # extract -I and -D flags from LALSuite library preprocessor flags
AC_SUBST([SWIG_CPPFLAGS],[]) AC_SUBST([SWIG_CPPFLAGS],[])
for flag in ${CPPFLAGS}; do for flag in ${CPPFLAGS}; do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment