Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From b4a354ae8d4f7c2ec3ec421c7d8a790cc57e77a9 Mon Sep 17 00:00:00 2001 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> |
| 3 | Date: Sat, 18 Jul 2015 23:03:30 +0900 |
| 4 | Subject: [PATCH] configure.ac - Avoid an incorrect check for python. |
| 5 | Makefile.am - avoid hard coded host include paths. |
| 6 | |
| 7 | Upstream-Status: pending |
| 8 | |
| 9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 10 | Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | --- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | bindings/python/Makefile.am | 4 +++- |
| 14 | configure.ac | 17 ++--------------- |
| 15 | 2 files changed, 5 insertions(+), 16 deletions(-) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
| 17 | diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | index 999b184..c8e49db 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | --- a/bindings/python/Makefile.am |
| 20 | +++ b/bindings/python/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | @@ -23,7 +23,9 @@ |
| 22 | SUBDIRS = test |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | CONFIG_CLEAN_FILES = *.loT *.rej *.orig |
| 24 | AM_CFLAGS = -fPIC -DPIC |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | -AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | +PYLIBVER ?= python$(PYTHON_VERSION) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | +PYINC ?= /usr/include/$(PYLIBVER) |
| 28 | +AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | SWIG_FLAGS = -python |
| 30 | SWIG_INCLUDES = ${AM_CPPFLAGS} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | pyexec_PYTHON = capng.py |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | diff --git a/configure.ac b/configure.ac |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | index 7f66179..079d026 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | --- a/configure.ac |
| 35 | +++ b/configure.ac |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | @@ -123,21 +123,8 @@ if test x$use_python = xno ; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | - pybind_dir="python" |
| 45 | - AC_SUBST(pybind_dir) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | - AC_MSG_NOTICE(Python bindings will be built) |
| 47 | -else |
| 48 | - python_found="no" |
| 49 | - if test x$use_python = xyes ; then |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 50 | - AC_MSG_ERROR([Python explicitly requested and python headers were not found]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | - 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 61 | 2.7.4 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | |