aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--mig.in8
2 files changed, 10 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 3cc86ee..550c44c 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,9 @@ Version 1.3.2
* Handle the preprocessor option `-isystem' correctly.
-* Cope with command line arguments the contain whitespace.
+* Cope with command line arguments that contain whitespace.
+
+* Make the installation tree relocatable.
* Be more careful to catch write errors when closing files.
diff --git a/mig.in b/mig.in
index 7707bf2..63e0269 100644
--- a/mig.in
+++ b/mig.in
@@ -27,7 +27,13 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-migcom=${MIGDIR-@libexecdir@}/${MIGCOM-@MIGCOM@}
+bindir=@bindir@
+libexecdir=@libexecdir@
+libexecdir_rel=$(perl -MFile::Spec -e 'print File::Spec->abs2rel("'"$libexecdir"'","'"$bindir"'")')
+bindir_real=$(dirname "$0")
+bindir_real=$(cd "$bindir_real"/ && pwd)
+libexecdir=$bindir_real/$libexecdir_rel
+migcom=${MIGDIR-$libexecdir}/${MIGCOM-@MIGCOM@}
# The expansion of TARGET_CC might refer to ${CC}, so make sure it is defined.
default_cc="@CC@"