diff configure.in @ 211:b2ff493b447a

- Made zlib a configure requirement.
author jcid
date Tue, 13 May 2008 01:11:52 +0200
parents 2348df162567
children 8ceff2c70779
line wrap: on
line diff
--- a/configure.in	Sat May 10 21:52:09 2008 +0200
+++ b/configure.in	Tue May 13 01:11:52 2008 +0200
@@ -184,31 +184,29 @@
   AC_DEFINE([ENABLE_JPEG], [], [Enable JPEG images])
 fi
 
-dnl ------------------------------
-dnl Test for zlib (libpng uses it)
-dnl ------------------------------
+dnl -------------
+dnl Test for zlib
+dnl -------------
 dnl
-if test "x$enable_png" = "xyes"; then
-  AC_CHECK_HEADER(zlib.h, libz_ok=yes, libz_ok=no)
+AC_CHECK_HEADER(zlib.h, libz_ok=yes, libz_ok=no)
 
-  if test "x$libz_ok" = "xyes"; then
-    old_libs="$LIBS"
-    AC_CHECK_LIB(z, zlibVersion, libz_ok=yes, libz_ok=no)
-    LIBS="$old_libs"
-  fi
+if test "x$libz_ok" = "xyes"; then
+  old_libs="$LIBS"
+  AC_CHECK_LIB(z, zlibVersion, libz_ok=yes, libz_ok=no)
+  LIBS="$old_libs"
+fi
 
-  if test "x$libz_ok" = xyes; then
-    LIBZ_LIBS="-lz"
-  else
-    AC_MSG_WARN([*** No libz found. Disabling PNG images ***])
-  fi
+if test "x$libz_ok" = xyes; then
+  LIBZ_LIBS="-lz"
+else
+  AC_ERROR(zlib must be installed!)
 fi
 
 dnl ---------------
 dnl Test for libpng
 dnl ---------------
 dnl
-if test "x$enable_png" = "xyes" && test "x$libz_ok" = "xyes"; then
+if test "x$enable_png" = "xyes"; then
   AC_MSG_CHECKING([for libpng-config])
 
 dnl Check if the user hasn't set the variable $PNG_CONFIG