From: Charalampos Stratakis Date: Fri, 7 Jun 2019 14:43:56 +0000 (+0200) Subject: Add Python 3.8 compatibility X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1d96b209bc19ba04346882266712f1a4f157d697;p=collectd.git 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 --- 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