From 1d96b209bc19ba04346882266712f1a4f157d697 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Fri, 7 Jun 2019 16:43:56 +0200 Subject: [PATCH] Add Python 3.8 compatibility From Python 3.8 and onwards C extensions are no longer linked to libpython so in order to embed python within an application the --embed flag needs to be added to python3-config --libs. A fall back is provided as the command will error out on previous python versions. References: https://bugs.python.org/issue36721 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c95422f4..7454fb4c 100644 --- a/configure.ac +++ b/configure.ac @@ -4771,7 +4771,7 @@ if test "$PYTHON_CONFIG" != ""; then if test $? -ne 0; then with_libpython="no" fi - LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`" + LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs --embed`" || LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`" if test $? -ne 0; then with_libpython="no" fi -- 2.11.0