Update hardening rules.
[awesomized/libmemcached] / m4 / uuid.m4
1 # ===========================================================================
2 # http://
3 # ===========================================================================
4 #
5 # SYNOPSIS
6 #
7 # AX_LIB_UUID
8 #
9 # DESCRIPTION
10 #
11 # Check for uuid, and uuid_generate_time_safe 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_UUID_GENERATE_TIME_SAFE], [
25 AC_CACHE_CHECK([check for uuid_generate_time_safe], [ax_cv_uuid_generate_time_safe], [
26 save_LDFLAGS="$LDFLAGS"
27 LDFLAGS="-luuid"
28 AC_LANG_PUSH([C])
29 AC_COMPILE_IFELSE([
30 AC_LANG_PROGRAM([
31 #include <uuid/uuid.h>
32 ], [
33 uuid_t out;
34 uuid_generate_time_safe(out);
35 ]), [ax_cv_uuid_generate_time_safe=yes ], [ax_cv_uuid_generate_time_safe=no ]
36 ])
37
38 AC_LANG_POP
39 LDFLAGS="$save_LDFLAGS"
40 ])
41
42 AS_IF([test "$ax_cv_uuid_generate_time_safe" = yes],[
43 AC_DEFINE(HAVE_UUID_GENERATE_TIME_SAFE,[1],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])],[
44 AC_DEFINE(HAVE_UUID_GENERATE_TIME_SAFE,[0],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])
45 ])
46 ])