7 Welcome to Notmuch, a system for indexing, searching and tagging your email.
9 We hope that the process of building and installing notmuch is quick
10 and smooth so that you can soon be reading and processing your email
11 more efficiently than ever.
13 If anything goes wrong in the configure process, you can override any
14 decisions it makes by manually editing the Makefile.config file that
15 it creates. Also please do as much as you can to figure out what could
16 be different on your machine compared to those of the notmuch
17 developers. Then, please email those details to the Notmuch list
18 (notmuch@notmuchmail.org) so that we can hopefully make future
19 versions of notmuch easier for you to use.
21 We'll now investigate your system to verify that all required
22 dependencies are available:
28 if pkg-config --version > /dev/null 2>&1; then
34 printf "Checking for Xapian development files... "
35 if xapian-config --version > /dev/null 2>&1; then
38 xapian_cxxflags=$(xapian-config --cxxflags)
39 xapian_ldflags=$(xapian-config --libs)
43 errors=$((errors + 1))
46 printf "Checking for GMime 2.4 development files... "
47 if pkg-config --modversion gmime-2.4 > /dev/null 2>&1; then
50 gmime_cflags=$(pkg-config --cflags gmime-2.4)
51 gmime_ldflags=$(pkg-config --libs gmime-2.4)
55 errors=$((errors + 1))
58 printf "Checking for talloc development files... "
59 if pkg-config --modversion talloc > /dev/null 2>&1; then
62 talloc_cflags=$(pkg-config --cflags talloc)
63 talloc_ldflags=$(pkg-config --libs talloc)
68 errors=$((errors + 1))
71 printf "Checking for valgrind development files... "
72 if pkg-config --modversion valgrind > /dev/null 2>&1; then
75 valgrind_cflags=$(pkg-config --cflags valgrind)
77 printf "No (but that's fine).\n"
81 if pkg-config --modversion emacs > /dev/null 2>&1; then
82 emacs_lispdir=$(pkg-config emacs --variable sitepkglispdir)
84 emacs_lispdir='$(prefix)/share/emacs/site-lisp'
87 if [ $errors -gt 0 ]; then
90 *** Error: The dependencies of notmuch could not be satisfied. You will
91 need to install the following packages before being able to compile
95 if [ $have_xapian -eq 0 ]; then
96 echo " Xapian library (including development files such as headers)"
97 echo " http://xapian.org/"
99 if [ $have_gmime -eq 0 ]; then
100 echo " GMime 2.4 library (including development files such as headers)"
101 echo " http://spruce.sourceforge.net/gmime/"
103 if [ $have_talloc -eq 0 ]; then
104 echo " The talloc library (including development files such as headers)"
105 echo " http://talloc.samba.org/"
109 On a modern, package-based operating system such as Debian, you can
110 install all of the dependencies with the following simple command
113 sudo apt-get install libxapian-dev libgmime-2.4-dev libtalloc-dev
115 Or on Fedora or other RPM-based systems:
117 sudo yum install xapian-core-devel gmime-devel libtalloc-devel
119 On other systems, a similar command can be used, but the details of the
120 package names may be different, (such as "devel" in place of "dev").
123 if [ $have_pkg_config -eq 0 ]; then
125 Note: the pkg-config program is not available. This configure script
126 uses pkg-config to find the compilation flags required to link against
127 the various libraries needed by notmuch. It's possible you simply need
128 to install pkg-config with a command such as:
130 sudo apt-get install pkg-config
133 sudo yum install pkgconfig
135 But if pkg-config is not available for your system, then you will need
136 to modify the configure script to manually set the cflags and ldflags
137 variables to the correct values to link against each library in each
138 case that pkg-config could not be used to determine those values.
143 When you have installed the necessary dependencies, you can run
144 configure again to ensure the packages can be found, or simply run
145 "make" to compile notmuch.
151 printf "Checking for getline... "
152 if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1
157 printf "No (will use our own instead).\n"
160 rm -f config/have_getline
164 All required packages were found. You may now run the following
165 commands to compile and install notmuch:
172 # construct the Makefile.config
173 cat > Makefile.config <<EOF
174 # This Makefile.config was automatically generated by the ./configure
175 # script of notmuch. If the configure script identified anything
176 # incorrectly, then you can edit this file to try to correct things,
177 # but be warned that if configure is run again it will destroy your
178 # changes, (and this could happen by simply calling "make" if the
179 # configure script is updated).
181 # The C compiler to use
184 # The C++ compiler to use
187 # The prefix to which notmuch should be installed
190 # The directory to which emacs lisp files should be installed
191 emacs_lispdir=${emacs_lispdir}
193 # Whether the getline function is available (if not, then notmuch will
194 # build its own version)
195 HAVE_GETLINE = ${have_getline}
197 # Flags needed to compile and link against Xapian
198 XAPIAN_CXXFLAGS = ${xapian_cxxflags}
199 XAPIAN_LDFLAGS = ${xapian_ldflags}
201 # Flags needed to compile and link against GMime-2.4
202 GMIME_CFLAGS = ${gmime_cflags}
203 GMIME_LDFLAGS = ${gmime_ldflags}
205 # Flags needed to compile and linke against talloc
206 TALLOC_CFLAGS = ${talloc_cflags}
207 TALLOC_LDFLAGS = ${talloc_ldflags}
209 # Whether valgrind header files are available
210 HAVE_VALGRIND = ${have_valgrind}
212 # And if so, flags needed at compile time for valgrind macros
213 VALGRIND_CFLAGS = ${valgrind_cflags}
215 # Combined flags for compiling and linking against all of the above
216 override CFLAGS += -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
217 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
219 override CXXFLAGS += -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
220 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
221 \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS)
222 override LDFLAGS += \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)