Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>

--- a/src/celengine/image.cpp
+++ b/src/celengine/image.cpp
@@ -63,6 +63,7 @@
 #include "celestia.h"
 
 #include <cassert>
+#include <libintl.h>
 #include <iostream>
 #include <algorithm>
 #include <cmath>
@@ -82,6 +83,11 @@
 #define png_set_tRNS_to_alpha(p)   png_set_expand(p)
 #endif // PNG_LIBPNG_VER < 10004
 
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+#define png_set_gray_1_2_4_to_8(p)	\
+		png_set_expand_gray_1_2_4_to_8(p)
+#endif
+
 #endif // PNG_SUPPORT
 
 
--- a/src/celestia/imagecapture.cpp
+++ b/src/celestia/imagecapture.cpp
@@ -29,6 +29,7 @@
 #include "../celestia/Celestia.app.skel/Contents/Frameworks/Headers/png.h"
 #else
 #include "png.h"
+#include "zlib.h"
 #endif
 
 // Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng
