blob: d60a0a39b66965c08553d7b57d0cedba398a5377 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From b4a354ae8d4f7c2ec3ec421c7d8a790cc57e77a9 Mon Sep 17 00:00:00 2001
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Sat, 18 Jul 2015 23:03:30 +0900
4Subject: [PATCH] configure.ac - Avoid an incorrect check for python.
5 Makefile.am - avoid hard coded host include paths.
6
7Upstream-Status: pending
8
9Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012---
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013 bindings/python/Makefile.am | 4 +++-
14 configure.ac | 17 ++---------------
15 2 files changed, 5 insertions(+), 16 deletions(-)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
17diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018index 999b184..c8e49db 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019--- a/bindings/python/Makefile.am
20+++ b/bindings/python/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021@@ -23,7 +23,9 @@
22 SUBDIRS = test
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
24 AM_CFLAGS = -fPIC -DPIC
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025-AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026+PYLIBVER ?= python$(PYTHON_VERSION)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027+PYINC ?= /usr/include/$(PYLIBVER)
28+AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029 SWIG_FLAGS = -python
30 SWIG_INCLUDES = ${AM_CPPFLAGS}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031 pyexec_PYTHON = capng.py
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032diff --git a/configure.ac b/configure.ac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033index 7f66179..079d026 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034--- a/configure.ac
35+++ b/configure.ac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036@@ -123,21 +123,8 @@ if test x$use_python = xno ; then
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037 else
38 AC_MSG_RESULT(testing)
39 AM_PATH_PYTHON
40-PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
41-if test -f ${PYINCLUDEDIR}/Python.h ; then
42- python_found="yes"
43- AC_SUBST(PYINCLUDEDIR)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044- pybind_dir="python"
45- AC_SUBST(pybind_dir)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046- AC_MSG_NOTICE(Python bindings will be built)
47-else
48- python_found="no"
49- if test x$use_python = xyes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080050- AC_MSG_ERROR([Python explicitly requested and python headers were not found])
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051- else
52- AC_MSG_WARN("Python headers not found - python bindings will not be made")
53- fi
54-fi
55+python_found="yes"
56+AC_MSG_NOTICE(Python bindings will be built)
57 fi
58 AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
59
60--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800612.7.4
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062