[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recent change to xfns.c breaks compilation
From: |
Kai Großjohann |
Subject: |
Re: Recent change to xfns.c breaks compilation |
Date: |
Tue, 22 Jul 2003 21:12:56 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> However, I think the simpler form to find the header (and define
> either HAVE_LIBPNG_PNG_H or HAVE_PNG_H) should work:
>
> AC_CHECK_HEADERS(libpng/png.h,,
> [AC_CHECK_HEADERS(png.h)])
>
> Can someone tell me if that really works?
> If it does, I'd like to install it.
I'm using the following, which appears to compile for me (after
running autoconf and then configure and then make bootstrap). I only
tested the png.h case and not the libpng/png.h case, though.
Warning: I don't know what I'm doing.
Changed configure.in:
--- configure.in.~1.345.~ Mon Jul 21 09:57:17 2003
+++ configure.in Tue Jul 22 10:43:55 2003
@@ -2145,14 +2145,20 @@
### Use -lpng if available, unless `--with-png=no'.
HAVE_PNG=no
+HAVE_LIBPNG_PNG=no
if test "${HAVE_X11}" = "yes"; then
if test "${with_png}" != "no"; then
AC_CHECK_HEADER(png.h,
AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm))
+ AC_CHECK_HEADER(libpng/png.h,
+ AC_CHECK_LIB(png, png_get_channels, HAVE_LIBPNG_PNG=yes, , -lz -lm))
fi
if test "${HAVE_PNG}" = "yes"; then
AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
+ fi
+ if test "${HAVE_LIBPNG_PNG}" = "yes"; then
+ AC_DEFINE(HAVE_LIBPNG_PNG, 1, [Define to 1 if you have the png library
(-lpng).])
fi
fi
Changed src/xnfs.c:
--- xfns.c.~1.585.~ Mon Jul 14 09:58:20 2003
+++ xfns.c Tue Jul 22 10:45:20 2003
@@ -7564,8 +7564,13 @@
***********************************************************************/
#if HAVE_PNG
-
+#include <png.h>
+#endif
+#if HAVE_LIBPNG_PNG
#include <libpng/png.h>
+#endif
+
+#if (HAVE_PNG||HAVE_LIBPNG_PNG)
/* Function prototypes. */
--
~/.signature
- Recent change to xfns.c breaks compilation, Markus Rost, 2003/07/14
- Re: Recent change to xfns.c breaks compilation, Richard Stallman, 2003/07/16
- Re: Recent change to xfns.c breaks compilation, Andreas Schwab, 2003/07/16
- Re: Recent change to xfns.c breaks compilation, Richard Stallman, 2003/07/17
- Re: Recent change to xfns.c breaks compilation, David Kastrup, 2003/07/17
- Re: Recent change to xfns.c breaks compilation, Andreas Schwab, 2003/07/17
- Re: Recent change to xfns.c breaks compilation, Markus Rost, 2003/07/17