diff --git a/build.sh b/build.sh
index e01d81f2d7a7c0ba0712764a756fa3d5b28d9f86..d2a0aaca9d984f53af47313142b820fe262071f0 100755
--- a/build.sh
+++ b/build.sh
@@ -196,7 +196,11 @@ build_generic()
 	cd $ROOT/3rdparty/sdl || failure
 	./autogen.sh >> $LOGFILE 2>&1 || failure
 	cd $ROOT/build/sdl || failure
-	$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
+	if [ "$1" == "$TARGET_MAC" ]; then
+		$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --enable-video-x11=no >> $LOGFILE 2>&1 || failure
+	else
+		$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure	
+	fi
 	make >> $LOGFILE 2>&1 || failure
 	make install >> $LOGFILE 2>&1 || failure
 	echo "Successfully built and installed SDL!" | tee -a $LOGFILE