mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Subject: libapparmor - use python-config if it exists when configuring
Merge from trunk commit 2108 Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Nominated-by: Steve Beattie <sbeattie@ubuntu.com> Acked-by: Seth Arnold <seth.arnold@canonical.com> Modifiy the libapparmor macro for python to use python-config if it exists to determine what CPPFLAGS and LDFLAGS to use when building the python swig libraries. Without this addition, python detection fails on ubuntu 13.04. I've confirmed that with this patch applied, the python libraries still build successfully on older releases as well (as far back as ubuntu 11.10).
This commit is contained in:
parent
b0fd46af26
commit
2c6e1b6e0f
1 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,9 @@ $ac_distutils_result])
|
|||
# Check for Python include path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python include path])
|
||||
if type $PYTHON-config; then
|
||||
PYTHON_CPPFLAGS=`$PYTHON-config --includes`
|
||||
fi
|
||||
if test -z "$PYTHON_CPPFLAGS"; then
|
||||
python_path=`$PYTHON -c "import sys; import distutils.sysconfig;\
|
||||
sys.stdout.write('%s\n' % distutils.sysconfig.get_python_inc());"`
|
||||
|
@ -94,6 +97,9 @@ sys.stdout.write('%s\n' % distutils.sysconfig.get_python_inc());"`
|
|||
# Check for Python library path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python library path])
|
||||
if type $PYTHON-config; then
|
||||
PYTHON_LDFLAGS=`$PYTHON-config --ldflags`
|
||||
fi
|
||||
if test -z "$PYTHON_LDFLAGS"; then
|
||||
# (makes two attempts to ensure we've got a version number
|
||||
# from the interpreter)
|
||||
|
|
Loading…
Add table
Reference in a new issue