diff --git a/mac_build/buildFTGL.sh b/mac_build/buildFTGL.sh
index ea82eb7223..39111b1446 100644
--- a/mac_build/buildFTGL.sh
+++ b/mac_build/buildFTGL.sh
@@ -18,8 +18,9 @@
# along with BOINC. If not, see .
#
#
-# Script to build Macintosh 32-bit Intel library of ftgl-2.1.3~rc5 for
-# use in building BOINC graphics. The resulting library is at:
+# Script to build Macintosh Universal Intel library (i386 and x86_64)
+# of ftgl-2.1.3~rc5 for use in building BOINC graphics.
+# The resulting library is at:
# [path]/ftgl-2.1.3~rc5/src/.libs/libftgl.a
#
# by Charlie Fenton 7/27/12
@@ -79,6 +80,7 @@ SDKPATH=`xcodebuild -version -sdk macosx Path`
if [ $? -ne 0 ]; then return 1; fi
+# Build for i386 architecture
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
export CPPFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
@@ -99,6 +101,44 @@ if [ $? -ne 0 ]; then
return 1;
fi
+mv -f .libs/libftgl.a libftgl_i386.a
+cd ..
+
+# Build for x86_64 architecture
+make clean
+
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
+export CPPFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export CFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export SDKROOT="${SDKPATH}"
+
+./configure --enable-shared=NO --disable-freetypetest --host=x86_64
+if [ $? -ne 0 ]; then
+ rm -f src/libftgl_i386.a
+ return 1;
+fi
+
+cd src
+make
+if [ $? -ne 0 ]; then
+ rm -f libftgl_i386.a
+ cd ..
+ return 1;
+fi
+
+mv -f .libs/libftgl.a .libs/libftgl_x86_64.a
+
+lipo -create libftgl_i386.a .libs/libftgl_x86_64.a -output .libs/libftgl.a
+
+if [ $? -ne 0 ]; then
+ cd ..
+ return 1;
+fi
+
+rm -f libftgl_i386.a
+rm -f .libs/libftgl_x86_64.a
+
cd ..
export CC="";export CXX=""
diff --git a/mac_build/buildfreetype.sh b/mac_build/buildfreetype.sh
index ee6a271d55..608124c476 100644
--- a/mac_build/buildfreetype.sh
+++ b/mac_build/buildfreetype.sh
@@ -18,8 +18,9 @@
# along with BOINC. If not, see .
#
#
-# Script to build Macintosh 32-bit Intel library of FreeType-2.4.10 for
-# use in building BOINC graphics. The resulting library is at:
+# Script to build Macintosh Universal Intel library (i386 and x86_64)
+# of FreeType-2.4.10 for use in building BOINC graphics.
+# The resulting library is at:
# [path]/freetype-2.4.10/objs/.libs/libfreetype.a
#
# by Charlie Fenton 7/27/12
@@ -85,6 +86,7 @@ rm -f README-objs
if [ $? -ne 0 ]; then return 1; fi
+# Build for i386 architecture
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
export CPPFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
@@ -102,6 +104,33 @@ fi
make
if [ $? -ne 0 ]; then return 1; fi
+mv -f objs/.libs/libfreetype.a objs/.libs/libfreetype_i386.a
+
+# Build for x86_64 architecture
+make clean
+
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
+export CPPFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export CFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export SDKROOT="${SDKPATH}"
+export MACOSX_DEPLOYMENT_TARGET=10.5
+
+./configure --enable-shared=NO --host=x86_64
+if [ $? -ne 0 ]; then return 1; fi
+
+make
+if [ $? -ne 0 ]; then return 1; fi
+
+mv -f objs/.libs/libfreetype.a objs/.libs/libfreetype_x86_64.a
+
+lipo -create objs/.libs/libfreetype_i386.a objs/.libs/libfreetype_x86_64.a -output objs/.libs/libfreetype.a
+
+if [ $? -ne 0 ]; then return 1; fi
+
+rm -f objs/.libs/libfreetype_i386.a
+rm -f objs/.libs/libfreetype_x86_64.a
+
export CC="";export CXX=""
export LDFLAGS=""
export CPPFLAGS=""
diff --git a/mac_build/setupForBOINC.sh b/mac_build/setupForBOINC.sh
index 3d914e24c7..2866ad71f3 100644
--- a/mac_build/setupForBOINC.sh
+++ b/mac_build/setupForBOINC.sh
@@ -107,17 +107,6 @@ if [ $? -eq 0 ]; then
fi
fi
-if [ "${wxWidgetsOK}" = "NO" ]; then
- echo ""
- echo "----------------------------------"
- echo "------------ WARNING -------------"
- echo "----------------------------------"
- echo "-- COULD NOT BUILD wxMac-2.8.10 --"
- echo "----------------------------------"
- echo ""
-fi
-
-
echo ""
echo "----------------------------------"
echo "----- BUILD FreeType-2.4.10 ------"
@@ -134,16 +123,6 @@ if [ $? -eq 0 ]; then
fi
fi
-if [ "${freetypeOK}" = "NO" ]; then
- echo ""
- echo "-----------------------------------"
- echo "------------ WARNING --------------"
- echo "-----------------------------------"
- echo "- COULD NOT BUILD FreeType-2.4.10 -"
- echo "-----------------------------------"
- echo ""
-fi
-
echo ""
echo "----------------------------------"
echo "------ BUILD FTGL-2.1.3~rc5 ------"
@@ -160,11 +139,31 @@ if [ $? -eq 0 ]; then
fi
fi
+if [ "${wxWidgetsOK}" = "NO" ]; then
+ echo ""
+ echo "----------------------------------"
+ echo "------------ WARNING -------------"
+ echo "------------ -------------"
+ echo "-- COULD NOT BUILD wxMac-2.8.10 --"
+ echo "----------------------------------"
+ echo ""
+fi
+
+if [ "${freetypeOK}" = "NO" ]; then
+ echo ""
+ echo "-----------------------------------"
+ echo "------------ WARNING --------------"
+ echo "------------ -------------"
+ echo "- COULD NOT BUILD FreeType-2.4.10 -"
+ echo "-----------------------------------"
+ echo ""
+fi
+
if [ "${ftglOK}" = "NO" ]; then
echo ""
echo "-----------------------------------"
echo "------------ WARNING --------------"
- echo "-----------------------------------"
+ echo "------------ -------------"
echo "- COULD NOT BUILD FTGL-2.1.3~rc50 -"
echo "-----------------------------------"
echo ""