To exit with an error message, just call the AC_ERROR macro if all the
checks fail. So that you only have to call AC_ERROR once, you might want
to just set a variable if the tests succeed/fail, and then check that
variable once at the end.
You might also want to check out my ACX_PTHREAD macro in the autoconf
macro archive:
http://cryp.to/autoconf-archive/Installed_Packages/acx_pthread.html
which does a more complete job of looking for POSIX threads on many
systems.
Cordially,
Steven G. Johnson
PS. I'm not familiar with any systems that use pthreads.h instead of
pthread.h; can you point one out?