[Freeciv-Dev] (PR#2820) libpng needs zlib
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#2820) libpng needs zlib |
From: |
"Jason Short via RT" <rt@xxxxxxxxxxxxxx> |
Date: |
Mon, 13 Jan 2003 23:22:32 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
Libpng (needed by gui-xaw) needs to link against zlib. Normally this is
taken care of automatically, but in some cases (when Tony tried to
compile on Fink, for instance) it doesn't seem to be.
The solution is to add a [-lz] extra parameter to the AC_CHECK_LIB macro
to force the linking. It is also helpful to have a check for zlib
*before* the libpng check so that a more helpful error message can be
generated. These are both already done by FC_WIN32_CLIENT.
jason
Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.33
diff -u -r1.33 configure.ac
--- configure.ac 2003/01/08 20:23:30 1.33
+++ configure.ac 2003/01/14 07:18:58
@@ -347,15 +347,20 @@
AC_DEFINE_UNQUOTED(NARROWPROTO, $fc_x_proto_value, [Narrowproto])
fi
+ dnl Check for zlib (needed for libpng)
+ AC_CHECK_LIB(z, gzgets, ,
+ AC_MSG_ERROR([Could not find zlib library.]),
+ $CLIENT_LIBS)
+ AC_CHECK_HEADER(zlib.h, ,
+ AC_MSG_ERROR([zlib found but not zlib.h.
+You may need to install a zlib \"development\" package.]))
+
dnl Check for libpng
AC_CHECK_LIB(png, png_read_image, [X_LIBS="$X_LIBS -lpng"],
- AC_MSG_ERROR([Could not find PNG library (libpng).]))
+ AC_MSG_ERROR([Could not find PNG library (libpng).]), [-lz])
AC_CHECK_HEADER(png.h, ,
AC_MSG_ERROR([libpng found but not png.h.
You may need to install a libpng \"development\" package.]))
-
- dnl Force check for zlib (needed for PNG loading)
- WITH_ZLIB="yes"
dnl Try to get additional Xpm paths:
FC_XPM_PATHS
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.211
diff -u -r1.211 configure.in
--- configure.in 2003/01/08 20:23:30 1.211
+++ configure.in 2003/01/14 07:18:58
@@ -341,15 +341,20 @@
AC_DEFINE_UNQUOTED(NARROWPROTO, $fc_x_proto_value)
fi
+ dnl Check for zlib (needed for libpng)
+ AC_CHECK_LIB(z, gzgets, ,
+ AC_MSG_ERROR([Could not find zlib library.]),
+ $CLIENT_LIBS)
+ AC_CHECK_HEADER(zlib.h, ,
+ AC_MSG_ERROR([zlib found but not zlib.h.
+You may need to install a zlib \"development\" package.]))
+
dnl Check for libpng
AC_CHECK_LIB(png, png_create_read_struct, [X_LIBS="$X_LIBS -lpng"],
- AC_MSG_ERROR([Could not find PNG library (libpng).]))
+ AC_MSG_ERROR([Could not find PNG library (libpng).]), [-lz])
AC_CHECK_HEADER(png.h, ,
AC_MSG_ERROR([libpng found but not png.h.
You may need to install a libpng \"development\" package.]))
-
- dnl Force check for zlib (needed for PNG loading)
- WITH_ZLIB="yes"
dnl Try to get additional Xpm paths:
FC_XPM_PATHS
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#2820) libpng needs zlib,
Jason Short via RT <=
|
|