diff -Nurd -x'*~' fltk-1.1.7.orig/Makefile fltk-1.1.7/Makefile
--- fltk-1.1.7.orig/Makefile	2006-01-15 13:36:16.000000000 -0500
+++ fltk-1.1.7/Makefile	2007-08-03 15:40:33.000000000 -0400
@@ -27,7 +27,7 @@
 
 include makeinclude
 
-DIRS	=	$(IMAGEDIRS) src fluid test documentation
+DIRS	=	$(IMAGEDIRS) src fluid documentation
 
 all: makeinclude
 	for dir in $(DIRS); do\
diff -Nurd -x'*~' fltk-1.1.7.orig/configure fltk-1.1.7/configure
--- fltk-1.1.7.orig/configure	2006-01-17 21:30:52.000000000 -0500
+++ fltk-1.1.7/configure	2007-08-03 16:46:35.000000000 -0400
@@ -857,7 +857,6 @@
   --enable-gl             turn on OpenGL support default=yes
   --enable-shared         turn on shared libraries default=no
   --enable-threads        enable multi-threading support
-  --enable-quartz         use Quartz instead of Quickdraw (default=no)
   --disable-largefile     omit support for large files
   --enable-localjpeg      use local JPEG library, default=auto
   --enable-localzlib      use local ZLIB library, default=auto
@@ -1423,7 +1422,7 @@
             FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib"
             GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
             IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib"
-	    DSOCOMMAND="\$(CC) $DSOFLAGS -dynamiclib -lc -o"
+	    DSOCOMMAND="\$(CXX) $DSOFLAGS -single_module -dynamiclib -lc -o"
 	    ;;
 
 	SunOS* | UNIX_S*)
@@ -1510,7 +1509,7 @@
 	    ;;
     esac
 
-    LINKSHARED="-L../src -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
+    LINKSHARED="../src/$IMGDSONAME ../src/$FLDSONAME ../src/$DSONAME"
 else
     DSOCOMMAND="echo"
     DSOLINK=""
@@ -1548,7 +1547,7 @@
 fi;
 
 case $uname in
-    Darwin*)
+    Darwin_DO_NOT_GO_HERE)
         # Check whether --enable-quartz or --disable-quartz was given.
 if test "${enable_quartz+set}" = set; then
   enableval="$enable_quartz"
@@ -8575,7 +8574,7 @@
 	fi
 	;;
 
-    Darwin*)
+    Darwin_DO_NOT_GO_HERE)
         # MacOS X uses Carbon for graphics...
         LIBS="$LIBS -framework Carbon -framework ApplicationServices"
 
diff -Nurd -x'*~' fltk-1.1.7.orig/fluid/fluid.cxx fltk-1.1.7/fluid/fluid.cxx
--- fltk-1.1.7.orig/fluid/fluid.cxx	2005-11-27 09:45:48.000000000 -0500
+++ fltk-1.1.7/fluid/fluid.cxx	2007-08-03 15:39:00.000000000 -0400
@@ -1804,11 +1804,7 @@
   fl_filename_absolute(absolute, sizeof(absolute), flname);
 
   for (i = 0; i < max_files; i ++)
-#if defined(WIN32) || defined(__APPLE__)
     if (!strcasecmp(absolute, absolute_history[i])) break;
-#else
-    if (!strcmp(absolute, absolute_history[i])) break;
-#endif // WIN32 || __APPLE__
 
   if (i == 0) return;
 
diff -Nurd -x'*~' fltk-1.1.7.orig/makeinclude.in fltk-1.1.7/makeinclude.in
--- fltk-1.1.7.orig/makeinclude.in	2006-01-15 13:36:16.000000000 -0500
+++ fltk-1.1.7/makeinclude.in	2007-08-03 16:56:49.000000000 -0400
@@ -81,7 +81,7 @@
 LINKFLTKFORMS	= @LINKFLTKFORMS@ @LINKFLTK@
 LINKFLTKIMG	= @LINKFLTKIMG@ @LINKFLTK@ $(IMAGELIBS)
 LINKSHARED	= @DSOLINK@ @LINKSHARED@ $(IMAGELIBS)
