mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
configure: Fix test for python 3.8
https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build > To embed Python into an application, a new --embed option must be > passed to python3-config --libs --embed to get -lpython3.8 (link the > application to libpython). To support both 3.8 and older, try > python3-config --libs --embed first and fallback to python3-config > --libs (without --embed) if the previous command fails. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Wei Liu <wl@xen.org> [ wei: rerun autogen.sh ]
This commit is contained in:
1 parent
bad237ded7
commit
0d2791b007
2 files changed
+16
-4
No files matched your search
+9
-2
@@ -23,8 +23,15 @@ AS_IF([test x"$pyconfig" = x"no"], [
|
||||
], [
|
||||
dnl If python-config is found use it
|
||||
CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
|
||||
LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
|
||||
LIBS="$LIBS `$PYTHON-config --libs`"
|
||||
dnl We need to use --embed with python 3.8 but not with earlier version so
|
||||
dnl check if it is recognized.
|
||||
python_devel_embed=""
|
||||
if $PYTHON-config --embed >/dev/null 2>/dev/null; then
|
||||
python_devel_embed="--embed"
|
||||
fi
|
||||
LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags $python_devel_embed`"
|
||||
LIBS="$LIBS `$PYTHON-config --libs $python_devel_embed`"
|
||||
unset python_devel_embed
|
||||
])
|
||||
|
||||
AC_CHECK_HEADER([Python.h], [],
|
||||
|
||||