build: Use AX_PTHREAD in configure.ac.

This gets us the right compiler and linker flags for pthreads
depending on the needs of the platform.

Resolves #6

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
diff --git a/Makefile.am b/Makefile.am
index 17533d3..49a479f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,10 +33,10 @@
 bin_PROGRAMS = resourcemgr/resourcemgr test/tpmclient/tpmclient test/tpmtest/tpmtest
 noinst_LIBRARIES = sysapi/libtpm.a
 
-resourcemgr_resourcemgr_CFLAGS   = $(RESOURCEMGR_INC)
-resourcemgr_resourcemgr_CXXFLAGS = $(RESOURCEMGR_INC)
+resourcemgr_resourcemgr_CFLAGS   = $(RESOURCEMGR_INC) $(PTHREAD_CFLAGS)
+resourcemgr_resourcemgr_CXXFLAGS = $(RESOURCEMGR_INC) $(PTHREAD_CFLAGS)
 resourcemgr_resourcemgr_LDADD    = $(noinst_LIBRARIES)
-resourcemgr_resourcemgr_LDFLAGS  = -lpthread
+resourcemgr_resourcemgr_LDFLAGS  = $(PTHREAD_LDFLAGS)
 resourcemgr_resourcemgr_SOURCES  = $(RESOURCEMGR_SRC) $(TPMSOCKETS_SRC) \
      $(LOCALTPM_SRC) $(COMMON_SRC)