]> git.notmuchmail.org Git - notmuch/blob - configure
new: Cleanup. Put removed/renamed message count in add_files_state_t.
[notmuch] / configure
1 #! /bin/sh
2
3 srcdir=$(dirname "$0")
4
5 # For a non-srcdir configure invocation (such as ../configure), create
6 # the directory structure and copy Makefiles.
7 if [ "$srcdir" != "." ]; then
8
9     for dir in . $(grep "^subdirs *=" "$srcdir"/Makefile | sed -e "s/subdirs *= *//"); do
10         mkdir -p "$dir"
11         cp "$srcdir"/"$dir"/Makefile.local "$dir"
12         cp "$srcdir"/"$dir"/Makefile "$dir"
13     done
14
15     # Easiest way to get the test suite to work is to just copy the
16     # whole thing into the build directory.
17     cp -a "$srcdir"/test/* test
18
19     # Emacs only likes to generate compiled files next to the .el files
20     # by default so copy these as well (which is not ideal0.
21     cp -a "$srcdir"/emacs/*.el emacs
22 fi
23
24 # Set several defaults (optionally specified by the user in
25 # environment variables)
26 CC=${CC:-gcc}
27 CXX=${CXX:-g++}
28 CFLAGS=${CFLAGS:--O2}
29 CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
30 LDFLAGS=${LDFLAGS:-}
31 XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config}
32
33 # We don't allow the EMACS or GZIP Makefile variables inherit values
34 # from the environment as we do with CC and CXX above. The reason is
35 # that these names as environment variables have existing uses other
36 # than the program name that we want. (EMACS is set to 't' when a
37 # shell is running within emacs and GZIP specifies arguments to pass
38 # on the gzip command line).
39
40 # Set the defaults for values the user can specify with command-line
41 # options.
42 PREFIX=/usr/local
43 LIBDIR=
44 WITH_EMACS=1
45 WITH_BASH=1
46 WITH_ZSH=1
47
48 usage ()
49 {
50     cat <<EOF
51 Usage: ./configure [options]...
52
53 This script configures notmuch to build on your system.
54
55 It verifies that dependencies are available, determines flags needed
56 to compile and link against various required libraries, and identifies
57 whether various system functions can be used or if locally-provided
58 replacements will be built instead.
59
60 Finally, it allows you to control various aspects of the build and
61 installation process.
62
63 First, some common variables can specified via environment variables:
64
65         CC              The C compiler to use
66         CFLAGS          Flags to pass to the C compiler
67         CXX             The C++ compiler to use
68         CXXFLAGS        Flags to pass to the C compiler
69         LDFLAGS         Flags to pass when linking
70
71 Each of these values can further be controlled by specifying them
72 later on the "make" command line.
73
74 Other environment variables can be used to control configure itself,
75 (and for which there is no equivalent build-time control):
76
77         XAPIAN_CONFIG   The program to use to determine flags for
78                         compiling and linking against the Xapian
79                         library. [$XAPIAN_CONFIG]
80
81 Additionally, various options can be specified on the configure
82 command line.
83
84         --prefix=PREFIX Install files in PREFIX [$PREFIX]
85
86 By default, "make install" will install the resulting program to
87 $PREFIX/bin, documentation to $PREFIX/man, etc. You can
88 specify an installation prefix other than $PREFIX using
89 --prefix, for instance:
90
91         ./configure --prefix=\$HOME
92
93 Fine tuning of some installation directories is available:
94
95         --libdir=DIR            Install libraries to DIR [PREFIX/lib]
96         --includedir=DIR        Install header files to DIR [PREFIX/include]
97         --mandir=DIR            Install man pages to DIR [PREFIX/share/man]
98         --sysconfdir=DIR        Read-only single-machine data [PREFIX/etc]
99         --emacslispdir=DIR      Emacs code [PREFIX/share/emacs/site-lisp]
100         --bashcompletiondir=DIR Bash completions files [SYSCONFDIR/bash_completion.d]
101         --zshcompletiondir=DIR  Zsh completions files [PREFIX/share/zsh/functions/Completion/Unix]
102
103 Some features can be disabled (--with-feature=no is equivalent to
104 --without-feature) :
105
106         --without-emacs                 Do not install lisp file
107         --without-bash-completion       Do not install bash completions files
108         --without-zsh-completion        Do not install zsh completions files
109
110 Additional options are accepted for compatibility with other
111 configure-script calling conventions, but don't do anything yet:
112
113         --build=<cpu>-<vendor>-<os>     Currently ignored
114         --host=<cpu>-<vendor>-<os>      Currently ignored
115         --infodir=DIR                   Currently ignored
116         --datadir=DIR                   Currently ignored
117         --localstatedir=DIR             Currently ignored
118         --libexecdir=DIR                Currently ignored
119         --disable-maintainer-mode       Currently ignored
120         --disable-dependency-tracking   Currently ignored
121
122 EOF
123 }
124
125 # Parse command-line options
126 for option; do
127     if [ "${option}" = '--help' ] ; then
128         usage
129         exit 0
130     elif [ "${option%%=*}" = '--prefix' ] ; then
131         PREFIX="${option#*=}"
132     elif [ "${option%%=*}" = '--libdir' ] ; then
133         LIBDIR="${option#*=}"
134     elif [ "${option%%=*}" = '--includedir' ] ; then
135         INCLUDEDIR="${option#*=}"
136     elif [ "${option%%=*}" = '--mandir' ] ; then
137         MANDIR="${option#*=}"
138     elif [ "${option%%=*}" = '--sysconfdir' ] ; then
139         SYSCONFDIR="${option#*=}"
140     elif [ "${option%%=*}" = '--emacslispdir' ] ; then
141         EMACSLISPDIR="${option#*=}"
142     elif [ "${option%%=*}" = '--bashcompletiondir' ] ; then
143         BASHCOMPLETIONDIR="${option#*=}"
144     elif [ "${option%%=*}" = '--zshcompletiondir' ] ; then
145         ZSHCOMLETIONDIR="${option#*=}"
146     elif [ "${option%%=*}" = '--with-emacs' ]; then
147         if [ "${option#*=}" = 'no' ]; then
148             WITH_EMACS=0
149         else
150             WITH_EMACS=1
151         fi
152     elif [ "${option}" = '--without-emacs' ] ; then
153         WITH_EMACS=0
154     elif [ "${option%%=*}" = '--with-bash-completion' ]; then
155         if [ "${option#*=}" = 'no' ]; then
156             WITH_BASH=0
157         else
158             WITH_BASH=1
159         fi
160     elif [ "${option}" = '--without-bash-completion' ] ; then
161         WITH_BASH=0
162     elif [ "${option%%=*}" = '--with-zsh-completion' ]; then
163         if [ "${option#*=}" = 'no' ]; then
164             WITH_ZSH=0
165         else
166             WITH_ZSH=1
167         fi
168     elif [ "${option}" = '--without-zsh-completion' ] ; then
169         WITH_ZSH=0
170     elif [ "${option%%=*}" = '--build' ] ; then
171         build_option="${option#*=}"
172         case ${build_option} in
173             *-*-*) ;;
174             *)
175                 echo "Unrecognized value for --build option: ${build_option}"
176                 echo "Should be: <cpu>-<vendor>-<os>"
177                 echo "See:"
178                 echo "  $0 --help"
179                 echo ""
180                 exit 1
181         esac
182         build_cpu=${build_option%%-*}
183         build_option=${build_option#*-}
184         build_vendor=${build_option%%-*}
185         build_os=${build_option#*-}
186     elif [ "${option%%=*}" = '--host' ] ; then
187         host_option="${option#*=}"
188         case ${host_option} in
189             *-*-*) ;;
190             *)
191                 echo "Unrecognized value for --host option: ${host_option}"
192                 echo "Should be: <cpu>-<vendor>-<os>"
193                 echo "See:"
194                 echo "  $0 --help"
195                 echo ""
196                 exit 1
197         esac
198         host_cpu=${host_option%%-*}
199         host_option=${host_option#*-}
200         host_vendor=${host_option%%-*}
201         host_os=${host_option#*-}
202     elif [ "${option%%=*}" = '--infodir' ] ; then
203         true
204     elif [ "${option%%=*}" = '--datadir' ] ; then
205         true
206     elif [ "${option%%=*}" = '--localstatedir' ] ; then
207         true
208     elif [ "${option%%=*}" = '--libexecdir' ] ; then
209         true
210     elif [ "${option}" = '--disable-maintainer-mode' ] ; then
211         true
212     elif [ "${option}" = '--disable-dependency-tracking' ] ; then
213         true
214     else
215         echo "Unrecognized option: ${option}"
216         echo "See:"
217         echo "  $0 --help"
218         echo ""
219         exit 1
220     fi
221 done
222
223 # We set this value early, (rather than just while printing the
224 # Makefile.config file later like most values), because we need to
225 # actually investigate this value compared to the ldconfig_paths value
226 # below.
227 libdir_expanded=${LIBDIR:-${PREFIX}/lib}
228
229 cat <<EOF
230 Welcome to Notmuch, a system for indexing, searching and tagging your email.
231
232 We hope that the process of building and installing notmuch is quick
233 and smooth so that you can soon be reading and processing your email
234 more efficiently than ever.
235
236 If anything goes wrong in the configure process, you can override any
237 decisions it makes by manually editing the Makefile.config file that
238 it creates. Also please do as much as you can to figure out what could
239 be different on your machine compared to those of the notmuch
240 developers. Then, please email those details to the Notmuch list
241 (notmuch@notmuchmail.org) so that we can hopefully make future
242 versions of notmuch easier for you to use.
243
244 We'll now investigate your system to verify that all required
245 dependencies are available:
246
247 EOF
248
249 errors=0
250
251 if pkg-config --version > /dev/null 2>&1; then
252     have_pkg_config=1
253 else
254     have_pkg_config=0
255 fi
256
257 printf "Checking for Xapian development files... "
258 have_xapian=0
259 for xapian_config in ${XAPIAN_CONFIG}; do
260     if ${xapian_config} --version > /dev/null 2>&1; then
261         printf "Yes (%s).\n" $(${xapian_config} --version | sed -e 's/.* //')
262         have_xapian=1
263         xapian_cxxflags=$(${xapian_config} --cxxflags)
264         xapian_ldflags=$(${xapian_config} --libs)
265         break
266     fi
267 done
268 if [ ${have_xapian} = "0" ]; then
269     printf "No.\n"
270     errors=$((errors + 1))
271 fi
272
273 printf "Checking for GMime development files... "
274 have_gmime=0
275 for gmimepc in gmime-2.6 gmime-2.4; do
276     if pkg-config --exists $gmimepc; then
277         printf "Yes ($gmimepc).\n"
278         have_gmime=1
279         gmime_cflags=$(pkg-config --cflags $gmimepc)
280         gmime_ldflags=$(pkg-config --libs $gmimepc)
281     fi
282 done
283 if [ "$have_gmime" = "0" ]; then
284     printf "No.\n"
285     errors=$((errors + 1))
286 fi
287
288 # GMime already depends on Glib >= 2.12, but we use at least one Glib
289 # function that only exists as of 2.14, (g_hash_table_get_keys)
290 printf "Checking for Glib development files (>= 2.14)... "
291 have_glib=0
292 if pkg-config --exists 'glib-2.0 >= 2.14'; then
293     printf "Yes.\n"
294     have_glib=1
295     glib_cflags=$(pkg-config --cflags glib-2.0)
296     glib_ldflags=$(pkg-config --libs glib-2.0)
297 else
298     printf "No.\n"
299     errors=$((errors + 1))
300 fi
301
302 printf "Checking for talloc development files... "
303 if pkg-config --exists talloc; then
304     printf "Yes.\n"
305     have_talloc=1
306     talloc_cflags=$(pkg-config --cflags talloc)
307     talloc_ldflags=$(pkg-config --libs talloc)
308 else
309     printf "No.\n"
310     have_talloc=0
311     talloc_cflags=
312     errors=$((errors + 1))
313 fi
314
315 printf "Checking for valgrind development files... "
316 if pkg-config --exists valgrind; then
317     printf "Yes.\n"
318     have_valgrind=1
319     valgrind_cflags=$(pkg-config --cflags valgrind)
320 else
321     printf "No (but that's fine).\n"
322     have_valgrind=0
323 fi
324
325 if [ -z "${EMACSLISPDIR}" ]; then
326     if pkg-config --exists emacs; then
327         EMACSLISPDIR=$(pkg-config emacs --variable sitepkglispdir)
328     else
329         EMACSLISPDIR='$(prefix)/share/emacs/site-lisp'
330     fi
331 fi
332
333 printf "Checking if emacs is available... "
334 if emacs --quick --batch > /dev/null 2>&1; then
335     printf "Yes.\n"
336     have_emacs=1
337 else
338     printf "No (so will not byte-compile emacs code)\n"
339     have_emacs=0
340 fi
341
342 libdir_in_ldconfig=0
343
344 printf "Checking which platform we are on... "
345 uname=`uname`
346 if [ $uname = "Darwin" ] ; then
347     printf "Mac OS X.\n"
348     platform=MACOSX
349     linker_resolves_library_dependencies=0
350 elif [ $uname = "SunOS" ] ; then
351     printf "Solaris.\n"
352     platform=SOLARIS
353     linker_resolves_library_dependencies=0
354 elif [ $uname = "Linux" ] ; then
355     printf "Linux\n"
356     platform=LINUX
357     linker_resolves_library_dependencies=1
358
359     printf "Checking for $libdir_expanded in ldconfig... "
360     ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p')
361     # Separate ldconfig_paths only on newline (not on any potential
362     # embedded space characters in any filenames). Note, we use a
363     # literal newline in the source here rather than something like:
364     #
365     #   IFS=$(printf '\n')
366     #
367     # because the shell's command substitution deletes any trailing newlines.
368     OLD_IFS=$IFS
369     IFS="
370 "
371     for path in $ldconfig_paths; do
372         if [ "$path" = "$libdir_expanded" ]; then
373             libdir_in_ldconfig=1
374         fi
375     done
376     IFS=$OLD_IFS
377     if [ "$libdir_in_ldconfig" = '0' ]; then
378         printf "No (will set RPATH)\n"
379     else
380         printf "Yes\n"
381     fi
382 else
383     printf "Unknown.\n"
384     cat <<EOF
385
386 *** Warning: Unknown platform. Notmuch might or might not build correctly.
387
388 EOF
389 fi
390
391 if [ $errors -gt 0 ]; then
392     cat <<EOF
393
394 *** Error: The dependencies of notmuch could not be satisfied. You will
395 need to install the following packages before being able to compile
396 notmuch:
397
398 EOF
399     if [ $have_xapian -eq 0 ]; then
400         echo "  Xapian library (including development files such as headers)"
401         echo "  http://xapian.org/"
402     fi
403     if [ $have_gmime -eq 0 ]; then
404         echo "  GMime 2.4 library (including development files such as headers)"
405         echo "  http://spruce.sourceforge.net/gmime/"
406     fi
407     if [ $have_glib -eq 0 ]; then
408         echo "  Glib library >= 2.14 (including development files such as headers)"
409         echo "  http://ftp.gnome.org/pub/gnome/sources/glib/"
410     fi
411     if [ $have_talloc -eq 0 ]; then
412         echo "  The talloc library (including development files such as headers)"
413         echo "  http://talloc.samba.org/"
414     fi
415     cat <<EOF
416
417 With any luck, you're using a modern, package-based operating system
418 that has all of these packages available in the distribution. In that
419 case a simple command will install everything you need. For example:
420
421 On Debian and similar systems:
422
423         sudo apt-get install libxapian-dev libgmime-2.4-dev libtalloc-dev
424
425 Or on Fedora and similar systems:
426
427         sudo yum install xapian-core-devel gmime-devel libtalloc-devel
428
429 On other systems, similar commands can be used, but the details of the
430 package names may be different.
431
432 EOF
433     if [ $have_pkg_config -eq 0 ]; then
434 cat <<EOF
435 Note: the pkg-config program is not available. This configure script
436 uses pkg-config to find the compilation flags required to link against
437 the various libraries needed by notmuch. It's possible you simply need
438 to install pkg-config with a command such as:
439
440         sudo apt-get install pkg-config
441 Or:
442         sudo yum install pkgconfig
443
444 But if pkg-config is not available for your system, then you will need
445 to modify the configure script to manually set the cflags and ldflags
446 variables to the correct values to link against each library in each
447 case that pkg-config could not be used to determine those values.
448
449 EOF
450     fi
451 cat <<EOF
452 When you have installed the necessary dependencies, you can run
453 configure again to ensure the packages can be found, or simply run
454 "make" to compile notmuch.
455
456 EOF
457     exit 1
458 fi
459
460 printf "Checking for getline... "
461 if ${CC} -o compat/have_getline "$srcdir"/compat/have_getline.c > /dev/null 2>&1
462 then
463     printf "Yes.\n"
464     have_getline=1
465 else
466     printf "No (will use our own instead).\n"
467     have_getline=0
468 fi
469 rm -f compat/have_getline
470
471 printf "Checking for strcasestr... "
472 if ${CC} -o compat/have_strcasestr "$srcdir"/compat/have_strcasestr.c > /dev/null 2>&1
473 then
474     printf "Yes.\n"
475     have_strcasestr=1
476 else
477     printf "No (will use our own instead).\n"
478     have_strcasestr=0
479 fi
480 rm -f compat/have_strcasestr
481
482 printf "int main(void){return 0;}\n" > minimal.c
483
484 printf "Checking for rpath support... "
485 if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
486 then
487     printf "Yes.\n"
488     rpath_ldflags="-Wl,--enable-new-dtags -Wl,-rpath,\$(libdir)"
489 else
490     printf "No (nothing to worry about).\n"
491     rpath_ldflags=""
492 fi
493
494 printf "Checking for -Wl,--as-needed... "
495 if ${CC} -Wl,--as-needed -o minimal minimal.c >/dev/null 2>&1
496 then
497     printf "Yes.\n"
498     as_needed_ldflags="-Wl,--as-needed"
499 else
500     printf "No (nothing to worry about).\n"
501     as_needed_ldflags=""
502 fi
503
504 WARN_CXXFLAGS=""
505 printf "Checking for available C++ compiler warning flags... "
506 for flag in -Wall -Wextra -Wwrite-strings -Wswitch-enum; do
507     if ${CC} $flag -o minimal minimal.c > /dev/null 2>&1
508     then
509         WARN_CXXFLAGS="${WARN_CXXFLAGS}${WARN_CXXFLAGS:+ }${flag}"
510     fi
511 done
512 printf "\n\t${WARN_CXXFLAGS}\n"
513
514 WARN_CFLAGS="${WARN_CXXFLAGS}"
515 printf "Checking for available C compiler warning flags... "
516 for flag in -Wmissing-declarations; do
517     if ${CC} $flag -o minimal minimal.c > /dev/null 2>&1
518     then
519         WARN_CFLAGS="${WARN_CFLAGS}${WARN_CFLAGS:+ }${flag}"
520     fi
521 done
522 printf "\n\t${WARN_CFLAGS}\n"
523
524 rm -f minimal minimal.c
525         
526 cat <<EOF
527
528 All required packages were found. You may now run the following
529 commands to compile and install notmuch:
530
531         make
532         sudo make install
533
534 EOF
535
536 # construct the Makefile.config
537 cat > Makefile.config <<EOF
538 # This Makefile.config was automatically generated by the ./configure
539 # script of notmuch. If the configure script identified anything
540 # incorrectly, then you can edit this file to try to correct things,
541 # but be warned that if configure is run again it will destroy your
542 # changes, (and this could happen by simply calling "make" if the
543 # configure script is updated).
544
545 # The top-level directory for the source, (the directory containing
546 # the configure script). This may be different than the build
547 # directory (the current directory at the time configure was run).
548 srcdir = ${srcdir}
549
550 configure_options = $@
551
552 # We use vpath directives (rather than the VPATH variable) since the
553 # VPATH variable matches targets as well as prerequisites, (which is
554 # not useful since then a target left-over from a srcdir build would
555 # cause a target to not be built in the non-srcdir build).
556 #
557 # Also, we don't use a single "vpath % \$(srcdir)" here because we
558 # don't want the vpath to trigger for our emacs lisp compilation,
559 # (unless we first find a way to convince emacs to build the .elc
560 # target in a directory other than the directory of the .el
561 # prerequisite). In the meantime, we're actually copying in the .el
562 # files, (which is quite ugly).
563 vpath %.c \$(srcdir)
564 vpath %.cc \$(srcdir)
565 vpath %.1 \$(srcdir)
566 vpath Makefile.% \$(srcdir)
567
568 # The C compiler to use
569 CC = ${CC}
570
571 # The C++ compiler to use
572 CXX = ${CXX}
573
574 # Command to execute emacs from Makefiles
575 EMACS = emacs --quick
576
577 # Default FLAGS for C compiler (can be overridden by user such as "make CFLAGS=-g")
578 CFLAGS = ${CFLAGS}
579
580 # Default FLAGS for C++ compiler (can be overridden by user such as "make CXXFLAGS=-g")
581 CXXFLAGS = ${CXXFLAGS}
582
583 # Default FLAGS for the linker (can be overridden by user such as "make LDFLAGS=-znow")
584 LDFLAGS = ${LDFLAGS}
585
586 # Flags to enable warnings when using the C++ compiler
587 WARN_CXXFLAGS=${WARN_CXXFLAGS}
588
589 # Flags to enable warnings when using the C compiler
590 WARN_CFLAGS=${WARN_CFLAGS}
591
592 # The prefix to which notmuch should be installed
593 # Note: If you change this value here, be sure to ensure that the
594 # LIBDIR_IN_LDCONFIG value below is still set correctly.
595 prefix = ${PREFIX}
596
597 # The directory to which libraries should be installed
598 # Note: If you change this value here, be sure to ensure that the
599 # LIBDIR_IN_LDCONFIG value below is still set correctly.
600 libdir = ${LIBDIR:=\$(prefix)/lib}
601
602 # Whether libdir is in a path configured into ldconfig
603 LIBDIR_IN_LDCONFIG = ${libdir_in_ldconfig}
604
605 # The directory to which header files should be installed
606 includedir = ${INCLUDEDIR:=\$(prefix)/include}
607
608 # The directory to which man pages should be installed
609 mandir = ${MANDIR:=\$(prefix)/share/man}
610
611 # The directory to which read-only (configuration) files should be installed
612 sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc}
613
614 # The directory to which emacs lisp files should be installed
615 emacslispdir=${EMACSLISPDIR}
616
617 # Whether there's an emacs binary available for byte-compiling
618 HAVE_EMACS = ${have_emacs}
619
620 # The directory to which desktop files should be installed
621 desktop_dir = \$(prefix)/share/applications
622
623 # The directory to which bash completions files should be installed
624 bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(sysconfdir)/bash_completion.d}
625
626 # The directory to which zsh completions files should be installed
627 zsh_completion_dir = ${ZSHCOMLETIONDIR:=\$(prefix)/share/zsh/functions/Completion/Unix}
628
629 # Whether the getline function is available (if not, then notmuch will
630 # build its own version)
631 HAVE_GETLINE = ${have_getline}
632
633 # Whether the strcasestr function is available (if not, then notmuch will
634 # build its own version)
635 HAVE_STRCASESTR = ${have_strcasestr}
636
637 # Supported platforms (so far) are: LINUX, MACOSX, SOLARIS
638 PLATFORM = ${platform}
639
640 # Whether the linker will automatically resolve the dependency of one
641 # library on another (if not, then linking a binary requires linking
642 # directly against both)
643 LINKER_RESOLVES_LIBRARY_DEPENDENCIES = ${linker_resolves_library_dependencies}
644
645 # Flags needed to compile and link against Xapian
646 XAPIAN_CXXFLAGS = ${xapian_cxxflags}
647 XAPIAN_LDFLAGS = ${xapian_ldflags}
648
649 # Flags needed to compile and link against GMime-2.4
650 GMIME_CFLAGS = ${gmime_cflags}
651 GMIME_LDFLAGS = ${gmime_ldflags}
652
653 # Flags needed to compile and link against talloc
654 TALLOC_CFLAGS = ${talloc_cflags}
655 TALLOC_LDFLAGS = ${talloc_ldflags}
656
657 # Flags needed to have linker set rpath attribute
658 RPATH_LDFLAGS = ${rpath_ldflags}
659
660 # Flags needed to have linker link only to necessary libraries
661 AS_NEEDED_LDFLAGS = ${as_needed_ldflags}
662
663 # Whether valgrind header files are available
664 HAVE_VALGRIND = ${have_valgrind}
665
666 # And if so, flags needed at compile time for valgrind macros
667 VALGRIND_CFLAGS = ${valgrind_cflags}
668
669 # Support for emacs
670 WITH_EMACS = ${WITH_EMACS}
671
672 # Support for bash completion
673 WITH_BASH = ${WITH_BASH}
674
675 # Support for zsh completion
676 WITH_ZSH = ${WITH_ZSH}
677
678 # Combined flags for compiling and linking against all of the above
679 CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)      \\
680                    \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND)   \\
681                    \$(VALGRIND_CFLAGS) -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR)
682 CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\
683                      \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
684                      \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS)             \\
685                      -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR)
686 CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)
687 EOF