pandora_have_libtokyocabinet.m4.moved 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. dnl Copyright (C) 2009 Sun Microsystems
  2. dnl This file is free software; Sun Microsystems
  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. AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[
  6. AC_REQUIRE([AC_LIB_PREFIX])
  7. dnl --------------------------------------------------------------------
  8. dnl Check for libtokyocabinet
  9. dnl --------------------------------------------------------------------
  10. AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[
  11. #include <tcutil.h>
  12. #include <tcbdb.h>
  13. ], [
  14. TCMAP *map;
  15. map = tcmapnew();
  16. tcmapdel(map);
  17. ])
  18. AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "x${ac_cv_libtokyocabinet}" = "xyes"])
  19. ])
  20. AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[
  21. AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
  22. ])
  23. AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[
  24. AC_REQUIRE([PANDORA_HAVE_LIBTOKYOCABINET])
  25. AS_IF([test x$ac_cv_libtokyocabinet = xno],
  26. AC_MSG_ERROR([libtokyocabbinet is required for ${PACKAGE}]))
  27. ])