blob: 8d84cf8a119e04107ab1a4a803f901dd493a9a72 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001
2Use pkgconfig to get the correct include paths
3
4Upstream-Status: Pending
5
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
8
9diff --git a/configure.ac b/configure.ac
10index e97f727..8179f44 100644
11--- a/configure.ac
12+++ b/configure.ac
13@@ -540,10 +540,10 @@ esac],
14
15 AS_IF([test "$enable_python" = yes],[
16 AM_PATH_PYTHON([2.6],[
17- WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
18+ WITH_PYTHON_INCLUDE=$(${PKG_CONFIG} --cflags-only-I python)
19 WITH_PYTHON_SUBPACKAGE=1
20 save_CPPFLAGS="$CPPFLAGS"
21- CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
22+ CPPFLAGS="$CPPFLAGS $WITH_PYTHON_INCLUDE"
23 AC_CHECK_HEADER([Python.h],[],
24 [AC_MSG_ERROR([missing Python.h])
25 ])
26diff --git a/python/Makefile.am b/python/Makefile.am
27index fff51ae..f37cb9d 100644
28--- a/python/Makefile.am
29+++ b/python/Makefile.am
30@@ -4,7 +4,7 @@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py
31
32 AM_CPPFLAGS = -I$(top_builddir)/include/
33 AM_CPPFLAGS += -I$(top_srcdir)/python
34-AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@
35+AM_CPPFLAGS += @WITH_PYTHON_INCLUDE@
36
37 pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la
38 pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py