fix the dist build process
fix automake issues