pandora_have_libtokyocabinet.m4 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (C) 2009 Sun Microsystems, Inc.
  2. # This file is free software; Sun Microsystems, Inc.
  3. # gives unlimited permission to copy and/or distribute it,
  4. # with or without modifications, as long as this notice is preserved.
  5. # Provides support for finding libtokyocabinet.
  6. #
  7. # serial 2
  8. AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],
  9. [AC_REQUIRE([AX_CHECK_LIBRARY])
  10. AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],
  11. [tokyocabinet_header="tcadb.h"],
  12. [tokyocabinet_header="does_not_exist"])
  13. AX_CHECK_LIBRARY([TOKYOCABINET],[$tokyocabinet_header],[tokyocabinet],,
  14. [AC_DEFINE([HAVE_TOKYOCABINET],[0],[Define to 1 if TOKYOCABINET is found])])
  15. AS_IF([test "x$ax_cv_have_TOKYOCABINET" = xno],[ac_enable_libtokyocabinet="no"])
  16. ])
  17. AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],
  18. [AC_ARG_ENABLE([libtokyocabinet],
  19. [AS_HELP_STRING([--disable-libtokyocabinet],
  20. [Build with libtokyocabinet support @<:@default=on@:>@])],
  21. [ac_enable_libtokyocabinet="$enableval"],
  22. [ac_enable_libtokyocabinet="yes"])
  23. _PANDORA_SEARCH_LIBTOKYOCABINET
  24. AM_CONDITIONAL([HAVE_TOKYOCABINET],[test "x${ac_enable_libtokyocabinet}" = "xyes"])
  25. ])