summarylogtreecommitdiffstats
path: root/Fix-compilation-with-python-38-newer.patch
blob: 0a9950eb75f4ded303f5704ca777d8e4a885017a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From a8720e5606ae0e9a44958024c51c4f0d6232befc Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Mon, 07 Sep 2020 20:37:26 +0000
Subject: Fix compilation with python >=3.8

* modules/python/module.ac: Try python-config --libs --embed first.
---
diff --git a/modules/python/module.ac b/modules/python/module.ac
index 35993b8..418caef 100644
--- a/modules/python/module.ac
+++ b/modules/python/module.ac
@@ -32,7 +32,9 @@ if test "$status_python" = yes; then
   AC_ARG_VAR([PYTHON_CONFIG], [The name of python-config binary])
   AC_PATH_PROG([PYTHON_CONFIG], python-config)
   if test -n "$PYTHON_CONFIG"; then
-    AC_SUBST(PYTHON_LIBS,`$PYTHON_CONFIG --libs`)
+    AC_SUBST(PYTHON_LIBS)
+    PYTHON_LIBS=`$PYTHON_CONFIG --libs --embed 2>/dev/null` || \
+         PYTHON_LIBS=`$PYTHON_CONFIG --libs`
     AC_SUBST(PYTHON_INCLUDES,`$PYTHON_CONFIG --includes`)
     $PYTHON <<EOT
 import sys
--
cgit v0.9.0.3