configure, plug-ins: really make libz a hard dependency

Don't check for it as if it were optional, and error out further down
in configure.ac. Instead error out immediately and remove all other
checks and Makefile hacks.
This commit is contained in:
Michael Natterer 2014-02-16 16:24:34 +01:00
parent 7c493f76f8
commit 17cadd3c38
4 changed files with 7 additions and 16 deletions

View File

@ -1163,22 +1163,16 @@ AC_SUBST(JPEG_LIBS)
# Check for libz
################
have_zlib=yes
if test -z "$Z_LIBS"; then
AC_CHECK_LIB(z, gzsetparams,
[AC_CHECK_HEADER(zlib.h,
FILE_PSP='file-psp$(EXEEXT)'; Z_LIBS='-lz',
[have_zlib="no (ZLIB header files not found)"])],
[have_zlib="no (ZLIB library not found)"])
Z_LIBS='-lz',
AC_MSG_ERROR([ZLIB header files not found]))],
AC_MSG_ERROR([ZLIB library not found]))
fi
if test "x$have_zlib" = xyes; then
MIME_TYPES="$MIME_TYPES;image/x-psp"
fi
MIME_TYPES="$MIME_TYPES;image/x-psp"
AC_SUBST(FILE_PSP)
AM_CONDITIONAL(HAVE_Z, test "x$have_zlib" = xyes)
AC_SUBST(Z_LIBS)
@ -1233,7 +1227,7 @@ AM_CONDITIONAL(HAVE_LIBLZMA, test "x$have_liblzma" = xyes)
# with fewer libraries.
#######################################################################
have_compressor=no
if test "x$have_zlib" = xyes && test "x$have_libbzip2" = xyes && test "x$have_liblzma" = xyes; then
if test "x$have_libbzip2" = xyes && test "x$have_liblzma" = xyes; then
have_compressor=yes
else
AC_MSG_ERROR([

View File

@ -24,13 +24,11 @@ if HAVE_MAC_TWAIN
twain = twain
endif
if HAVE_Z
if HAVE_BZIP2
if HAVE_LIBLZMA
file_compressor = file-compressor
endif
endif
endif
if OS_WIN32
twain = twain

View File

@ -103,7 +103,7 @@ libexec_PROGRAMS = \
file-png \
file-pnm \
$(FILE_PS) \
$(FILE_PSP) \
file-psp \
file-raw-data \
file-sunras \
$(FILE_SVG) \
@ -173,7 +173,6 @@ EXTRA_PROGRAMS = \
file-pdf-load \
file-pdf-save \
file-ps \
file-psp \
file-svg \
file-tiff-load \
file-tiff-save \

View File

@ -58,7 +58,7 @@
'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' },
'file-ps' => { ui => 1, gegl => 1, optional => 1, libs => 'GS_LIBS' },
'file-psp' => { ui => 1, gegl => 1, optional => 1, libs => 'Z_LIBS' },
'file-psp' => { ui => 1, gegl => 1, libs => 'Z_LIBS' },
'file-raw-data' => { ui => 1, gegl => 1 },
'file-sunras' => { ui => 1, gegl => 1 },
'file-svg' => { ui => 1, optional => 1, libs => 'SVG_LIBS', cflags => 'SVG_CFLAGS' },