diff -aur lcms-1.10.ori/include/lcms.h lcms-1.10/include/lcms.h
--- lcms-1.10.ori/include/lcms.h	Tue Apr 22 16:56:24 2003
+++ lcms-1.10/include/lcms.h	Sun Aug 24 15:27:45 2003
@@ -107,7 +107,7 @@
 #  define USE_C               1
 #endif
 
-#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__)
+#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(__ppc__)
 #   define USE_BIG_ENDIAN      1
 #endif
 
@@ -123,7 +123,7 @@
 #   define USE_BIG_ENDIAN      1
 #endif
 
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Apple__)
 #  include <sys/types.h>
 #  define USE_INT64           1
 #  undef  LONGLONG
diff -aur lcms-1.10.ori/jpegicc/Makefile lcms-1.10/jpegicc/Makefile
--- lcms-1.10.ori/jpegicc/Makefile	Sat Mar  1 15:42:35 2003
+++ lcms-1.10/jpegicc/Makefile	Sun Aug 24 16:00:23 2003
@@ -1,24 +1,20 @@
 SHELL = /bin/sh
 
-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include -I/usr/include -I/usr/local/include
-BASEDIR = $(DESTDIR)/usr
+CFLAGS = -Os -fomit-frame-pointer -Wall -I../include -I/usr/include 
+BASEDIR = $(DESTDIR)/$(PREFIX)
 BINDIR  = $(BASEDIR)/bin
 
 all:	jpegicc
 
 jpegicc: jpegicc.o iccjpeg.o getopt.o
-	$(CC) $(CFLAGS) jpegicc.o iccjpeg.o getopt.o ../src/liblcms.a -o $@ -lm -ljpeg 
+	$(CC) $(CFLAGS) $(LDFLAGS) jpegicc.o iccjpeg.o getopt.o ../src/liblcms.a -o $@ -lm -ljpeg 
 
 iccjpeg.o: iccjpeg.c
 jpegicc.o: jpegicc.c
 getopt.o: getopt.c
 
 install utils:: jpegicc
-	-cp jpegicc  $(BINDIR)
-	-cp jpegicc.exe $(BINDIR)  # Cygwin
+	cp jpegicc  $(BINDIR)
 
-	
 clean:
 	-rm jpegicc.o getopt.o iccjpeg.o jpegicc jpegicc.exe
-
-	
diff -aur lcms-1.10.ori/samples/Makefile lcms-1.10/samples/Makefile
--- lcms-1.10.ori/samples/Makefile	Sat Mar  1 15:42:35 2003
+++ lcms-1.10/samples/Makefile	Sun Aug 24 15:39:30 2003
@@ -1,7 +1,7 @@
 SHELL = /bin/sh
 
-CFLAGS = -g -O4 -Wall
-BASEDIR = $(DESTDIR)/usr
+CFLAGS = -Os -Wall
+BASEDIR = $(DESTDIR)/$(PREFIX)
 BINDIR  = $(BASEDIR)/bin
 
 
@@ -22,13 +22,9 @@
 
 install: icctrans icc2ps icclink
 	-cp icctrans $(BINDIR)
-	-cp icctrans.exe $(BINDIR)  # Cygwin
 	-cp icc2ps $(BINDIR)
-	-cp icc2ps.exe $(BINDIR)   # Cygwin
 	-cp icclink $(BINDIR)
-	-cp icclink.exe $(BINDIR)  # Cygwin
 
-	
 test:
 	# Nothing to do for test target
 
diff -aur lcms-1.10.ori/samples/icctrans.c lcms-1.10/samples/icctrans.c
--- lcms-1.10.ori/samples/icctrans.c	Sat Mar  1 15:42:35 2003
+++ lcms-1.10/samples/icctrans.c	Sun Aug 24 15:27:45 2003
@@ -31,6 +31,9 @@
 #include "lcms.h"
 #include <stdarg.h>
 #include <ctype.h>
+#ifdef __APPLE__
+#include <unistd.h>
+#endif
 
 // xgetopt() interface -----------------------------------------------------
 
diff -aur lcms-1.10.ori/src/cmsio1.c lcms-1.10/src/cmsio1.c
--- lcms-1.10.ori/src/cmsio1.c	Sat Mar  1 15:42:36 2003
+++ lcms-1.10/src/cmsio1.c	Sun Aug 24 15:27:46 2003
@@ -36,6 +36,9 @@
 
 #include "lcms.h"
 #include <time.h>
+#ifdef __APPLE__
+#include <unistd.h>
+#endif
 
 cmsHPROFILE   LCMSEXPORT cmsOpenProfileFromFile(const char *ICCProfile, const char *sAccess);
 cmsHPROFILE   LCMSEXPORT cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize);
diff -aur lcms-1.10.ori/src/makefile lcms-1.10/src/makefile
--- lcms-1.10.ori/src/makefile	Sat Mar  1 15:42:36 2003
+++ lcms-1.10/src/makefile	Sun Aug 24 15:53:47 2003
@@ -1,8 +1,8 @@
 SHELL = /bin/sh
 
