diff -Nurd fltk-1.3.0/configure fltk-1.3.0.patched/configure
--- fltk-1.3.0/configure	2011-06-16 11:50:44.000000000 -0400
+++ fltk-1.3.0.patched/configure	2011-08-27 16:03:31.000000000 -0400
@@ -2011,7 +2011,7 @@
             GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
             IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib"
             CAIRODSONAME="libfltk_cairo.$FL_API_VERSION.dylib"
-	    DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
+	    DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -L@FINKPREFIX@/lib -dynamiclib -lc -o"
 	    ;;
 
 	SunOS* | UNIX_S*)
@@ -2123,7 +2123,7 @@
 	    ;;
     esac
 
-    LINKSHARED="-L../src $FLTKCAIROOPTION -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
+    LINKSHARED="../src/$IMGDSONAME ../src/$FLDSONAME ../src/$DSONAME"
 else
     DSOCOMMAND="echo"
     DSOLINK=""
diff -Nurd fltk-1.3.0/makeinclude.in fltk-1.3.0.patched/makeinclude.in
--- fltk-1.3.0/makeinclude.in	2010-12-23 09:24:29.000000000 -0500
+++ fltk-1.3.0.patched/makeinclude.in	2011-08-27 15:35:23.000000000 -0400
@@ -99,7 +99,7 @@
 LINKFLTKCAIRO	= @LINKFLTKCAIRO@ $(CAIROLIBS)
 FLTKCAIROOPTION = @FLTKCAIROOPTION@
 LINKSHARED	= @DSOLINK@ @LINKSHARED@ $(IMAGELIBS) $(CAIROLIBS)
-IMAGELIBS	= -L../lib @IMAGELIBS@
+IMAGELIBS	= @IMAGELIBS@
 
 # image libraries to build...
 IMAGEDIRS	= @JPEG@ @ZLIB@ @PNG@
@@ -140,7 +140,7 @@
 UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@
 
 # Be quiet when building...
-.SILENT:
+#.SILENT:
 
 # Build commands and filename extensions...
 .SUFFIXES:	.0 .1 .3 .6 .c .cxx .mm .h .fl .man .o .z $(EXEEXT)
diff -Nurd fltk-1.3.0/src/Makefile fltk-1.3.0.patched/src/Makefile
--- fltk-1.3.0/src/Makefile	2011-02-06 09:08:08.000000000 -0500
+++ fltk-1.3.0.patched/src/Makefile	2011-08-27 15:55:17.000000000 -0400
@@ -292,7 +292,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.3.0 \
 		-compatibility_version 1.3.0 \
-		$(FLOBJECTS) -L. $(LDLIBS) -lfltk
+		$(FLOBJECTS) -L. $(LDLIBS) libfltk.1.3.dylib
 	$(RM) libfltk_forms.dylib
 	$(LN) libfltk_forms.1.3.dylib libfltk_forms.dylib
 
@@ -328,7 +328,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.3.0 \
 		-compatibility_version 1.3.0 \
-		$(GLOBJECTS) -L. $(GLDLIBS) -lfltk
+		$(GLOBJECTS) -L. $(GLDLIBS) libfltk.1.3.dylib
 	$(RM) libfltk_gl.dylib
 	$(LN) libfltk_gl.1.3.dylib libfltk_gl.dylib
 
@@ -364,7 +364,7 @@
 		-install_name $(libdir)/$@ \
 		-current_version 1.3.0 \
 		-compatibility_version 1.3.0 \
-		$(IMGOBJECTS)  -L. $(LDLIBS) $(IMAGELIBS) -lfltk
+		$(IMGOBJECTS)  -L. $(LDLIBS) $(IMAGELIBS) libfltk.1.3.dylib
 	$(RM) libfltk_images.dylib
 	$(LN) libfltk_images.1.3.dylib libfltk_images.dylib
 
