11 if [ "${option%%=*}" = '--prefix' ] ; then
17 Welcome to Notmuch, a system for indexing, searching and tagging your email.
19 We hope that the process of building and installing notmuch is quick
20 and smooth so that you can soon be reading and processing your email
21 more efficiently than ever.
23 If anything goes wrong in the configure process, you can override any
24 decisions it makes by manually editing the Makefile.config file that
25 it creates. Also please do as much as you can to figure out what could
26 be different on your machine compared to those of the notmuch
27 developers. Then, please email those details to the Notmuch list
28 (notmuch@notmuchmail.org) so that we can hopefully make future
29 versions of notmuch easier for you to use.
31 We'll now investigate your system to verify that all required
32 dependencies are available:
38 if pkg-config --version > /dev/null 2>&1; then
44 printf "Checking for Xapian development files... "
45 if xapian-config --version > /dev/null 2>&1; then
48 xapian_cxxflags=$(xapian-config --cxxflags)
49 xapian_ldflags=$(xapian-config --libs)
53 errors=$((errors + 1))
56 printf "Checking for GMime 2.4 development files... "
57 if pkg-config --modversion gmime-2.4 > /dev/null 2>&1; then
60 gmime_cflags=$(pkg-config --cflags gmime-2.4)
61 gmime_ldflags=$(pkg-config --libs gmime-2.4)
65 errors=$((errors + 1))
68 printf "Checking for talloc development files... "
69 if pkg-config --modversion talloc > /dev/null 2>&1; then
72 talloc_cflags=$(pkg-config --cflags talloc)
73 talloc_ldflags=$(pkg-config --libs talloc)
78 errors=$((errors + 1))
81 printf "Checking for valgrind development files... "
82 if pkg-config --modversion valgrind > /dev/null 2>&1; then
85 valgrind_cflags=$(pkg-config --cflags valgrind)
87 printf "No (but that's fine).\n"
91 if pkg-config --modversion emacs > /dev/null 2>&1; then
92 emacs_lispdir=$(pkg-config emacs --variable sitepkglispdir)
94 emacs_lispdir='$(prefix)/share/emacs/site-lisp'
97 if [ $errors -gt 0 ]; then
100 *** Error: The dependencies of notmuch could not be satisfied. You will
101 need to install the following packages before being able to compile
105 if [ $have_xapian -eq 0 ]; then
106 echo " Xapian library (including development files such as headers)"
107 echo " http://xapian.org/"
109 if [ $have_gmime -eq 0 ]; then
110 echo " GMime 2.4 library (including development files such as headers)"
111 echo " http://spruce.sourceforge.net/gmime/"
113 if [ $have_talloc -eq 0 ]; then
114 echo " The talloc library (including development files such as headers)"
115 echo " http://talloc.samba.org/"
119 With any luck, you're using a modern, package-based operating system
120 that has all of these packages available in the distribution. In that
121 case a simple command will install everything you need. For example:
123 On Debian and similar systems:
125 sudo apt-get install libxapian-dev libgmime-2.4-dev libtalloc-dev
127 Or on Fedora and similar systems:
129 sudo yum install xapian-core-devel gmime-devel libtalloc-devel
131 On other systems, similar commands can be used, but the details of the
132 package names may be different.
135 if [ $have_pkg_config -eq 0 ]; then
137 Note: the pkg-config program is not available. This configure script
138 uses pkg-config to find the compilation flags required to link against
139 the various libraries needed by notmuch. It's possible you simply need
140 to install pkg-config with a command such as:
142 sudo apt-get install pkg-config
144 sudo yum install pkgconfig
146 But if pkg-config is not available for your system, then you will need
147 to modify the configure script to manually set the cflags and ldflags
148 variables to the correct values to link against each library in each
149 case that pkg-config could not be used to determine those values.
154 When you have installed the necessary dependencies, you can run
155 configure again to ensure the packages can be found, or simply run
156 "make" to compile notmuch.
162 printf "Checking for getline... "
163 if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1
168 printf "No (will use our own instead).\n"
171 rm -f config/have_getline
175 All required packages were found. You may now run the following
176 commands to compile and install notmuch:
183 # construct the Makefile.config
184 cat > Makefile.config <<EOF
185 # This Makefile.config was automatically generated by the ./configure
186 # script of notmuch. If the configure script identified anything
187 # incorrectly, then you can edit this file to try to correct things,
188 # but be warned that if configure is run again it will destroy your
189 # changes, (and this could happen by simply calling "make" if the
190 # configure script is updated).
192 # The C compiler to use
195 # The C++ compiler to use
198 # The prefix to which notmuch should be installed
201 # The directory to which emacs lisp files should be installed
202 emacs_lispdir=${emacs_lispdir}
204 # Whether the getline function is available (if not, then notmuch will
205 # build its own version)
206 HAVE_GETLINE = ${have_getline}
208 # Flags needed to compile and link against Xapian
209 XAPIAN_CXXFLAGS = ${xapian_cxxflags}
210 XAPIAN_LDFLAGS = ${xapian_ldflags}
212 # Flags needed to compile and link against GMime-2.4
213 GMIME_CFLAGS = ${gmime_cflags}
214 GMIME_LDFLAGS = ${gmime_ldflags}
216 # Flags needed to compile and link against talloc
217 TALLOC_CFLAGS = ${talloc_cflags}
218 TALLOC_LDFLAGS = ${talloc_ldflags}
220 # Whether valgrind header files are available
221 HAVE_VALGRIND = ${have_valgrind}
223 # And if so, flags needed at compile time for valgrind macros
224 VALGRIND_CFLAGS = ${valgrind_cflags}
226 # Combined flags for compiling and linking against all of the above
227 CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
228 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
230 CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
231 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
232 \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS)
233 CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)