summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-12-17 08:57:01 -0500
committerDavid Thompson <dthompson2@worcester.edu>2021-12-17 08:57:16 -0500
commitc405b463a00c719e015f30a8a7da4db787736560 (patch)
tree27b5c945ce8285832e07ad1848d9bab427aac83d /configure.ac
parenta9aa99ac55440b36fe0c2c647bcfa151f08bcce2 (diff)
Add libpng bindings.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 61fd8d3..b4cd56d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,20 @@ GUILE_PROGS
GUILE_MODULE_REQUIRED([gl])
GUILE_MODULE_REQUIRED([sdl2])
+AC_PATH_PROGS([PKG_CONFIG], [pkg-config])
+
+PKG_CHECK_MODULES([PNG], [libpng])
+PKG_CHECK_VAR([PNG_LIBDIR], [libpng], [libdir])
+AC_MSG_CHECKING([libpng library path])
+AS_IF([test "PNG_LIBDIR" = "x"], [
+ AC_MSG_FAILURE([Unable to identify libpng lib path.])
+], [
+ AC_MSG_RESULT([$PNG_LIBDIR])
+])
+AC_SUBST([PNG_LIBDIR])
+PNG_VERSION="`$PKG_CONFIG --modversion libpng`"
+AC_SUBST([PNG_VERSION])
+
PKG_CHECK_MODULES([TURBOJPEG], [libturbojpeg])
PKG_CHECK_VAR([TURBOJPEG_LIBDIR], [libturbojpeg], [libdir])
AC_MSG_CHECKING([libturbojpeg library path])