X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=5e7e5aa9478e8ee2c844f727dce17dfd3b3d1a64;hp=3ae26241df2a9d16fa6b319ad963bdf2af56fb92;hb=6b0cf9b21a8fe8b9a3cd9479e46835bb0eef024b;hpb=5e4437237365373ddb90abae7d7a62ecb36034e2 diff --git a/configure b/configure index 3ae26241..5e7e5aa9 100755 --- a/configure +++ b/configure @@ -53,7 +53,7 @@ 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++} @@ -82,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 @@ -241,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 @@ -560,13 +569,13 @@ 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... " @@ -928,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)"