--- wesnoth-1.8.5-orig/configure.ac	2010-09-24 10:37:41.000000000 -0700
+++ wesnoth-1.8.5/configure.ac	2010-10-22 15:08:14.000000000 -0700
@@ -755,6 +755,7 @@
 
 AC_LANG([C])
 AC_MSG_CHECKING([for PNG support in SDL_image])
+if test "x$enable_sdltest" = "xyes" ; then
 
 OLD_CPPFLAGS=$CPPFLAGS
 OLD_CFLAGS=$CFLAGS
@@ -789,11 +790,14 @@
 	[AC_MSG_ERROR([*** Either your test image has vanished, or SDL_image has no PNG support!])],
 	[AC_MSG_RESULT([not tested in cross-compiling])])
 
 CPPFLAGS=$OLD_CPPFLAGS
 CFLAGS=$OLD_CFLAGS
 LIBS=$OLD_LIBS
+else
+	AC_MSG_RESULT([test disabled])
+fi
 
 
 #######################################################################
 # Check for OGG support in SDL_mixer                                  #
 #######################################################################
--- wesnoth-1.8.6-orig/src/gui/auxiliary/event/dispatcher_private.hpp	2013-08-09 15:05:49.000000000 -0700
+++ wesnoth-1.8.6/src/gui/auxiliary/event/dispatcher_private.hpp	2013-08-09 15:07:41.000000000 -0700
@@ -319,9 +319,9 @@
 			// MSVC 2008 doesn't like operator() here so changed the name.
 			return functor.template oper<item>(event);
 		} else {
-			typedef typename boost::mpl::next<itor>::type itor;
-			return find<boost::is_same<itor, end>::value>
-				::execute((itor*)0, (end*)0, event, functor);
+			typedef typename boost::mpl::next<itor>::type itor2;
+			return find<boost::is_same<itor2, end>::value>
+				::execute((itor2*)0, (end*)0, event, functor);
 		}
     }
 };
--- wesnoth-1.8.6/src/campaign_server/campaign_server.cpp.orig	2013-08-30 15:06:16.000000000 -0700
+++ wesnoth-1.8.6/src/campaign_server/campaign_server.cpp	2013-08-30 15:06:29.000000000 -0700
@@ -20,9 +20,9 @@
  */
 
 #include "filesystem.hpp"
-#include "foreach.hpp"
 #include "log.hpp"
 #include "network_worker.hpp"
+#include "foreach.hpp"
 #include "serialization/binary_or_text.hpp"
 #include "serialization/binary_wml.hpp"
 #include "serialization/parser.hpp"
--- wesnoth-1.8.6/src/language.cpp.orig	2013-08-30 15:10:17.000000000 -0700
+++ wesnoth-1.8.6/src/language.cpp	2013-08-30 15:10:30.000000000 -0700
@@ -15,9 +15,9 @@
 #include "global.hpp"
 
 #include "filesystem.hpp"
-#include "foreach.hpp"
 #include "gettext.hpp"
 #include "language.hpp"
+#include "foreach.hpp"
 #include "log.hpp"
 #include "preferences.hpp"
 #include "serialization/parser.hpp"
--- wesnoth-1.8.6/src/terrain.cpp.orig	2013-08-30 15:12:03.000000000 -0700
+++ wesnoth-1.8.6/src/terrain.cpp	2013-08-30 15:12:12.000000000 -0700
@@ -14,10 +14,10 @@
 
 #include "global.hpp"
 
-#include "foreach.hpp"
 #include "gettext.hpp"
 #include "log.hpp"
 #include "serialization/string_utils.hpp"
+#include "foreach.hpp"
 #include "terrain.hpp"
 #include "util.hpp"
 
--- wesnoth-1.8.6/src/sound.cpp.orig	2013-08-30 15:12:55.000000000 -0700
+++ wesnoth-1.8.6/src/sound.cpp	2013-08-30 15:13:10.000000000 -0700
@@ -14,8 +14,8 @@
 
 #include "global.hpp"
 #include "filesystem.hpp"
-#include "foreach.hpp"
 #include "game_preferences.hpp"
+#include "foreach.hpp"
 #include "log.hpp"
 #include "serialization/string_utils.hpp"
 #include "sound.hpp"