-IMAGELIBS	= -L../lib @IMAGELIBS@
+IMAGELIBS	= @IMAGELIBS@
 
 # image libraries to build...
 IMAGEDIRS	= @JPEG@ @ZLIB@ @PNG@
@@ -111,7 +111,7 @@
 UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@
 
 # Be quiet when building...
-.SILENT:
+#.SILENT:
 
 # Build commands and filename extensions...
 .SUFFIXES:	.0 .1 .3 .c .cxx .h .fl .man .o .z $(EXEEXT)
diff -Nurd -x'*~' fltk-1.1.7.orig/src/Makefile fltk-1.1.7/src/Makefile
--- fltk-1.1.7.orig/src/Makefile	2005-08-07 20:54:30.000000000 -0400
+++ fltk-1.1.7/src/Makefile	2007-08-03 17:02:23.000000000 -0400
@@ -218,7 +218,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.1.4 \
 		-compatibility_version 1.1.0 \
-		$(OBJECTS) $(LDLIBS)
+		$(OBJECTS) $(LDLIBS) $(FONTCONFIGLIB)
 	$(RM) libfltk.dylib
 	$(LN) libfltk.1.1.dylib libfltk.dylib
 
@@ -254,7 +254,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.1.4 \
 		-compatibility_version 1.1.0 \
-		$(FLOBJECTS) -L. $(LDLIBS) -lfltk
+		$(FLOBJECTS) $(LDLIBS) libfltk.1.1.dylib
 	$(RM) libfltk_forms.dylib
 	$(LN) libfltk_forms.1.1.dylib libfltk_forms.dylib
 
@@ -290,7 +290,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.1.4 \
 		-compatibility_version 1.1.0 \
-		$(GLOBJECTS) -L. $(GLDLIBS) -lfltk
+		$(GLOBJECTS) $(GLDLIBS) libfltk.1.1.dylib
 	$(RM) libfltk_gl.dylib
 	$(LN) libfltk_gl.1.1.dylib libfltk_gl.dylib
 
@@ -326,7 +326,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.1.4 \
 		-compatibility_version 1.1.0 \
-		$(IMGOBJECTS)  -L.$(LDLIBS) $(IMAGELIBS) -lfltk
+		$(IMGOBJECTS)  $(LDLIBS) $(IMAGELIBS) libfltk.1.1.dylib
 	$(RM) libfltk_images.dylib
 	$(LN) libfltk_images.1.1.dylib libfltk_images.dylib
 
diff -Nurd -x'*~' fltk-1.1.7.orig/src/filename_absolute.cxx fltk-1.1.7/src/filename_absolute.cxx
--- fltk-1.1.7.orig/src/filename_absolute.cxx	2005-11-27 09:45:48.000000000 -0500
+++ fltk-1.1.7/src/filename_absolute.cxx	2007-08-03 15:40:05.000000000 -0400
@@ -161,11 +161,7 @@
        *slash != '\0' && *newslash != '\0';
        slash ++, newslash ++)
     if (isdirsep(*slash) && isdirsep(*newslash)) continue;
-#if defined(WIN32) || defined(__EMX__) || defined(__APPLE__)
     else if (tolower(*slash & 255) != tolower(*newslash & 255)) break;
-#else
-    else if (*slash != *newslash) break;
-#endif // WIN32 || __EMX__ || __APPLE__
 
   if (*newslash == '\0' && *slash != '\0' && !isdirsep(*slash))
     newslash--;
--- /tmp/fltk/fltk-1.1.7/png/png.c	2005-02-24 21:55:12.000000000 +0000
+++ fltk-1.1.7/png/png.c	2007-12-03 07:43:10.000000000 +0000
@@ -143,13 +143,13 @@
 png_zalloc(voidpf png_ptr, uInt items, uInt size)
 {
    png_voidp ptr;
-   png_structp p=png_ptr;
+   png_structp p=(png_structp)png_ptr;
    png_uint_32 save_flags=p->flags;
    png_uint_32 num_bytes;
 
    if (items > PNG_UINT_32_MAX/size)
    {
-     png_warning (png_ptr, "Potential overflow in png_zalloc()");
+     png_warning ((png_structp)png_ptr, "Potential overflow in png_zalloc()");
      return (NULL);
    }
    num_bytes = (png_uint_32)items * size;

