File lcms-endian.patch of Package lcms2

--- include/lcms2.h.orig
+++ include/lcms2.h
@@ -30,9 +30,6 @@
 
 // ********** Configuration toggles ****************************************
 
-// Uncomment this one if you are using big endian machines
-// #define CMS_USE_BIG_ENDIAN   1
-
 // Uncomment this one if your compiler/machine does NOT support the
 // "long long" type.
 // #define CMS_DONT_USE_INT64        1
@@ -170,33 +167,6 @@ typedef int                  cmsBool;
 #  define CMS_IS_WINDOWS_ 1
 #endif
 
-// Try to detect big endian platforms. This list can be endless, so only some checks are performed over here.
-// you can pass this toggle to the compiler by using -DCMS_USE_BIG_ENDIAN or something similar
-
-#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN)
-#   define CMS_USE_BIG_ENDIAN      1
-#endif
-
-#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc)
-#   define CMS_USE_BIG_ENDIAN      1
-#endif
-
-#if defined(__ppc__) || defined(__s390__) || defined(__s390x__)
-#   define CMS_USE_BIG_ENDIAN   1
-#endif
-
-#ifdef TARGET_CPU_PPC
-# if TARGET_CPU_PPC
-#   define CMS_USE_BIG_ENDIAN   1
-# endif
-#endif
-
-#ifdef macintosh
-# ifdef __BIG_ENDIAN__
-#   define CMS_USE_BIG_ENDIAN      1
-# endif
-#endif
-
 // Calling convention -- this is hardly platform and compiler dependent
 #ifdef CMS_IS_WINDOWS_
 #  if defined(CMS_DLL) || defined(CMS_DLL_BUILD)
--- src/cmsmd5.c.orig
+++ src/cmsmd5.c
@@ -26,7 +26,7 @@
 
 #include "lcms2_internal.h"
 
-#ifdef CMS_USE_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
 
 static
 void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs)
--- src/cmsplugin.c.orig
+++ src/cmsplugin.c
@@ -36,7 +36,7 @@
 // Adjust a word value after being readed/ before being written from/to an ICC profile
 cmsUInt16Number CMSEXPORT  _cmsAdjustEndianess16(cmsUInt16Number Word)
 {
-#ifndef CMS_USE_BIG_ENDIAN
+#ifndef WORDS_BIGENDIAN
 
     cmsUInt8Number* pByte = (cmsUInt8Number*) &Word;
     cmsUInt8Number tmp;
@@ -57,7 +57,7 @@ cmsUInt16Number CMSEXPORT  _cmsAdjustEnd
 
 cmsUInt32Number CMSEXPORT  _cmsAdjustEndianess32(cmsUInt32Number DWord)
 {
-#ifndef CMS_USE_BIG_ENDIAN
+#ifndef WORDS_BIGENDIAN
 
     cmsUInt8Number* pByte = (cmsUInt8Number*) &DWord;
     cmsUInt8Number temp1;
@@ -79,7 +79,7 @@ cmsUInt32Number CMSEXPORT  _cmsAdjustEnd
 void CMSEXPORT  _cmsAdjustEndianess64(cmsUInt64Number* Result, cmsUInt64Number* QWord)
 {
 
-#ifndef CMS_USE_BIG_ENDIAN
+#ifndef WORDS_BIGENDIAN
 
     cmsUInt8Number* pIn  = (cmsUInt8Number*) QWord;
     cmsUInt8Number* pOut = (cmsUInt8Number*) Result;
--- testbed/testcms2.c.orig
+++ testbed/testcms2.c
@@ -719,15 +719,15 @@ cmsInt32Number CheckEndianess(void)
     u.l = 1;
     BigEndian = (u.c[sizeof (long) - 1] == 1);
 
-#ifdef CMS_USE_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
     IsOk = BigEndian;
 #else
     IsOk = !BigEndian;
 #endif
 
     if (!IsOk) {
-        Fail("\nOOOPPSS! You have CMS_USE_BIG_ENDIAN toggle misconfigured!\n\n"
-            "Please, edit lcms2.h and %s the CMS_USE_BIG_ENDIAN toggle.\n", BigEndian? "uncomment" : "comment");
+        Fail("\nOOOPPSS! You have WORDS_BIGENDIAN toggle misconfigured!\n\n"
+            "Please, edit lcms2.h and %s the WORDS_BIGENDIAN toggle.\n", BigEndian? "uncomment" : "comment");
         return 0;
     }
 
--- src/lcms2_internal.h.orig
+++ src/lcms2_internal.h
@@ -140,7 +140,7 @@ cmsINLINE int _cmsQuickFloor(cmsFloat64N
 
     temp.val = val + _lcms_double2fixmagic;
 
-#ifdef CMS_USE_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
     return temp.halves[1] >> 16;
 #else
     return temp.halves[0] >> 16;
--- configure.ac.orig
+++ configure.ac
@@ -65,7 +65,8 @@ AC_ARG_WITH(zlib,
 AC_PROG_CC_STDC
 AC_PROG_CPP
 AC_PROG_CXX
-
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 #AM_PROG_LD
 #AC_SUBST(LD)
 #AC_PROG_INSTALL
@@ -79,11 +80,7 @@ AC_EXEEXT
 AC_OBJEXT
 
 # Configure libtool
-AC_ENABLE_SHARED
-AC_ENABLE_STATIC
-AC_LIBTOOL_WIN32_DLL
-AC_LIBTOOL_SETUP
-AC_PROG_LIBTOOL
+LT_INIT([disable-static pic-only win32-dll])
 AC_SUBST(LIBTOOL_DEPS)
 
 # Add configure option --enable-maintainer-mode which enables dependency