X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=c0a550c7f9fd74402ab42974075ddd40ac88cc47;hp=6c782e16d5a63a746e3b49691bcc398fcb7f63cd;hb=5fb0f5f113e7cb7422fb44bb7abcba2bcadfc0c8;hpb=c0c5645538d9dda84657602ee4189f4ff3ca1aeb diff --git a/configure b/configure index 6c782e16..c0a550c7 100755 --- a/configure +++ b/configure @@ -143,7 +143,7 @@ Fine tuning of some installation directories is available: --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] - --bashcompletiondir=DIR Bash completions files [SYSCONFDIR/bash_completion.d] + --bashcompletiondir=DIR Bash completions files [PREFIX/share/bash-completion/completions] --zshcompletiondir=DIR Zsh completions files [PREFIX/share/zsh/functions/Completion/Unix] Some features can be disabled (--with-feature=no is equivalent to @@ -322,22 +322,29 @@ errors=0 printf "int main(void){return 0;}\n" > minimal.c printf "Sanity checking C compilation environment... " -if ${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1 +test_cmdline="${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal" +if ${test_cmdline} > /dev/null 2>&1 then printf "OK.\n" else printf "Fail.\n" errors=$((errors + 1)) + printf Executed:; printf ' %s' ${test_cmdline}; echo + ${test_cmdline} fi printf "Sanity checking C++ compilation environment... " -if ${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1 +test_cmdline="${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal" +if ${test_cmdline} > /dev/null 2>&1 then printf "OK.\n" else printf "Fail.\n" errors=$((errors + 1)) + printf Executed:; printf ' %s' ${test_cmdline}; echo + ${test_cmdline} fi +unset test_cmdline if [ $errors -gt 0 ]; then cat <= $GMIME_MINVER"; then - printf "Yes.\n" +if pkg-config --exists "gmime-3.0"; then + printf "Yes (3.0).\n" + have_gmime=1 + gmime_cflags=$(pkg-config --cflags gmime-3.0) + gmime_ldflags=$(pkg-config --libs gmime-3.0) + gmime_major=3 +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 else have_gmime=0 printf "No.\n" @@ -632,6 +646,15 @@ if [ $WITH_DESKTOP = "1" ]; then fi fi +printf "Checking for cppcheck... " +if command -v cppcheck > /dev/null; then + have_cppcheck=1 + printf "Yes.\n" +else + have_cppcheck=0 + printf "No.\n" +fi + libdir_in_ldconfig=0 printf "Checking which platform we are on... " @@ -1042,7 +1065,7 @@ HAVE_DOXYGEN=${have_doxygen} desktop_dir = \$(prefix)/share/applications # The directory to which bash completions files should be installed -bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(sysconfdir)/bash_completion.d} +bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(prefix)/share/bash-completion/completions} # The directory to which zsh completions files should be installed zsh_completion_dir = ${ZSHCOMLETIONDIR:=\$(prefix)/share/zsh/functions/Completion/Unix} @@ -1051,6 +1074,9 @@ zsh_completion_dir = ${ZSHCOMLETIONDIR:=\$(prefix)/share/zsh/functions/Completio # build its own version) HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name} +# Whether the cppcheck static checker is available +HAVE_CPPCHECK = ${have_cppcheck} + # Whether the getline function is available (if not, then notmuch will # build its own version) HAVE_GETLINE = ${have_getline} @@ -1199,6 +1225,12 @@ NOTMUCH_PYTHON=${python} # Are the ruby development files (and ruby) available? If not skip # 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 # Finally, after everything configured, inform the user how to continue.