cyrus-imapd-db.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --- configure.ac 2015-07-06 01:22:19.000000000 +0000
  2. +++ configure.ac 2015-07-22 11:18:33.000000000 +0000
  3. @@ -236,50 +236,29 @@
  4. dnl Berkeley DB Detection
  5. AC_ARG_WITH(bdb,
  6. - [AS_HELP_STRING([--with-bdb=DIR], [use Berkeley DB (in DIR) [yes]])],
  7. - with_bdb=$withval, with_bdb="yes")
  8. -
  9. -dnl support old-style
  10. -AC_ARG_WITH(dbdir,, with_bdb=$withval)
  11. + [AS_HELP_STRING([--with-bdb], [use Berkeley DB [yes]])],
  12. + [],
  13. + [with_bdb="yes"])
  14. +# On a properly installed system, we build
  15. +# by including <db.h> and by linking with -ldb
  16. case "$with_bdb" in
  17. - no)
  18. - use_berkeley="no"
  19. - ;;
  20. - yes)
  21. - use_berkeley="yes"
  22. - with_bdb_lib=none
  23. - with_bdb_inc=none
  24. - ;;
  25. - *)
  26. - use_berkeley="yes"
  27. - with_bdb_lib="$with_bdb/lib"
  28. - with_bdb_inc="$with_bdb/include"
  29. + no) ;;
  30. + *) AC_CHECK_FILE([/usr/include/db.h],
  31. + [],
  32. + AC_CHECK_FILE([/usr/include/db/db.h]),
  33. + [BDB_INC="-I/usr/include/db"],
  34. + AC_MSG_ERROR([No <db.h> include file is found. Install the
  35. + appropriate db*-devel package first.]))
  36. + BDB_LIB="-ldb"
  37. + AC_SUBST(BDB_INC)
  38. + AC_SUBST(BDB_LIB)
  39. + LIBS="${LIBS} ${BDB_LIB}"
  40. + CPPFLAGS="${CPPFLAGS} ${BDB_INC}"
  41. + AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
  42. ;;
  43. esac
  44. -
  45. -if test "$use_berkeley" != "no"; then
  46. - CYRUS_BERKELEY_DB_CHK()
  47. -
  48. - if test "$dblib" = "no"; then
  49. - AC_MSG_ERROR([Berkeley DB 3.x or later was not found. You may need to
  50. - supply the --with-bdb-libdir or --with-bdb-incdir configure options.])
  51. - fi
  52. -
  53. - if test "$with_bdb_lib" != "none"; then
  54. - CMU_ADD_LIBPATH($with_bdb_lib)
  55. - fi
  56. -
  57. - BDB_INC=${BDB_INCADD}
  58. - BDB_LIB=${BDB_LIBADD}
  59. - AC_SUBST(BDB_INC)
  60. - AC_SUBST(BDB_LIB)
  61. -
  62. - LIBS="${LIBS} ${BDB_LIBADD}"
  63. - CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
  64. - AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
  65. -fi
  66. -AM_CONDITIONAL([USE_BERKELEY], [test "$use_berkeley" != "no"])
  67. +AM_CONDITIONAL([USE_BERKELEY], [test "$with_bdb" != "no"])
  68. dnl End Berkeley DB Detection
  69. @@ -1800,7 +1779,7 @@
  70. pcre: $cyrus_cv_pcre_utf8
  71. Database support:
  72. - bdb: $use_berkeley
  73. + bdb: $with_bdb
  74. mysql: $with_mysql
  75. postgresql: $use_pgsql
  76. sqlite: $use_sqlite