diff -ru devil-1.7.8.orig/configure devil-1.7.8/configure
--- devil-1.7.8.orig/configure	2009-03-08 16:43:20.000000000 -0400
+++ devil-1.7.8/configure	2013-11-20 09:26:47.000000000 -0500
@@ -16134,7 +16134,7 @@
 	                     { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 	                     CFLAGS="$TMP_CFLAGS"
-                             GENERAL_CFLAGS="$GENERAL_CFLAGS -std=gnu99 -fgnu89-inline"
+                             GENERAL_CFLAGS="$GENERAL_CFLAGS"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
Binary files devil-1.7.8.orig/docs/DevIL_manual.info and devil-1.7.8/docs/DevIL_manual.info differ
diff -ru devil-1.7.8.orig/src-IL/include/il_endian.h devil-1.7.8/src-IL/include/il_endian.h
--- devil-1.7.8.orig/src-IL/include/il_endian.h	2009-03-08 03:10:08.000000000 -0400
+++ devil-1.7.8/src-IL/include/il_endian.h	2013-11-20 09:31:36.000000000 -0500
@@ -19,9 +19,13 @@
 	#ifndef __BIG_ENDIAN__
 	#define __BIG_ENDIAN__ 1
 	#endif
+#else
+	#ifndef __LITTLE_ENDIAN__
+	#define __LITTLE_ENDIAN__ 1
+	#endif
 #endif
 
-#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \
+#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
   || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
  	#undef __LITTLE_ENDIAN__
 	#define Short(s) iSwapShort(s)
@@ -39,8 +43,6 @@
 	#define BigDouble(d)  
 #else
 	#undef __BIG_ENDIAN__
-	#undef __LITTLE_ENDIAN__  // Not sure if it's defined by any compiler...
-	#define __LITTLE_ENDIAN__
 	#define Short(s)  
 	#define UShort(s)  
 	#define Int(i)  
@@ -56,6 +58,7 @@
 	#define BigDouble(d) iSwapDouble(d)
 #endif
 
+#if 0
 void   iSwapUShort(ILushort *s);
 void   iSwapShort(ILshort *s);
 void   iSwapUInt(ILuint *i);
@@ -86,6 +89,7 @@
 ILubyte SaveBigInt(ILint i);
 ILubyte SaveBigFloat(ILfloat f);
 ILubyte SaveBigDouble(ILdouble d);
+#endif 
 
 #ifdef IL_ENDIAN_C
 #undef NOINLINE
@@ -94,7 +98,7 @@
 #endif
 
 #ifndef NOINLINE
-INLINE void iSwapUShort(ILushort *s)  {
+static inline void iSwapUShort(ILushort *s)  {
 	#ifdef USE_WIN32_ASM
 		__asm {
 			mov ebx, s
@@ -113,11 +117,11 @@
 	#endif //USE_WIN32_ASM
 }
 
-INLINE void iSwapShort(ILshort *s) {
+static inline void iSwapShort(ILshort *s) {
 	iSwapUShort((ILushort*)s);
 }
 
-INLINE void iSwapUInt(ILuint *i) {
+static inline void iSwapUInt(ILuint *i) {
 	#ifdef USE_WIN32_ASM
 		__asm {
 			mov ebx, i
@@ -135,15 +139,15 @@
 	#endif //USE_WIN32_ASM
 }
 
-INLINE void iSwapInt(ILint *i) {
+static inline void iSwapInt(ILint *i) {
 	iSwapUInt((ILuint*)i);
 }
 
-INLINE void iSwapFloat(ILfloat *f) {
+static inline void iSwapFloat(ILfloat *f) {
 	iSwapUInt((ILuint*)f);
 }
 
-INLINE void iSwapDouble(ILdouble *d) {
+static inline void iSwapDouble(ILdouble *d) {
 	#ifdef GCC_X86_ASM
 	int *t = (int*)d;
 	asm("bswap %2    \n"
@@ -164,7 +168,7 @@
 }
 
 
-INLINE ILushort GetLittleUShort() {
+static inline ILushort GetLittleUShort() {
 	ILushort s;
 	iread(&s, sizeof(ILushort), 1);
 #ifdef __BIG_ENDIAN__
@@ -173,7 +177,7 @@
 	return s;
 }
 
-INLINE ILshort GetLittleShort() {
+static inline ILshort GetLittleShort() {
 	ILshort s;
 	iread(&s, sizeof(ILshort), 1);
 #ifdef __BIG_ENDIAN__
@@ -182,7 +186,7 @@
 	return s;
 }
 
-INLINE ILuint GetLittleUInt() {
+static inline ILuint GetLittleUInt() {
 	ILuint i;
 	iread(&i, sizeof(ILuint), 1);
 #ifdef __BIG_ENDIAN__
@@ -191,7 +195,7 @@
 	return i;
 }
 
-INLINE ILint GetLittleInt() {
+static inline ILint GetLittleInt() {
 	ILint i;
 	iread(&i, sizeof(ILint), 1);
 #ifdef __BIG_ENDIAN__
@@ -200,7 +204,7 @@
 	return i;
 }
 
-INLINE ILfloat GetLittleFloat() {
+static inline ILfloat GetLittleFloat() {
 	ILfloat f;
 	iread(&f, sizeof(ILfloat), 1);
 #ifdef __BIG_ENDIAN__
@@ -209,7 +213,7 @@
 	return f;
 }
 
-INLINE ILdouble GetLittleDouble() {
+static inline ILdouble GetLittleDouble() {
 	ILdouble d;
 	iread(&d, sizeof(ILdouble), 1);
 #ifdef __BIG_ENDIAN__
@@ -219,7 +223,7 @@
 }
 
 
-INLINE ILushort GetBigUShort() {
+static inline ILushort GetBigUShort() {
 	ILushort s;
 	iread(&s, sizeof(ILushort), 1);
 #ifdef __LITTLE_ENDIAN__
@@ -229,7 +233,7 @@
 }
 
 
-INLINE ILshort GetBigShort() {
+static inline ILshort GetBigShort() {
 	ILshort s;
 	iread(&s, sizeof(ILshort), 1);
 #ifdef __LITTLE_ENDIAN__
@@ -239,7 +243,7 @@
 }
 
 
-INLINE ILuint GetBigUInt() {
+static inline ILuint GetBigUInt() {
 	ILuint i;
 	iread(&i, sizeof(ILuint), 1);
 #ifdef __LITTLE_ENDIAN__
@@ -249,7 +253,7 @@
 }
 
 
-INLINE ILint GetBigInt() {
+static inline ILint GetBigInt() {
 	ILint i;
 	iread(&i, sizeof(ILint), 1);
 #ifdef __LITTLE_ENDIAN__
@@ -259,7 +263,7 @@
 }
 
 
-INLINE ILfloat GetBigFloat() {
+static inline ILfloat GetBigFloat() {
 	ILfloat f;
 	iread(&f, sizeof(ILfloat), 1);
 #ifdef __LITTLE_ENDIAN__
@@ -269,7 +273,7 @@
 }
 
 
-INLINE ILdouble GetBigDouble() {
+static inline ILdouble GetBigDouble() {
 	ILdouble d;
 	iread(&d, sizeof(ILdouble), 1);
 #ifdef __LITTLE_ENDIAN__
@@ -278,14 +282,14 @@
 	return d;
 }
 
-INLINE ILubyte SaveLittleUShort(ILushort s) {
+static inline ILubyte SaveLittleUShort(ILushort s) {
 #ifdef __BIG_ENDIAN__
 	iSwapUShort(&s);
 #endif
 	return iwrite(&s, sizeof(ILushort), 1);
 }
 
-INLINE ILubyte SaveLittleShort(ILshort s) {
+static inline ILubyte SaveLittleShort(ILshort s) {
 #ifdef __BIG_ENDIAN__
 	iSwapShort(&s);
 #endif
@@ -293,7 +297,7 @@
 }
 
 
-INLINE ILubyte SaveLittleUInt(ILuint i) {
+static inline ILubyte SaveLittleUInt(ILuint i) {
 #ifdef __BIG_ENDIAN__
 	iSwapUInt(&i);
 #endif
@@ -301,14 +305,14 @@
 }
 
 
-INLINE ILubyte SaveLittleInt(ILint i) {
+static inline ILubyte SaveLittleInt(ILint i) {
 #ifdef __BIG_ENDIAN__
 	iSwapInt(&i);
 #endif
 	return iwrite(&i, sizeof(ILint), 1);
 }
 
-INLINE ILubyte SaveLittleFloat(ILfloat f) {
+static inline ILubyte SaveLittleFloat(ILfloat f) {
 #ifdef __BIG_ENDIAN__
 	iSwapFloat(&f);
 #endif
@@ -316,7 +320,7 @@
 }
 
 
-INLINE ILubyte SaveLittleDouble(ILdouble d) {
+static inline ILubyte SaveLittleDouble(ILdouble d) {
 #ifdef __BIG_ENDIAN__
 	iSwapDouble(&d);
 #endif
@@ -324,7 +328,7 @@
 }
 
 
-INLINE ILubyte SaveBigUShort(ILushort s) {
+static inline ILubyte SaveBigUShort(ILushort s) {
 #ifdef __LITTLE_ENDIAN__
 	iSwapUShort(&s);
 #endif
@@ -332,7 +336,7 @@
 }
 
 
-INLINE ILubyte SaveBigShort(ILshort s) {
+static inline ILubyte SaveBigShort(ILshort s) {
 #ifdef __LITTLE_ENDIAN__
 	iSwapShort(&s);
 #endif
@@ -340,7 +344,7 @@
 }
 
 
-INLINE ILubyte SaveBigUInt(ILuint i) {
+static inline ILubyte SaveBigUInt(ILuint i) {
 #ifdef __LITTLE_ENDIAN__
 	iSwapUInt(&i);
 #endif
@@ -348,7 +352,7 @@
 }
 
 
-INLINE ILubyte SaveBigInt(ILint i) {
+static inline ILubyte SaveBigInt(ILint i) {
 #ifdef __LITTLE_ENDIAN__
 	iSwapInt(&i);
 #endif
@@ -356,7 +360,7 @@
 }
 
 
-INLINE ILubyte SaveBigFloat(ILfloat f) {
+static inline ILubyte SaveBigFloat(ILfloat f) {
 #ifdef __LITTLE_ENDIAN__
 	iSwapFloat(&f);
 #endif
@@ -364,7 +368,7 @@
 }
 
 
-INLINE ILubyte SaveBigDouble(ILdouble d) {
+static inline ILubyte SaveBigDouble(ILdouble d) {
 #ifdef __LITTLE_ENDIAN__
 	iSwapDouble(&d);
 #endif
diff -ru devil-1.7.8.orig/src-IL/include/il_internal.h devil-1.7.8/src-IL/include/il_internal.h
--- devil-1.7.8.orig/src-IL/include/il_internal.h	2009-03-08 03:10:08.000000000 -0400
+++ devil-1.7.8/src-IL/include/il_internal.h	2013-11-20 09:26:47.000000000 -0500
@@ -227,7 +227,9 @@
 ILboolean ilLoadBlp(ILconst_string FileName);
 ILboolean ilLoadBlpF(ILHANDLE File);
 ILboolean ilLoadBlpL(const void *Lump, ILuint Size);
+#ifndef __cplusplus
 ILboolean ilIsValidBmp(ILconst_string CONST_RESTRICT FileName);
+#endif
 ILboolean ilIsValidBmpF(ILHANDLE File);
 ILboolean ilIsValidBmpL(const void *Lump, ILuint Size);
 ILboolean ilLoadBmp(ILconst_string FileName);
diff -ru devil-1.7.8.orig/src-IL/include/il_manip.h devil-1.7.8/src-IL/include/il_manip.h
--- devil-1.7.8.orig/src-IL/include/il_manip.h	2009-03-08 03:10:08.000000000 -0400
+++ devil-1.7.8/src-IL/include/il_manip.h	2013-11-20 09:26:47.000000000 -0500
@@ -31,7 +31,7 @@
 	#pragma warning(push)
 	#pragma warning(disable : 4756)  // Disables 'named type definition in parentheses' warning
 #endif
-INLINE ILfloat /*ILAPIENTRY*/ ilFloatToHalfOverflow() {
+static inline ILfloat /*ILAPIENTRY*/ ilFloatToHalfOverflow() {
 	ILfloat f = 1e10;
 	ILint j;
 	for (j = 0; j < 10; j++)
@@ -47,7 +47,7 @@
 // Float-to-half conversion -- general case, including
 // zeroes, denormalized numbers and exponent overflows.
 //-----------------------------------------------------
-INLINE ILushort ILAPIENTRY ilFloatToHalf(ILuint i) {
+static inline ILushort ILAPIENTRY ilFloatToHalf(ILuint i) {
 	//
 	// Our floating point number, f, is represented by the bit
 	// pattern in integer i.  Disassemble that bit pattern into
@@ -175,7 +175,7 @@
 }
 
 // Taken from OpenEXR
-INLINE ILuint ILAPIENTRY ilHalfToFloat (ILushort y) {
+static inline ILuint ILAPIENTRY ilHalfToFloat (ILushort y) {
 
 	int s = (y >> 15) & 0x00000001;
 	int e = (y >> 10) & 0x0000001f;
diff -ru devil-1.7.8.orig/src-IL/src/il_icon.c devil-1.7.8/src-IL/src/il_icon.c
--- devil-1.7.8.orig/src-IL/src/il_icon.c	2009-03-08 03:10:09.000000000 -0400
+++ devil-1.7.8/src-IL/src/il_icon.c	2013-11-20 09:26:47.000000000 -0500
@@ -525,7 +525,7 @@
 
 	// Expand low-bit-depth grayscale images to 8 bits
 	if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
-		png_set_gray_1_2_4_to_8(ico_png_ptr);
+		png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
 	}
 
 	// Expand RGB images with transparency to full alpha channels
diff -ru devil-1.7.8.orig/src-IL/src/il_png.c devil-1.7.8/src-IL/src/il_png.c
--- devil-1.7.8.orig/src-IL/src/il_png.c	2009-03-08 03:10:09.000000000 -0400
+++ devil-1.7.8/src-IL/src/il_png.c	2013-11-20 09:26:47.000000000 -0500
@@ -278,7 +278,7 @@
 
 	// Expand low-bit-depth grayscale images to 8 bits
 	if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
-		png_set_gray_1_2_4_to_8(png_ptr);
+		png_set_expand_gray_1_2_4_to_8(png_ptr);
 	}
 
 	// Expand RGB images with transparency to full alpha channels
diff -ru devil-1.7.8.orig/src-ILU/ilur/ilur.c devil-1.7.8/src-ILU/ilur/ilur.c
--- devil-1.7.8.orig/src-ILU/ilur/ilur.c	2009-03-08 03:10:12.000000000 -0400
+++ devil-1.7.8/src-ILU/ilur/ilur.c	2013-11-20 09:26:47.000000000 -0500
@@ -1,6 +1,6 @@
 #include <string.h>
 #include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 #include <IL/il.h>
 #include <IL/ilu.h>
diff -ru devil-1.7.8.orig/src-ILU/include/ilu_internal.h devil-1.7.8/src-ILU/include/ilu_internal.h
--- devil-1.7.8.orig/src-ILU/include/ilu_internal.h	2009-03-08 03:10:12.000000000 -0400
+++ devil-1.7.8/src-ILU/include/ilu_internal.h	2013-11-20 09:26:47.000000000 -0500
@@ -71,22 +71,24 @@
 #define INLINE
 #endif
 
+#if 0
 // Internal functions
 ILfloat ilCos(ILfloat Angle);
 ILfloat ilSin(ILfloat Angle);
 ILint ilRound(ILfloat Num);
+#endif
 
 #ifndef NOINLINE
-INLINE ILfloat ilCos(ILfloat Angle) {
+static inline ILfloat ilCos(ILfloat Angle) {
 	return (ILfloat)(cos(Angle * IL_DEGCONV));
 }
 
-INLINE ILfloat ilSin(ILfloat Angle) {
+static inline ILfloat ilSin(ILfloat Angle) {
 	return (ILfloat)(sin(Angle * IL_DEGCONV));
 }
 
 
-INLINE ILint ilRound(ILfloat Num) {
+static inline ILint ilRound(ILfloat Num) {
 	return (ILint)(Num + 0.5); // this is truncating in away-from-0, not rounding
 }
 #endif
From: Markus Koschany <apo@gambaru.de>
Date: Mon, 18 Aug 2014 17:34:26 +0200
Subject: lcms2

---
 configure                | 112 +++++++++++++++++++++++------------------------
 src-IL/src/il_profiles.c |   4 +-
 2 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/configure b/configure
index 2d0de03..dd4f501 100755
--- a/configure
+++ b/configure
@@ -18574,13 +18574,13 @@ else
 fi
 
          if test 4 -eq 4 -a "x$enable_lcms" = "xyes"; then
-  { echo "$as_me:$LINENO: checking for main in -llcms" >&5
-echo $ECHO_N "checking for main in -llcms... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: checking for main in -llcms2" >&5
+echo $ECHO_N "checking for main in -llcms2... $ECHO_C" >&6; }
 if test "${ac_cv_lib_lcms_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-llcms  $LIBS"
+LIBS="-llcms2  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18631,12 +18631,12 @@ fi
 echo "${ECHO_T}$ac_cv_lib_lcms_main" >&6; }
 if test $ac_cv_lib_lcms_main = yes; then
   have_lcms_lib="yes"
-               IL_LIBS="-llcms $IL_LIBS"
+               IL_LIBS="-llcms2 $IL_LIBS"
 fi
 
 if test "${ac_cv_header_lcms_lcms_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for lcms/lcms.h" >&5
-echo $ECHO_N "checking for lcms/lcms.h... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: checking for lcms/lcms2.h" >&5
+echo $ECHO_N "checking for lcms/lcms2.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_lcms_lcms_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -18644,8 +18644,8 @@ fi
 echo "${ECHO_T}$ac_cv_header_lcms_lcms_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking lcms/lcms.h usability" >&5
-echo $ECHO_N "checking lcms/lcms.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking lcms/lcms2.h usability" >&5
+echo $ECHO_N "checking lcms/lcms2.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18653,7 +18653,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <lcms/lcms.h>
+#include <lcms/lcms2.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -18685,15 +18685,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking lcms/lcms.h presence" >&5
-echo $ECHO_N "checking lcms/lcms.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking lcms/lcms2.h presence" >&5
+echo $ECHO_N "checking lcms/lcms2.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <lcms/lcms.h>
+#include <lcms/lcms2.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -18726,25 +18726,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: lcms/lcms.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: lcms/lcms.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: lcms/lcms2.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: lcms/lcms2.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: lcms/lcms.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: lcms/lcms.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: lcms/lcms.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: lcms/lcms.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: lcms/lcms.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: lcms/lcms.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: lcms/lcms2.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: lcms/lcms2.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: lcms/lcms2.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: lcms/lcms2.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: lcms/lcms2.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms/lcms2.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: lcms/lcms2.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------------------ ##
 ## Report this to bubla@users.sourceforge.net ##
@@ -18753,8 +18753,8 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for lcms/lcms.h" >&5
-echo $ECHO_N "checking for lcms/lcms.h... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for lcms/lcms2.h" >&5
+echo $ECHO_N "checking for lcms/lcms2.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_lcms_lcms_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -18770,8 +18770,8 @@ fi
 
 
 if test "${ac_cv_header_lcms_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for lcms.h" >&5
-echo $ECHO_N "checking for lcms.h... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: checking for lcms2.h" >&5
+echo $ECHO_N "checking for lcms2.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_lcms_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -18779,8 +18779,8 @@ fi
 echo "${ECHO_T}$ac_cv_header_lcms_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking lcms.h usability" >&5
-echo $ECHO_N "checking lcms.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking lcms2.h usability" >&5
+echo $ECHO_N "checking lcms2.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18788,7 +18788,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <lcms.h>
+#include <lcms2.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -18820,15 +18820,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking lcms.h presence" >&5
-echo $ECHO_N "checking lcms.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking lcms2.h presence" >&5
+echo $ECHO_N "checking lcms2.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <lcms.h>
+#include <lcms2.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -18861,25 +18861,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: lcms.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: lcms.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: lcms.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: lcms2.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: lcms2.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: lcms.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: lcms.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: lcms.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: lcms.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: lcms.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: lcms.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: lcms.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: lcms.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: lcms2.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: lcms2.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: lcms2.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: lcms2.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: lcms2.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: lcms2.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: lcms2.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------------------ ##
 ## Report this to bubla@users.sourceforge.net ##
@@ -18888,8 +18888,8 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for lcms.h" >&5
-echo $ECHO_N "checking for lcms.h... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for lcms2.h" >&5
+echo $ECHO_N "checking for lcms2.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_lcms_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
diff --git a/src-IL/src/il_profiles.c b/src-IL/src/il_profiles.c
index 317e1db..c26fbee 100644
--- a/src-IL/src/il_profiles.c
+++ b/src-IL/src/il_profiles.c
@@ -21,9 +21,9 @@
 #if (!defined(_WIN32) && !defined(_WIN64))
 	#define NON_WINDOWS 1
 	#ifdef LCMS_NODIRINCLUDE
-		#include <lcms.h>
+		#include <lcms2.h>
 	#else
-		#include <lcms/lcms.h>
+		#include <lcms/lcms2.h>
 	#endif
 	
 #else
 