Now using autoconf for building.
Added the M4 macro for pthreads.