build: Use AX_PTHREAD to detect pthreads

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Adam Jackson <ajax@redhat.com>
diff --git a/Makefile.am b/Makefile.am
index e411218..23355ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,8 @@
 
 SUBDIRS = src
 
+ACLOCAL_AMFLAGS = -I m4
+
 doxygen:
 	cd doxygen && $(MAKE)