gimp r26503 - in trunk: . modules plug-ins/common plug-ins/file-jpeg



Author: mitch
Date: Mon Aug 11 17:28:41 2008
New Revision: 26503
URL: http://svn.gnome.org/viewvc/gimp?rev=26503&view=rev

Log:
2008-08-11  Michael Natterer  <mitch gimp org>

	* configure.in: check for lcms with PKG_CHECK_MODULES(). Remove
	check for <lcms.h> vs. <lsmc/lsmc.h> because the pc file should
	give us the right location now.

	* modules/cdisplay_lcms.c
	* modules/cdisplay_proof.c
	* modules/colorsel_cmyk_lcms.c
	* plug-ins/file-jpeg/jpeg-load.c
	* plug-ins/common/lcms.c: #include <lcms.h> and nothing else.

	* modules/Makefile.am
	* plug-ins/file-jpeg/Makefile.am
	* plug-ins/common/plugin-defs.pl: add LCMS_CFLAGS where appropriate.

	* plug-ins/common/Makefile.am: regenerated.



Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/modules/Makefile.am
   trunk/modules/cdisplay_lcms.c
   trunk/modules/cdisplay_proof.c
   trunk/modules/colorsel_cmyk_lcms.c
   trunk/plug-ins/common/Makefile.am
   trunk/plug-ins/common/lcms.c
   trunk/plug-ins/common/plugin-defs.pl
   trunk/plug-ins/file-jpeg/Makefile.am
   trunk/plug-ins/file-jpeg/jpeg-load.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Aug 11 17:28:41 2008
@@ -62,6 +62,7 @@
 m4_define([dbus_glib_required_version], [0.70])
 m4_define([libhal_required_version], [0.5.7])
 m4_define([exif_required_version], [0.6.15])
