X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=a6f5dfa2ca2b894da29ff4bd93ef96a3266587ab;hp=ab7e1610a0c58c83f942bb5754c14b2657384657;hb=87eb477ba546c47083f678bb7fa3d433cb591090;hpb=045f0e455ac94e2393d0d729c9bbdf3459a4860f diff --git a/configure b/configure index ab7e1610..a6f5dfa2 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} @@ -557,6 +559,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 +623,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 @@ -1081,6 +1103,14 @@ 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} @@ -1262,6 +1292,14 @@ 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}