Mark Wheaton <m.wheaton@rms.co.uk> writes:
> So, it's looking in the wrong place for its Python, and you can't give
> an argument to --with-python to tell it which python to look at.
No. What you need is to control which python executable it finds.
Either change your $PATH so that the 2.2.2 python appears first,
or set PYTHON in configure's environment.
I'm not sure whether the --with-includes and --with-libraries hacks
are necessary or not, once you do that --- it may learn everything it
needs to know directly from python.
regards, tom lane