1 # ===========================================================================
3 # ===========================================================================
7 # AX_PTHREAD_TIMEDJOIN_NP
11 # Check for pthread_timedjoin_np support.
15 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
17 # Copying and distribution of this file, with or without modification, are
18 # permitted in any medium without royalty provided the copyright notice
19 # and this notice are preserved. This file is offered as-is, without any
24 AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP], [
25 AC_REQUIRE([AX_PTHREAD])
26 AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np], [
27 save_LDFLAGS="$LDFLAGS"
28 LDFLAGS="$PTHREAD_LIBS"
40 pthread_timedjoin_np(thread, NULL);
42 [ax_cv_pthread_timedjoin_np=yes],
46 LDFLAGS="$save_LDFLAGS"
50 AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],[
51 AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],[
52 AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])