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