pandora_have_libtokyocabinet.m4 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. dnl Copyright (C) 2009 Sun Microsystems, Inc.
  2. dnl This file is free software; Sun Microsystems, Inc.
  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. dnl Provides support for finding libtokyocabinet.
  6. dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET
  7. AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[
  8. AC_REQUIRE([AX_CHECK_LIBRARY])
  9. AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[
  10. AX_CHECK_LIBRARY([LIBTOKYOCABINET], [tcadb.h], [tokyocabinet],
  11. [
  12. LIBTOKYOCABINET_LDFLAGS="-ltokyocabinet"
  13. AC_DEFINE([HAVE_LIBTOKYOCABINET], [1], [If TokyoCabinet is available])
  14. ],
  15. [
  16. AC_DEFINE([HAVE_LIBTOKYOCABINET], [0], [If TokyoCabinet is available])
  17. ac_enable_libtokyocabinet="no"
  18. ])
  19. ],
  20. [
  21. AC_DEFINE([HAVE_LIBTOKYOCABINET], [0], [If TokyoCabinet is available])
  22. ])
  23. AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "x$ac_cv_lib_tokyocabinet_main" = "xyes"])
  24. ])
  25. AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[
  26. AC_ARG_ENABLE([libtokyocabinet],
  27. [AS_HELP_STRING([--disable-libtokyocabinet],
  28. [Build with libtokyocabinet support @<:@default=on@:>@])],
  29. [ac_enable_libtokyocabinet="$enableval"],
  30. [ac_enable_libtokyocabinet="yes"])
  31. _PANDORA_SEARCH_LIBTOKYOCABINET
  32. ])