]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Fix linking with Python 3.8 3344/head
authorAlexander Meshcheryakov <Self-Perfection@users.noreply.github.com>
Sat, 16 Nov 2019 14:53:32 +0000 (17:53 +0300)
committerGitHub <noreply@github.com>
Sat, 16 Nov 2019 14:53:32 +0000 (17:53 +0300)
Since Python 3.8 --embed flag needs to be provided to python-config to embed python.
Reference: https://bugs.python.org/issue36721

This was partially addressed in #3170 but only fixed building and not linking with python.

configure.ac

index 9fc40b17df41ff88fa2d82c10469dfee6845d39f..00e1f6a53e9d3c3e1b08830adf978b74481dffd5 100644 (file)
@@ -4711,7 +4711,7 @@ if test "$PYTHON_CONFIG" != ""; then
   if test $? -ne 0; then
     with_libpython="no"
   fi
-  LIBPYTHON_LDFLAGS="`${PYTHON_CONFIG} --ldflags`"
+  LIBPYTHON_LDFLAGS="`${PYTHON_CONFIG} --ldflags --embed`" || LIBPYTHON_LDFLAGS="`${PYTHON_CONFIG} --ldflags`"
   if test $? -ne 0; then
     with_libpython="no"
   fi