X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=f0fc466eead546174868fb79d753e7d1b138060b;hp=49fa5b934566d0370777797ba3921243527652dc;hb=60ac94fe58635f9c40724afa0f35965fc9ff1afc;hpb=6a833a6e83865f6999707cc30768d07e1351c2cb diff --git a/configure b/configure index 49fa5b93..f0fc466e 100755 --- a/configure +++ b/configure @@ -68,10 +68,12 @@ PYTHON=${PYTHON:-} PREFIX=/usr/local LIBDIR= WITH_DOCS=1 +WITH_API_DOCS=1 WITH_EMACS=1 WITH_BASH=1 WITH_RUBY=1 WITH_ZSH=1 +WITH_RETRY_LOCK=1 usage () { @@ -136,10 +138,12 @@ Some features can be disabled (--with-feature=no is equivalent to --without-feature) : --without-bash-completion Do not install bash completions files - --without-docs Do not install documentation and man pages + --without-docs Do not install documentation + --without-api-docs Do not install API man page --without-emacs Do not install lisp file --without-ruby Do not install ruby bindings --without-zsh-completion Do not install zsh completions files + --without-retry-lock Do not use blocking xapian opens, even if available Additional options are accepted for compatibility with other configure-script calling conventions, but don't do anything yet: @@ -182,11 +186,21 @@ for option; do elif [ "${option%%=*}" = '--with-docs' ]; then if [ "${option#*=}" = 'no' ]; then WITH_DOCS=0 + WITH_API_DOCS=0 else WITH_DOCS=1 fi elif [ "${option}" = '--without-docs' ] ; then WITH_DOCS=0 + WITH_API_DOCS=0 + elif [ "${option%%=*}" = '--with-api-docs' ]; then + if [ "${option#*=}" = 'no' ]; then + WITH_API_DOCS=0 + else + WITH_API_DOCS=1 + fi + elif [ "${option}" = '--without-api-docs' ] ; then + WITH_API_DOCS=0 elif [ "${option%%=*}" = '--with-emacs' ]; then if [ "${option#*=}" = 'no' ]; then WITH_EMACS=0 @@ -211,6 +225,14 @@ for option; do fi elif [ "${option}" = '--without-ruby' ] ; then WITH_RUBY=0 + elif [ "${option%%=*}" = '--with-retry-lock' ]; then + if [ "${option#*=}" = 'no' ]; then + WITH_RETRY_LOCK=0 + else + WITH_RETRY_LOCK=1 + fi + elif [ "${option}" = '--without-retry-lock' ] ; then + WITH_RETRY_LOCK=0 elif [ "${option%%=*}" = '--with-zsh-completion' ]; then if [ "${option#*=}" = 'no' ]; then WITH_ZSH=0 @@ -372,6 +394,7 @@ EOF printf "Yes.\n" else printf "No.\n" + errors=$((errors + 1)) fi rm -f _compact.o _compact.cc @@ -392,6 +415,24 @@ EOF rm -f _field_processor.o _field_processor.cc default_xapian_backend="" + # DB_RETRY_LOCK is only supported on Xapian > 1.3.2 + have_xapian_db_retry_lock=0 + if [ $WITH_RETRY_LOCK = "1" ]; then + printf "Checking for Xapian lock retry support... " + cat>_retry.cc< +int flag = Xapian::DB_RETRY_LOCK; +EOF + if ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} -c _retry.cc -o _retry.o > /dev/null 2>&1 + then + have_xapian_db_retry_lock=1 + printf "Yes.\n" + else + printf "No. (optional)\n" + fi + rm -f _retry.o _retry.cc + fi + printf "Testing default Xapian backend... " cat >_default_backend.cc < @@ -529,7 +570,7 @@ else fi have_doxygen=0 -if [ $WITH_DOCS = "1" ] ; then +if [ $WITH_API_DOCS = "1" ] ; then printf "Checking if doxygen is available... " if command -v doxygen > /dev/null; then printf "Yes.\n" @@ -610,6 +651,8 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then fi else printf "Unknown.\n" + platform="$uname" + linker_resolves_library_dependencies=0 cat <= version 1.2.6, including development files such as headers)" echo " https://xapian.org/" fi if [ $have_zlib -eq 0 ]; then @@ -1022,6 +1065,9 @@ HAVE_XAPIAN_COMPACT = ${have_xapian_compact} # Whether the Xapian version in use supports field processors HAVE_XAPIAN_FIELD_PROCESSOR = ${have_xapian_field_processor} +# Whether the Xapian version in use supports DB_RETRY_LOCK +HAVE_XAPIAN_DB_RETRY_LOCK = ${have_xapian_db_retry_lock} + # Whether the getpwuid_r function is standards-compliant # (if not, then notmuch will #define _POSIX_PTHREAD_SEMANTICS # to enable the standards-compliant version -- needed for Solaris) @@ -1096,7 +1142,9 @@ COMMON_CONFIGURE_CFLAGS = \\ -DSTD_GETPWUID=\$(STD_GETPWUID) \\ -DSTD_ASCTIME=\$(STD_ASCTIME) \\ -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\ + -DSILENCE_XAPIAN_DEPRECATION_WARNINGS \\ -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\ + -DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK) \\ -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) CONFIGURE_CFLAGS = \$(COMMON_CONFIGURE_CFLAGS) @@ -1117,6 +1165,9 @@ NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact} # Whether the Xapian version in use supports field processors NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR=${have_xapian_field_processor} +# Whether the Xapian version in use supports lock retry +NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK=${have_xapian_db_retry_lock} + # Which backend will Xapian use by default? NOTMUCH_DEFAULT_XAPIAN_BACKEND=${default_xapian_backend}