blob: bcc43195363b9fb9a1c1aba2a0ec8519926fd4dd (
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
43
44
45
46
|
From f2a1c67e2b3b60ba54f506cf806437924b5242ca Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Tue, 12 Mar 2019 20:21:48 -0700
Subject: [PATCH] configure.ac: allow PYTHON values to be passed via env
Allow the recipe can specify specific values for PYTHON.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
[Hongzhi: minor adjust the patch on v5.4]
Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
---
configure.ac | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index d55a7b2..36b0980 100644
--- a/configure.ac
+++ b/configure.ac
@@ -650,12 +650,20 @@ if test "x${PYTHON_VERSION}" = "x2.6"; then
PYTHON_CFLAGS=$(python-config --includes)
PYTHON_LIBS=$(python-config --libs)
else
- PKG_CHECK_MODULES([PYTHON], "python-${PYTHON_VERSION}",,true)
+ PKG_CHECK_MODULES([PYTHONDEV], "python-$PYTHON_VERSION", [AC_SUBST(PYTHONDEV_CPPFLAGS) AC_SUBST(PYTHONDEV_LDFLAGS)], AC_MSG_ERROR([Can not find python]))
fi
PYTHON_CFLAGS=$(echo ${PYTHON_CFLAGS} | sed -e 's|-I|-isystem |')
-BUILD_PYTHON_SITE_PACKAGES=${pythondir}
+if test -z "${BUILD_PYTHON_SITE_PACKAGES}"; then
+ BUILD_PYTHON_SITE_PACKAGES=${pythondir}
+fi
+if test -z "${BUILD_PYTHON_INC}"; then
+ BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null`
+fi
+if test -z "${BUILD_PYTHON_LIB}"; then
+ BUILD_PYTHON_LIB=python$PYTHON_VERSION
+fi
AC_SUBST(BUILD_PYTHON_SITE_PACKAGES)
# Eval two times to expand fully. First eval replaces $exec_prefix into $prefix
--
2.17.1
|