On Apr 3, 2015, at 11:55 AM, Andy Falanga (afalanga) <afala...@micron.com> wrote: > > It just so happens that, on CentOS 6, the install of python is broken because > one cannot do pkg-config --cflags python.
Who said you should be able to? I just downloaded the source tarballs for Python 2.6.6 (which is what CentOS 6 ships) and the latest 2.7 release, which happens to be 2.7.9, and lo and behold, python.pc.in appeared sometime in the 2.7 series. Thus, your command doesn’t work for Python 2.6.6 on *any* platform, unless the packager slipped in a custom version. > 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 It’s always a bad idea to hard-code versions and paths. It works until it doesn’t. Instead, call python-config --cflags. Incidentally, isn’t this an autoconf issue, rather than an automake one? I get that you’re going to be making use of CFLAGS and such in your Makefile.am files, but the problem is cropping up before you get to that stage.