--- wesnoth-1.8.6/src/mapgen.cpp.orig	2013-08-30 15:13:58.000000000 -0700
+++ wesnoth-1.8.6/src/mapgen.cpp	2013-08-30 15:14:09.000000000 -0700
@@ -19,9 +19,9 @@
 
 #include "global.hpp"
 
-#include "foreach.hpp"
 #include "gettext.hpp"
 #include "language.hpp"
+#include "foreach.hpp"
 #include "log.hpp"
 #include "map.hpp"
 #include "mapgen.hpp"
--- wesnoth-1.8.6/src/time_of_day.cpp.orig	2013-08-30 15:15:19.000000000 -0700
+++ wesnoth-1.8.6/src/time_of_day.cpp	2013-08-30 15:15:29.000000000 -0700
@@ -16,8 +16,8 @@
 
 #include "global.hpp"
 
-#include "foreach.hpp"
 #include "time_of_day.hpp"
+#include "foreach.hpp"
 
 #include <cstdio>
 
--- wesnoth-1.8.6/src/video.cpp.orig	2013-08-30 15:15:59.000000000 -0700
+++ wesnoth-1.8.6/src/video.cpp	2013-08-30 15:16:13.000000000 -0700
@@ -20,10 +20,10 @@
 #include "global.hpp"
 
 #include "font.hpp"
-#include "foreach.hpp"
 #include "image.hpp"
 #include "log.hpp"
 #include "preferences_display.hpp"
+#include "foreach.hpp"
 #include "video.hpp"
 
 #include <vector>
--- wesnoth-1.8.6/src/theme.cpp.orig	2013-08-30 15:16:41.000000000 -0700
+++ wesnoth-1.8.6/src/theme.cpp	2013-08-30 15:17:12.000000000 -0700
@@ -17,9 +17,9 @@
 #include "global.hpp"
 
 #include "font.hpp"
-#include "foreach.hpp"
 #include "gettext.hpp"
 #include "hotkeys.hpp"
+#include "foreach.hpp"
 #include "log.hpp"
 #include "serialization/string_utils.hpp"
 #include "theme.hpp"
--- wesnoth-1.8.6/src/game_preferences.cpp.orig	2013-08-30 15:17:56.000000000 -0700
+++ wesnoth-1.8.6/src/game_preferences.cpp	2013-08-30 15:18:15.000000000 -0700
@@ -16,8 +16,8 @@
 
 #define GETTEXT_DOMAIN "wesnoth-lib"
 
-#include "foreach.hpp"
 #include "game_display.hpp"
+#include "foreach.hpp"
 #include "game_preferences.hpp"
 #include "gamestatus.hpp"
 #include "gettext.hpp"
--- wesnoth-1.8.6/src/gui/dialogs/addon_list.cpp.orig	2013-08-30 15:21:12.000000000 -0700
+++ wesnoth-1.8.6/src/gui/dialogs/addon_list.cpp	2013-08-30 15:21:31.000000000 -0700
@@ -16,8 +16,8 @@
 
 #include "gui/dialogs/addon_list.hpp"
 
-#include "foreach.hpp"
 #include "gui/widgets/listbox.hpp"
+#include "foreach.hpp"
 #include "gui/widgets/settings.hpp"
 #include "gui/widgets/window.hpp"
 
--- wesnoth-1.8.6/src/gui/auxiliary/event/handler.cpp.orig	2013-08-30 15:23:27.000000000 -0700
+++ wesnoth-1.8.6/src/gui/auxiliary/event/handler.cpp	2013-08-30 15:23:51.000000000 -0700
@@ -17,8 +17,8 @@
 #include "gui/auxiliary/event/handler.hpp"
 
 #include "clipboard.hpp"
-#include "foreach.hpp"
 #include "gui/auxiliary/event/dispatcher.hpp"
+#include "foreach.hpp"
 #include "gui/auxiliary/timer.hpp"
 #include "gui/auxiliary/log.hpp"
 #include "gui/widgets/helper.hpp"
--- wesnoth-1.8.6/src/gui/dialogs/dialog.cpp.orig	2013-08-30 15:24:43.000000000 -0700
+++ wesnoth-1.8.6/src/gui/dialogs/dialog.cpp	2013-08-30 15:25:03.000000000 -0700
@@ -16,8 +16,8 @@
 
 #include "gui/dialogs/dialog.hpp"
 
