improved main.cc to better use autoconf #defines