Synchronize notmuch mail across machines
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.69])
  4. AC_INIT(muchsync, 6)
  5. AM_INIT_AUTOMAKE([-Wall])
  6. AC_CONFIG_SRCDIR([configure.ac])
  7. AC_CONFIG_MACRO_DIR([m4])
  8. dnl On arch, clang++ is not compatible with all libraries
  9. dnl AC_PROG_CXX([clang++ eg++ g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC])
  10. AC_PROG_CXX
  11. AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
  12. : ${WFLAGS=-Wall}
  13. CXXFLAGS="$CXXFLAGS $WFLAGS"
  14. dnl AC_USE_SYSTEM_EXTENSIONS
  15. AC_LANG(C++)
  16. # -pthread Seems to be required by g++ -stc=c++11
  17. AX_APPEND_COMPILE_FLAGS([-pthread])
  18. AC_CHECK_FUNCS(openat)
  19. AC_CHECK_FUNCS(fdopendir)
  20. PKG_CHECK_MODULES([sqlite3], [sqlite3])
  21. PKG_CHECK_MODULES([libcrypto], [libcrypto])
  22. AC_PATH_PROG(XAPIAN_CONFIG, xapian-config)
  23. test -n "$XAPIAN_CONFIG" || AC_MSG_ERROR(Cannot find xapian-config)
  24. if ! xapian_CPPFLAGS=$($XAPIAN_CONFIG --cxxflags) \
  25. || ! xapian_LIBS=$($XAPIAN_CONFIG --libs); then
  26. AC_MSG_ERROR(Error running $XAPIAN_CONFIG)
  27. fi
  28. AC_SUBST(xapian_CPPFLAGS)
  29. AC_SUBST(xapian_LIBS)
  30. AC_MSG_CHECKING(For st_mtim in struct stat)
  31. AC_COMPILE_IFELSE(
  32. [AC_LANG_PROGRAM([#include <time.h>
  33. #include <sys/time.h>
  34. #include <sys/stat.h>],
  35. [return sizeof(stat::st_mtim) > 0;])],
  36. have_st_mtim=yes, have_st_mtim=no)
  37. AC_MSG_RESULT($have_st_mtim)
  38. if test yes = "$have_st_mtim"; then
  39. ST_MTIM=st_mtim
  40. else
  41. AC_MSG_CHECKING(For st_mtimespec in struct stat)
  42. AC_COMPILE_IFELSE(
  43. [AC_LANG_PROGRAM([#include <time.h>
  44. #include <sys/time.h>
  45. #include <sys/stat.h>],
  46. [int sz = sizeof(stat::st_mtimespec);])],
  47. have_st_mtimespec=yes, have_st_mtimespec=no)
  48. AC_MSG_RESULT($have_st_mtimespec)
  49. if test yes = "$have_st_mtimespec"; then
  50. ST_MTIM=st_mtimespec
  51. else
  52. AC_MSG_ERROR(Cannot find nanoseconds mtime in stat struct)
  53. fi
  54. fi
  55. AC_DEFINE_UNQUOTED(ST_MTIM, $ST_MTIM,
  56. Name of timespec modification time field in stat structure)
  57. AC_CONFIG_FILES([Makefile])
  58. AC_OUTPUT