aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2011-08-26 17:41:09 +0100
committerEugene Sandulenko2011-08-26 17:41:09 +0100
commit8d229796674b4760da1a3532b16f05b5f0c68761 (patch)
tree80a09f1cad35fc269c8c3015286d24fa2bcad094
parent7b9346d42b3f447d49fe565d10c66ada341477c8 (diff)
downloadscummvm-rg350-8d229796674b4760da1a3532b16f05b5f0c68761.tar.gz
scummvm-rg350-8d229796674b4760da1a3532b16f05b5f0c68761.tar.bz2
scummvm-rg350-8d229796674b4760da1a3532b16f05b5f0c68761.zip
CONFIGURE: Add support for building under MacPorts
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index b9ccb67e1a..eca9005b8a 100755
--- a/configure
+++ b/configure
@@ -1819,6 +1819,26 @@ case $_host_os in
DEFINES="$DEFINES -DMACOSX"
LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI"
add_line_to_config_mk 'MACOSX = 1'
+
+ # Now we may have MacPorts or Fink installed
+ # Which put libraries and headers in non-standard places
+ # Checking them here
+
+ # MacPorts
+ # There is no way to get the prefix, so implementing a hack here
+ macport_version=`port version 2>/dev/null`
+ if test "$?" -eq 0; then
+ macport_version="`echo "${macport_version}" } sed -ne 's/Version: \([0-9]\.[0-9]\.[0-9]\)/\1/gp'`"
+ echo_n "You seem to be running MacPorts version ${macport_version}..."
+
+ $macport_prefix=`which port`
+ $macport_prefix=`dirname ${macport_prefix}`
+
+ echo "adding ${macport_prefix} to paths"
+
+ LDFLAGS="-L${macport_prefix}/lib $LDFLAGS"
+ CXXFLAGS="-I${macport_prefix}/lib $CXXFLAGS"
+ fi
;;
dreamcast)
DEFINES="$DEFINES -D__DC__"