4 Welcome to Notmuch, a system for indexing, searching and tagging your email.
6 We hope that the process of building and installing notmuch is quick
7 and smooth so that you can soon be reading and processing your email
8 more efficiently than ever.
10 If anything goes wrong in the configure process, you can override any
11 decisions it makes by manually editing the Makefile.config file that
12 it creates. Also please do as much as you can to figure out what could
13 be different on your machine compared to those of the notmuch
14 developers. Then, please email those details to the Notmuch list
15 (notmuch@notmuchmail.org) so that we can hopefully make future
16 versions of notmuch easier for you to use.
18 We'll now investigate your system to verify that all required
19 dependencies are available:
25 if pkg-config --version > /dev/null 2>&1; then
31 printf "Checking for Xapian development files... "
32 if xapian-config --version > /dev/null 2>&1; then
35 xapian_cxxflags=$(xapian-config --cxxflags)
36 xapian_ldflags=$(xapian-config --libs)
40 errors=$((errors + 1))
43 printf "Checking for GMime 2.4 development files... "
44 if pkg-config --modversion gmime-2.4 > /dev/null 2>&1; then
47 gmime_cflags=$(pkg-config --cflags gmime-2.4)
48 gmime_ldflags=$(pkg-config --libs gmime-2.4)
52 errors=$((errors + 1))
55 printf "Checking for talloc development files... "
56 if pkg-config --modversion talloc > /dev/null 2>&1; then
59 talloc_cflags=$(pkg-config --cflags talloc)
60 talloc_ldflags=$(pkg-config --libs talloc)
65 errors=$((errors + 1))
68 printf "Checking for valgrind development files... "
69 if pkg-config --modversion valgrind > /dev/null 2>&1; then
72 valgrind_cflags=$(pkg-config --cflags valgrind)
74 printf "No (but that's fine).\n"
78 if pkg-config --modversion emacs > /dev/null 2>&1; then
79 emacs_lispdir=$(pkg-config emacs --variable sitepkglispdir)
81 emacs_lispdir='$(prefix)/share/emacs/site-lisp'
84 if [ $errors -gt 0 ]; then
87 *** Error: The dependencies of notmuch could not be satisfied. You will
88 need to install the following packages before being able to compile
92 if [ $have_xapian -eq 0 ]; then
93 echo " Xapian library (including development files such as headers)"
94 echo " http://xapian.org/"
96 if [ $have_gmime -eq 0 ]; then
97 echo " GMime 2.4 library (including development files such as headers)"
98 echo " http://spruce.sourceforge.net/gmime/"
100 if [ $have_talloc -eq 0 ]; then
101 echo " The talloc library (including development files such as headers)"
102 echo " http://talloc.samba.org/"
106 On a modern, package-based operating system such as Debian, you can
107 install all of the dependencies with the following simple command
110 sudo apt-get install libxapian-dev libgmime-2.4-dev libtalloc-dev
112 On other systems, a similar command can be used, but the details of the
113 package names may be different, (such as "devel" in place of "dev").
116 if [ $have_pkg_config -eq 0 ]; then
118 Note: the pkg-config program is not available. This configure script
119 uses pkg-config to find the compilation flags required to link against
120 the various libraries needed by notmuch. It's possible you simply need
121 to install pkg-config with a command such as:
123 sudo apt-get install pkg-config
125 But if pkg-config is not available for your system, then you will need
126 to modify the configure script to manually set the cflags and ldflags
127 variables to the correct values to link against each library in each
128 case that pkg-config could not be used to determine those values.
133 When you have installed the necessary dependencies, you can run
134 configure again to ensure the packages can be found, or simply run
135 "make" to compile notmuch.
141 printf "Checking for getline... "
142 if gcc -o config/have_getline config/have_getline.c > /dev/null 2>&1
147 printf "No (will use our own instead).\n"
150 rm -f config/have_getline
154 All required packages were found. You may now run the following
155 commands to compile and install notmuch:
162 # construct the Makefile.config
163 cat > Makefile.config <<EOF
164 # This Makefile.config was automatically generated by the ./configure
165 # script of notmuch. If the configure script identified anything
166 # incorrectly, then you can edit this file to try to correct things,
167 # but be warned that if configure is run again it will destroy your
168 # changes, (and this could happen by simply calling "make" if the
169 # configure script is updated).
171 # The prefix to which notmuch should be installed
174 # The directory to which emacs lisp files should be installed
175 emacs_lispdir=${emacs_lispdir}
177 # Whether the getline function is available (if not, then notmuch will
178 # build its own version)
179 HAVE_GETLINE = ${have_getline}
181 # Flags needed to compile and link against Xapian
182 XAPIAN_CXXFLAGS = ${xapian_cxxflags}
183 XAPIAN_LDFLAGS = ${xapian_ldflags}
185 # Flags needed to compile and link against GMime-2.4
186 GMIME_CFLAGS = ${gmime_cflags}
187 GMIME_LDFLAGS = ${gmime_ldflags}
189 # Flags needed to compile and linke against talloc
190 TALLOC_CFLAGS = ${talloc_cflags}
191 TALLOC_LDFLAGS = ${talloc_ldflags}
193 # Whether valgrind header files are available
194 HAVE_VALGRIND = ${have_valgrind}
196 # And if so, flags needed at compile time for valgrind macros
197 VALGRIND_CFLAGS = ${valgrind_cflags}
199 # Combined flags for compiling and linking against all of the above
200 override CFLAGS += -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
201 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
203 override CXXFLAGS += -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
204 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
205 \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS)
206 override LDFLAGS += \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)