From ff3c4acbb2bc829325324a705018189ac04d7c54 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 14 Dec 2020 10:24:25 +0000 Subject: [PATCH] allow spng.pc and libspng.ps for libspng discovery --- configure.ac | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e7e79468..ed4d2361 100644 --- a/configure.ac +++ b/configure.ac @@ -1126,6 +1126,7 @@ FIND_GIFLIB( ) # Look for libspng first +# 0.6.1 uses "libspng.pc", git master libspng uses "spng.pc" AC_ARG_WITH([libspng], AS_HELP_STRING([--without-libspng], [build without libspng (default: test)])) @@ -1133,14 +1134,23 @@ if test x"$with_libspng" != x"no"; then PKG_CHECK_MODULES(SPNG, libspng >= 0.6, [AC_DEFINE(HAVE_SPNG,1,[define if you have libspng installed.]) with_libspng=yes - PACKAGES_USED="$PACKAGES_USED spng" + PACKAGES_USED="$PACKAGES_USED libspng" ], - [with_libspng=no + [PKG_CHECK_MODULES(SPNG, spng >= 0.6, + [AC_DEFINE(HAVE_SPNG,1,[define if you have libspng installed.]) + with_libspng=yes + PACKAGES_USED="$PACKAGES_USED spng" + ], + [with_libspng=no + ] + ) ] ) fi # look for PNG with pkg-config ... fall back to our tester +# we can have both PNG and SPNG enabled, with SPNG for read and PNG for +# write AC_ARG_WITH([png], AS_HELP_STRING([--without-png], [build without libpng (default: test)]))