unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: kai.grossjohann@gmx.net (Kai Großjohann)
Subject: Re: Recent change to xfns.c breaks compilation
Date: Tue, 22 Jul 2003 21:12:56 +0200	[thread overview]
Message-ID: <84wuebos9k.fsf@lucy.is.informatik.uni-duisburg.de> (raw)
In-Reply-To: E19eNG6-00050g-Nl@fencepost.gnu.org

Richard Stallman <rms@gnu.org> 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

  reply	other threads:[~2003-07-22 19:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-13  1:23 Recent change to xfns.c breaks compilation Kim F. Storm
     [not found] ` <E19bkkG-0005iJ-Ak@fencepost.gnu.org>
     [not found]   ` <5xwuekaekd.fsf@kfs2.cua.dk>
2003-07-15 11:02     ` Richard Stallman
2003-07-20 23:06     ` Richard Stallman
2003-07-22 19:12       ` Kai Großjohann [this message]
2003-07-23 23:03         ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2003-07-15  0:10 Markus Rost
2003-07-16 10:31 ` Richard Stallman
2003-07-16 11:56   ` Andreas Schwab
2003-07-17 10:10     ` Richard Stallman
2003-07-17 10:19       ` David Kastrup
2003-07-17 11:15       ` Andreas Schwab
2003-07-17 14:38       ` Markus Rost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84wuebos9k.fsf@lucy.is.informatik.uni-duisburg.de \
    --to=kai.grossjohann@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).