Clean up redundant code in configure.ac
Add bash completion support