Re: [apparmor] [patch] libapparmor - use python-config if it exists when configuring

2013-01-29 Thread Kees Cook
On Mon, Jan 28, 2013 at 11:44:18PM -0800, Steve Beattie wrote:
> Author: Dmitrijs Ledkovs 
> 
> This patch modifies 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).

Acked-by: Kees Cook 

-- 
Kees Cook

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor


[apparmor] [patch] libapparmor - use python-config if it exists when configuring

2013-01-28 Thread Steve Beattie
Author: Dmitrijs Ledkovs 

This patch modifies 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).

---
 libraries/libapparmor/m4/ac_python_devel.m4 |6 ++
 1 file changed, 6 insertions(+)

Index: b/libraries/libapparmor/m4/ac_python_devel.m4
===
--- a/libraries/libapparmor/m4/ac_python_devel.m4
+++ b/libraries/libapparmor/m4/ac_python_devel.m4
@@ -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 distutils.sysconfig; \
 print distutils.sysconfig.get_python_inc();"`
@@ -94,6 +97,9 @@ $ac_distutils_result])
 # 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)

-- 
Steve Beattie

http://NxNW.org/~steve/


signature.asc
Description: Digital signature
-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor