diff -Nurd -x'*~' plotutils-2.4.1.orig/libplot/Makefile.in plotutils-2.4.1/libplot/Makefile.in
--- plotutils-2.4.1.orig/libplot/Makefile.in	2000-07-04 03:37:10.000000000 -0400
+++ plotutils-2.4.1/libplot/Makefile.in	2007-06-26 02:38:54.000000000 -0400
@@ -88,7 +88,7 @@
 
 libplot_la_LDFLAGS = -version-info 4:1:2
 
-INCLUDES = $(X_CFLAGS) -I$(srcdir)/../include -DLIBPLOT
+INCLUDES = -I$(srcdir)/../include $(X_CFLAGS) -DLIBPLOT
 
 MISRC = mi_alloc.c mi_api.c mi_arc.c mi_canvas.c mi_fllarc.c mi_fllrct.c mi_fplycon.c mi_gc.c mi_ply.c mi_plycon.c mi_plygen.c mi_plypnt.c	 mi_plyutil.c mi_spans.c mi_widelin.c mi_zerarc.c mi_zerolin.c mi_version.c
 
diff -Nurd -x'*~' plotutils-2.4.1.orig/libplot/g_write.c plotutils-2.4.1/libplot/g_write.c
--- plotutils-2.4.1.orig/libplot/g_write.c	2000-05-19 12:10:01.000000000 -0400
+++ plotutils-2.4.1/libplot/g_write.c	2006-03-28 16:55:12.000000000 -0500
@@ -40,7 +40,7 @@
     }
 #ifdef LIBPLOTTER
   else if (data->outstream)
-    data->outstream->write(c, n);
+    data->outstream->write((const char *)c, n);
 #endif
 }
 
diff -Nurd -x'*~' plotutils-2.4.1.orig/libplot/i_rle.c plotutils-2.4.1/libplot/i_rle.c
--- plotutils-2.4.1.orig/libplot/i_rle.c	1999-06-27 12:58:10.000000000 -0400
+++ plotutils-2.4.1/libplot/i_rle.c	2006-03-28 16:47:04.000000000 -0500
@@ -78,7 +78,7 @@
   else if (rle->outstream)
     {
       rle->outstream->put ((unsigned char)(rle->oblen));
-      rle->outstream->write (&(rle->oblock[0]), rle->oblen);
+      rle->outstream->write ((const char *)&(rle->oblock[0]), rle->oblen);
     }
 #endif  
 
diff -Nurd -x'*~' plotutils-2.4.1.orig/libplot/n_write.c plotutils-2.4.1/libplot/n_write.c
--- plotutils-2.4.1.orig/libplot/n_write.c	2000-06-16 01:42:13.000000000 -0400
+++ plotutils-2.4.1/libplot/n_write.c	2006-03-28 17:06:20.000000000 -0500
@@ -208,7 +208,7 @@
 		  linebuf[pos++] = '0';
 		if (pos >= MAX_PBM_PIXELS_PER_LINE || i == (width - 1))
 		  {
-		    stream->write (linebuf, pos);
+		    stream->write ((const char *)linebuf, pos);
 		    stream->put ('\n');
 
 		    pos = 0;
@@ -253,7 +253,7 @@
 		  rowbuf[bytecount++] = outbyte;
 		}
 	      /* emit row of bytes */
-	      stream->write (rowbuf, bytecount);
+	      stream->write ((const char *)rowbuf, bytecount);
 	    }
 
 	  free (rowbuf);
@@ -366,7 +366,7 @@
 		num_pixels++;
 		if (num_pixels >= MAX_PGM_PIXELS_PER_LINE || i == (width - 1))
 		  {
-		    stream->write (linebuf, pos);
+		    stream->write ((const char *)linebuf, pos);
 		    stream->put ('\n');
 
 		    num_pixels = 0;
@@ -392,7 +392,7 @@
 	    {
 	      for (i = 0; i < width; i++)
 		rowbuf[i] = pixmap[j][i].u.rgb[0];
-	      stream->write (rowbuf, width);
+	      stream->write ((const char *)rowbuf, width);
 	    }
 	  free (rowbuf);
 	}
@@ -514,7 +514,7 @@
 		num_pixels++;
 		if (num_pixels >= MAX_PPM_PIXELS_PER_LINE || i == (width - 1))
 		  {
-		    stream->write (linebuf, pos);
+		    stream->write ((const char *)linebuf, pos);
 		    stream->put ('\n');
 
 		    num_pixels = 0;
@@ -542,7 +542,7 @@
 	      for (i = 0; i < width; i++)
 		for (component = 0; component < 3; component++)
 		  rowbuf[3 * i + component] = pixmap[j][i].u.rgb[component];
-	      stream->write (rowbuf, 3 * width);
+	      stream->write ((const char *)rowbuf, 3 * width);
 	    }
 	  free (rowbuf);
 	}
diff -Nurd -x'*~' plotutils-2.4.1.orig/libplot/z_write.c plotutils-2.4.1/libplot/z_write.c
--- plotutils-2.4.1.orig/libplot/z_write.c	2000-06-20 00:34:42.000000000 -0400
+++ plotutils-2.4.1/libplot/z_write.c	2006-03-28 17:15:48.000000000 -0500
@@ -484,7 +484,7 @@
   ostream *stream;
 
   stream = (ostream *)png_get_io_ptr (png_ptr);
-  stream->write (data, length);
+  stream->write ((const char *)data, length);
 }
 
 static void 
diff -Nurd -x'*~' plotutils-2.4.1.orig/libplotter/Makefile.in plotutils-2.4.1/libplotter/Makefile.in
--- plotutils-2.4.1.orig/libplotter/Makefile.in	2000-07-04 03:41:22.000000000 -0400
+++ plotutils-2.4.1/libplotter/Makefile.in	2007-06-26 02:38:33.000000000 -0400
@@ -86,7 +86,7 @@
 
 libplotter_la_LDFLAGS = -version-info 4:0:2
 
-INCLUDES = $(X_CFLAGS) -I$(srcdir)/../include -DLIBPLOT -DLIBPLOTTER
+INCLUDES = -I$(srcdir)/../include $(X_CFLAGS) -DLIBPLOT -DLIBPLOTTER
 
 MISRC = mi_alloc.cc mi_api.cc mi_arc.cc mi_canvas.cc mi_fllarc.cc	mi_fllrct.cc mi_fplycon.cc mi_gc.cc mi_ply.cc mi_plycon.cc mi_plygen.cc	mi_plypnt.cc mi_plyutil.cc mi_spans.cc mi_widelin.cc mi_zerarc.cc	mi_zerolin.cc mi_version.cc
 
