Fix HAVE_PTHREAD conditional

This commit is contained in:
Ben "root" Anderson
2013-10-25 15:10:40 -05:00
parent 0b6fc17c27
commit 40ca822982
+2 -1
View File
@@ -309,11 +309,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
])
AC_LANG_POP(C++)
AM_CONDITIONAL(HAVE_PTHREAD, test x$have_pthread = xyes)
AC_CHECK_LIB( pthread, pthread_create, [have_pthread=yes; AC_DEFINE([HAVE_LIBPTHREAD],1,[libpthread is available])], have_pthread=no)
AC_CHECK_LIB( pthread, pthread_mutex_timedlock, AC_DEFINE([HAVE_PTHREAD_MUTEX_TIMEDLOCK],1,[pthreads has pthread_mutex_timedlock()]) )
AC_CHECK_LIB( pthread, pthread_cond_timedwait, AC_DEFINE([HAVE_PTHREAD_COND_TIMEDWAIT],1,[pthreads has pthread_cond_timedwait()]) )
AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
# Always:
AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])
AC_DEFINE(__STDC_FORMAT_MACROS, 1, [Use PRId64 and similar])