X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=a79f6bd5e2efb531a519b27ebbad75c622db7c09;hp=d1bcc20eb6c2c56513075d097b51381009f6ea96;hb=7edba1d17d45a3f8bdc25ca22efeaf309bc87da6;hpb=765556c1f159ae0a29137c935c7cbf4106569e7e diff --git a/configure b/configure index d1bcc20e..a79f6bd5 100755 --- a/configure +++ b/configure @@ -71,16 +71,6 @@ WITH_BASH=1 WITH_RUBY=1 WITH_ZSH=1 -# Compatible GMime versions (with constraints). -# If using GMime 2.6, 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_24_VERSION_CTR='' -GMIME_24_VERSION="gmime-2.4 $GMIME_24_VERSION_CTR" -GMIME_26_VERSION_CTR='>= 2.6.7' -GMIME_26_VERSION="gmime-2.6 $GMIME_26_VERSION_CTR" - -WITH_GMIME_VERSIONS="$GMIME_26_VERSION;$GMIME_24_VERSION" - usage () { cat < _libversion.c < #include "lib/notmuch.h" @@ -341,7 +321,7 @@ EOF if ${CC} ${CFLAGS} _libversion.c -o _libversion > /dev/null 2>&1 && \ ./_libversion > _libversion.sh && . ./_libversion.sh then - printf "OK" + printf "OK.\n" else cat <= 2.6.5 to avoid a crypto bug. We need +# 2.6.7 for permissive "From " header handling. +GMIME_MINVER=2.6.7 + printf "Checking for GMime development files... " -have_gmime=0 -IFS=';' -for gmimepc in $WITH_GMIME_VERSIONS; do - if pkg-config --exists $gmimepc; then - printf "Yes ($gmimepc).\n" - have_gmime=1 - gmime_cflags=$(pkg-config --cflags $gmimepc) - gmime_ldflags=$(pkg-config --libs $gmimepc) - break - fi -done -IFS=$DEFAULT_IFS -if [ "$have_gmime" = "0" ]; then +if pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then + printf "Yes.\n" + have_gmime=1 + gmime_cflags=$(pkg-config --cflags gmime-2.6) + gmime_ldflags=$(pkg-config --libs gmime-2.6) +else + have_gmime=0 printf "No.\n" errors=$((errors + 1)) fi @@ -493,19 +472,11 @@ else fi if [ -z "${EMACSLISPDIR}" ]; then - if pkg-config --exists emacs; then - EMACSLISPDIR=$(pkg-config emacs --variable sitepkglispdir) - else - EMACSLISPDIR='$(prefix)/share/emacs/site-lisp' - fi + EMACSLISPDIR='$(prefix)/share/emacs/site-lisp' fi if [ -z "${EMACSETCDIR}" ]; then - if pkg-config --exists emacs; then - EMACSETCDIR=$(pkg-config emacs --variable sitepkglispdir) - else - EMACSETCDIR='$(prefix)/share/emacs/site-lisp' - fi + EMACSETCDIR='$(prefix)/share/emacs/site-lisp' fi printf "Checking if emacs is available... " @@ -640,7 +611,7 @@ EOF echo fi if [ $have_gmime -eq 0 ]; then - echo " Either GMime 2.4 library" $GMIME_24_VERSION_CTR "or GMime 2.6 library" $GMIME_26_VERSION_CTR + echo " GMime 2.6 library >= $GMIME_MINVER" echo " (including development files such as headers)" echo " http://spruce.sourceforge.net/gmime/" echo @@ -998,6 +969,10 @@ HAVE_STRCASESTR = ${have_strcasestr} # build its own version) HAVE_STRSEP = ${have_strsep} +# Whether the timegm function is available (if not, then notmuch will +# build its own version) +HAVE_TIMEGM = ${have_timegm} + # Whether struct dirent has d_type (if not, then notmuch will use stat) HAVE_D_TYPE = ${have_d_type} @@ -1026,7 +1001,7 @@ LINKER_RESOLVES_LIBRARY_DEPENDENCIES = ${linker_resolves_library_dependencies} XAPIAN_CXXFLAGS = ${xapian_cxxflags} XAPIAN_LDFLAGS = ${xapian_ldflags} -# Flags needed to compile and link against GMime-2.4 +# Flags needed to compile and link against GMime GMIME_CFLAGS = ${gmime_cflags} GMIME_LDFLAGS = ${gmime_ldflags} @@ -1070,6 +1045,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ \$(VALGRIND_CFLAGS) \\ -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\ -DHAVE_STRSEP=\$(HAVE_STRSEP) \\ + -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\ -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\ -DSTD_GETPWUID=\$(STD_GETPWUID) \\ -DSTD_ASCTIME=\$(STD_ASCTIME) \\ @@ -1083,6 +1059,7 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\ -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\ -DHAVE_STRSEP=\$(HAVE_STRSEP) \\ + -DHAVE_TIMEGM=\$(HAVE_TIMEGM) \\ -DHAVE_D_TYPE=\$(HAVE_D_TYPE) \\ -DSTD_GETPWUID=\$(STD_GETPWUID) \\ -DSTD_ASCTIME=\$(STD_ASCTIME) \\