Commit 2b29ed660afe5d4c6ee5762527d0b853b3682839

suzuki toshiya 2013-07-30T13:55:29

Ignore libpng-config under cross-building configuration, because it will return the flags for the hosting environment. * builds/unix/configure.raw: Ignore libpng-config when `cross_compiling' == yes.

diff --git a/ChangeLog b/ChangeLog
index 47453ce..f3dc662 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-07-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+	Ignore libpng-config under cross-building configuration,
+	because it will return the flags for the hosting environment.
+
+	* builds/unix/configure.raw: Ignore libpng-config when
+	`cross_compiling' == yes.
+
 2013-07-30  Behdad Esfahbod  <behdad@google.com>
 
 	Prevent division by zero by a transparent color.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 6a6edc7..9798dbe 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -292,6 +292,10 @@ if test x$with_png != xno; then
       AC_MSG_ERROR([`libpng-config' not found;
 either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables,
 or pass `--without-png' to the `configure' script.])
+    elif test ${cross_compiling} = yes; then
+      AC_MSG_ERROR([`libpng-config' should not be used in cross-building,
+set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment,
+or pass `--without-png' to the `configure' script.])
     fi
     LIBPNG_CFLAGS="`libpng-config --cflags`"
     LIBPNG_LDFLAGS="`libpng-config --ldflags`"