diff options
| author | Paul Eggert | 2012-07-08 13:03:56 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-08 13:03:56 -0700 |
| commit | 0ccb0b098349c987e35ee1b2ec795f24a743a4e0 (patch) | |
| tree | 2c55a484b6141b0e375bca7160cf2635fe01719d | |
| parent | 3434fe8a236bb8fcb098c713b6383810c16a721d (diff) | |
| download | emacs-0ccb0b098349c987e35ee1b2ec795f24a743a4e0.tar.gz emacs-0ccb0b098349c987e35ee1b2ec795f24a743a4e0.zip | |
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.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | configure.in | 16 |
2 files changed, 21 insertions, 2 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-07-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Restore deprecation warnings, except for older libpng. | ||
| 4 | * configure.in (WARN_CFLAGS): Remove -Wno-deprecated-declarations. | ||
| 5 | (HAVE_LIBPNG_PNG_H): Don't bother checking for this if we have png.h. | ||
| 6 | (PNG_DEPRECATED): Define when compiling with older PNG versions. | ||
| 7 | |||
| 1 | 2012-07-07 Andreas Schwab <schwab@linux-m68k.org> | 8 | 2012-07-07 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 9 | ||
| 3 | * configure.in (WARN_CFLAGS): Add -Wno-deprecated-declarations. | 10 | * configure.in (WARN_CFLAGS): Add -Wno-deprecated-declarations. |
diff --git a/configure.in b/configure.in index 6a90c4869e5..4df12844b1d 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -697,7 +697,6 @@ else | |||
| 697 | gl_WARN_ADD([-Wno-switch]) # Too many warnings for now | 697 | gl_WARN_ADD([-Wno-switch]) # Too many warnings for now |
| 698 | gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now | 698 | gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now |
| 699 | gl_WARN_ADD([-Wno-format-nonliteral]) | 699 | gl_WARN_ADD([-Wno-format-nonliteral]) |
| 700 | gl_WARN_ADD([-Wno-deprecated-declarations]) # triggered by libpng | ||
| 701 | 700 | ||
| 702 | # In spite of excluding -Wlogical-op above, it is enabled, as of | 701 | # In spite of excluding -Wlogical-op above, it is enabled, as of |
| 703 | # gcc 4.5.0 20090517. | 702 | # gcc 4.5.0 20090517. |
| @@ -2451,7 +2450,7 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 2451 | if test "${with_png}" != "no"; then | 2450 | if test "${with_png}" != "no"; then |
| 2452 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | 2451 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h |
| 2453 | # in /usr/include/libpng. | 2452 | # in /usr/include/libpng. |
| 2454 | AC_CHECK_HEADERS(png.h libpng/png.h) | 2453 | AC_CHECK_HEADERS(png.h libpng/png.h, break) |
| 2455 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | 2454 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then |
| 2456 | AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm) | 2455 | AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm) |
| 2457 | fi | 2456 | fi |
| @@ -2460,6 +2459,19 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 2460 | if test "${HAVE_PNG}" = "yes"; then | 2459 | if test "${HAVE_PNG}" = "yes"; then |
| 2461 | AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) | 2460 | AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) |
| 2462 | LIBPNG="-lpng -lz -lm" | 2461 | LIBPNG="-lpng -lz -lm" |
| 2462 | |||
| 2463 | AC_CHECK_DECL(png_longjmp, | ||
| 2464 | [], | ||
| 2465 | [AC_DEFINE(PNG_DEPRECATED, [], | ||
| 2466 | [Define to empty to suppress deprecation warnings when building | ||
| 2467 | with --enable-gcc-warnings and with libpng versions before 1.5, | ||
| 2468 | which lack png_longjmp.])], | ||
| 2469 | [[#ifdef HAVE_LIBPNG_PNG_H | ||
| 2470 | # include <libpng/png.h> | ||
| 2471 | #else | ||
| 2472 | # include <png.h> | ||
| 2473 | #endif | ||
| 2474 | ]]) | ||
| 2463 | fi | 2475 | fi |
| 2464 | fi | 2476 | fi |
| 2465 | AC_SUBST(LIBPNG) | 2477 | AC_SUBST(LIBPNG) |