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



commit 7bd4d2678add95360fc0c0cfcae8d1bc2dcdf8dc
Author: Michael Natterer <mitch gimp org>
Date:   Sun Nov 3 21:19:51 2013 +0100

    configure, plug-ins, modules: make lcms a hard dependency

 INSTALL                        |   13 +++++--------
 configure.ac                   |   17 +----------------
 modules/Makefile.am            |   17 +++--------------
 plug-ins/common/Makefile.am    |    3 +--
 plug-ins/common/plugin-defs.pl |    2 +-
 plug-ins/file-jpeg/jpeg-load.c |   14 --------------
 6 files changed, 11 insertions(+), 55 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index 98054d8..a331fd8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -72,14 +72,14 @@ header files installed.
      at http://redmine.yorba.org/projects/gexiv2/wiki .
 
  10. Some other third party libraries or programs are needed for some
-     of the available plug-ins. libpng, libjpeg are hard dependencies
-     that can not be disabled.
+     of the available plug-ins. libpng, libjpeg and lcms are hard
+     dependencies that can not be disabled.
 
  11. You may want to install other third party libraries or programs
      that are needed for some of the available plug-ins. We recommend
-     to check that the following libraries are installed: lcms,
-     libpoppler, libtiff, webkit, libmng, librsvg, libwmf, libgs
-     (Ghostscript), libaa and libjasper.
+     to check that the following libraries are installed: libpoppler,
+     libtiff, webkit, libmng, librsvg, libwmf, libgs (Ghostscript),
+     libaa and libjasper.
 
  12. The Python extension requires Python development headers to be
      present. You will also need PyGTK and the respective development
@@ -184,9 +184,6 @@ These are:
   --without-librsvg.  If for some reason you want to build GIMP without
      SVG support, you can build --without-librsvg.
 
-  --without-lcms.  If for some reason you want to build GIMP without
-     using lcms for color support, you can build with --without-lcms.
-
   --without-poppler.  If for some reason you don't want to build the PDF
      Import plug-in that uses libpoppler, you can use --without-poppler.
 
diff --git a/configure.ac b/configure.ac
index 97981fa..0808bf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1573,19 +1573,7 @@ AC_SUBST(JP2_LIBS)
 # Check for lcms
 ################
 
-AC_ARG_WITH(lcms, [  --without-lcms          build without lcms support])
-
-have_lcms="no (lcms support disabled)"
-if test "x$with_lcms" != xno; then
-  have_lcms=yes
-  PKG_CHECK_MODULES(LCMS, lcms2 >= lcms_required_version,
-    AC_DEFINE(HAVE_LCMS, 1, [Define to 1 if lcms is available])
-    LCMS='lcms$(EXEEXT)',
-    have_lcms="no (lcms not found or unusable)")
-fi
-
-AC_SUBST(LCMS)
-AM_CONDITIONAL(HAVE_LCMS, test "x$have_lcms" = xyes)
+PKG_CHECK_MODULES(LCMS, lcms2 >= lcms_required_version)
 
 
 ######################
@@ -2326,7 +2314,6 @@ Optional Plug-Ins:
   Compressor:          $have_compressor
   Ghostscript:         $have_gs
   Help Browser:        $have_webkit
-  LCMS:                $have_lcms
   JPEG 2000:           $have_jp2
   MNG:                 $have_libmng
   OpenEXR:             $have_openexr
@@ -2351,8 +2338,6 @@ Optional Modules:
   ALSA (MIDI Input):   $have_alsa
   Linux Input:         $have_linux_input (GUdev support: $have_libgudev)
   DirectInput (Win32): $have_dx_dinput
-  Color Correction:    $have_lcms
-  Soft Proof:          $have_lcms
 
 Tests:
   Use xvfb-run         $have_xvfb_run
diff --git a/modules/Makefile.am b/modules/Makefile.am
index dd9b8fb..9b000b8 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -18,11 +18,6 @@ AM_CPPFLAGS = \
         $(GTK_CFLAGS)  \
         -I$(includedir)
 
-if HAVE_LCMS
-display_filter_lcms_module = libdisplay-filter-lcms.la
-display_filter_proof_module = libdisplay-filter-proof.la
-endif
-
 if PLATFORM_WIN32
 else
 controller_midi_module = libcontroller-midi.la
@@ -43,8 +38,8 @@ lib_LTLIBRARIES = \
        libdisplay-filter-color-blind.la        \
        libdisplay-filter-gamma.la              \
        libdisplay-filter-high-contrast.la      \
-       $(display_filter_lcms_module)           \
-       $(display_filter_proof_module)          \
+       libdisplay-filter-lcms.la               \
+       libdisplay-filter-proof.la              \
        $(controller_midi_module)               \
        $(controller_linux_input_module)        \
        $(controller_dx_dinput_module)
