X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=40e8b2559e86b40985ef2c6dc142eb0104c3ddb6;hp=c8690d3a647b3da7d832c82935dadda56ff4828a;hb=0b4490c82cfeae7a0692cbf675b87c3a0e8f5114;hpb=0e03e2d45e36edb635229f356bf41f153c30a70f diff --git a/configure b/configure index c8690d3a..40e8b255 100755 --- a/configure +++ b/configure @@ -108,6 +108,7 @@ PREFIX=/usr/local LIBDIR= WITH_DOCS=1 WITH_API_DOCS=1 +WITH_PYTHON_DOCS=1 WITH_EMACS=1 WITH_DESKTOP=1 WITH_BASH=1 @@ -454,26 +455,6 @@ if [ ${have_xapian} = "0" ]; then errors=$((errors + 1)) fi -if [ ${have_xapian} = "1" ]; then - default_xapian_backend="" - printf "Testing default Xapian backend... " - cat >_default_backend.cc < -int main(int argc, char** argv) { - Xapian::WritableDatabase db("test.db",Xapian::DB_CREATE_OR_OPEN); -} -EOF - ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} _default_backend.cc -o _default_backend ${xapian_ldflags} - ./_default_backend - if [ -f test.db/iamglass ]; then - default_xapian_backend=glass - else - default_xapian_backend=chert - fi - printf "%s\n" "${default_xapian_backend}"; - rm -rf test.db _default_backend _default_backend.cc -fi - GMIME_MINVER=3.0.3 printf "Checking for GMime development files (>= $GMIME_MINVER)... " @@ -801,7 +782,9 @@ if [ $have_python3 -eq 1 ]; then if "$python" -c 'import cffi,setuptools; cffi.FFI().verify()' >/dev/null 2>&1; then printf "Yes.\n" have_python3_cffi=1 + WITH_PYTHON_DOCS=1 else + WITH_PYTHON_DOCS=0 printf "No (will not install CFFI-based python bindings).\n" fi rm -rf __pycache__ # cffi.FFI().verify() uses this space @@ -809,7 +792,7 @@ if [ $have_python3 -eq 1 ]; then printf "Checking for python3 pytest (>= 3.0)... " conf=$(mktemp) printf "[pytest]\nminversion=3.0\n" > $conf - if pytest-3 -c $conf --version >/dev/null 2>&1; then + if "$python" -m pytest -c $conf --version >/dev/null 2>&1; then printf "Yes.\n" have_python3_pytest=1 else @@ -846,8 +829,8 @@ if [ -z "${EMACSETCDIR-}" ]; then fi if [ $WITH_EMACS = "1" ]; then - printf "Checking if emacs (>= 24) is available... " - if emacs --quick --batch --eval '(if (< emacs-major-version 24) (kill-emacs 1))' > /dev/null 2>&1; then + printf "Checking if emacs (>= 25) is available... " + if emacs --quick --batch --eval '(if (< emacs-major-version 25) (kill-emacs 1))' > /dev/null 2>&1; then printf "Yes.\n" else printf "No (disabling emacs related parts of build)\n" @@ -1505,9 +1488,6 @@ NOTMUCH_SRCDIR='${NOTMUCH_SRCDIR}' # Whether to have Xapian retry lock NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK=${WITH_RETRY_LOCK} -# Which backend will Xapian use by default? -NOTMUCH_DEFAULT_XAPIAN_BACKEND=${default_xapian_backend} - # Whether GMime can verify X.509 certificate validity NOTMUCH_GMIME_X509_CERT_VALIDITY=${gmime_x509_cert_validity} @@ -1548,13 +1528,16 @@ NOTMUCH_HAVE_PYTHON3_PYTEST=${have_python3_pytest} PLATFORM=${platform} EOF -cat > sphinx.config <> sphinx.config -fi -printf "rsti_dir = '%s'\n" $(realpath emacs) >> sphinx.config +{ + echo "# Generated by configure, run from doc/conf.py" + if [ $WITH_EMACS = "1" ]; then + echo "tags.add('WITH_EMACS')" + fi + if [ $WITH_PYTHON_DOCS = "1" ]; then + echo "tags.add('WITH_PYTHON')" + fi + printf "rsti_dir = '%s'\n" $(realpath emacs) +} > sphinx.config # Finally, after everything configured, inform the user how to continue. cat <