fix config file writing
added config.h.in and moved some defines there