autotools: use builddir instead of srcdir

srcdir is supposed to be read-only when running distcheck so it is better to
create the log directory in builddir.
autotools: all target are conditional