-#include "foreach.hpp"
 #include "gui/dialogs/field.hpp"
+#include "foreach.hpp"
 #include "gui/widgets/integer_selector.hpp"
 #include "video.hpp"
 
--- wesnoth-1.8.6/src/gui/dialogs/language_selection.cpp.orig	2013-08-30 15:25:48.000000000 -0700
+++ wesnoth-1.8.6/src/gui/dialogs/language_selection.cpp	2013-08-30 15:26:13.000000000 -0700
@@ -16,8 +16,8 @@
 
 #include "gui/dialogs/language_selection.hpp"
 
-#include "foreach.hpp"
 #include "gui/widgets/listbox.hpp"
+#include "foreach.hpp"
 #include "gui/widgets/settings.hpp"
 #include "gui/widgets/window.hpp"
 #include "language.hpp"
--- wesnoth-1.8.6/src/gui/dialogs/wml_message.cpp.orig	2013-08-30 15:27:10.000000000 -0700
+++ wesnoth-1.8.6/src/gui/dialogs/wml_message.cpp	2013-08-30 15:27:25.000000000 -0700
@@ -16,8 +16,8 @@
 
 #include "gui/dialogs/wml_message.hpp"
 
-#include "foreach.hpp"
 #include "gui/widgets/button.hpp"
+#include "foreach.hpp"
 #include "gui/widgets/label.hpp"
 #include "gui/widgets/listbox.hpp"
 #include "gui/widgets/settings.hpp"
--- wesnoth-1.8.6/src/gui/dialogs/mp_create_game.cpp.orig	2013-08-30 15:28:25.000000000 -0700
+++ wesnoth-1.8.6/src/gui/dialogs/mp_create_game.cpp	2013-08-30 15:28:38.000000000 -0700
@@ -16,8 +16,8 @@
 
 #include "gui/dialogs/mp_create_game.hpp"
 
-#include "foreach.hpp"
 #include "game_preferences.hpp"
+#include "foreach.hpp"
 #include "gettext.hpp"
 #include "gui/dialogs/field.hpp"
 #include "gui/dialogs/helper.hpp"
--- wesnoth-1.8.6/src/multiplayer_create.cpp.orig	2013-08-30 15:29:30.000000000 -0700
+++ wesnoth-1.8.6/src/multiplayer_create.cpp	2013-08-30 15:29:42.000000000 -0700
@@ -19,9 +19,9 @@
 
 #include "global.hpp"
 
-#include "foreach.hpp"
 #include "gettext.hpp"
 #include "game_display.hpp"
+#include "foreach.hpp"
 #include "construct_dialog.hpp"
 #include "settings.hpp"
 #include "map.hpp"
--- wesnoth-1.8.6/src/multiplayer_lobby.cpp.orig	2013-08-30 15:30:43.000000000 -0700
+++ wesnoth-1.8.6/src/multiplayer_lobby.cpp	2013-08-30 15:31:05.000000000 -0700
@@ -19,12 +19,12 @@
 #include "global.hpp"
 
 #include "filesystem.hpp"
-#include "foreach.hpp"
 #include "lobby_preferences.hpp"
 #include "map_exception.hpp"
 #include "marked-up_text.hpp"
 #include "minimap.hpp"
 #include "multiplayer_lobby.hpp"
+#include "foreach.hpp"
 #include "gettext.hpp"
 #include "log.hpp"
 #include "playmp_controller.hpp"
--- wesnoth-1.8.6/src/playcampaign.cpp.orig	2013-08-30 15:31:36.000000000 -0700
+++ wesnoth-1.8.6/src/playcampaign.cpp	2013-08-30 15:31:56.000000000 -0700
@@ -20,8 +20,8 @@
 
 #include "global.hpp"
 
-#include "foreach.hpp"
 #include "game_preferences.hpp"
+#include "foreach.hpp"
 #include "gui/dialogs/message.hpp"
 #include "gui/dialogs/transient_message.hpp"
 #include "playcampaign.hpp"
--- wesnoth-1.8.6/src/statistics.cpp.orig	2013-08-30 15:32:32.000000000 -0700
+++ wesnoth-1.8.6/src/statistics.cpp	2013-08-30 15:32:54.000000000 -0700
@@ -19,10 +19,10 @@
 
 #include "global.hpp"
 #include "statistics.hpp"
