# construct the Makefile.config
cat > Makefile.config <<EOF
+# This Makefile.config was automatically generated by the ./configure
+# script of notmuch. If the configure script identified anything
+# incorrectly, then you can edit this file to try to correct things,
+# but be warned that if configure is run again it will destroy your
+# changes, (and this could happen by simply calling "make" if the
+# configure script is updated).
+
+# The prefix to which notmuch should be installed
prefix = /usr/local
+
+# The directory to which emacs lisp files should be installed
emacs_lispdir=${emacs_lispdir}
+
+# Whether the getline function is available (if not, then notmuch will
+# build its own version)
HAVE_GETLINE = ${have_getline}
+
+# Various flags needed to compile and link against the dependencies of
+# notmuch.
override CFLAGS += ${cflags} -DHAVE_VALGRIND=${have_valgrind} -DHAVE_GETLINE=\$(HAVE_GETLINE)
override CXXFLAGS += ${cflags} ${cxxflags}
override LDFLAGS += ${ldflags}