From 338a7b00011778e4d85db0c4d3d60e401cf6cbee Mon Sep 17 00:00:00 2001 From: Alan Westbrook Date: Sat, 25 Jan 2014 15:54:30 -0800 Subject: [PATCH] "Detect" macports vs homebrew Just looks for the /opt v /usr dir, probably not very fool proof Prefers home-brew in case of conflict in detection. --- src/makefile.osx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/makefile.osx b/src/makefile.osx index 4fd7a859f..8e56eb744 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -9,7 +9,16 @@ STATIC=yes CXX=c++ -DEPSDIR=/usr/local + +MACPORTSDIR=$(wildcard /opt/local) +HOMEBREWDIR=$(wildcard /usr/local) + +ifneq ($(HOMEBREWDIR),) + DEPSDIR=$(HOMEBREWDIR) +else + DEPSDIR=$(MACPORTSDIR) +endif + INCLUDEPATHS= \ -I"$(CURDIR)" \ @@ -56,7 +65,7 @@ LIBS += \ TESTDEFS += -DBOOST_TEST_DYN_LINK endif -DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE +DEFS=-DMAC_OSX -DBOOST_SPIRIT_THREADSAFE ifdef RELEASE # Compile for maximum compatibility and smallest size.