6 CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
13 if [ "${option%%=*}" = '--prefix' ] ; then
19 Welcome to Notmuch, a system for indexing, searching and tagging your email.
21 We hope that the process of building and installing notmuch is quick
22 and smooth so that you can soon be reading and processing your email
23 more efficiently than ever.
25 If anything goes wrong in the configure process, you can override any
26 decisions it makes by manually editing the Makefile.config file that
27 it creates. Also please do as much as you can to figure out what could
28 be different on your machine compared to those of the notmuch
29 developers. Then, please email those details to the Notmuch list
30 (notmuch@notmuchmail.org) so that we can hopefully make future
31 versions of notmuch easier for you to use.
33 We'll now investigate your system to verify that all required
34 dependencies are available:
40 if pkg-config --version > /dev/null 2>&1; then
46 printf "Checking for Xapian development files... "
47 if xapian-config --version > /dev/null 2>&1; then
50 xapian_cxxflags=$(xapian-config --cxxflags)
51 xapian_ldflags=$(xapian-config --libs)
55 errors=$((errors + 1))
58 printf "Checking for GMime 2.4 development files... "
59 if pkg-config --modversion gmime-2.4 > /dev/null 2>&1; then
62 gmime_cflags=$(pkg-config --cflags gmime-2.4)
63 gmime_ldflags=$(pkg-config --libs gmime-2.4)
67 errors=$((errors + 1))
70 printf "Checking for talloc development files... "
71 if pkg-config --modversion talloc > /dev/null 2>&1; then
74 talloc_cflags=$(pkg-config --cflags talloc)
75 talloc_ldflags=$(pkg-config --libs talloc)
80 errors=$((errors + 1))
83 printf "Checking for valgrind development files... "
84 if pkg-config --modversion valgrind > /dev/null 2>&1; then
87 valgrind_cflags=$(pkg-config --cflags valgrind)
89 printf "No (but that's fine).\n"
93 if pkg-config --modversion emacs > /dev/null 2>&1; then
94 emacs_lispdir=$(pkg-config emacs --variable sitepkglispdir)
96 emacs_lispdir='$(prefix)/share/emacs/site-lisp'
99 if [ $errors -gt 0 ]; then
102 *** Error: The dependencies of notmuch could not be satisfied. You will
103 need to install the following packages before being able to compile
107 if [ $have_xapian -eq 0 ]; then
108 echo " Xapian library (including development files such as headers)"
109 echo " http://xapian.org/"
111 if [ $have_gmime -eq 0 ]; then
112 echo " GMime 2.4 library (including development files such as headers)"
113 echo " http://spruce.sourceforge.net/gmime/"
115 if [ $have_talloc -eq 0 ]; then
116 echo " The talloc library (including development files such as headers)"
117 echo " http://talloc.samba.org/"
121 With any luck, you're using a modern, package-based operating system
122 that has all of these packages available in the distribution. In that
123 case a simple command will install everything you need. For example:
125 On Debian and similar systems:
127 sudo apt-get install libxapian-dev libgmime-2.4-dev libtalloc-dev
129 Or on Fedora and similar systems:
131 sudo yum install xapian-core-devel gmime-devel libtalloc-devel
133 On other systems, similar commands can be used, but the details of the
134 package names may be different.
137 if [ $have_pkg_config -eq 0 ]; then
139 Note: the pkg-config program is not available. This configure script
140 uses pkg-config to find the compilation flags required to link against
141 the various libraries needed by notmuch. It's possible you simply need
142 to install pkg-config with a command such as:
144 sudo apt-get install pkg-config
146 sudo yum install pkgconfig
148 But if pkg-config is not available for your system, then you will need
149 to modify the configure script to manually set the cflags and ldflags
150 variables to the correct values to link against each library in each
151 case that pkg-config could not be used to determine those values.
156 When you have installed the necessary dependencies, you can run
157 configure again to ensure the packages can be found, or simply run
158 "make" to compile notmuch.
164 printf "Checking for getline... "
165 if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1
170 printf "No (will use our own instead).\n"
173 rm -f config/have_getline
177 All required packages were found. You may now run the following
178 commands to compile and install notmuch:
185 # construct the Makefile.config
186 cat > Makefile.config <<EOF
187 # This Makefile.config was automatically generated by the ./configure
188 # script of notmuch. If the configure script identified anything
189 # incorrectly, then you can edit this file to try to correct things,
190 # but be warned that if configure is run again it will destroy your
191 # changes, (and this could happen by simply calling "make" if the
192 # configure script is updated).
194 # The C compiler to use
197 # The C++ compiler to use
200 # Default FLAGS for C compiler (can be overridden by user such as "make CFLAGS=-g")
203 # Default FLAGS for C++ compiler (can be overridden by user such as "make CXXFLAGS=-g")
204 CXXFLAGS = ${CXXFLAGS}
206 # The prefix to which notmuch should be installed
209 # The directory to which emacs lisp files should be installed
210 emacs_lispdir=${emacs_lispdir}
212 # Whether the getline function is available (if not, then notmuch will
213 # build its own version)
214 HAVE_GETLINE = ${have_getline}
216 # Flags needed to compile and link against Xapian
217 XAPIAN_CXXFLAGS = ${xapian_cxxflags}
218 XAPIAN_LDFLAGS = ${xapian_ldflags}
220 # Flags needed to compile and link against GMime-2.4
221 GMIME_CFLAGS = ${gmime_cflags}
222 GMIME_LDFLAGS = ${gmime_ldflags}
224 # Flags needed to compile and link against talloc
225 TALLOC_CFLAGS = ${talloc_cflags}
226 TALLOC_LDFLAGS = ${talloc_ldflags}
228 # Whether valgrind header files are available
229 HAVE_VALGRIND = ${have_valgrind}
231 # And if so, flags needed at compile time for valgrind macros
232 VALGRIND_CFLAGS = ${valgrind_cflags}
234 # Combined flags for compiling and linking against all of the above
235 CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
236 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
238 CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
239 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
240 \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS)
241 CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)