aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-28 16:58:25 +0300
committerEugene Sandulenko2014-05-28 16:58:55 +0300
commit38ee05d75bb19d7a607bc85472d67281e43d72d0 (patch)
tree3fc533325bf230cc841bdae49a71cb21d891c148
parent3de1a9dcaa0458c7907839b3903f356eb811497d (diff)
downloadscummvm-rg350-38ee05d75bb19d7a607bc85472d67281e43d72d0.tar.gz
scummvm-rg350-38ee05d75bb19d7a607bc85472d67281e43d72d0.tar.bz2
scummvm-rg350-38ee05d75bb19d7a607bc85472d67281e43d72d0.zip
CONFIGURE: Detect and use Mac Homebrew if it is installed
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index def2d915a4..46edeafa4e 100755
--- a/configure
+++ b/configure
@@ -2227,6 +2227,25 @@ case $_host_os in
fi
fi
+ # Homebrew
+ brew_version=`brew -v 2>/dev/null`
+ if test "$?" -eq 0; then
+ brew_version="`echo "${brew_version}" | sed -ne 's/Homebrew \([0-9.]*\)/\1/gp'`"
+ echo_n "You seem to be running Homebrew version ${brew_version}..."
+
+ brew_prefix=`brew --prefix`
+
+ echo "adding ${brew_prefix} to paths"
+
+ LDFLAGS="-L${brew_prefix}/lib $LDFLAGS"
+ CXXFLAGS="-I${brew_prefix}/include $CXXFLAGS"
+
+ if test -z "$_staticlibpath"; then
+ _staticlibpath=${brew_prefix}
+ echo "Set staticlib-prefix to ${_staticlibpath}"
+ fi
+ fi
+
# If _staticlibpath is not set yet try first /sw (fink) then /usr/local
# (the macports case is handled above).
if test -z "$_staticlibpath"; then