configure: absolute path of bash

This can be used to set shebang lines during install.
This commit is contained in:
David Bremner 2018-09-16 14:08:04 -03:00
parent c846e15ffe
commit aab395b2d4

19
configure vendored
View file

@ -53,6 +53,7 @@ fi
# Set several defaults (optionally specified by the user in # Set several defaults (optionally specified by the user in
# environment variables) # environment variables)
BASH=${BASH:-bash}
CC=${CC:-cc} CC=${CC:-cc}
CXX=${CXX:-c++} CXX=${CXX:-c++}
CFLAGS=${CFLAGS:--g -O2} CFLAGS=${CFLAGS:--g -O2}
@ -557,6 +558,16 @@ else
errors=$((errors + 1)) errors=$((errors + 1))
fi fi
printf "Checking for bash... "
if command -v ${BASH} > /dev/null; then
have_bash=1
bash_absolute=$(command -v ${BASH})
printf "Yes (%s).\n" "$bash_absolute"
else
have_bash=0
printf "No. (%s not found)\n" "${BASH}"
fi
printf "Checking for python... " printf "Checking for python... "
have_python=0 have_python=0
@ -1081,6 +1092,10 @@ emacslispdir=${EMACSLISPDIR}
# be installed # be installed
emacsetcdir=${EMACSETCDIR} emacsetcdir=${EMACSETCDIR}
# Whether bash exists, and if so where
HAVE_BASH = ${have_bash}
BASH_ABSOLUTE = ${bash_absolute}
# Whether there's an emacs binary available for byte-compiling # Whether there's an emacs binary available for byte-compiling
HAVE_EMACS = ${have_emacs} HAVE_EMACS = ${have_emacs}
@ -1262,6 +1277,10 @@ NOTMUCH_DEFAULT_XAPIAN_BACKEND=${default_xapian_backend}
# do we have man pages? # do we have man pages?
NOTMUCH_HAVE_MAN=$((have_sphinx)) NOTMUCH_HAVE_MAN=$((have_sphinx))
# Whether bash exists, and if so where
NOTMUCH_HAVE_BASH=${have_bash}
NOTMUCH_BASH_ABSOLUTE=${bash_absolute}
# Name of python interpreter # Name of python interpreter
NOTMUCH_PYTHON=${python} NOTMUCH_PYTHON=${python}