summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLuis Ressel <aranea@aixah.de>2019-02-26 03:06:49 +0100
committerDavid Bremner <david@tethera.net>2019-03-12 20:12:49 -0300
commit5569e042315862bdedb341472160cd09f4a0a2f7 (patch)
tree24b8df3785a544ccd7dfeff2dc200132627ea189 /configure
parentb8a8dbed91d16299a8768646fb6f18181f31ec40 (diff)
Add a configure flag to disable rpaths
Better support build environments where our /sbin/ldconfig based heuristic does not work (e.g. some musl libc based systems).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure b/configure
index a6f5dfa2..5e7e5aa9 100755
--- a/configure
+++ b/configure
@@ -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
@@ -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)"