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



commit 17cadd3c38cd1131a2f02ff5c3f74b2827f012d9
Author: Michael Natterer <mitch gimp org>
Date:   Sun Feb 16 16:24:34 2014 +0100

    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.

 configure.ac                   |   16 +++++-----------
 plug-ins/Makefile.am           |    2 --
 plug-ins/common/Makefile.am    |    3 +--
 plug-ins/common/plugin-defs.pl |    2 +-
 4 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a3b6d84..ec4c615 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
-
-AC_SUBST(FILE_PSP)
+MIME_TYPES="$MIME_TYPES;image/x-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([
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 99f6990..7c4464c 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -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
diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am
index f8a917a..19f5ebe 100644
--- a/plug-ins/common/Makefile.am
+++ b/plug-ins/common/Makefile.am
@@ -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 \
diff --git a/plug-ins/common/plugin-defs.pl b/plug-ins/common/plugin-defs.pl
index 67fc57f..67b3fdb 100644
--- a/plug-ins/common/plugin-defs.pl
+++ b/plug-ins/common/plugin-defs.pl
@@ -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' },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]