[PATCH] configure: disable features that do not work out of tree

Subject: [PATCH] configure: disable features that do not work out of tree

Date: Thu, 23 Apr 2020 23:58:57 +0300

To: notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: Tomi Ollila

When doing out of tree build,

- sphinx-build cannot collect source files from source code
  directory and generated files from build directory.

- python3-cffi did not work, did not investigate further.

In order to get at least something done out of tree, these
features are disabled when doing out of tree builds. The output
is still useful if these features are not needed, and helps with
e.g. test output comparisons.
 configure | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure b/configure
index 70031d14..8c2c9b72 100755
--- a/configure
+++ b/configure
@@ -70,6 +70,10 @@ if [ "$srcdir" != "." ]; then
     mkdir bindings/ruby
     cp -a "$srcdir"/bindings/ruby/*.[ch] bindings/ruby
     cp -a "$srcdir"/bindings/ruby/extconf.rb bindings/ruby
+    out_of_tree_build=1
+    out_of_tree_build=0
 # Set several defaults (optionally specified by the user in
@@ -1089,6 +1093,11 @@ printf "\n\t%s\n" "${WARN_CFLAGS}"
 rm -f minimal minimal.c _libversion.c _libversion _libversion.sh _check_session_keys.c _check_session_keys
+if [ "$out_of_tree_build" = 1 ]; then
+   printf '\n*** Out of tree build: disabling sphinx docs, python3-cffi ***\n'
+   have_sphinx=0 have_python3_cffi=0
 # construct the Makefile.config
 cat > Makefile.config <<EOF
 # This Makefile.config was automatically generated by the ./configure

notmuch mailing list