+4. Building with non-GNU compilers
+----------------------------------
+
+As mentioned above Python's distutils uses whatever compiler Python
+was compiled with to compile extension modules. It also appears that
+distutils assumes that this compiler can compile C or C++ sources as
+distutils makes no differentiation between the two. For builds using
+GNU gcc and a few other compilers this is not an issue as they will
+determine the type of source from the file extension. For SunCC (and
+probably other compilers that came from cfront) it won't work as the C
+compiler (cc) is totally separate from the C++ compiler (CC). This
+causes distutils to attempt to compile the wxPython sources with the C
+compiler, which won't work.
+
+There may be better ways to get around this, but here is the
+workaround I devised. I created a script that will execute either cc
+or CC based on the file extension given to it. If Python uses this
+script for its compiler then it will also be used by extensions built
+with distutils and everybody will be more or less happy. Here is a
+copy of the script I used. It was a fairly quick rush job so there
+are probably issues with it but it worked for me.
+
+ #!/bin/bash
+ #--------------------------------------------------------------
+ # Try to determine type of file being compiled and then
+ # launch cc for C sources or CC for C++.
+ #
+
+ args=$@
+ is_C=
+
+ for arg in $args; do
+
+ # is the arg a file that exists?
+ if [ -e $arg ]; then
+
+ # does it end in ".c"?
+ if [ "${arg:${#arg}-2}" == ".c" ]; then
+ is_C=yes
+ fi
+ fi
+ done
+
+ # if the flag wasn't set then assume C++ and execute CC,
+ # otherwise execute cc.
+ if [ -z $is_C ]; then
+ exec CC -w $@
+ else
+ exec cc -w $@
+ fi
+ #--------------------------------------------------------------
+
+I called it pycc, put it in ${prefix}/bin and set its execute
+permission bit.
+
+The next step is to configure and build Python such that it uses pycc
+as it's compiler. You can do that by setting CC in your environment
+before running configure, like this in bash:
+
+ export CC=pycc
+ configure
+
+After making and installing Python with this configuration you should
+be able to build wxPython as described in the steps above.