Sha256: 4caf9d24377bc7ff237a7ddb359f5b4f3c5e77c63dc6faa029daa9156c3376dc

Contents?: true

Size: 1.89 KB

Versions: 2

Compression:

Stored size: 1.89 KB

Contents

dnl  Copyright (C) 2009 Sun Microsystems, Inc.
dnl This file is free software; Sun Microsystems, Inc.
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

#--------------------------------------------------------------------
# Check for libldap
#--------------------------------------------------------------------


AC_DEFUN([_PANDORA_SEARCH_LIBLDAP],[
  AC_REQUIRE([AC_LIB_PREFIX])

  AC_LIB_HAVE_LINKFLAGS(ldap,,
  [#include <ldap.h>],
  [
    LDAP *ldap;
    ldap_initialize(&ldap, "ldap://localhost/");
  ])
  AS_IF([test "x$ac_cv_libldap" = "xno"],
  [
    unset ac_cv_libldap
    unset HAVE_LIBLDAP
    unset LIBLDAP
    unset LIBLDAP_PREFIX
    unset LTLIBLDAP
    AC_LIB_HAVE_LINKFLAGS(ldap,,
    [#include <ldap/ldap.h>],
    [
      LDAP *ldap;
      ldap_initialize(&ldap, "ldap://localhost/");
    ])
    AS_IF([test "x$ac_cv_libldap" = "xyes"], [
      ac_cv_ldap_location="<ldap/ldap.h>"
    ])
  ],[
    ac_cv_ldap_location="<ldap.h>"
  ])

  AM_CONDITIONAL(HAVE_LIBLDAP, [test "x${ac_cv_libldap}" = "xyes"])
])

AC_DEFUN([_PANDORA_HAVE_LIBLDAP],[

  AC_ARG_ENABLE([libldap],
    [AS_HELP_STRING([--disable-libldap],
      [Build with libldap support @<:@default=on@:>@])],
    [ac_enable_libldap="$enableval"],
    [ac_enable_libldap="yes"])

  _PANDORA_SEARCH_LIBLDAP
])


AC_DEFUN([PANDORA_HAVE_LIBLDAP],[
  AC_REQUIRE([_PANDORA_HAVE_LIBLDAP])
])

AC_DEFUN([_PANDORA_REQUIRE_LIBLDAP],[
  ac_enable_libldap="yes"
  _PANDORA_SEARCH_LIBLDAP

  AS_IF([test x$ac_cv_libldap = xno],[
    AC_MSG_ERROR([libldap is required for ${PACKAGE}. On Debian this can be found in libldap2-dev. On RedHat this can be found in openldap-devel.])
  ],[
    AC_DEFINE_UNQUOTED(LDAP_HEADER,[${ac_cv_ldap_location}],
                       [Location of ldap header])
  ])
])

AC_DEFUN([PANDORA_REQUIRE_LIBLDAP],[
  AC_REQUIRE([_PANDORA_REQUIRE_LIBLDAP])
])

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
couchbase-memcached-1.2.9 ext/libmemcached-0.50/m4/pandora_have_libldap.m4
couchbase-memcached-1.2.8 ext/libmemcached-0.50/m4/pandora_have_libldap.m4