Update hardening rules.
[awesomized/libmemcached] / m4 / ax_pthread_timedjoin_np.m4
1 # ===========================================================================
2 # http://
3 # ===========================================================================
4 #
5 # SYNOPSIS
6 #
7 # AX_LIB_UUID
8 #
9 # DESCRIPTION
10 #
11 # Check for pthread_timedjoin_np support.
12 #
13 # LICENSE
14 #
15 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
16 #
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
20 # warranty.
21
22 #serial 2
23
24 AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP], [
25 AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np], [
26 save_LDFLAGS="$LDFLAGS"
27 LDFLAGS="$PTHREAD_LIBS"
28 AC_LANG_PUSH([C])
29 AC_COMPILE_IFELSE([
30 AC_LANG_PROGRAM([
31 #include <uuid/uuid.h>
32 ], [
33 uuid_t out;
34 pthread_timedjoin_np(out);
35 ]), [ax_cv_pthread_timedjoin_np=yes ], [ax_cv_pthread_timedjoin_np=no ]
36 ])
37
38 AC_LANG_POP
39 LDFLAGS="$save_LDFLAGS"
40
41 ])
42
43 AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],[
44 AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],[
45 AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])
46 ])
47 ])
48