From 8d229796674b4760da1a3532b16f05b5f0c68761 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 26 Aug 2011 17:41:09 +0100 Subject: CONFIGURE: Add support for building under MacPorts --- configure | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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__" -- cgit v1.2.3