summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-24 17:34:39 +0000
committerrubidium <rubidium@openttd.org>2009-05-24 17:34:39 +0000
commit4033f786bdea696ae04811cfbe930eca4f9bcf40 (patch)
treed1b63b70f8dad6297a1814b21a4673bbb380bfba /configure
parentad64d5eedb2f7282b72d06a9bb14e40c88914f0f (diff)
downloadopenttd-4033f786bdea696ae04811cfbe930eca4f9bcf40.tar.xz
(svn r16419) -Fix [FS#2916]: MSYS has two distinct ways to write paths. When calling external binaries it resolves paths which causes comparisons between a resolved and unresolved path. So always use the resolved path instead of the unresolved one.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure b/configure
index e2b12b3ea..19044102a 100755
--- a/configure
+++ b/configure
@@ -22,11 +22,16 @@ if [ "$0" != "$CONFIGURE_EXECUTABLE" ]; then
fi
# Find out where configure is (in what dir)
ROOT_DIR="`dirname $0`"
-ROOT_DIR="`cd $ROOT_DIR && pwd`"
+# For MSYS/MinGW we want to know the FULL path. This as that path is generated
+# once you call an outside binary. Having the same path for the rest is needed
+# for dependency checking.
+# pwd -W returns said FULL path, but doesn't exist on others so fall back.
+ROOT_DIR="`cd $ROOT_DIR && (pwd -W 2>/dev/null || pwd 2>/dev/null)`"
check_path_characters
-PWD="`pwd`"
+# Same here as for the ROOT_DIR above
+PWD="`pwd -W 2>/dev/null || pwd 2>/dev/null`"
PREFIX="$PWD/bin"
. $ROOT_DIR/config.lib