X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=e16a9b761e7257551b39f7f60455e9d2d374afe4;hp=ae0a02709e2d611197b1a9903ede242d95897183;hb=b7763c94e23bbb7d27e995e7a721f31b2ba8cb13;hpb=92d8eae8f182e4eebc87d76f8d4f37e6c018883a diff --git a/configure b/configure index ae0a0270..e16a9b76 100755 --- a/configure +++ b/configure @@ -68,7 +68,9 @@ PYTHON=${PYTHON:-} PREFIX=/usr/local LIBDIR= WITH_DOCS=1 +WITH_API_DOCS=1 WITH_EMACS=1 +WITH_DESKTOP=1 WITH_BASH=1 WITH_RUBY=1 WITH_ZSH=1 @@ -137,8 +139,10 @@ Some features can be disabled (--with-feature=no is equivalent to --without-feature) : --without-bash-completion Do not install bash completions files - --without-docs Do not install documentation and man pages + --without-docs Do not install documentation + --without-api-docs Do not install API man page --without-emacs Do not install lisp file + --without-desktop Do not install desktop file --without-ruby Do not install ruby bindings --without-zsh-completion Do not install zsh completions files --without-retry-lock Do not use blocking xapian opens, even if available @@ -184,11 +188,21 @@ for option; do elif [ "${option%%=*}" = '--with-docs' ]; then if [ "${option#*=}" = 'no' ]; then WITH_DOCS=0 + WITH_API_DOCS=0 else WITH_DOCS=1 fi elif [ "${option}" = '--without-docs' ] ; then WITH_DOCS=0 + WITH_API_DOCS=0 + elif [ "${option%%=*}" = '--with-api-docs' ]; then + if [ "${option#*=}" = 'no' ]; then + WITH_API_DOCS=0 + else + WITH_API_DOCS=1 + fi + elif [ "${option}" = '--without-api-docs' ] ; then + WITH_API_DOCS=0 elif [ "${option%%=*}" = '--with-emacs' ]; then if [ "${option#*=}" = 'no' ]; then WITH_EMACS=0 @@ -197,6 +211,14 @@ for option; do fi elif [ "${option}" = '--without-emacs' ] ; then WITH_EMACS=0 + elif [ "${option%%=*}" = '--with-desktop' ]; then + if [ "${option#*=}" = 'no' ]; then + WITH_DESKTOP=0 + else + WITH_DESKTOP=1 + fi + elif [ "${option}" = '--without-desktop' ] ; then + WITH_DESKTOP=0 elif [ "${option%%=*}" = '--with-bash-completion' ]; then if [ "${option#*=}" = 'no' ]; then WITH_BASH=0 @@ -262,7 +284,7 @@ if [ -z "$LIBDIR" ] ; then libdir_expanded="${PREFIX}/lib" else # very non-general variable expansion - libdir_expanded=$(echo "$LIBDIR" | sed "s|\\${prefix}|${PREFIX}|g; s|\\$prefix/|${PREFIX}/|; s|//*|/|g") + libdir_expanded=$(printf %s "$LIBDIR" | sed "s|\${prefix}|${PREFIX}|; s|\$prefix\>|${PREFIX}|; s|//*|/|g") fi cat < /dev/null 2>&1 && + ${CC} -o compat/gen_zlib_pc "$srcdir"/compat/gen_zlib_pc.c >/dev/null 2>&1 && compat/gen_zlib_pc > compat/zlib.pc && PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat && export PKG_CONFIG_PATH @@ -557,7 +579,7 @@ else fi have_doxygen=0 -if [ $WITH_DOCS = "1" ] ; then +if [ $WITH_API_DOCS = "1" ] ; then printf "Checking if doxygen is available... " if command -v doxygen > /dev/null; then printf "Yes.\n" @@ -589,6 +611,16 @@ if [ $WITH_DOCS = "1" ] ; then fi fi +if [ $WITH_DESKTOP = "1" ]; then + printf "Checking if desktop-file-install is available... " + if command -v desktop-file-install > /dev/null; then + printf "Yes.\n" + else + printf "No (so will not install .desktop file).\n" + WITH_DESKTOP=0 + fi +fi + libdir_in_ldconfig=0 printf "Checking which platform we are on... " @@ -638,6 +670,8 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then fi else printf "Unknown.\n" + platform="$uname" + linker_resolves_library_dependencies=0 cat < _byteorder.c < -#include -uint32_t test = 0x34333231; -int main() { printf("%.4s\n", (const char*)&test); return 0; } -EOF -${CC} ${CFLAGS} _byteorder.c -o _byteorder > /dev/null 2>&1 -util_byte_order=$(./_byteorder) -echo $util_byte_order - -rm -f _byteorder _byteorder.c - if [ $errors -gt 0 ]; then cat <= version 1.2.6, including development files such as headers)" echo " https://xapian.org/" fi if [ $have_zlib -eq 0 ]; then @@ -977,9 +998,6 @@ prefix = ${PREFIX} # LIBDIR_IN_LDCONFIG value below is still set correctly. libdir = ${LIBDIR:=\$(prefix)/lib} -# byte order within a 32 bit word. 1234 = little, 4321 = big, 0 = guess -UTIL_BYTE_ORDER = ${util_byte_order} - # Whether libdir is in a path configured into ldconfig LIBDIR_IN_LDCONFIG = ${libdir_in_ldconfig} @@ -1108,6 +1126,9 @@ VALGRIND_CFLAGS = ${valgrind_cflags} # Support for emacs WITH_EMACS = ${WITH_EMACS} +# Support for desktop file +WITH_DESKTOP = ${WITH_DESKTOP} + # Support for bash completion WITH_BASH = ${WITH_BASH} @@ -1127,9 +1148,9 @@ COMMON_CONFIGURE_CFLAGS = \\ -DSTD_GETPWUID=\$(STD_GETPWUID) \\ -DSTD_ASCTIME=\$(STD_ASCTIME) \\ -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\ + -DSILENCE_XAPIAN_DEPRECATION_WARNINGS \\ -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\ - -DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK) \\ - -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) + -DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK) CONFIGURE_CFLAGS = \$(COMMON_CONFIGURE_CFLAGS)