configure: rewrote configure script in python

also added options for setting the target compiler
configure: respecting CXX environment variable for configuring
engine/texture: removed unused variable