From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: Recent change to xfns.c breaks compilation Date: Tue, 22 Jul 2003 21:12:56 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84wuebos9k.fsf@lucy.is.informatik.uni-duisburg.de> References: <5xznjjcj8h.fsf@kfs2.cua.dk> <5xwuekaekd.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1058901400 7103 80.91.224.249 (22 Jul 2003 19:16:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2003 19:16:40 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jul 22 21:16:37 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19f2c3-0001nV-00 for ; Tue, 22 Jul 2003 21:15:51 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19f2tK-0004N1-00 for ; Tue, 22 Jul 2003 21:33:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19f2bF-0007S4-HU for emacs-devel@quimby.gnus.org; Tue, 22 Jul 2003 15:15:01 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19f2aZ-0007D1-UM for emacs-devel@gnu.org; Tue, 22 Jul 2003 15:14:19 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19f2aP-0006si-0G for emacs-devel@gnu.org; Tue, 22 Jul 2003 15:14:09 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19f2ZZ-00062L-90 for emacs-devel@gnu.org; Tue, 22 Jul 2003 15:13:17 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19f2YO-0001Sj-00 for ; Tue, 22 Jul 2003 21:12:04 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19f2YM-0001SK-00 for ; Tue, 22 Jul 2003 21:12:02 +0200 Original-Lines: 66 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:g6PM/rRwxlYfWlODOytATDnHqhA= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15671 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15671 Richard Stallman 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 +#endif +#if HAVE_LIBPNG_PNG #include +#endif + +#if (HAVE_PNG||HAVE_LIBPNG_PNG) /* Function prototypes. */ -- ~/.signature