Fix config generation

This makes it obvious that configoptions.cpp should not be touched to add new options. It also makes the build more portable.