check for lcms with PKG_CHECK_MODULES(). Remove check for <lcms.h> vs.

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.


svn path=/trunk/; revision=26503
This commit is contained in:
Michael Natterer 2008-08-11 17:28:41 +00:00 committed by Michael Natterer
parent bda291f914
commit e4eec5b5b1
11 changed files with 32 additions and 41 deletions

View File

@ -1,3 +1,21 @@
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.
2008-08-11 Sven Neumann <sven@gimp.org>
Please re-run autogen.sh after this update, and let me know if
@ -25,7 +43,7 @@
2008-08-11 Michael Natterer <mitch@gimp.org>
* 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

View File

@ -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)

View File

@ -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)

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1639,6 +1639,8 @@ jigsaw_LDADD = \
$(RT_LIBS) \
$(INTLLIBS)
lcms_CFLAGS = $(LCMS_CFLAGS)
lcms_SOURCES = \
lcms.c

View File

@ -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>

View File

@ -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 },

View File

@ -20,6 +20,7 @@ INCLUDES = \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
$(EXIF_CFLAGS) \
$(LCMS_CFLAGS) \
-I$(includedir)
libexec_PROGRAMS = file-jpeg

View File

@ -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>