aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-28 13:55:38 +0300
committerEugene Sandulenko2014-05-28 16:58:55 +0300
commit3de1a9dcaa0458c7907839b3903f356eb811497d (patch)
treec16b0668df6e0b59bfef34cb275047769709acc9 /configure
parent0e8bf7de56565508d8d61debb53bb85c64e38ad2 (diff)
downloadscummvm-rg350-3de1a9dcaa0458c7907839b3903f356eb811497d.tar.gz
scummvm-rg350-3de1a9dcaa0458c7907839b3903f356eb811497d.tar.bz2
scummvm-rg350-3de1a9dcaa0458c7907839b3903f356eb811497d.zip
CONFIGURE: Detect and use Fink if installed
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure b/configure
index c2020ab89e..def2d915a4 100755
--- a/configure
+++ b/configure
@@ -2203,6 +2203,30 @@ case $_host_os in
echo "Set staticlib-prefix to ${_staticlibpath}"
fi
fi
+
+ # Fink
+ # There is no way to get the prefix, so implementing a hack here
+ fink_version=`fink -V 2>/dev/null`
+ if test "$?" -eq 0; then
+ fink_version="`echo "${fink_version}" | sed -ne 's/Package manager version: \([0-9.]*\)/\1/gp'`"
+ echo_n "You seem to be running Fink version ${fink_version}..."
+
+ fink_prefix=`which fink`
+ # strip off /bin/fink from /sw/bin/port
+ fink_prefix=`dirname ${fink_prefix}`
+ fink_prefix=`dirname ${fink_prefix}`
+
+ echo "adding ${fink_prefix} to paths"
+
+ LDFLAGS="-L${fink_prefix}/lib $LDFLAGS"
+ CXXFLAGS="-I${fink_prefix}/include $CXXFLAGS"
+
+ if test -z "$_staticlibpath"; then
+ _staticlibpath=${fink_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