From 18649ad6669921c7fece7faecb55fe2231e4580d Mon Sep 17 00:00:00 2001 From: karliss Date: Fri, 29 May 2020 06:04:15 +0300 Subject: [PATCH] Do the prefix check after prefix argument has been processed. (#16950) --- sys/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/build.sh b/sys/build.sh index f8319b8484..c91e916ef9 100755 --- a/sys/build.sh +++ b/sys/build.sh @@ -66,9 +66,6 @@ if [ "`uname`" = Darwin ]; then [ "$(id -u)" = 0 ] || SUDO=sudo [ -n "${NOSUDO}" ] && SUDO= fi -else - [ -n "${PREFIX}" -a "${PREFIX}" != /usr ] && \ - CFGARG="${CFGARG} --with-rpath" fi [ -z "${PREFIX}" ] && PREFIX="${DEFAULT_PREFIX}" @@ -96,6 +93,10 @@ if [ "${USE_CS5}" = 1 ]; then CFGARG="${CFGARG} --with-capstone5" fi +if [ "`uname`" != Darwin -a -n "${PREFIX}" -a "${PREFIX}" != /usr ]; then + CFGARG="${CFGARG} --with-rpath" +fi + ccache --help > /dev/null 2>&1 if [ $? = 0 ]; then [ -z "${CC}" ] && CC=gcc