~drizzle-trunk/drizzle/development

1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
1
dnl  Copyright (C) 2009 Sun Microsystems, Inc.
2
dnl This file is free software; Sun Microsystems, Inc.
1093.2.1 by Monty Taylor
pandora-build v0.16
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
5
6
AC_DEFUN([_PANDORA_SEARCH_LIBMEMCACHED],[
7
  AC_REQUIRE([AC_LIB_PREFIX])
8
9
  dnl --------------------------------------------------------------------
10
  dnl  Check for libmemcached
11
  dnl --------------------------------------------------------------------
12
1093.9.2 by Monty Taylor
pandora-build v0.35
13
  AC_ARG_ENABLE([libmemcached],
14
    [AS_HELP_STRING([--disable-libmemcached],
15
      [Build with libmemcached support @<:@default=on@:>@])],
16
    [ac_enable_libmemcached="$enableval"],
17
    [ac_enable_libmemcached="yes"])
18
19
  AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
20
    AC_LIB_HAVE_LINKFLAGS(memcached,,[
21
      #include <libmemcached/memcached.h>
22
    ],[
23
      memcached_st memc;
24
      memcached_dump_func *df;
1093.9.9 by Monty Taylor
pandora-build v0.40
25
      memcached_lib_version();
1093.9.2 by Monty Taylor
pandora-build v0.35
26
    ])
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
27
  ],[
28
    ac_cv_libmemcached="no"
29
  ])
30
31
  AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
1259.7.1 by Monty Taylor
Updated to pandora-buld v0.94
32
    AC_LIB_HAVE_LINKFLAGS(memcachedprotocol,,[
33
      #include <libmemcached/protocol_handler.h>
34
    ],[
35
      struct memcached_protocol_st *protocol_handle;
36
      protocol_handle= memcached_protocol_create_instance();
37
    ])
1093.9.2 by Monty Taylor
pandora-build v0.35
38
  ],[
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
39
    ac_cv_libmemcachedprotocol="no"
1093.2.1 by Monty Taylor
pandora-build v0.16
40
  ])
41
  
1259.4.3 by Monty Taylor
pandora-build v0.93 - added a check for memcached_server_fn name change.
42
  AC_CACHE_CHECK([if libmemcached has memcached_server_fn],
43
    [pandora_cv_libmemcached_server_fn],
44
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
45
#include <libmemcached/memcached.h>
46
memcached_server_fn callbacks[1];
47
    ]])],
1259.7.1 by Monty Taylor
Updated to pandora-buld v0.94
48
    [pandora_cv_libmemcached_server_fn=yes],
49
    [pandora_cv_libmemcached_server_fn=no])])
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
50
1259.7.1 by Monty Taylor
Updated to pandora-buld v0.94
51
  AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
1259.4.3 by Monty Taylor
pandora-build v0.93 - added a check for memcached_server_fn name change.
52
    AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
53
  ])
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
54
])
55
56
AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[
57
58
  AC_CACHE_CHECK([if libmemcached is recent enough],
59
    [pandora_cv_recent_libmemcached],[
60
    AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[
61
      pandora_cv_recent_libmemcached=no
62
    ],[
63
      AS_IF([test "x$1" != "x"],[
64
        pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
1471.3.1 by Monty Taylor
Latest pandora-build. Moves the lint check to only run distcheck.
65
        AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
66
          pandora_cv_recent_libmemcached=yes
67
        ],[
68
          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1273.23.8 by Monty Taylor
Added version checking for libmemcached. Re-enabled libmemcached plugins
69
#include <libmemcached/configure.h>
70
71
#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
72
# error libmemcached too old!
73
#endif
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
74
            ]],[[]])
75
          ],[
76
            pandora_cv_recent_libmemcached=yes
77
          ],[
78
            pandora_cv_recent_libmemcached=no
79
          ])
1273.23.11 by Monty Taylor
Actually disable the lib on not-recent-enough. duh.
80
        ])
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
81
      ],[
82
        pandora_cv_recent_libmemcached=yes
1273.23.8 by Monty Taylor
Added version checking for libmemcached. Re-enabled libmemcached plugins
83
      ])
84
    ])
85
  ])
86
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
87
  AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"])
1093.2.1 by Monty Taylor
pandora-build v0.16
88
  
89
])
90
91
AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
92
  AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])
93
  _PANDORA_RECENT_LIBMEMCACHED($1)
1093.2.1 by Monty Taylor
pandora-build v0.16
94
])
95
96
AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
1273.23.8 by Monty Taylor
Added version checking for libmemcached. Re-enabled libmemcached plugins
97
  PANDORA_HAVE_LIBMEMCACHED($1)
1405.1.1 by Monty Taylor
Updated the search for libmemcached.
98
  AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"],
2221.1.8 by Monty Taylor
Adds ability to just build libdrizzle without needing all of the rest of the
99
      PANDORA_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
1093.2.1 by Monty Taylor
pandora-build v0.16
100
])
1259.4.3 by Monty Taylor
pandora-build v0.93 - added a check for memcached_server_fn name change.
101
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
102
AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[
1273.23.8 by Monty Taylor
Added version checking for libmemcached. Re-enabled libmemcached plugins
103
  PANDORA_HAVE_LIBMEMCACHED($1)
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
104
  AS_IF([test x$ac_cv_libmemcachedprotocol = xno],
2221.1.8 by Monty Taylor
Adds ability to just build libdrizzle without needing all of the rest of the
105
      PANDORA_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}]))
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
106
])