From bfd322cff7aee206374d809ce1857575c5a05130 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 21 Sep 2018 08:53:03 +0000 Subject: [PATCH] Make it possible to compile without png support. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4163 --- configure.ac | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 8f3e64bf..fb8d28fb 100644 --- a/configure.ac +++ b/configure.ac @@ -417,13 +417,20 @@ else fi AH_TEMPLATE(C_SSHOT,[Define to 1 to enable screenshots, requires libpng]) +AC_ARG_ENABLE(screenshots,AC_HELP_STRING([--disable-screenshots],[Disable screenshots and movie recording]),,enable_screenshots=yes) AC_CHECK_HEADER(png.h,have_png_h=yes,) AC_CHECK_LIB(png, png_get_io_ptr, have_png_lib=yes, ,-lz) -if test x$have_png_lib = xyes -a x$have_png_h = xyes ; then - LIBS="$LIBS -lpng -lz" - AC_DEFINE(C_SSHOT,1) +AC_MSG_CHECKING([whether screenshots will be enabled]) +if test x$enable_screenshots = xyes; then + if test x$have_png_lib = xyes -a x$have_png_h = xyes ; then + LIBS="$LIBS -lpng -lz" + AC_DEFINE(C_SSHOT,1) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no, can't find libpng.]) + fi else - AC_MSG_WARN([Can't find libpng, screenshot support disabled]) + AC_MSG_RESULT([no]) fi AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL_net])