]> git.notmuchmail.org Git - notmuch/blobdiff - configure
emacs: Increase consistency of library headers
[notmuch] / configure
index 2caa08c85e657d24a253a02398d4532d601a81b9..a357eb916fef846445e4e4167f3a5c0a7eeec444 100755 (executable)
--- a/configure
+++ b/configure
@@ -48,7 +48,7 @@ case $PWD in ( *["$IFS"]* )
 esac
 
 subdirs="util compat lib parse-time-string completion doc emacs"
 esac
 
 subdirs="util compat lib parse-time-string completion doc emacs"
-subdirs="${subdirs} performance-test test test/test-databases"
+subdirs="${subdirs} performance-test test"
 subdirs="${subdirs} bindings"
 
 # For a non-srcdir configure invocation (such as ../configure), create
 subdirs="${subdirs} bindings"
 
 # For a non-srcdir configure invocation (such as ../configure), create
@@ -108,6 +108,7 @@ PREFIX=/usr/local
 LIBDIR=
 WITH_DOCS=1
 WITH_API_DOCS=1
 LIBDIR=
 WITH_DOCS=1
 WITH_API_DOCS=1
+WITH_PYTHON_DOCS=1
 WITH_EMACS=1
 WITH_DESKTOP=1
 WITH_BASH=1
 WITH_EMACS=1
 WITH_DESKTOP=1
 WITH_BASH=1
@@ -454,26 +455,6 @@ if [ ${have_xapian} = "0" ]; then
     errors=$((errors + 1))
 fi
 
     errors=$((errors + 1))
 fi
 
-if [ ${have_xapian} = "1" ]; then
-    default_xapian_backend=""
-    printf "Testing default Xapian backend... "
-    cat >_default_backend.cc <<EOF
-#include <xapian.h>
-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)... "
 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
     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
     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
         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
     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
         printf "Yes.\n"
         have_python3_pytest=1
     else
@@ -1028,7 +1011,7 @@ On Debian and similar systems:
 
 Or on Fedora and similar systems:
 
 
 Or on Fedora and similar systems:
 
-       sudo yum install xapian-core-devel gmime-devel libtalloc-devel zlib-devel
+       sudo dnf install xapian-core-devel gmime30-devel libtalloc-devel zlib-devel
 
 On other systems, similar commands can be used, but the details of the
 package names may be different.
 
 On other systems, similar commands can be used, but the details of the
 package names may be different.
@@ -1043,7 +1026,7 @@ to install pkg-config with a command such as:
 
        sudo apt-get install pkg-config
 Or:
 
        sudo apt-get install pkg-config
 Or:
-       sudo yum install pkgconfig
+       sudo dnf install pkgconfig
 
 But if pkg-config is not available for your system, then you will need
 to modify the configure script to manually set the cflags and ldflags
 
 But if pkg-config is not available for your system, then you will need
 to modify the configure script to manually set the cflags and ldflags
@@ -1505,9 +1488,6 @@ NOTMUCH_SRCDIR='${NOTMUCH_SRCDIR}'
 # Whether to have Xapian retry lock
 NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK=${WITH_RETRY_LOCK}
 
 # 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}
 
 # Whether GMime can verify X.509 certificate validity
 NOTMUCH_GMIME_X509_CERT_VALIDITY=${gmime_x509_cert_validity}
 
@@ -1548,6 +1528,17 @@ NOTMUCH_HAVE_PYTHON3_PYTEST=${have_python3_pytest}
 PLATFORM=${platform}
 EOF
 
 PLATFORM=${platform}
 EOF
 
+{
+    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 <<EOF
 
 # Finally, after everything configured, inform the user how to continue.
 cat <<EOF