X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=5e7e5aa9478e8ee2c844f727dce17dfd3b3d1a64;hp=20961763ff36c33cc8a4d5022d32e76405e95336;hb=9fbc5cb578c60762ab9c2a24a14d4d07de516790;hpb=aab395b2d4edb41d0670c3c838c309df30d95d63 diff --git a/configure b/configure index 20961763..5e7e5aa9 100755 --- a/configure +++ b/configure @@ -53,7 +53,8 @@ fi # Set several defaults (optionally specified by the user in # environment variables) -BASH=${BASH:-bash} +BASHCMD=${BASHCMD:-bash} +PERL=${PERL:-perl} CC=${CC:-cc} CXX=${CXX:-c++} CFLAGS=${CFLAGS:--g -O2} @@ -81,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 @@ -240,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 @@ -559,13 +569,23 @@ else fi printf "Checking for bash... " -if command -v ${BASH} > /dev/null; then +if command -v ${BASHCMD} > /dev/null; then have_bash=1 - bash_absolute=$(command -v ${BASH}) + bash_absolute=$(command -v ${BASHCMD}) printf "Yes (%s).\n" "$bash_absolute" else have_bash=0 - printf "No. (%s not found)\n" "${BASH}" + 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... " @@ -612,8 +632,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 @@ -917,7 +937,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)" @@ -1096,6 +1116,10 @@ emacsetcdir=${EMACSETCDIR} 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} @@ -1281,6 +1305,10 @@ NOTMUCH_HAVE_MAN=$((have_sphinx)) 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}