summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Sergienko <singalen@gmail.com>2018-04-12 14:46:09 -0700
committerPatric Stout <truebrain@openttd.org>2018-04-12 23:46:09 +0200
commit6ac079020b4545accc2b411fe0d4389845438ba5 (patch)
treeb6bb866ab026f7e1adba4a48a42467074b60be27
parent192770e6dafd90efe317fe409c16b5c52e264d22 (diff)
downloadopenttd-6ac079020b4545accc2b411fe0d4389845438ba5.tar.xz
Fix e614357: MingW/MacOS/MacPorts don't have realpath, use reallink in those cases (#6710)
-rw-r--r--config.lib10
1 files changed, 5 insertions, 5 deletions
diff --git a/config.lib b/config.lib
index 81a68b1d4..0fb038a83 100644
--- a/config.lib
+++ b/config.lib
@@ -1202,6 +1202,10 @@ check_params() {
fi
}
+if ! which realpath; then
+ realpath() { readlink -f -- "$@"; }
+fi
+
make_compiler_cflags() {
# Params:
# $1 - compiler
@@ -1211,11 +1215,7 @@ make_compiler_cflags() {
# $5 - name of the features variable
# Resolve symlinks, if your OS even does them
- if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ]; then
- compiler="$1"
- else
- compiler="`realpath \`which $1\``"
- fi
+ compiler="`realpath \`which $1\``"
eval eval "flags=\\\$$2"
eval eval "cxxflags=\\\$$3"