python autoconf macro for building ming extension

Daniel Nogradi nogradi at
Wed Oct 3 20:08:30 CEST 2007

It might be slightly off topic here but couldn't find a more suitable
place for this question:

I'm trying to build the python binding for ming --
-- but for some reason the python macro for autoconf -- python.m4 --
doesn't seem to detect my python installation correctly. The strange
thing is that it seemingly detects everything correctly, but a final
check still fails. I have the python 2.5 source distribution installed
to /usr/local the standard location.

Configuring ming fails with:

checking for python... /usr/local/bin/python
checking for python2.5... (cached) /usr/local/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/local/include/python2.5
checking for Python library path... -L/usr/local/lib/python2.5 -lpython2.5
checking for Python site-packages path... /usr/local/lib/python2.5/site-packages
checking python extra libraries... -lpthread -ldl -lutil
checking python extra linking flags... -Xlinker -export-dynamic
checking consistency of all components of python development environment... no
configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.

and all variables above are correct. It apparently found

PYTHON_LDFLAGS=-L/usr/local/lib/python2.5 -lpython2.5
PYTHON_EXTRA_LIBS=-lpthread -ldl -lutil
PYTHON_EXTRA_LDFLAGS=-Xlinker -export-dynamic

all correctly, yet the final check fails. I even tried configuring
with PYTHON_NOVERSIONCHECK and LDFLAGS=-L/usr/local/lib/python2.5 and
gave the above environment variables manually but still the same final
check fails.

Apparently it's not a ming but an autoconf issue. Anyone familiar with

More information about the Python-list mailing list