Blame jdk8042159-allow_using_system_installed_lcms2-root.patch

80597c5
diff -ruN openjdk/common/autoconf/libraries.m4 openjdk/common/autoconf/libraries.m4
80597c5
--- openjdk/common/autoconf/libraries.m4	2013-11-14 22:04:38.039440136 -0500
80597c5
+++ openjdk/common/autoconf/libraries.m4	2013-11-14 22:05:11.474356424 -0500
80597c5
@@ -676,6 +676,46 @@
80597c5
 
80597c5
   ###############################################################################
80597c5
   #
80597c5
+  # Check for the lcms2 library
80597c5
+  #
80597c5
+
80597c5
+  AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
80597c5
+  	[use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
80597c5
+
80597c5
+  AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile,
80597c5
+               [ LCMS_FOUND=yes ],
80597c5
+               [ LCMS_FOUND=no ])
80597c5
+
80597c5
+  AC_MSG_CHECKING([for which lcms to use])
80597c5
+
80597c5
+  DEFAULT_LCMS=bundled
80597c5
+
80597c5
+  #
80597c5
+  # If user didn't specify, use DEFAULT_LCMS
80597c5
+  #
80597c5
+  if test "x${with_lcms}" = "x"; then
80597c5
+      with_lcms=${DEFAULT_LCMS}
80597c5
+  fi
80597c5
+
80597c5
+  if test "x${with_lcms}" = "xbundled"; then
80597c5
+      USE_EXTERNAL_LCMS=false
80597c5
+      AC_MSG_RESULT([bundled])
80597c5
+  elif test "x${with_lcms}" = "xsystem"; then
80597c5
+      if test "x${LCMS_FOUND}" = "xyes"; then
80597c5
+          USE_EXTERNAL_LCMS=true
80597c5
+          AC_MSG_RESULT([system])
80597c5
+      else
80597c5
+          AC_MSG_RESULT([system not found])
80597c5
+          AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
80597c5
+      fi
80597c5
+  else
80597c5
+      AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
80597c5
+  fi
80597c5
+
80597c5
+  AC_SUBST(USE_EXTERNAL_LCMS)
80597c5
+
80597c5
+  ###############################################################################
80597c5
+  #
80597c5
   # Check for the png library
80597c5
   #
80597c5