Browse Source

configure: --sbindir/--mandir behaviour consistent with help output

And also with autoconf. I.e. "--sbindir=/whatever" actually sets SBINDIR
to "/whatever", not "$EPREFIX/whatever".
Davin McCall 1 year ago
parent
commit
2ffeb1b356
1 changed files with 2 additions and 6 deletions
  1. 2 6
      configure

+ 2 - 6
configure

@@ -233,8 +233,8 @@ done
 : "${PLATFORM:=$(uname)}"
 : "${PREFIX:="/usr"}"
 : "${EPREFIX:="/"}"
-: "${SBINDIR:="/sbin"}"
-: "${MANDIR:="/share/man/"}"
+: "${SBINDIR:="${EPREFIX%%/}/sbin"}"
+: "${MANDIR:="${PREFIX%%/}/share/man"}"
 : "${NO_SANITIZE:="auto"}"
 : "${SHUTDOWN_PREFIX:=""}"
 : "${CXXFLAGS_EXTRA:=""}"
@@ -252,10 +252,6 @@ else
     : "${SYSCONTROLSOCKET:="/var/run/dinitctl"}"
 fi
 
-## Resolve final paths
-SBINDIR="$EPREFIX/$SBINDIR"
-MANDIR="$PREFIX/$MANDIR"
-
 ## Finalize $CXXFLAGS, $TEST_CXXFLAGS, $LDFLAGS, $TEST_LDFLAGS
 if [ -z "${CXXFLAGS+IS_SET}" ]; then
     CXXFLAGS=""