@@ -56,16 +51,10 @@ color_selector_libadd = $(libgimpcolor) $(modules_libadd)
 display_filter_libadd = $(libgimpbase) $(libgimpconfig) $(libgimpcolor) $(modules_libadd) $(GEGL_LIBS)
 controller_libadd = $(modules_libadd)
 
-if HAVE_LCMS
 libcolor_selector_cmyk_la_SOURCES = color-selector-cmyk-lcms.c
+libcolor_selector_cmyk_la_LDFLAGS = -avoid-version -module $(no_undefined)
 libcolor_selector_cmyk_la_CFLAGS = $(LCMS_CFLAGS)
 libcolor_selector_cmyk_la_LIBADD = $(libgimpconfig) $(color_selector_libadd) $(LCMS_LIBS)
-else
-libcolor_selector_cmyk_la_SOURCES = color-selector-cmyk.c
-libcolor_selector_cmyk_la_LIBADD = $(color_selector_libadd)
-endif
-
-libcolor_selector_cmyk_la_LDFLAGS = -avoid-version -module $(no_undefined)
 
 libcolor_selector_water_la_SOURCES = color-selector-water.c
 libcolor_selector_water_la_LDFLAGS = -avoid-version -module $(no_undefined)
diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am
index bfd0eaa..85fd3c7 100644
--- a/plug-ins/common/Makefile.am
+++ b/plug-ins/common/Makefile.am
@@ -129,7 +129,7 @@ libexec_PROGRAMS = \
        illusion \
        iwarp \
        jigsaw \
-       $(LCMS) \
+       lcms \
        lens-apply \
        lens-flare \
        $(MAIL) \
@@ -183,7 +183,6 @@ EXTRA_PROGRAMS = \
        file-wmf \
        file-xmc \
        file-xpm \
-       lcms \
        mail \
        screenshot \
        web-page
diff --git a/plug-ins/common/plugin-defs.pl b/plug-ins/common/plugin-defs.pl
index 7e72237..2ddc716 100644
--- a/plug-ins/common/plugin-defs.pl
+++ b/plug-ins/common/plugin-defs.pl
@@ -84,7 +84,7 @@
     'illusion' => { ui => 1 },
     'iwarp' => { ui => 1 },
     'jigsaw' => { ui => 1 },
-    'lcms' => { ui => 1, gegl => 1, optional => 1, libs => 'LCMS_LIBS', cflags => 'LCMS_CFLAGS' },
+    'lcms' => { ui => 1, gegl => 1, libs => 'LCMS_LIBS', cflags => 'LCMS_CFLAGS' },
     'lens-apply' => { ui => 1 },
     'lens-flare' => { ui => 1 },
     'mail' => { ui => 1, optional => 1 },
diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c
index 91a38d7..d7ea0db 100644
--- a/plug-ins/file-jpeg/jpeg-load.c
+++ b/plug-ins/file-jpeg/jpeg-load.c
@@ -28,9 +28,7 @@
 #include <jpeglib.h>
 #include <jerror.h>
 
-#ifdef HAVE_LCMS
 #include <lcms2.h>
-#endif
 
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
@@ -79,11 +77,7 @@ load_image (const gchar  *filename,
   gint             tile_height;
   gint             scanlines;
   gint             i, start, end;
-#ifdef HAVE_LCMS
   cmsHTRANSFORM    cmyk_transform = NULL;
-#else
-  gpointer         cmyk_transform = NULL;
-#endif
 
   /* We set up the normal JPEG error routines. */
   cinfo.err = jpeg_std_error (&jerr.pub);
@@ -382,10 +376,8 @@ load_image (const gchar  *filename,
    * with the stdio data source.
    */
 
-#ifdef HAVE_LCMS
   if (cmyk_transform)
     cmsDeleteTransform (cmyk_transform);
-#endif
 
   /* Step 8: Release JPEG decompression object */
 
@@ -601,7 +593,6 @@ static gpointer
 jpeg_load_cmyk_transform (guint8 *profile_data,
                           gsize   profile_len)
 {
-#ifdef HAVE_LCMS
   GimpColorConfig *config       = gimp_get_color_configuration ();
   cmsHPROFILE      cmyk_profile = NULL;
   cmsHPROFILE      rgb_profile  = NULL;
@@ -677,9 +668,6 @@ jpeg_load_cmyk_transform (guint8 *profile_data,
   g_object_unref (config);
 
   return transform;
-#else  /* HAVE_LCMS */
-  return NULL;
-#endif
 }
 
 
@@ -691,13 +679,11 @@ jpeg_load_cmyk_to_rgb (guchar   *buf,
   const guchar *src  = buf;
   guchar       *dest = buf;
 
-#ifdef HAVE_LCMS
   if (transform)
     {
       cmsDoTransform (transform, buf, buf, pixels);
       return;
     }
-#endif
 
   while (pixels--)
     {


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