+m4_define([lcms_required_version], [1.16])
 
 
 AC_INIT([GIMP], [gimp_version],
@@ -1426,30 +1427,16 @@
 
 AC_ARG_WITH(lcms, [  --without-lcms          build without lcms support])
 
-have_lcms=no
+have_lcms="no (lcms support disabled)"
 if test "x$with_lcms" != xno; then
-  AC_CHECK_LIB(lcms, cmsCreate_sRGBProfile, [
-    AC_CHECK_HEADER(lcms.h,
-      have_lcms=yes, [
-      AC_CHECK_HEADER(lcms/lcms.h,
-        have_lcms=yes
-        AC_DEFINE(HAVE_LCMS_LCMS_H, 1,
-          [Define to 1 if the lcms header must be included as lcms/lcms.h]))
-      ])
-  ])
-  if test "x$have_lcms" = xyes; then
+  have_lcms=yes
+  PKG_CHECK_MODULES(LCMS, lcms >= lcms_required_version,
     AC_DEFINE(HAVE_LCMS, 1, [Define to 1 if lcms is available])
-    LCMS_LIBS="-llcms"
-    LCMS='lcms$(EXEEXT)'
-  else
-    have_lcms="no (lcms not found or unusable)"
-  fi
-else
-  have_lcms="no (lcms support disabled)"
+    LCMS='lcms$(EXEEXT)',
+    have_lcms="no (lcms not found or unusable)")
 fi
 
 AC_SUBST(LCMS)
-AC_SUBST(LCMS_LIBS)
 AM_CONDITIONAL(HAVE_LCMS, test "x$have_lcms" = xyes)
 
 

Modified: trunk/modules/Makefile.am
==============================================================================
--- trunk/modules/Makefile.am	(original)
+++ trunk/modules/Makefile.am	Mon Aug 11 17:28:41 2008
@@ -60,6 +60,7 @@
 
 if HAVE_LCMS
 libcolorsel_cmyk_la_SOURCES = colorsel_cmyk_lcms.c
+libcolorsel_cmyk_la_CFLAGS = $(LCMS_CFLAGS)
 libcolorsel_cmyk_la_LIBADD = $(libgimpconfig) $(colorsel_libadd) $(LCMS_LIBS)
 else
 libcolorsel_cmyk_la_SOURCES = colorsel_cmyk.c
@@ -89,6 +90,7 @@
 libcdisplay_highcontrast_la_LIBADD = $(cdisplay_libadd)
 
 libcdisplay_lcms_la_SOURCES = cdisplay_lcms.c
+libcdisplay_lcms_la_CFLAGS = $(LCMS_CFLAGS)
 libcdisplay_lcms_la_LDFLAGS = -avoid-version -module $(no_undefined)
 libcdisplay_lcms_la_LIBADD = $(cdisplay_libadd) $(LCMS_LIBS)
 
@@ -97,6 +99,7 @@
 endif
 
 libcdisplay_proof_la_SOURCES = cdisplay_proof.c
+libcdisplay_proof_la_CFLAGS = $(LCMS_CFLAGS)
 libcdisplay_proof_la_LDFLAGS = -avoid-version -module $(no_undefined)
 libcdisplay_proof_la_LIBADD = $(cdisplay_libadd) $(LCMS_LIBS)
 

Modified: trunk/modules/cdisplay_lcms.c
==============================================================================
--- trunk/modules/cdisplay_lcms.c	(original)
+++ trunk/modules/cdisplay_lcms.c	Mon Aug 11 17:28:41 2008
@@ -26,11 +26,7 @@
 #define LCMS_WIN_TYPES_ALREADY_DEFINED
 #endif
 
-#ifdef HAVE_LCMS_LCMS_H
-#include <lcms/lcms.h>
-#else
 #include <lcms.h>
-#endif
 
 #include <gtk/gtk.h>
 

Modified: trunk/modules/cdisplay_proof.c
==============================================================================
--- trunk/modules/cdisplay_proof.c	(original)
+++ trunk/modules/cdisplay_proof.c	Mon Aug 11 17:28:41 2008
@@ -20,11 +20,7 @@
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
 
-#ifdef HAVE_LCMS_LCMS_H
-#include <lcms/lcms.h>
-#else
 #include <lcms.h>
-#endif
 
 #include <gtk/gtk.h>
 

Modified: trunk/modules/colorsel_cmyk_lcms.c
==============================================================================
--- trunk/modules/colorsel_cmyk_lcms.c	(original)
+++ trunk/modules/colorsel_cmyk_lcms.c	Mon Aug 11 17:28:41 2008
@@ -20,11 +20,7 @@
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
 
-#ifdef HAVE_LCMS_LCMS_H
-#include <lcms/lcms.h>
-#else
 #include <lcms.h>
-#endif
 
 #include <gtk/gtk.h>
 

Modified: trunk/plug-ins/common/Makefile.am
==============================================================================
--- trunk/plug-ins/common/Makefile.am	(original)
+++ trunk/plug-ins/common/Makefile.am	Mon Aug 11 17:28:41 2008
@@ -1639,6 +1639,8 @@
 	$(RT_LIBS)		\
 	$(INTLLIBS)
 
+lcms_CFLAGS = $(LCMS_CFLAGS)
+
 lcms_SOURCES = \
 	lcms.c
 

Modified: trunk/plug-ins/common/lcms.c
==============================================================================
--- trunk/plug-ins/common/lcms.c	(original)
+++ trunk/plug-ins/common/lcms.c	Mon Aug 11 17:28:41 2008
@@ -25,11 +25,7 @@
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
 
-#ifdef HAVE_LCMS_LCMS_H
-#include <lcms/lcms.h>
-#else
 #include <lcms.h>
-#endif
 
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>

Modified: trunk/plug-ins/common/plugin-defs.pl
==============================================================================
--- trunk/plug-ins/common/plugin-defs.pl	(original)
+++ trunk/plug-ins/common/plugin-defs.pl	Mon Aug 11 17:28:41 2008
@@ -90,7 +90,7 @@
     'illusion' => { ui => 1 },
     'iwarp' => { ui => 1 },
     'jigsaw' => { ui => 1 },
-    'lcms' => { ui => 1, optional => 1, libs => 'LCMS_LIBS' },
+    'lcms' => { ui => 1, optional => 1, libs => 'LCMS_LIBS', cflags => 'LCMS_CFLAGS' },
     'lens-apply' => { ui => 1 },
     'lens-distortion' => { ui => 1 },
     'lens-flare' => { ui => 1 },

Modified: trunk/plug-ins/file-jpeg/Makefile.am
==============================================================================
--- trunk/plug-ins/file-jpeg/Makefile.am	(original)
+++ trunk/plug-ins/file-jpeg/Makefile.am	Mon Aug 11 17:28:41 2008
@@ -20,6 +20,7 @@
 	-I$(top_srcdir)	\
 	$(GTK_CFLAGS)	\
 	$(EXIF_CFLAGS)	\
+	$(LCMS_CFLAGS)	\
 	-I$(includedir)
 
 libexec_PROGRAMS = file-jpeg

Modified: trunk/plug-ins/file-jpeg/jpeg-load.c
==============================================================================
--- trunk/plug-ins/file-jpeg/jpeg-load.c	(original)
+++ trunk/plug-ins/file-jpeg/jpeg-load.c	Mon Aug 11 17:28:41 2008
@@ -32,12 +32,8 @@
 #endif /* HAVE_EXIF */
 
 #ifdef HAVE_LCMS
-#ifdef HAVE_LCMS_LCMS_H
-#include <lcms/lcms.h>
-#else
 #include <lcms.h>
 #endif
-#endif
 
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>



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