X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=9140026a71f0873e78be32b1c27eee699e66180f;hp=cbb3b7cc4245f1d81979ebb1b1b1fd3fff716a9e;hb=6682b4e686b7972883626c9b0f941ae4bf02dedb;hpb=b2e4778ea4a704e4a86ae41d680a9ec886e66cfa diff --git a/configure b/configure index cbb3b7cc..9140026a 100755 --- a/configure +++ b/configure @@ -53,6 +53,8 @@ fi # Set several defaults (optionally specified by the user in # environment variables) +BASHCMD=${BASHCMD:-bash} +PERL=${PERL:-perl} CC=${CC:-cc} CXX=${CXX:-c++} CFLAGS=${CFLAGS:--g -O2} @@ -80,6 +82,7 @@ WITH_API_DOCS=1 WITH_EMACS=1 WITH_DESKTOP=1 WITH_BASH=1 +WITH_RPATH=1 WITH_RUBY=1 WITH_ZSH=1 WITH_RETRY_LOCK=1 @@ -139,6 +142,7 @@ Fine tuning of some installation directories is available: --libdir=DIR Install libraries to DIR [PREFIX/lib] --includedir=DIR Install header files to DIR [PREFIX/include] --mandir=DIR Install man pages to DIR [PREFIX/share/man] + --infodir=DIR Install man pages to DIR [PREFIX/share/man] --sysconfdir=DIR Read-only single-machine data [PREFIX/etc] --emacslispdir=DIR Emacs code [PREFIX/share/emacs/site-lisp] --emacsetcdir=DIR Emacs miscellaneous files [PREFIX/share/emacs/site-lisp] @@ -162,7 +166,6 @@ configure-script calling conventions, but don't do anything yet: --build=-- Currently ignored --host=-- Currently ignored - --infodir=DIR Currently ignored --datadir=DIR Currently ignored --localstatedir=DIR Currently ignored --libexecdir=DIR Currently ignored @@ -185,6 +188,8 @@ for option; do INCLUDEDIR="${option#*=}" elif [ "${option%%=*}" = '--mandir' ] ; then MANDIR="${option#*=}" + elif [ "${option%%=*}" = '--infodir' ] ; then + INFODIR="${option#*=}" elif [ "${option%%=*}" = '--sysconfdir' ] ; then SYSCONFDIR="${option#*=}" elif [ "${option%%=*}" = '--emacslispdir' ] ; then @@ -237,6 +242,14 @@ for option; do 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 @@ -265,8 +278,6 @@ for option; do true elif [ "${option%%=*}" = '--host' ] ; then true - elif [ "${option%%=*}" = '--infodir' ] ; then - true elif [ "${option%%=*}" = '--datadir' ] ; then true elif [ "${option%%=*}" = '--localstatedir' ] ; then @@ -478,33 +489,16 @@ EOF 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 @@ -557,6 +551,26 @@ else errors=$((errors + 1)) fi +printf "Checking for bash... " +if command -v ${BASHCMD} > /dev/null; then + have_bash=1 + bash_absolute=$(command -v ${BASHCMD}) + printf "Yes (%s).\n" "$bash_absolute" +else + have_bash=0 + printf "No. (%s not found)\n" "${BASHCMD}" +fi + +printf "Checking for perl... " +if command -v ${PERL} > /dev/null; then + have_perl=1 + perl_absolute=$(command -v ${PERL}) + printf "Yes (%s).\n" "$perl_absolute" +else + have_perl=0 + printf "No. (%s not found)\n" "${PERL}" +fi + printf "Checking for python... " have_python=0 @@ -601,8 +615,8 @@ if [ -z "${EMACSETCDIR-}" ]; then EMACSETCDIR="\$(prefix)/share/emacs/site-lisp" fi -printf "Checking if emacs is available... " -if emacs --quick --batch > /dev/null 2>&1; then +printf "Checking if emacs (>= 24) is available... " +if emacs --quick --batch --eval '(if (< emacs-major-version 24) (kill-emacs 1))' > /dev/null 2>&1; then printf "Yes.\n" have_emacs=1 else @@ -633,6 +647,8 @@ if [ $WITH_RUBY = "1" ] ; then fi have_sphinx=0 +have_makeinfo=0 +have_install_info=0 if [ $WITH_DOCS = "1" ] ; then printf "Checking if sphinx is available and supports nroff output... " if command -v sphinx-build > /dev/null && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then @@ -641,6 +657,20 @@ if [ $WITH_DOCS = "1" ] ; then else printf "No (so will not install man pages).\n" fi + printf "Checking if makeinfo is available... " + if command -v makeinfo > /dev/null; then + printf "Yes.\n" + have_makeinfo=1 + else + printf "No (so will not build info pages).\n" + fi + printf "Checking if install-info is available... " + if command -v install-info > /dev/null; then + printf "Yes.\n" + have_install_info=1 + else + printf "No (so will not install info pages).\n" + fi fi if [ $WITH_DESKTOP = "1" ]; then @@ -699,7 +729,7 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then IFS=" " for path in $ldconfig_paths; do - if [ "$path" = "$libdir_expanded" ]; then + if [ "$path" -ef "$libdir_expanded" ]; then libdir_in_ldconfig=1 fi done @@ -741,7 +771,7 @@ EOF 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 @@ -763,7 +793,7 @@ case a simple command will install everything you need. For example: 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: @@ -890,7 +920,7 @@ fi 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)" @@ -1052,6 +1082,9 @@ includedir = ${INCLUDEDIR:=\$(prefix)/include} # The directory to which man pages should be installed mandir = ${MANDIR:=\$(prefix)/share/man} +# The directory to which man pages should be installed +infodir = ${INFODIR:=\$(prefix)/share/info} + # The directory to which read-only (configuration) files should be installed sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc} @@ -1062,12 +1095,26 @@ emacslispdir=${EMACSLISPDIR} # be installed emacsetcdir=${EMACSETCDIR} +# Whether bash exists, and if so where +HAVE_BASH = ${have_bash} +BASH_ABSOLUTE = ${bash_absolute} + +# Whether perl exists, and if so where +HAVE_PERL = ${have_perl} +PERL_ABSOLUTE = ${perl_absolute} + # Whether there's an emacs binary available for byte-compiling HAVE_EMACS = ${have_emacs} # Whether there's a sphinx-build binary available for building documentation HAVE_SPHINX=${have_sphinx} +# Whether there's a makeinfo binary available for building info format documentation +HAVE_MAKEINFO=${have_makeinfo} + +# Whether there's an install-info binary available for installing info format documentation +HAVE_INSTALL_INFO=${have_install_info} + # Whether there's a doxygen binary available for building api documentation HAVE_DOXYGEN=${have_doxygen} @@ -1110,9 +1157,6 @@ HAVE_TIMEGM = ${have_timegm} # 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} @@ -1199,7 +1243,6 @@ COMMON_CONFIGURE_CFLAGS = \\ -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) \\ @@ -1228,15 +1271,20 @@ NOTMUCH_HAVE_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} # do we have man pages? NOTMUCH_HAVE_MAN=$((have_sphinx)) +# Whether bash exists, and if so where +NOTMUCH_HAVE_BASH=${have_bash} +NOTMUCH_BASH_ABSOLUTE=${bash_absolute} + +# Whether perl exists, and if so where +NOTMUCH_HAVE_PERL=${have_perl} +NOTMUCH_PERL_ABSOLUTE=${perl_absolute} + # Name of python interpreter NOTMUCH_PYTHON=${python} @@ -1247,9 +1295,6 @@ NOTMUCH_RUBY=${RUBY} # building/testing ruby bindings. NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev} -# Major version of gmime -NOTMUCH_GMIME_MAJOR=${gmime_major} - # Platform we are run on PLATFORM=${platform} EOF