summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2018-04-11 21:50:23 +0100
committerglx22 <glx22@users.noreply.github.com>2018-04-11 22:50:23 +0200
commite47f646cb342f4351c92ff36a90233e015a827f5 (patch)
tree606fd342dcd0420f566e278bebc88a2942d88040 /config.lib
parent17bd580630fe56d48daaf017f01912064658c123 (diff)
downloadopenttd-e47f646cb342f4351c92ff36a90233e015a827f5.tar.xz
Fix e61435774b: Some systems don't have realpath (#6705)
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib7
1 files changed, 6 insertions, 1 deletions
diff --git a/config.lib b/config.lib
index 750165881..81a68b1d4 100644
--- a/config.lib
+++ b/config.lib
@@ -1210,7 +1210,12 @@ make_compiler_cflags() {
# $4 - name of the ldflags variable
# $5 - name of the features variable
- compiler="`realpath \`which $1\``" # resolve symlinks
+ # Resolve symlinks, if your OS even does them
+ if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ]; then
+ compiler="$1"
+ else
+ compiler="`realpath \`which $1\``"
+ fi
eval eval "flags=\\\$$2"
eval eval "cxxflags=\\\$$3"