configure, plug-ins: make libpng a hard dependency

This commit is contained in:
Michael Natterer 2013-11-02 17:11:21 +01:00
parent 4573a12b70
commit a76460f497
4 changed files with 6 additions and 29 deletions

View File

@ -1282,27 +1282,10 @@ AC_SUBST(GS_LIBS)
# Check for libpng
##################
AC_ARG_WITH(libpng, [ --without-libpng build without PNG support])
PKG_CHECK_MODULES(PNG, libpng >= libpng_required_version)
have_libpng=no
if test "x$with_libpng" != xno; then
have_libpng=yes
PKG_CHECK_MODULES(PNG, libpng >= libpng_required_version,
FILE_PNG='file-png$(EXEEXT)',
[have_libpng="no (libpng not found)"
AC_MSG_ERROR([
*** Checks for PNG library failed. You can build without it by passing
*** --without-libpng to configure but you won't be able to use PNGs then.])])
fi
if test "x$have_libpng" = xyes; then
MIME_TYPES="$MIME_TYPES;image/png;image/x-icon"
PNG_CFLAGS="$PNG_CFLAGS -DPNG_PEDANTIC_WARNINGS"
fi
AC_SUBST(FILE_PNG)
AM_CONDITIONAL(HAVE_PNG, test "x$have_libpng" = xyes)
MIME_TYPES="$MIME_TYPES;image/png;image/x-icon"
PNG_CFLAGS="$PNG_CFLAGS -DPNG_PEDANTIC_WARNINGS"
##################
@ -2370,7 +2353,6 @@ Optional Plug-Ins:
OpenEXR: $have_openexr
PDF (import): $have_poppler
PDF (export): $have_cairo_pdf
PNG: $have_libpng
Print: $enable_print
PSP: $have_zlib
Python: $enable_python

View File

@ -37,10 +37,6 @@ endif
endif
endif
if HAVE_PNG
file_ico = file-ico
endif
if OS_WIN32
twain = twain
win_snap = win-snap
@ -61,7 +57,7 @@ SUBDIRS = \
file-faxg3 \
file-fits \
file-fli \
$(file_ico) \
file-ico \
$(file_jpeg) \
$(file_psd) \
file-sgi \

View File

@ -103,7 +103,7 @@ libexec_PROGRAMS = \
$(FILE_PDF_LOAD) \
$(FILE_PDF_SAVE) \
file-pix \
$(FILE_PNG) \
file-png \
file-pnm \
$(FILE_PS) \
$(FILE_PSP) \
@ -175,7 +175,6 @@ EXTRA_PROGRAMS = \
file-mng \
file-pdf-load \
file-pdf-save \
file-png \
file-ps \
file-psp \
file-svg \

View File

@ -56,7 +56,7 @@
'file-pat' => { ui => 1, gegl => 1 },
'file-pcx' => { ui => 1, gegl => 1 },
'file-pix' => { ui => 1, gegl => 1 },
'file-png' => { ui => 1, gegl => 1, optional => 1, libs => 'PNG_LIBS', cflags => 'PNG_CFLAGS' },
'file-png' => { ui => 1, gegl => 1, libs => 'PNG_LIBS', cflags => 'PNG_CFLAGS' },
'file-pnm' => { ui => 1, gegl => 1 },
'file-pdf-load' => { ui => 1, optional => 1, libs => 'POPPLER_LIBS', cflags => 'POPPLER_CFLAGS' },
'file-pdf-save' => { ui => 1, gegl => 1, optional => 1, libs => 'CAIRO_PDF_LIBS', cflags => 'CAIRO_PDF_CFLAGS' },