-CFLAGS  = -g -O4 -I../include -fomit-frame-pointer -Wall 
+CFLAGS  = -Os -I../include -fomit-frame-pointer -Wall 
 LDFLAGS = -lm
-BASEDIR = $(DESTDIR)/usr
+BASEDIR = $(DESTDIR)/$(PREFIX)
 BINDIR  = $(BASEDIR)/bin
 LIBDIR  = $(BASEDIR)/lib
 INCDIR  = $(BASEDIR)/include
@@ -21,7 +21,7 @@
 
 
 
-all:	liblcms.a liblcms.so.${VERSION} 
+all:	liblcms.a liblcms.${VERSION}.dylib 
 
 
 #
@@ -32,19 +32,22 @@
 	$(AR) liblcms.a $(OBJS)
 	$(RANLIB) liblcms.a
 
-liblcms.so.${VERSION}: $(OBJS) 
-	-$(CC) $(CFLAGS) $(LDFLAGS) -shared -o liblcms.so.${VERSION} $(OBJS) 
-	-ln -s liblcms.so.${VERSION} liblcms.so.1
-	-ln -s liblcms.so.1 liblcms.so
+liblcms.${VERSION}.dylib: $(OBJS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -prebind -dynamiclib \
+	 -install_name $(PREFIX)/lib/liblcms.1.dylib \
+	 -compatibility_version $(VERSION) -current_version $(VERSION) \
+	 -o liblcms.${VERSION}.dylib $(OBJS)
+	ln -s liblcms.${VERSION}.dylib liblcms.1.dylib
+	ln -s liblcms.1.dylib liblcms.dylib
 
 #
 # Installation
 #
 
-install: liblcms.a  liblcms.so.${VERSION}
+install: liblcms.a  liblcms.${VERSION}.dylib
 	mkdir -p $(BINDIR) $(LIBDIR) $(INCDIR)
-	-cp -a liblcms.so* $(LIBDIR)
-	cp -a liblcms.a $(LIBDIR)
+	cp -R liblcms*.dylib $(LIBDIR)
+	cp -R liblcms.a $(LIBDIR)
 	cp ../include/lcms.h ../include/icc34.h $(INCDIR)
 
 #
@@ -61,4 +64,4 @@
 #
 
 clean:
-	-rm $(OBJS)  liblcms.a liblcms.so.${VERSION} liblcms.so.1 liblcms.so
+	-rm $(OBJS)  liblcms.a liblcms.${VERSION}.dylib liblcms.1.dylib liblcms.dylib
diff -aur lcms-1.10.ori/testbed/Makefile lcms-1.10/testbed/Makefile
--- lcms-1.10.ori/testbed/Makefile	Sat Mar  1 15:42:36 2003
+++ lcms-1.10/testbed/Makefile	Sun Aug 24 15:57:20 2003
@@ -1,6 +1,6 @@
 SHELL = /bin/sh
 
-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include
+CFLAGS = -Os -fomit-frame-pointer -Wall -I../include
 
 testcms.o: testcms.c
 
@@ -14,8 +14,6 @@
 
 install:
 	# Nothing to install
-	
+
 clean:
 	-rm testcms.o testcms testcms.exe
-
-	
diff -aur lcms-1.10.ori/testbed/testcms.c lcms-1.10/testbed/testcms.c
--- lcms-1.10.ori/testbed/testcms.c	Sat Mar  1 15:42:36 2003
+++ lcms-1.10/testbed/testcms.c	Sun Aug 24 15:33:14 2003
@@ -37,6 +37,10 @@
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef __APPLE__
+#include <unistd.h>
+#endif
+
 
 #ifndef NON_WINDOWS
 #include <icm.h>
diff -aur lcms-1.10.ori/tifficc/Makefile lcms-1.10/tifficc/Makefile
--- lcms-1.10.ori/tifficc/Makefile	Sat Mar  1 15:42:36 2003
+++ lcms-1.10/tifficc/Makefile	Sun Aug 24 16:01:46 2003
@@ -1,23 +1,20 @@
 SHELL = /bin/sh
 
-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include -I/usr/include -I/usr/local/include
-BASEDIR = $(DESTDIR)/usr
+CFLAGS = -Os -fomit-frame-pointer -Wall -I../include -I/usr/include
+BASEDIR = $(DESTDIR)/$(PREFIX)
 BINDIR  = $(BASEDIR)/bin
 
 
 all:	tifficc
 
 tifficc: tifficc.o getopt.o
-	$(CC) $(CFLAGS) tifficc.o getopt.o ../src/liblcms.a -o $@ -lm -ljpeg -ltiff -lz
+	$(CC) $(CFLAGS) $(LDFLAGS) tifficc.o getopt.o ../src/liblcms.a -o $@ -lm -ljpeg -ltiff -lz
 
 tifficc.o: tifficc.c
 getopt.o: getopt.c
 
 install utils:: tifficc
-	   -cp tifficc $(BINDIR)
-	   -cp tifficc.exe $(BINDIR)
-	
+	   cp tifficc $(BINDIR)
+
 clean:
 	-rm tifficc.o getopt.o tifficc tifficc.exe
-
-	
