summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure10
1 files changed, 5 insertions, 5 deletions
diff --git a/configure b/configure
index ef9a41f..5e99fa6 100755
--- a/configure
+++ b/configure
@@ -25,14 +25,14 @@ error() {
exit 1
}
-topsrcdir=$(realpath -ms --relative-to=. -- "$srcdir")
-if [ "$topsrcdir" = . ]; then
- topsrcdir=
+if [ "${srcdir:0:1}" = / ]; then
+ topsrcdir=$srcdir
else
- topsrcdir=/$topsrcdir
+ topsrcdir="&/$srcdir"
fi
+topsrcdir="${topsrcdir%/.}"
-edit=(sed -E -e "s|^topsrcdir := .*|&$topsrcdir|")
+edit=(sed -E -e "s|^topsrcdir := .*|$topsrcdir|")
setvar() {
edit+=(-e "s@^(\s*$1\s*:?=).*@\1 $2@")
}