summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2017-07-11 12:46:17 -0700
committerAaron Plattner <aplattner@nvidia.com>2017-07-11 12:46:17 -0700
commitdb1bf24714e01242abedf409709cd335905ded15 (patch)
tree759f81dc7ade63b70ea4945022f7dadd96096432
parent9e2d4e11bff6303aebef49b8ae6874d3ce3ffc61 (diff)
Update to libpng 1.6, and link against libm
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--readpng.c2
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))