-#include "foreach.hpp"
 #include "log.hpp"
 #include "serialization/binary_or_text.hpp"
 #include "unit.hpp"
+#include "foreach.hpp"
 #include "util.hpp"
 
 static lg::log_domain log_engine("engine");
--- wesnoth-1.8.6/src/storyscreen/interface.cpp.orig	2013-08-30 15:33:32.000000000 -0700
+++ wesnoth-1.8.6/src/storyscreen/interface.cpp	2013-08-30 15:33:49.000000000 -0700
@@ -18,8 +18,8 @@
  */
 
 #include "global.hpp"
-#include "foreach.hpp"
 #include "variable.hpp"
+#include "foreach.hpp"
 
 #include "storyscreen/interface.hpp"
 #include "storyscreen/controller.hpp"
--- wesnoth-1.8.6/src/storyscreen/part.cpp.orig	2013-08-30 15:34:30.000000000 -0700
+++ wesnoth-1.8.6/src/storyscreen/part.cpp	2013-08-30 15:34:53.000000000 -0700
@@ -19,12 +19,12 @@
 
 #include "global.hpp"
 #include "asserts.hpp"
-#include "foreach.hpp"
 #include "log.hpp"
 #include "resources.hpp"
 #include "storyscreen/part.hpp"
 
 #include "config.hpp"
+#include "foreach.hpp"
 #include "gamestatus.hpp"
 #include "game_events.hpp"
 #include "image.hpp"
--- wesnoth-1.8.6/src/storyscreen/render.cpp.orig	2013-08-30 15:35:30.000000000 -0700
+++ wesnoth-1.8.6/src/storyscreen/render.cpp	2013-08-30 15:35:46.000000000 -0700
@@ -21,12 +21,12 @@
 
 #include "global.hpp"
 #include "asserts.hpp"
-#include "foreach.hpp"
 #include "log.hpp"
 #include "storyscreen/part.hpp"
 #include "storyscreen/render.hpp"
 
 #include "display.hpp"
+#include "foreach.hpp"
 #include "image.hpp"
 #include "language.hpp"
 #include "sound.hpp"
--- wesnoth-1.8.6/src/tod_manager.cpp.orig	2013-08-30 15:36:45.000000000 -0700
+++ wesnoth-1.8.6/src/tod_manager.cpp	2013-08-30 15:36:56.000000000 -0700
@@ -11,8 +11,8 @@
    See the COPYING file for more details.
  */
 
-#include "foreach.hpp"
 #include "tod_manager.hpp"
+#include "foreach.hpp"
 #include "wml_exception.hpp"
 #include "gettext.hpp"
 #include "formula_string_utils.hpp"
--- wesnoth-1.8.6/src/unit_abilities.cpp.orig	2013-08-30 15:39:08.000000000 -0700
+++ wesnoth-1.8.6/src/unit_abilities.cpp	2013-08-30 15:39:21.000000000 -0700
@@ -17,8 +17,8 @@
  *  Manage unit-abilities, like heal, cure, and weapon_specials.
  */
 
-#include "foreach.hpp"
 #include "gamestatus.hpp"
+#include "foreach.hpp"
 #include "resources.hpp"
 #include "terrain_filter.hpp"
 #include "unit.hpp"
--- wesnoth-1.8.6/src/gui/widgets/widget.hpp.orig	2013-09-03 11:17:09.000000000 -0700
+++ wesnoth-1.8.6/src/gui/widgets/widget.hpp	2013-09-03 11:17:47.000000000 -0700
@@ -21,7 +21,7 @@
 #include "sdl_utils.hpp"
 #include "wml_exception.hpp"
 
-#include <boost/noncopyable.hpp>
+// #include <boost/noncopyable.hpp>	// clang rejects
 
 #include <string>
 #include <cassert>
@@ -39,8 +39,8 @@
  * be implemented by classes inheriting from this class.
  */
 class twidget
-	: private boost::noncopyable
-	, public virtual tevent_executor
+//	: private boost::noncopyable	// clang rejects
+	: public virtual tevent_executor
 	, public virtual event::tdispatcher
 {
 	friend class tdebug_layout_graph;
