[libpng16] Made pngvalid so that it will build outside the libpng source tree.
diff --git a/ANNOUNCE b/ANNOUNCE
index 037d754..c9cd119 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -527,6 +527,7 @@
 
 Version 1.6.0beta31 [October 26, 2012]
   Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30.
+  Made pngvalid so that it will build outside the libpng source tree.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/CHANGES b/CHANGES
index a7fad81..0a25103 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4279,6 +4279,7 @@
 
 Version 1.6.0beta31 [October 26, 2012]
   Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30.
+  Made pngvalid so that it will build outside the libpng source tree.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
index c1f41bc..7d39161 100644
--- a/contrib/libtests/pngvalid.c
+++ b/contrib/libtests/pngvalid.c
@@ -107,7 +107,11 @@
 #endif
 
 /***************************** EXCEPTION HANDLING *****************************/
-#include "../visupng/cexcept.h"
+#ifdef PNG_FREESTANDING_TESTS
+#  include <cexcept.h>
+#else
+#  include "../visupng/cexcept.h"
+#endif
 
 #ifdef __cplusplus
 #  define this not_the_cpp_this