Emulate autoconf a bit more