File: ax_sasl.m4

package info (click to toggle)
libmemcached 1.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,912 kB
  • sloc: cpp: 39,309; ansic: 18,449; sh: 11,864; python: 603; yacc: 437; lex: 195; makefile: 116
file content (55 lines) | stat: -rw-r--r-- 1,454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ===========================================================================
#  http://www.tangent.org/
# ===========================================================================
#
# SYNOPSIS
#
#   AX_SASL
#
# DESCRIPTION
#
#   Check for sasl version one or two support.
#
# LICENSE
#
#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

#serial 1

AC_DEFUN([AX_SASL_OPTION],[
    AC_REQUIRE([AX_SASL_CHECK])
    AC_ARG_ENABLE([sasl],
      [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
      [ac_enable_sasl="$enableval"],
      [ac_enable_sasl="yes"])

    AS_IF([test "x$ac_enable_sasl" = "xyes"],
      [ac_enable_sasl="yes"],
      [ac_enable_sasl="no"])

    AS_IF([test "x$ac_enable_sasl" = "xyes"], [
      AC_DEFINE([HAVE_LIBSASL], [ 1 ], [Have libsasl2])
      ], [
      AC_DEFINE([HAVE_LIBSASL], [ 0 ], [Have libsasl2])
      ])

    AM_CONDITIONAL(HAVE_SASL, test "x${ac_enable_sasl}" = "xyes")

    ])

AC_DEFUN([AX_SASL_CHECK],[

    AX_CHECK_LIBRARY([LIBSASL], [sasl/sasl.h], [sasl2],[
      LIBSASL_LDFLAGS="-lsasl2"
      ax_cv_sasl=yes
      ], [
      ax_cv_sasl=no 
      ])

    AM_CONDITIONAL(HAVE_SASL, test "x${ac_enable_sasl}" = "xyes")
    ])