Fix e614357: MingW/MacOS/MacPorts don't have realpath, use reallink in those cases (#6710)

This commit is contained in:
Victor Sergienko 2018-04-12 14:46:09 -07:00 committed by Patric Stout
parent 192770e6da
commit 6ac079020b
1 changed files with 5 additions and 5 deletions

View File

@ -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"