# environment variables)
CC=${CC:-cc}
CXX=${CXX:-c++}
-CFLAGS=${CFLAGS:--O2}
+CFLAGS=${CFLAGS:--g -O2}
CPPFLAGS=${CPPFLAGS:-}
CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
LDFLAGS=${LDFLAGS:-}
have_emacs=0
fi
+printf "Checking if doxygen is available... "
+if command -v doxygen > /dev/null 2>&1; then
+ printf "Yes.\n"
+ have_doxygen=1
+else
+ printf "No (so will not install api docs)\n"
+ have_doxygen=0
+fi
+
printf "Checking if sphinx is available and supports nroff output... "
if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > /dev/null 2>&1 ; then
printf "Yes.\n"
rm -f minimal minimal.c
-cat <<EOF
-
-All required packages were found. You may now run the following
-commands to compile and install notmuch:
-
- make
- sudo make install
-
-EOF
-
# construct the Makefile.config
cat > Makefile.config <<EOF
# This Makefile.config was automatically generated by the ./configure
# Whether there's a rst2man binary available for building documentation
HAVE_RST2MAN=${have_rst2man}
+# Whether there's a doxygen binary available for building api documentation
+HAVE_DOXYGEN=${have_doxygen}
+
# The directory to which desktop files should be installed
desktop_dir = \$(prefix)/share/applications
CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)
EOF
+
+# construct the sh.config
+cat > sh.config <<EOF
+# This sh.config was automatically generated by the ./configure
+# script of notmuch.
+
+# Whether the Xapian version in use supports compaction
+NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}
+
+# Whether there's either sphinx or rst2man available for building
+# documentation
+NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man))
+EOF
+
+# Finally, after everything configured, inform the user how to continue.
+cat <<EOF
+
+All required packages were found. You may now run the following
+commands to compile and install notmuch:
+
+ make
+ sudo make install
+
+EOF