--with-python flag unsuccesful

I'm trying to compile LLVM on a machine with Python 2.4 (usr/bin/python) and
2.6.

Unfortunately, the Makefile can only find version 2.4, and the optional flag
--with-python does not seem to help.

I receive the error:
configure: WARNING: specified python (yes) is not usable, searching path