From 82a3980701c68949ed762b1e93dc81698db1613e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 11 Feb 2012 01:04:13 -0800 Subject: [PATCH] configure.ac: Add an --enable-libpng option Now there is a way to not link against libpng even if it's available. Signed-off-by: Jeremy Huddleston --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9f81b11..233d3dc 100644 --- a/configure.ac +++ b/configure.ac @@ -855,7 +855,14 @@ AC_SUBST(TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR) dnl ================== dnl libpng -PKG_CHECK_MODULES(PNG, [libpng], have_libpng=yes, have_libpng=no) +AC_ARG_ENABLE(libpng, AS_HELP_STRING([--enable-libpng], [Build support for libpng (default: auto)]), + [have_libpng=$enableval], [have_libpng=auto]) + +case x$have_libpng in + xyes) PKG_CHECK_MODULES(PNG, [libpng]) ;; + xno) ;; + *) PKG_CHECK_MODULES(PNG, [libpng], have_libpng=yes, have_libpng=no) ;; +esac if test x$have_libpng = xyes; then AC_DEFINE([HAVE_LIBPNG], [1], [Whether we have libpng]) -- 2.7.4