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