* Recent change to xfns.c breaks compilation
@ 2003-07-13 1:23 Kim F. Storm
[not found] ` <E19bkkG-0005iJ-Ak@fencepost.gnu.org>
0 siblings, 1 reply; 12+ messages in thread
From: Kim F. Storm @ 2003-07-13 1:23 UTC (permalink / raw)
Cc: emacs-devel
This change:
2003-07-12 Richard M. Stallman <rms@gnu.org>
* xfns.c: Include libpng/png.h instead of png.h.
causes problems on my GNU/Linux system (redhat 6.2) where png.h is in
/usr/include.
What is the rationale for that change?
Since configure only checks for the presence of png.h (and not
libpng/png.h), I think we need to check for both and condition the
#include with HAVE_PNG_H and HAVE_LIBPNG_PNG_H.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 12+ messages in thread
* Recent change to xfns.c breaks compilation
@ 2003-07-15 0:10 Markus Rost
2003-07-16 10:31 ` Richard Stallman
0 siblings, 1 reply; 12+ messages in thread
From: Markus Rost @ 2003-07-15 0:10 UTC (permalink / raw)
Cc: emacs-devel
This change:
2003-07-12 Richard M. Stallman <rms@bogus.example.com>
* xfns.c: Include libpng/png.h instead of png.h.
causes problems on my GNU/Linux system (redhat 6.2) where png.h is in
/usr/include.
What is the rationale for that change?
Since configure only checks for the presence of png.h (and not
libpng/png.h), I think we need to check for both and condition the
#include with HAVE_PNG_H and HAVE_LIBPNG_PNG_H.
It still breaks compilation for me, on gnu/linux and solaris.
Moreover autoconf does not work well after the recent change
2003-07-12 Richard M. Stallman <rms@gnu.org>
* configure.in [netbsd systems]: Define HAVE_CRTIN properly.
Here are some lines from the shell:
gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/home/rost/cvs-gnu-linux1/emacs/src -D_BSD_SOURCE -I/usr/X11R6/include -g xfns.c
xfns.c:7568:24: libpng/png.h: No such file or directory
make[1]: *** [xfns.o] Error 1
make[1]: Leaving directory `/home/rost/cvs-gnu-linux1/emacs/src'
make: *** [bootstrap] Error 2
euler:~/cvs-gnu-linux1/emacs> autoconf
configure.in:50: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
euler:~/cvs-gnu-linux1/emacs> autoconf --version
autoconf (GNU Autoconf) 2.57
euler:~/cvs-gnu-linux1/emacs> configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
./configure: line 1666: syntax error near unexpected token `AC_DEFINE(HAVE_CRTIN)'
./configure: line 1666: ` AC_DEFINE(HAVE_CRTIN)'
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
[not found] ` <5xwuekaekd.fsf@kfs2.cua.dk>
@ 2003-07-15 11:02 ` Richard Stallman
2003-07-20 23:06 ` Richard Stallman
1 sibling, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2003-07-15 11:02 UTC (permalink / raw)
Cc: emacs-devel
I'm not an expert on autoconf, so I really cannot say.
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)])
Could someone say if this is correct?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
2003-07-15 0:10 Recent change to xfns.c breaks compilation Markus Rost
@ 2003-07-16 10:31 ` Richard Stallman
2003-07-16 11:56 ` Andreas Schwab
0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2003-07-16 10:31 UTC (permalink / raw)
Cc: emacs-devel, storm
I don't understand this at all, because the call to AC_DEFINE
that I added is just like the others that do work.
Is there an Autoconf expert here?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
2003-07-16 10:31 ` Richard Stallman
@ 2003-07-16 11:56 ` Andreas Schwab
2003-07-17 10:10 ` Richard Stallman
0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2003-07-16 11:56 UTC (permalink / raw)
Cc: emacs-devel, storm, Markus Rost
Richard Stallman <rms@gnu.org> writes:
|> I don't understand this at all, because the call to AC_DEFINE
|> that I added is just like the others that do work.
No, the other ones are not quoted.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
2003-07-16 11:56 ` Andreas Schwab
@ 2003-07-17 10:10 ` Richard Stallman
2003-07-17 10:19 ` David Kastrup
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Richard Stallman @ 2003-07-17 10:10 UTC (permalink / raw)
Cc: emacs-devel, storm, rost
|> I don't understand this at all, because the call to AC_DEFINE
|> that I added is just like the others that do work.
No, the other ones are not quoted.
What does "quoted" mean here? I don't see anything that
looks like quoting to me.
However, someone introduced some strange square brackets whose
meaning I don't understand. Emacs can't find what they match.
Was that a fix for this bug?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
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
2 siblings, 0 replies; 12+ messages in thread
From: David Kastrup @ 2003-07-17 10:19 UTC (permalink / raw)
Cc: Andreas Schwab, storm, rost, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> |> I don't understand this at all, because the call to AC_DEFINE
> |> that I added is just like the others that do work.
>
> No, the other ones are not quoted.
>
> What does "quoted" mean here? I don't see anything that
> looks like quoting to me.
>
> However, someone introduced some strange square brackets whose
> meaning I don't understand. Emacs can't find what they match.
> Was that a fix for this bug?
m4 quotes inside of square brackets.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
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
2 siblings, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2003-07-17 11:15 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
|> However, someone introduced some strange square brackets whose meaning
|> I don't understand.
These are the quotes in autoconf.
|> Emacs can't find what they match.
That's because of the parens in the case patterns. POSIX shells also
accept `(...)' for case patterns, but I don't think the Bourne Shell does.
|> Was that a fix for this bug?
Yes.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
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
2 siblings, 0 replies; 12+ messages in thread
From: Markus Rost @ 2003-07-17 14:38 UTC (permalink / raw)
Cc: schwab, storm, emacs-devel
What does "quoted" mean here? I don't see anything that
looks like quoting to me.
What about adding more explanations, like
===Buffer *diff*============================================
cd /home/rost/cvs/emacs/
diff -c /home/rost/cvs/emacs/configure.in /tmp/buffer-content-22086Ybz
*** /home/rost/cvs/emacs/configure.in Tue Jul 15 11:46:51 2003
--- /tmp/buffer-content-22086Ybz Thu Jul 17 10:36:19 2003
***************
*** 182,187 ****
--- 182,189 ----
dnl per the autoconf manual, we can speed up autoconf somewhat by quoting
dnl the great gob of text. Thus it's not processed for possible expansion.
dnl Just make sure the brackets remain balanced.
+
+ dnl evil changequote begins
[
### If you add support for a new configuration, add code to this
***************
*** 1168,1173 ****
--- 1170,1176 ----
fi
]
+ dnl evil changequote ends
if test $unported = yes; then
AC_MSG_ERROR([Emacs hasn't been ported to `${canonical}' systems.
Diff finished at Thu Jul 17 10:36:20
============================================================
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
[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
1 sibling, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2003-07-20 23:06 UTC (permalink / raw)
Cc: emacs-devel
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
2003-07-20 23:06 ` Richard Stallman
@ 2003-07-22 19:12 ` Kai Großjohann
2003-07-23 23:03 ` Richard Stallman
0 siblings, 1 reply; 12+ messages in thread
From: Kai Großjohann @ 2003-07-22 19:12 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent change to xfns.c breaks compilation
2003-07-22 19:12 ` Kai Großjohann
@ 2003-07-23 23:03 ` Richard Stallman
0 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2003-07-23 23:03 UTC (permalink / raw)
Cc: emacs-devel
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.
It looks like David Love solved this problem.
Thanks, Dave.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-07-23 23:03 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-15 0:10 Recent change to xfns.c breaks compilation 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
-- strict thread matches above, loose matches on Subject: below --
2003-07-13 1:23 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
2003-07-23 23:03 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.