diff --git a/build.sh b/build.sh
index 049b3b2a7221230959e265fb21f8cc7a8a51e3d6..7dc7e9bcd6c245406ea493322a5dce1bd5fcfef8 100755
--- a/build.sh
+++ b/build.sh
@@ -261,7 +261,12 @@ build_generic()
 	./_autosetup >> $LOGFILE 2>&1 || failure
 	chmod +x configure >> $LOGFILE 2>&1 || failure
 	cd $ROOT/build/boinc || failure
-	$ROOT/3rdparty/boinc/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure
+	if [ "$1" == "$TARGET_MAC_INTEL" -o "$1" == "$TARGET_MAC_PPC" ]; then
+		export CPPFLAGS=-I/sw/include
+		$ROOT/3rdparty/boinc/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --disable-server --disable-client --with-apple-opengl-framework >> $LOGFILE 2>&1 || failure
+	else
+		$ROOT/3rdparty/boinc/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure
+	fi
 	make >> $LOGFILE 2>&1 || failure
 	make install >> $LOGFILE 2>&1 || failure
 	echo "Successfully built and installed BOINC!" | tee -a $LOGFILE
diff --git a/src/starsphere/Makefile.macos b/src/starsphere/Makefile.macos
index 5722945e2353a85e338a4e9287cea0543a05de53..c2bd56e1d2fe90141a8623f557b6e60dde0b9bb1 100644
--- a/src/starsphere/Makefile.macos
+++ b/src/starsphere/Makefile.macos
@@ -29,7 +29,7 @@ CXX ?= g++
 LIBS = -lframework -loglft -L$(STARSPHERE_INSTALL)/lib
 LIBS += $(shell $(STARSPHERE_INSTALL)/bin/freetype-config --libs)
 LIBS += $(shell $(STARSPHERE_INSTALL)/bin/xml2-config --libs)
-LIBS += -lboinc_api -lboinc -L$(STARSPHERE_INSTALL)/lib
+LIBS += -lboinc_graphics2 -lboinc_api -lboinc -L$(STARSPHERE_INSTALL)/lib
 LIBS += $(shell $(STARSPHERE_INSTALL)/bin/sdl-config --static-libs)
 
 LDFLAGS = -static-libgcc