--- fltk-1.3.2/src/fl_diamond_box.cxx.orig	2013-07-19 08:28:44.000000000 -0400
+++ fltk-1.3.2/src/fl_diamond_box.cxx	2013-07-19 08:30:28.000000000 -0400
@@ -34,13 +34,13 @@
   int y1 = y+h/2;
   fl_color(bgcolor); fl_polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
   uchar *g = fl_gray_ramp();
-  fl_color(g['W']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
-  fl_color(g['U']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
-  fl_color(g['S']); fl_line(x+3, y1, x1, y+3, x+w-3, y1);
-  fl_color(g['P']); fl_line(x+3, y1, x1, y+h-3, x+w-3, y1);
-  fl_color(g['N']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
-  fl_color(g['H']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
-  fl_color(g['A']); fl_loop(x, y1, x1, y, x+w, y1, x1, y+h);
+  fl_color(g[(uchar)'W']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
+  fl_color(g[(uchar)'U']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
+  fl_color(g[(uchar)'S']); fl_line(x+3, y1, x1, y+3, x+w-3, y1);
+  fl_color(g[(uchar)'P']); fl_line(x+3, y1, x1, y+h-3, x+w-3, y1);
+  fl_color(g[(uchar)'N']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
+  fl_color(g[(uchar)'H']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
+  fl_color(g[(uchar)'A']); fl_loop(x, y1, x1, y, x+w, y1, x1, y+h);
 }
 
 static void fl_diamond_down_box(int x,int y,int w,int h,Fl_Color bgcolor) {
@@ -49,14 +49,14 @@
   int x1 = x+w/2;
   int y1 = y+h/2;
   uchar *g = fl_gray_ramp();
-  fl_color(g['P']); fl_line(x+0, y1, x1, y+0, x+w-0, y1);
-  fl_color(g['N']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
-  fl_color(g['H']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
-  fl_color(g['W']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
-  fl_color(g['U']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
-  fl_color(g['S']); fl_line(x+0, y1, x1, y+h-0, x+w-0, y1);
+  fl_color(g[(uchar)'P']); fl_line(x+0, y1, x1, y+0, x+w-0, y1);
+  fl_color(g[(uchar)'N']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
+  fl_color(g[(uchar)'H']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
+  fl_color(g[(uchar)'W']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
+  fl_color(g[(uchar)'U']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
+  fl_color(g[(uchar)'S']); fl_line(x+0, y1, x1, y+h-0, x+w-0, y1);
   fl_color(bgcolor); fl_polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
-  fl_color(g['A']); fl_loop(x+3, y1, x1, y+3, x+w-3, y1, x1, y+h-3);
+  fl_color(g[(uchar)'A']); fl_loop(x+3, y1, x1, y+3, x+w-3, y1, x1, y+h-3);
 }
 
 extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
--- fltk-1.3.2/src/fl_round_box.cxx.orig	2013-07-19 08:31:37.000000000 -0400
+++ fltk-1.3.2/src/fl_round_box.cxx	2013-07-19 08:32:51.000000000 -0400
@@ -76,29 +76,29 @@
 void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
   uchar *g = fl_gray_ramp();
   draw(FILL,	    x,   y, w,   h, 2, bgcolor);
-  draw(UPPER_LEFT,  x+1, y, w-2, h, 0, (Fl_Color)g['N']);
-  draw(UPPER_LEFT,  x+1, y, w-2, h, 1, (Fl_Color)g['H']);
-  draw(UPPER_LEFT,  x,   y, w,   h, 0, (Fl_Color)g['N']);
-  draw(UPPER_LEFT,  x,   y, w,   h, 1, (Fl_Color)g['H']);
-  draw(LOWER_RIGHT, x,   y, w,   h, 0, (Fl_Color)g['S']);
-  draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['U']);
-  draw(LOWER_RIGHT, x,   y, w,   h, 1, (Fl_Color)g['U']);
-  draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['W']);
-  draw(CLOSED,	    x,   y, w,   h, 2, (Fl_Color)g['A']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 0, (Fl_Color)g[(uchar)'N']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 1, (Fl_Color)g[(uchar)'H']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 0, (Fl_Color)g[(uchar)'N']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 1, (Fl_Color)g[(uchar)'H']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 0, (Fl_Color)g[(uchar)'S']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g[(uchar)'U']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 1, (Fl_Color)g[(uchar)'U']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g[(uchar)'W']);
+  draw(CLOSED,	    x,   y, w,   h, 2, (Fl_Color)g[(uchar)'A']);
 }
 
 void fl_round_up_box(int x, int y, int w, int h, Fl_Color bgcolor) {
   uchar *g = fl_gray_ramp();
   draw(FILL,	    x,   y, w,   h, 2, bgcolor);
-  draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['H']);
-  draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['N']);
-  draw(LOWER_RIGHT, x,   y, w,   h, 1, (Fl_Color)g['H']);
-  draw(LOWER_RIGHT, x,   y, w,   h, 2, (Fl_Color)g['N']);
-  draw(UPPER_LEFT,  x,   y, w,   h, 2, (Fl_Color)g['U']);
-  draw(UPPER_LEFT,  x+1, y, w-2, h, 1, (Fl_Color)g['S']);
-  draw(UPPER_LEFT,  x,   y, w,   h, 1, (Fl_Color)g['W']);
-  draw(UPPER_LEFT,  x+1, y, w-2, h, 0, (Fl_Color)g['U']);
-  draw(CLOSED,	    x,   y, w,   h, 0, (Fl_Color)g['A']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g[(uchar)'H']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g[(uchar)'N']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 1, (Fl_Color)g[(uchar)'H']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 2, (Fl_Color)g[(uchar)'N']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 2, (Fl_Color)g[(uchar)'U']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 1, (Fl_Color)g[(uchar)'S']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 1, (Fl_Color)g[(uchar)'W']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 0, (Fl_Color)g[(uchar)'U']);
+  draw(CLOSED,	    x,   y, w,   h, 0, (Fl_Color)g[(uchar)'A']);
 }
 
 extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
--- fltk-1.3.2/jpeg/jmorecfg.h.orig	2013-07-19 08:48:14.000000000 -0400
+++ fltk-1.3.2/jpeg/jmorecfg.h	2013-07-19 08:50:50.000000000 -0400
@@ -232,14 +232,15 @@
  * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
  */
 
-#ifndef HAVE_BOOLEAN
-typedef int boolean;
-#endif
-#ifndef FALSE			/* in case these macros already exist */
-#define FALSE	0		/* values of boolean */
+#ifdef HAVE_BOOLEAN
+#ifndef FALSE           /* in case these macros already exist */
+#define FALSE   0       /* values of boolean */
 #endif
 #ifndef TRUE
-#define TRUE	1
+#define TRUE    1
+#endif
+#else
+typedef enum { FALSE = 0, TRUE = 1 } boolean;
 #endif
 
 
--- fltk-1.3.2/src/Fl_JPEG_Image.cxx.orig	2013-07-19 08:46:16.000000000 -0400
+++ fltk-1.3.2/src/Fl_JPEG_Image.cxx	2013-07-19 08:59:15.000000000 -0400
@@ -155,7 +155,7 @@
   
   jpeg_create_decompress(&dinfo);
   jpeg_stdio_src(&dinfo, fp);
-  jpeg_read_header(&dinfo, 1);
+  jpeg_read_header(&dinfo, TRUE);
   
   dinfo.quantize_colors      = (boolean)FALSE;
   dinfo.out_color_space      = JCS_RGB;
@@ -333,7 +333,7 @@
   
   jpeg_create_decompress(&dinfo);
   jpeg_mem_src(&dinfo, data);
-  jpeg_read_header(&dinfo, 1);
+  jpeg_read_header(&dinfo, TRUE);
   
   dinfo.quantize_colors      = (boolean)FALSE;
   dinfo.out_color_space      = JCS_RGB;
