# Set several defaults (optionally specified by the user in
# environment variables)
-BASH=${BASH:-bash}
+BASHCMD=${BASHCMD:-bash}
PERL=${PERL:-perl}
CC=${CC:-cc}
CXX=${CXX:-c++}
WITH_EMACS=1
WITH_DESKTOP=1
WITH_BASH=1
+WITH_RPATH=1
WITH_RUBY=1
WITH_ZSH=1
WITH_RETRY_LOCK=1
fi
elif [ "${option}" = '--without-bash-completion' ] ; then
WITH_BASH=0
+ elif [ "${option%%=*}" = '--with-rpath' ]; then
+ if [ "${option#*=}" = 'no' ]; then
+ WITH_RPATH=0
+ else
+ WITH_RPATH=1
+ fi
+ elif [ "${option}" = '--without-rpath' ] ; then
+ WITH_RPATH=0
elif [ "${option%%=*}" = '--with-ruby' ]; then
if [ "${option#*=}" = 'no' ]; then
WITH_RUBY=0
rm -rf test.db _default_backend _default_backend.cc
fi
-# we need to have a version >= 2.6.5 to avoid a crypto bug. We need
-# 2.6.7 for permissive "From " header handling.
-GMIME_MINVER=2.6.7
-GMIME3_MINVER=3.0.3
+GMIME_MINVER=3.0.3
printf "Checking for GMime development files... "
-if pkg-config --exists "gmime-3.0 > $GMIME3_MINVER"; then
- printf "Yes (3.0).\n"
+if pkg-config --exists "gmime-3.0 > $GMIME_MINVER"; then
+ printf "Yes.\n"
have_gmime=1
gmime_cflags=$(pkg-config --cflags gmime-3.0)
gmime_ldflags=$(pkg-config --libs gmime-3.0)
gmime_major=3
- have_gmime_session_keys=1
-elif pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
- printf "Yes (2.6).\n"
- have_gmime=1
- gmime_cflags=$(pkg-config --cflags gmime-2.6)
- gmime_ldflags=$(pkg-config --libs gmime-2.6)
- gmime_major=2
- if pkg-config --exists "gmime-2.6 >= 2.6.21"; then
- have_gmime_session_keys=1
- else
- have_gmime_session_keys=0
- fi
else
have_gmime=0
- have_gmime_session_keys=0
printf "No.\n"
errors=$((errors + 1))
fi
fi
printf "Checking for bash... "
-if command -v ${BASH} > /dev/null; then
+if command -v ${BASHCMD} > /dev/null; then
have_bash=1
- bash_absolute=$(command -v ${BASH})
+ bash_absolute=$(command -v ${BASHCMD})
printf "Yes (%s).\n" "$bash_absolute"
else
have_bash=0
- printf "No. (%s not found)\n" "${BASH}"
+ printf "No. (%s not found)\n" "${BASHCMD}"
fi
printf "Checking for perl... "
echo
fi
if [ $have_gmime -eq 0 ]; then
- echo " GMime 2.6 library >= $GMIME_MINVER"
+ echo " GMime library >= $GMIME_MINVER"
echo " (including development files such as headers)"
echo " https://github.com/jstedfast/gmime/"
echo
On Debian and similar systems:
- sudo apt-get install libxapian-dev libgmime-2.6-dev libtalloc-dev zlib1g-dev
+ sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev zlib1g-dev
Or on Fedora and similar systems:
rm -f compat/check_asctime
printf "Checking for rpath support... "
-if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
+if [ $WITH_RPATH = "1" ] && ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
then
printf "Yes.\n"
rpath_ldflags="-Wl,--enable-new-dtags -Wl,-rpath,\$(libdir)"
# Whether struct dirent has d_type (if not, then notmuch will use stat)
HAVE_D_TYPE = ${have_d_type}
-# Whether the GMime version can handle extraction and reuse of session keys
-HAVE_GMIME_SESSION_KEYS = ${have_gmime_session_keys}
-
# Whether the Xapian version in use supports compaction
HAVE_XAPIAN_COMPACT = ${have_xapian_compact}
-DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\
-DSTD_GETPWUID=\$(STD_GETPWUID) \\
-DSTD_ASCTIME=\$(STD_ASCTIME) \\
- -DHAVE_GMIME_SESSION_KEYS=\$(HAVE_GMIME_SESSION_KEYS) \\
-DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\
-DSILENCE_XAPIAN_DEPRECATION_WARNINGS \\
-DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\
# Whether the Xapian version in use supports lock retry
NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK=${have_xapian_db_retry_lock}
-# Whether the GMime version can handle extraction and reuse of session keys
-NOTMUCH_HAVE_GMIME_SESSION_KEYS=${have_gmime_session_keys}
-
# Which backend will Xapian use by default?
NOTMUCH_DEFAULT_XAPIAN_BACKEND=${default_xapian_backend}