summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch
blob: 312fc8593fa97c09b04d965ef100942c649bf38e (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 855cc20bafa30597ae7a62f7672d42654b25cde0 Mon Sep 17 00:00:00 2001
From: Herrie <github.com@herrie.org>
Date: Mon, 24 Jul 2017 21:30:16 +0200
Subject: [PATCH] Use pkg-config instead of ${PYTHON}-config to find python

---
 configure.ac | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index d20a18e..c741829 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1567,20 +1567,15 @@ AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
 dnl Check for Python headers (currently useful only for libgnt)
 dnl (Thanks to XChat)
 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
-	AC_MSG_CHECKING(for Python compile flags)
-	if test -f ${PYTHON}-config; then
-		PY_CFLAGS=`${PYTHON}-config --includes`
-		PY_LIBS=`${PYTHON}-config --libs`
-		AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
-		AC_MSG_RESULT(ok)
-	else
-		AC_MSG_RESULT([Cannot find ${PYTHON}-config])
-		PY_CFLAGS=""
-		PY_LIBS=""
-	fi
+        AC_MSG_CHECKING(for Python compile flags)
+        PKG_CHECK_MODULES(PY, python, [
+                AC_SUBST(PY_CFLAGS)
+                AC_SUBST(PY_LIBS)
+        ], [
+                AC_MSG_RESULT(no)
+                AC_MSG_ERROR([Can't find python])
+        ])
 fi
-AC_SUBST(PY_CFLAGS)
-AC_SUBST(PY_LIBS)
 
 dnl #######################################################################
 dnl # Check for Mono support
OpenPOWER on IntegriCloud