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



commit a76460f49788518326373d2da794b5f35aa47903
Author: Michael Natterer <mitch gimp org>
Date:   Sat Nov 2 17:11:21 2013 +0100

    configure, plug-ins: make libpng a hard dependency

 configure.ac                   |   24 +++---------------------
 plug-ins/Makefile.am           |    6 +-----
 plug-ins/common/Makefile.am    |    3 +--
 plug-ins/common/plugin-defs.pl |    2 +-
 4 files changed, 6 insertions(+), 29 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4777659..7f3a76d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 38cc20f..488358a 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -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                \
diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am
index 595c017..bfd0eaa 100644
--- a/plug-ins/common/Makefile.am
+++ b/plug-ins/common/Makefile.am
@@ -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 \
diff --git a/plug-ins/common/plugin-defs.pl b/plug-ins/common/plugin-defs.pl
index 82912a7..7e72237 100644
--- a/plug-ins/common/plugin-defs.pl
+++ b/plug-ins/common/plugin-defs.pl
@@ -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' },


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