clean up automake/pkg-config handling, move separate host/package variable exports to templates, fix automake path for host builds SVN-Revision: 15339