emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108956: Restore deprecation warnings


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108956: Restore deprecation warnings, except for older libpng.
Date: Sun, 08 Jul 2012 13:03:56 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108956
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2012-07-08 13:03:56 -0700
message:
  Restore deprecation warnings, except for older libpng.
  
  * configure.in (WARN_CFLAGS): Remove -Wno-deprecated-declarations.
  (HAVE_LIBPNG_PNG_H): Don't bother checking for this if we have png.h.
  (PNG_DEPRECATED): Define when compiling with older PNG versions.
modified:
  ChangeLog
  configure.in
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-07-07 23:16:19 +0000
+++ b/ChangeLog 2012-07-08 20:03:56 +0000
@@ -1,3 +1,10 @@
+2012-07-08  Paul Eggert  <address@hidden>
+
+       Restore deprecation warnings, except for older libpng.
+       * configure.in (WARN_CFLAGS): Remove -Wno-deprecated-declarations.
+       (HAVE_LIBPNG_PNG_H): Don't bother checking for this if we have png.h.
+       (PNG_DEPRECATED): Define when compiling with older PNG versions.
+
 2012-07-07  Andreas Schwab  <address@hidden>
 
        * configure.in (WARN_CFLAGS): Add -Wno-deprecated-declarations.

=== modified file 'configure.in'
--- a/configure.in      2012-07-07 20:32:41 +0000
+++ b/configure.in      2012-07-08 20:03:56 +0000
@@ -697,7 +697,6 @@
   gl_WARN_ADD([-Wno-switch])           # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
   gl_WARN_ADD([-Wno-format-nonliteral])
-  gl_WARN_ADD([-Wno-deprecated-declarations]) # triggered by libpng
 
   # In spite of excluding -Wlogical-op above, it is enabled, as of
   # gcc 4.5.0 20090517.
@@ -2451,7 +2450,7 @@
   if test "${with_png}" != "no"; then
     # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
     # in /usr/include/libpng.
-    AC_CHECK_HEADERS(png.h libpng/png.h)
+    AC_CHECK_HEADERS(png.h libpng/png.h, break)
     if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = 
yes ; then
       AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)
     fi
@@ -2460,6 +2459,19 @@
   if test "${HAVE_PNG}" = "yes"; then
     AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
     LIBPNG="-lpng -lz -lm"
+
+    AC_CHECK_DECL(png_longjmp,
+      [],
+      [AC_DEFINE(PNG_DEPRECATED, [],
+        [Define to empty to suppress deprecation warnings when building
+         with --enable-gcc-warnings and with libpng versions before 1.5,
+         which lack png_longjmp.])],
+      [[#ifdef HAVE_LIBPNG_PNG_H
+       # include <libpng/png.h>
+       #else
+       # include <png.h>
+       #endif
+      ]])
   fi
 fi
 AC_SUBST(LIBPNG)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]