diff options
author | Albert Astals Cid <aacid@kde.org> | 2009-05-17 12:07:05 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2009-05-17 12:08:53 +0200 |
commit | e0fcf7055af480498a81a000dcd9f977a783df66 (patch) | |
tree | be80fd61952ebf520a9a6f830d18e5072726bb5f /configure.ac | |
parent | 657734c19274ab281328cba9297eca45e48777aa (diff) |
Use pkgconfig for autotools cms check
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 4db7815d..1eb8fd1d 100644 --- a/configure.ac +++ b/configure.ac @@ -458,12 +458,14 @@ AC_ARG_ENABLE(cms, AC_HELP_STRING([--disable-cms], [Don't use color management system.]), enable_cms=$enableval, - enable_cms="yes") + enable_cms="try") if test x$enable_cms = xyes; then - AC_CHECK_LIB([lcms],cmsOpenProfileFromFile,, - AC_MSG_ERROR("*** lcms library not found ***")) - AC_CHECK_HEADERS([lcms.h],, - AC_MSG_ERROR("*** lcms headers not found ***")) + PKG_CHECK_MODULES(LCMS, lcms) +elif test x$enable_cms = xtry; then + PKG_CHECK_MODULES(LCMS, lcms, [enable_cms=yes], [enable_cms=no]) +fi + +if test "x$enable_cms" = "xyes"; then AC_DEFINE(USE_CMS, 1, [Defines if use cms]) fi AM_CONDITIONAL(USE_CMS, test x$enable_cms = xyes) |