Correct patches for MacOSX 10.6
More cleaning of the script. Move configuration stuff to setting functions.
C++ source file to test if the installation works.