blob: fcd6f9cd334fa502e1bc6f8d138d067bc469041d [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Subject: [PATCH] configure.ac - Avoid an incorrect check for python.
2 Makefile.am - avoid hard coded host include paths.
3
4Upstream-Status: pending
5
6Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
7Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08008Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Andrew Geisslerc9f78652020-09-18 14:11:35 -05009Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
10
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011---
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012 bindings/python/Makefile.am | 4 +++-
13 configure.ac | 17 ++---------------
14 2 files changed, 5 insertions(+), 16 deletions(-)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
16diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017index 999b184..c8e49db 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018--- a/bindings/python/Makefile.am
19+++ b/bindings/python/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020@@ -23,7 +23,9 @@
21 SUBDIRS = test
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
23 AM_CFLAGS = -fPIC -DPIC
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024-AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025+PYLIBVER ?= python$(PYTHON_VERSION)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026+PYINC ?= /usr/include/$(PYLIBVER)
27+AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028 SWIG_FLAGS = -python
29 SWIG_INCLUDES = ${AM_CPPFLAGS}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030 pyexec_PYTHON = capng.py
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031diff --git a/configure.ac b/configure.ac
Andrew Geisslerc9f78652020-09-18 14:11:35 -050032index 8b46f51..2d7e00c 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033--- a/configure.ac
34+++ b/configure.ac
Andrew Geisslerc9f78652020-09-18 14:11:35 -050035@@ -141,21 +141,8 @@ fi
36
37 # Setup Python2 with the interpreter found previously.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038 AM_PATH_PYTHON
39-PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
40-if test -f ${PYINCLUDEDIR}/Python.h ; then
41- python_found="yes"
42- AC_SUBST(PYINCLUDEDIR)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043- pybind_dir="python"
44- AC_SUBST(pybind_dir)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045- AC_MSG_NOTICE(Python bindings will be built)
46-else
47- python_found="no"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050048- if test "x$use_python" = xyes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080049- AC_MSG_ERROR([Python explicitly requested and python headers were not found])
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050- else
51- AC_MSG_WARN("Python headers not found - python bindings will not be made")
52- fi
53-fi
54+python_found="yes"
55+AC_MSG_NOTICE(Python bindings will be built)
56 fi
57 AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
58
59--
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500602.25.1