Python ./configure does not find g++ compiler
Workaround:
CXX=/usr/bin/g++ ./configure
Anyway it's very strange and it seems to be a bug in the configure script. It seems to be a known problem. Oh well...
EDIT: It seems that --with-cxx-main
is an option with a different purpose. It's required on some platforms to support C++ extension modules. I updated my answer above.
You can set the location of g++ manually using an environment variable passed to configure, as described in the help:
Usage: ./configure [OPTION]... [VAR=VALUE]...
For example, if you are running configure with a custom prefix your command would be:
./configure --prefix=/home/user/.local CXX="/usr/bin/g++"