Initial stab at porting distribution to autotools