Run the following:
$ python-config --cflags
This will give you a list of flags to pass to the compiler to find Python.h:
$ python-config --cflags
-I/usr/include/python3.3m -I/usr/include/python3.3m -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=
1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-pr
otector --param=ssp-buffer-size=4 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ss
p-buffer-size=4
You'll probably also want to run python-config --ldflags for the necessary linker flags.
If you have multiple versions of Python installed, you can specify, i.e., python2.7-config
Then, I would manually edit the file posix-ap2X.mk.in so that it contains the following:
CFLAGS = @CFLAGS@ $(shell python-config --cflags)
LDFLAGS = @LDFLAGS@ $(shell python-config --ldflags)
The configure.ac Autoconf file tries to figure this stuff out but it seems to do it in a clunky way that is apparently not working for you, so this manual way will hopefully sort things out.
Edit: oh, also, be sure that you use the correct python-config and that you specify which Python interpreter to use as necessary. For example, if you have installed Python from source to some non-standard location while there is another version installed in the usual place, be sure to specify this (i.e use /path/to/my/python-config in the above edits and pass the argument PYTHON=/path/to/my/python to the configure script). In fact, simply specifying the correct Python interpreter might cause the included configure script to do its job correctly.
yum install python-develconfigurescript may then be finding the system Python and not his own.