diff options
| author | Paul Eggert | 2014-05-04 14:28:08 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-05-04 14:28:08 -0700 |
| commit | f8c2cef5e60d31f48c44fc883bc72d2f6090834b (patch) | |
| tree | c31f7cd29921efb107390227ee727147f0c63561 /src | |
| parent | 4a05c50a46dee2a75b06a2e4e3bc7732c267d7bb (diff) | |
| download | emacs-f8c2cef5e60d31f48c44fc883bc72d2f6090834b.tar.gz emacs-f8c2cef5e60d31f48c44fc883bc72d2f6090834b.zip | |
Consult libpng-config more consistently.
This is mainly for simplicity, but it should also avoid
some future problems like the ones we recently had with NetBSD.
* configure.ac (LIBPNG): Configure after LIBZ. Use libpng-config
for cflags, too. Append -lz if we're not already doing that with
LIBZ. Do not bother appending -lm, since we always append that.
Coalesce some duplicate code.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
Fixes: debbugs:17339
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/Makefile.in | 2 | ||||
| -rw-r--r-- | src/image.c | 4 |
3 files changed, 7 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e06163c32ce..01569db30e6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | 2014-05-04 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2014-05-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Revert recent libpng changes (Bug#17339). | 3 | Consult libpng-config more consistently (Bug#17339). |
| 4 | * Makefile.in (PNG_CFLAGS): Remove; all uses removed. | 4 | * Makefile.in (PNG_CFLAGS): New var. |
| 5 | * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>. | 5 | (ALL_CFLAGS): Use it. |
| 6 | * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as | ||
| 7 | CFLAGS now handles this. | ||
| 6 | 8 | ||
| 7 | 2014-05-03 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2014-05-03 Paul Eggert <eggert@cs.ucla.edu> |
| 8 | 10 | ||
| @@ -15,14 +17,6 @@ | |||
| 15 | 17 | ||
| 16 | * buffer.c (overlay_strings): Fix the wording of the commentary. | 18 | * buffer.c (overlay_strings): Fix the wording of the commentary. |
| 17 | 19 | ||
| 18 | 2014-05-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 19 | |||
| 20 | Consult libpng-config more consistently (Bug#17339). | ||
| 21 | * Makefile.in (PNG_CFLAGS): New var. | ||
| 22 | (ALL_CFLAGS): Use it. | ||
| 23 | * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as | ||
| 24 | CFLAGS now handles this. | ||
| 25 | |||
| 26 | 2014-05-01 Glenn Morris <rgm@gnu.org> | 20 | 2014-05-01 Glenn Morris <rgm@gnu.org> |
| 27 | 21 | ||
| 28 | * floatfns.c (Fisnan): | 22 | * floatfns.c (Fisnan): |
diff --git a/src/Makefile.in b/src/Makefile.in index 388923596c9..c35e38bb290 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -77,6 +77,7 @@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | |||
| 77 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ | 77 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ |
| 78 | 78 | ||
| 79 | GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@ | 79 | GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@ |
| 80 | PNG_CFLAGS=@PNG_CFLAGS@ | ||
| 80 | 81 | ||
| 81 | ## Define C_SWITCH_X_SITE to contain any special flags your compiler | 82 | ## Define C_SWITCH_X_SITE to contain any special flags your compiler |
| 82 | ## may need to deal with X Windows. For instance, if you've defined | 83 | ## may need to deal with X Windows. For instance, if you've defined |
| @@ -325,6 +326,7 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ | |||
| 325 | -I$(lib) -I$(srcdir)/../lib \ | 326 | -I$(lib) -I$(srcdir)/../lib \ |
| 326 | $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ | 327 | $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ |
| 327 | $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ | 328 | $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ |
| 329 | $(PNG_CFLAGS) \ | ||
| 328 | $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \ | 330 | $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \ |
| 329 | $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ | 331 | $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ |
| 330 | $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ | 332 | $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ |
diff --git a/src/image.c b/src/image.c index d558540c6e7..c26c0db2b4f 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -22,12 +22,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include <unistd.h> | 22 | #include <unistd.h> |
| 23 | 23 | ||
| 24 | #ifdef HAVE_PNG | 24 | #ifdef HAVE_PNG |
| 25 | #if defined HAVE_LIBPNG_PNG_H | ||
| 26 | # include <libpng/png.h> | ||
| 27 | #else | ||
| 28 | # include <png.h> | 25 | # include <png.h> |
| 29 | #endif | 26 | #endif |
| 30 | #endif | ||
| 31 | 27 | ||
| 32 | #include <setjmp.h> | 28 | #include <setjmp.h> |
| 33 | #include <c-ctype.h> | 29 | #include <c-ctype.h> |