diff -Nurd -x'*~' libmng-1.0.10.orig/libmng_cms.c libmng-1.0.10/libmng_cms.c --- libmng-1.0.10.orig/libmng_cms.c 2004-12-20 07:03:46.000000000 -0500 +++ libmng-1.0.10/libmng_cms.c 2015-02-17 22:42:38.000000000 -0500 @@ -104,7 +104,6 @@ void mnglcms_initlibrary () { - cmsErrorAction (LCMS_ERROR_IGNORE); /* LCMS should ignore errors! */ } /* ************************************************************************** */ @@ -132,14 +131,14 @@ {0.3000, 0.6000, 1.0}, {0.1500, 0.0600, 1.0} }; - LPGAMMATABLE Gamma24[3]; + cmsToneCurve* Gamma24[3]; mng_cmsprof hsRGB; - cmsWhitePointFromTemp(6504, &D65); - Gamma24[0] = Gamma24[1] = Gamma24[2] = cmsBuildGamma(256, 2.4); + cmsWhitePointFromTemp(&D65, 6504); + Gamma24[0] = Gamma24[1] = Gamma24[2] = + cmsBuildGamma(NULL, 2.4); hsRGB = cmsCreateRGBProfile(&D65, &Rec709Primaries, Gamma24); - cmsFreeGamma(Gamma24[0]); - + cmsFreeToneCurve(Gamma24[0]); return hsRGB; } @@ -368,16 +367,13 @@ pGammatable [0] = /* and build the lookup tables */ pGammatable [1] = - pGammatable [2] = cmsBuildGamma (256, dGamma); - + pGammatable [2] = + cmsBuildGamma(NULL, dGamma); if (!pGammatable [0]) /* enough memory ? */ MNG_ERRORL (pData, MNG_LCMS_NOMEM); /* create the profile */ hProf = cmsCreateRGBProfile (&sWhitepoint, &sPrimaries, pGammatable); - - cmsFreeGamma (pGammatable [0]); /* free the temporary gamma tables ? */ - /* yes! but just the one! */ - + cmsFreeToneCurve(pGammatable [0]); pData->hProf1 = hProf; /* save for future use */ if (!hProf) /* handle error ? */ diff -Nurd -x'*~' libmng-1.0.10.orig/libmng_types.h libmng-1.0.10/libmng_types.h --- libmng-1.0.10.orig/libmng_types.h 2007-04-20 04:41:59.000000000 -0400 +++ libmng-1.0.10/libmng_types.h 2015-02-17 22:39:22.000000000 -0500 @@ -178,7 +178,7 @@ #ifndef ZLIB_DLL #undef FAR #endif -#include +#include #endif /* MNG_INCLUDE_LCMS */ #ifdef MNG_INCLUDE_IJG6B /* IJG's jpgsrc6b */ @@ -388,7 +388,7 @@ typedef cmsHTRANSFORM mng_cmstrans; typedef cmsCIExyY mng_CIExyY; typedef cmsCIExyYTRIPLE mng_CIExyYTRIPLE; -typedef LPGAMMATABLE mng_gammatabp; +typedef cmsToneCurve* mng_gammatabp; #endif /* MNG_INCLUDE_LCMS */ /* ************************************************************************** */ diff -Nurd -x'*~' libmng-1.0.10.orig/makefiles/configure.in libmng-1.0.10/makefiles/configure.in --- libmng-1.0.10.orig/makefiles/configure.in 2005-01-30 05:28:00.000000000 -0500 +++ libmng-1.0.10/makefiles/configure.in 2015-02-18 15:46:11.000000000 -0500 @@ -1,12 +1,12 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT +AC_INIT([libmng], [1.0.9]) AC_CONFIG_SRCDIR([libmng.h]) AC_PREREQ(2.52) dnl this call will define PACKAGE and VERSION dnl please use this as the primary reference for the version number -AM_INIT_AUTOMAKE(libmng, 1.0.9) +AM_INIT_AUTOMAKE dnl pass the version string on the the makefiles AC_SUBST(PACKAGE) @@ -15,10 +15,6 @@ dnl Checks for programs. AC_PROG_CC AC_ISC_POSIX -AM_C_PROTOTYPES -if test "x$U" != "x"; then - AC_MSG_ERROR(Compiler not ANSI compliant) -fi AM_PROG_LIBTOOL AC_PROG_INSTALL @@ -168,10 +164,10 @@ fi if test "x$with_lcms" != "xno"; then - AC_CHECK_HEADER(lcms.h, [ + AC_CHECK_HEADER(lcms2.h, [ have_lcms=yes - AC_CHECK_LIB(lcms, cmsCreateRGBProfile, [ - LIBS="$LIBS -llcms" + AC_CHECK_LIB(lcms2, cmsCreateRGBProfile, [ + LIBS="$LIBS -llcms2" AC_DEFINE(HAVE_LIBLCMS) dnl for now this implies MNG_INCLUDE_LCMS in the headers: AC_DEFINE(MNG_FULL_CMS)