~brianaker/libmemcached/1220444

« back to all changes in this revision

Viewing changes to m4/ax_uuid.m4

  • Committer: Continuous Integration
  • Date: 2013-04-30 06:56:24 UTC
  • mfrom: (1161.1.11 libmemcached-1.0)
  • Revision ID: ci@tangent.org-20130430065624-3psqr8wz1p5yr0bz
Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-286

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# SYNOPSIS
7
7
#
8
8
#   AX_UUID()
 
9
#   AX_UUID_GENERATE_TIME()
9
10
#   AX_UUID_GENERATE_TIME_SAFE()
10
11
#
11
12
# DESCRIPTION
12
13
#
13
 
#   Check for uuid, and uuid_generate_time_safe support.
 
14
#   Check for uuid, uuid_generate_time, and uuid_generate_time_safe support.
14
15
#
15
16
# LICENSE
16
17
#
17
 
#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
 
18
#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
18
19
#
19
20
#   Copying and distribution of this file, with or without modification, are
20
21
#   permitted in any medium without royalty provided the copyright notice
21
22
#   and this notice are preserved. This file is offered as-is, without any
22
23
#   warranty.
23
24
 
24
 
#serial 6
 
25
#serial 7
25
26
 
26
27
AC_DEFUN([AX_UUID],
27
28
    [AC_PREREQ([2.63])dnl
72
73
  AM_CONDITIONAL([HAVE_LIBUUID],[test "x$ax_libuuid" = xyes])
73
74
  ])
74
75
 
 
76
  AC_DEFUN([AX_UUID_GENERATE_TIME],
 
77
      [AC_PREREQ([2.63])dnl
 
78
      AC_REQUIRE([AX_UUID])dnl
 
79
      AC_CACHE_CHECK([for uuid_generate_time],
 
80
        [ax_cv_uuid_generate_time],
 
81
        [AX_SAVE_FLAGS
 
82
        LIBS="$LIBUUID_LIB $LIBS"
 
83
        AC_LANG_PUSH([C])
 
84
        AC_RUN_IFELSE([
 
85
          AC_LANG_PROGRAM([#include <uuid/uuid.h>],[
 
86
            uuid_t out;
 
87
            uuid_generate_time(out);
 
88
            ])],
 
89
          [ax_cv_uuid_generate_time=yes],
 
90
          [ax_cv_uuid_generate_time=no],
 
91
          [AC_MSG_WARN([test program execution failed])])
 
92
        AC_LANG_POP
 
93
        AX_RESTORE_FLAGS
 
94
        ])
 
95
 
 
96
      AS_IF([test "$ax_cv_uuid_generate_time" = yes],
 
97
        [AC_DEFINE([HAVE_UUID_GENERATE_TIME],[1],[Define if uuid_generate_time is present in uuid/uuid.h.])],
 
98
        [AC_DEFINE([HAVE_UUID_GENERATE_TIME],[0],[Define if uuid_generate_time is present in uuid/uuid.h.])])
 
99
      ])
 
100
 
75
101
  AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE],
76
102
      [AC_PREREQ([2.63])dnl
77
103
      AC_REQUIRE([AX_UUID])dnl