aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2014-05-02 12:34:03 -0700
committerPaul Eggert2014-05-02 12:34:03 -0700
commit6f074205d30c6922db52fdf9a63b9e0467fd82c1 (patch)
treee739dc5474dbc555ff87c612bc4cc9b274890f1d /src
parentcb9af965374fd1537b1b82705642c5c03d04c4d2 (diff)
downloademacs-6f074205d30c6922db52fdf9a63b9e0467fd82c1.tar.gz
emacs-6f074205d30c6922db52fdf9a63b9e0467fd82c1.zip
Consult libpng-config more consistently.
* configure.ac (edit_cflags): Move this up and to the top level, so that PNG_CFLAGS can use it too. (PNG_CFLAGS): New var. (png_longjmp): Use PNG_CFLAGS when checking. (LIBPNG): Be consistent about -lpng16 etc; e.g., don't use -lpng16 in some places and -lpng in others. Test libpng-config's exit status. If it succeeds, use its output rather than appending -lz -lm. * 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/ChangeLog8
-rw-r--r--src/Makefile.in2
-rw-r--r--src/image.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12a0cd63dc0..29fb2dd1edf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12014-05-02 Paul Eggert <eggert@cs.ucla.edu>
2
3 Consult libpng-config more consistently (Bug#17339).
4 * Makefile.in (PNG_CFLAGS): New var.
5 (ALL_CFLAGS): Use it.
6 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
7 CFLAGS now handles this.
8
12014-05-01 Glenn Morris <rgm@gnu.org> 92014-05-01 Glenn Morris <rgm@gnu.org>
2 10
3 * floatfns.c (Fisnan): 11 * 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@
77C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ 77C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
78 78
79GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@ 79GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@
80PNG_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 4133aaa7621..dcbe5942b32 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>