aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2014-05-04 14:28:08 -0700
committerPaul Eggert <[email protected]>2014-05-04 14:28:08 -0700
commitf8c2cef5e60d31f48c44fc883bc72d2f6090834b (patch)
treec31f7cd29921efb107390227ee727147f0c63561 /src
parent4a05c50a46dee2a75b06a2e4e3bc7732c267d7bb (diff)
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/ChangeLog16
-rw-r--r--src/Makefile.in2
-rw-r--r--src/image.c4
3 files changed, 7 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e06163c32c..01569db30e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,8 +1,10 @@
2014-05-04 Paul Eggert <[email protected]>
- Revert recent libpng changes (Bug#17339).
- * Makefile.in (PNG_CFLAGS): Remove; all uses removed.
- * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
+ Consult libpng-config more consistently (Bug#17339).
+ * Makefile.in (PNG_CFLAGS): New var.
+ (ALL_CFLAGS): Use it.
+ * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
+ CFLAGS now handles this.
2014-05-03 Paul Eggert <[email protected]>
@@ -15,14 +17,6 @@
* buffer.c (overlay_strings): Fix the wording of the commentary.
-2014-05-02 Paul Eggert <[email protected]>
-
- Consult libpng-config more consistently (Bug#17339).
- * Makefile.in (PNG_CFLAGS): New var.
- (ALL_CFLAGS): Use it.
- * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
- CFLAGS now handles this.
-
2014-05-01 Glenn Morris <[email protected]>
* floatfns.c (Fisnan):
diff --git a/src/Makefile.in b/src/Makefile.in
index 388923596c..c35e38bb29 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -77,6 +77,7 @@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@
+PNG_CFLAGS=@PNG_CFLAGS@
## Define C_SWITCH_X_SITE to contain any special flags your compiler
## may need to deal with X Windows. For instance, if you've defined
@@ -325,6 +326,7 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
-I$(lib) -I$(srcdir)/../lib \
$(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
$(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
+ $(PNG_CFLAGS) \
$(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \
$(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
$(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
diff --git a/src/image.c b/src/image.c
index d558540c6e..c26c0db2b4 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/>. */
#include <unistd.h>
#ifdef HAVE_PNG
-#if defined HAVE_LIBPNG_PNG_H
-# include <libpng/png.h>
-#else
# include <png.h>
#endif
-#endif
#include <setjmp.h>
#include <c-ctype.h>