From db1bf24714e01242abedf409709cd335905ded15 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Tue, 11 Jul 2017 12:46:17 -0700 Subject: Update to libpng 1.6, and link against libm --- Makefile.am | 2 +- configure.ac | 2 +- readpng.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index e0b2a31..1c754b0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ bin_PROGRAMS = xrenderbenchmark xrenderbenchmark_CFLAGS = $(XRENDERBENCHMARK_CFLAGS) -xrenderbenchmark_LDADD = $(XRENDERBENCHMARK_LIBS) +xrenderbenchmark_LDADD = $(XRENDERBENCHMARK_LIBS) -lm xrenderbenchmark_SOURCES = \ main.c readpng.c \ diff --git a/configure.ac b/configure.ac index b2a2a1e..3a02562 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ AC_PROG_CC AC_PROG_INSTALL # Checks for pkg-config packages -PKG_CHECK_MODULES(XRENDERBENCHMARK, libpng12 x11 xrender) +PKG_CHECK_MODULES(XRENDERBENCHMARK, libpng x11 xrender) AC_SUBST(XRENDERBENCHMARK_CFLAGS) AC_SUBST(XRENDERBENCHMARK_LIBS) diff --git a/readpng.c b/readpng.c index bf2742d..9121916 100644 --- a/readpng.c +++ b/readpng.c @@ -118,7 +118,7 @@ int readPng(const char *filename, /* expand gray bit depth if needed */ if (color_type == PNG_COLOR_TYPE_GRAY && depth < 8) - png_set_gray_1_2_4_to_8 (png); + png_set_expand_gray_1_2_4_to_8 (png); /* transform transparency to alpha */ if (png_get_valid(png, info, PNG_INFO_tRNS)) -- cgit v1.2.3