[libpng16] Don't call png_icc_set_sRGB() when it's not compiled.
diff --git a/pngrutil.c b/pngrutil.c
index c9747fc..4d499aa 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1512,12 +1512,12 @@
                                     png_crc_finish(png_ptr, length);
                                     finished = 1;
 
-#                                   ifdef PNG_sRGB_SUPPORTED
+# if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0
                                     /* Check for a match against sRGB */
                                     png_icc_set_sRGB(png_ptr,
                                        &png_ptr->colorspace, profile,
                                        png_ptr->zstream.adler);
-#                                   endif
+# endif
 
                                     /* Steal the profile for info_ptr. */
                                     if (info_ptr != NULL)