X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=1e7b9f7a47e1a2efc40e6dc1d8f513bb0a73a672;hp=f7d37e5000a581cd8ea771592dcfdab19eea8411;hb=b23902a61158ecdbca2d9d96c6eaf509d6e3d205;hpb=7546fd9cf69775cc256bd9d2878b2426fe14248b diff --git a/configure b/configure index f7d37e50..1e7b9f7a 100755 --- a/configure +++ b/configure @@ -529,8 +529,10 @@ int main () { return 0; } EOF - if ${CC} ${CFLAGS} ${gmime_cflags} ${gmime_ldflags} _check_session_keys.c -o _check_session_keys \ - && TEMP_GPG=$(mktemp -d) \ + if ! TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX"); then + printf 'No.\nCould not make tempdir for testing session-key support.\n' + errors=$((errors + 1)) + elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \ && GNUPGHOME=${TEMP_GPG} gpg --batch --quiet --import < test/gnupg-secret-key.asc \ && SESSION_KEY=$(GNUPGHOME=${TEMP_GPG} ./_check_session_keys) \ && [ $SESSION_KEY = 9:0BACD64099D1468AB07C796F0C0AC4851948A658A15B34E803865E9FC635F2F5 ] @@ -552,9 +554,11 @@ EOF else printf 'You do not have the GPGME development libraries installed.\n' fi - rm -rf "$TEMP_GPG" errors=$((errors + 1)) fi + if [ -n "$TEMP_GPG" -a -d "$TEMP_GPG" ]; then + rm -rf "$TEMP_GPG" + fi else have_gmime=0 printf "No.\n" @@ -673,13 +677,14 @@ if [ -z "${EMACSETCDIR-}" ]; then EMACSETCDIR="\$(prefix)/share/emacs/site-lisp" fi -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 - printf "No (so will not byte-compile emacs code)\n" - have_emacs=0 +if [ $WITH_EMACS = "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" + else + printf "No (disabling emacs related parts of build)\n" + WITH_EMACS=0 + fi fi have_doxygen=0 @@ -1161,9 +1166,6 @@ BASH_ABSOLUTE = ${bash_absolute} 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}