[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to use python macros together
From: |
Andy Falanga (afalanga) |
Subject: |
how to use python macros together |
Date: |
Fri, 3 Apr 2015 17:55:54 +0000 |
Hi,
My project uses Boost.python to export C++ code to python. Thus, as one would
expect, I have a dependency on python. It just so happens that, on CentOS 6,
the install of python is broken because one cannot do pkg-config --cflags
python. It just doesn't work. So, to work around this, I did the following in
configure.ac:
AM_PATH_PYTHON([2.6])
if test -d /usr/lib/python2.6 ; then
# AC_PREFIX_DEFAULT([/usr/lib/python2.6])
PYTHON_CPPFLAGS=-I/usr/include/python2.6
PYTHON_LIB=-lpython2.6
fi
if test -d /usr/lib/python2.7 ; then
# AC_PREFIX_DEFAULT([/usr/lib/python2.7])
PYTHON_CPPFLAGS=-I/usr/include/python2.7
PYTHON_LIB=-lpython2.7
fi
AC_SUBST([PYTHON_CPPFLAGS])
AC_SUBST([PYTHON_LIB])
I've found another macro, AX_PYTHON_DEVEL, which sets the very variables I was
setting. I'd like to use this because
I think it will save me some grief. However, when I did this
AM_PATH_PYTHON([2.6])
AX_PYTHON_DEVEL([2.6])
I run into issues. Can the two be used together? Am I worrying over nothing?
Will AM_PATH_PYTHON set these variables too? This reference to AM_PATH_PYTHON
doesn't specifically say so that's why I did my own hack.
http://www.gnu.org/software/automake/manual/html_node/Python.html
How should I handle this properly?
Andy
- how to use python macros together,
Andy Falanga (afalanga) <=