From e4eec5b5b1a8bc6629c63561ea1a4075b2706be4 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 11 Aug 2008 17:28:41 +0000 Subject: [PATCH] check for lcms with PKG_CHECK_MODULES(). Remove check for vs. 2008-08-11 Michael Natterer * configure.in: check for lcms with PKG_CHECK_MODULES(). Remove check for vs. 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 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. svn path=/trunk/; revision=26503 --- ChangeLog | 20 +++++++++++++++++++- configure.in | 25 ++++++------------------- modules/Makefile.am | 3 +++ modules/cdisplay_lcms.c | 4 ---- modules/cdisplay_proof.c | 4 ---- modules/colorsel_cmyk_lcms.c | 4 ---- plug-ins/common/Makefile.am | 2 ++ plug-ins/common/lcms.c | 4 ---- plug-ins/common/plugin-defs.pl | 2 +- plug-ins/file-jpeg/Makefile.am | 1 + plug-ins/file-jpeg/jpeg-load.c | 4 ---- 11 files changed, 32 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 350327e331..5a90350079 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-08-11 Michael Natterer + + * configure.in: check for lcms with PKG_CHECK_MODULES(). Remove + check for vs. 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 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. + 2008-08-11 Sven Neumann Please re-run autogen.sh after this update, and let me know if @@ -25,7 +43,7 @@ 2008-08-11 Michael Natterer * configure.in: change all LIBFOO variables to FOO_LIBS for - consistency, could get rid of some variables alltogether since + consistency, got rid of some variables alltogether since PNG_CHECK_MODULES() already defined FOO_LIBS. * tools/Makefile.am diff --git a/configure.in b/configure.in index 04ddb316cf..1ccff23a78 100644 --- a/configure.in +++ b/configure.in @@ -62,6 +62,7 @@ m4_define([libcurl_required_version], [7.15.1]) 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_SUBST(WMF_CFLAGS) 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) diff --git a/modules/Makefile.am b/modules/Makefile.am index 9a52b76be9..fbfde4ad5f 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -60,6 +60,7 @@ controller_libadd = $(modules_libadd) 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_LDFLAGS = -avoid-version -module $(no_undefined) 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 @@ libcdisplay_lcms_la_LIBADD += -lgdi32 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) diff --git a/modules/cdisplay_lcms.c b/modules/cdisplay_lcms.c index 349d759f0d..239fa50926 100644 --- a/modules/cdisplay_lcms.c +++ b/modules/cdisplay_lcms.c @@ -26,11 +26,7 @@ #define LCMS_WIN_TYPES_ALREADY_DEFINED #endif -#ifdef HAVE_LCMS_LCMS_H -#include -#else #include -#endif #include diff --git a/modules/cdisplay_proof.c b/modules/cdisplay_proof.c index 5674056a2d..79dad9dc94 100644 --- a/modules/cdisplay_proof.c +++ b/modules/cdisplay_proof.c @@ -20,11 +20,7 @@ #include /* lcms.h uses the "inline" keyword */ -#ifdef HAVE_LCMS_LCMS_H -#include -#else #include -#endif #include diff --git a/modules/colorsel_cmyk_lcms.c b/modules/colorsel_cmyk_lcms.c index f3afe03e45..a49d553ffe 100644 --- a/modules/colorsel_cmyk_lcms.c +++ b/modules/colorsel_cmyk_lcms.c @@ -20,11 +20,7 @@ #include /* lcms.h uses the "inline" keyword */ -#ifdef HAVE_LCMS_LCMS_H -#include -#else #include -#endif #include diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am index 1c675657f6..bae6b2ef87 100644 --- a/plug-ins/common/Makefile.am +++ b/plug-ins/common/Makefile.am @@ -1639,6 +1639,8 @@ jigsaw_LDADD = \ $(RT_LIBS) \ $(INTLLIBS) +lcms_CFLAGS = $(LCMS_CFLAGS) + lcms_SOURCES = \ lcms.c diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c index 8172d9e60c..c11d9717b2 100644 --- a/plug-ins/common/lcms.c +++ b/plug-ins/common/lcms.c @@ -25,11 +25,7 @@ #include /* lcms.h uses the "inline" keyword */ -#ifdef HAVE_LCMS_LCMS_H -#include -#else #include -#endif #include #include diff --git a/plug-ins/common/plugin-defs.pl b/plug-ins/common/plugin-defs.pl index e0b04ead8d..bb3507b243 100644 --- a/plug-ins/common/plugin-defs.pl +++ b/plug-ins/common/plugin-defs.pl @@ -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 }, diff --git a/plug-ins/file-jpeg/Makefile.am b/plug-ins/file-jpeg/Makefile.am index 09c1c55cfb..ae78a00592 100644 --- a/plug-ins/file-jpeg/Makefile.am +++ b/plug-ins/file-jpeg/Makefile.am @@ -20,6 +20,7 @@ INCLUDES = \ -I$(top_srcdir) \ $(GTK_CFLAGS) \ $(EXIF_CFLAGS) \ + $(LCMS_CFLAGS) \ -I$(includedir) libexec_PROGRAMS = file-jpeg diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c index 396a8ec71e..8baa5cb9eb 100644 --- a/plug-ins/file-jpeg/jpeg-load.c +++ b/plug-ins/file-jpeg/jpeg-load.c @@ -32,12 +32,8 @@ #endif /* HAVE_EXIF */ #ifdef HAVE_LCMS -#ifdef HAVE_LCMS_LCMS_H -#include -#else #include #endif -#endif #include #include