--- Imakefile.orig	Mon Oct 26 09:16:54 1998
+++ Imakefile	Mon Oct 26 09:27:43 1998
@@ -48,8 +48,10 @@
 /**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT
 
 /**/# For a generic Solaris 2.x system, I'd suggest
-MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4
+/**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4
 
+/**/# For FreeBSD
+MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DMAXPID=30000 -DREGEXP -DXPM -DXVIEW32
 /**/#
 /**/# Set MORELDFLAGS to any link options you want.  Be sure to add -lxpm if you
 /**/# want to include XPM support.  For a generic Solaris 1.x
@@ -57,8 +59,11 @@
 /**/#MORELDFLAGS=-L${OPENWINHOME}/lib
 /**/#
 /**/# For Solaris 2.x, I'd suggest
-MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl
+/**/#MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl
 
+/**/# For FreeBSD
+MORELDFLAGS=-L$(USRLIBDIR) -lXpm
+XPMINCDIR=-I$(INCROOT)/X11
 
 /**/# No more changes needed
 
@@ -72,6 +77,7 @@
 SYS_LIBRARIES = -ll -lm
 INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XPMINCDIR) 
 DEPLIBS = 
+EXTENSIONLIB = -lXext
 LOCAL_LIBRARIES = $(MORELDFLAGS) $(OLGXLIB) $(XLIB)
 
 HEADERS = cmdstream.h cursors.h debug.h defaults.h dsdm.h environ.h error.h \
@@ -115,26 +121,29 @@
 	${HEADERS} ${BITMAPS} ${SRCS} \
 	${MISC} ${INFOFILES} ${MANPAGES} ${SCRIPTS}
 
-ComplexProgramTarget(olvwm)
-
-#if NeedMenuFile
-InstallNonExecList($(MISC),$(LIBRARY_DEST))
-#endif
+depend:: olvwmrc.c
 
 parse.c: parse.l
-	lex -t parse.l > parse.c
+	$(LEX) $(LFALGS) parse.l
+	$(MV) lex.yy.c parse.c
 
-olvwmrc.c: olvwmrc.y
-	yacc olvwmrc.y
-	mv y.tab.c olvwmrc.c
+olvwmrc.c: parse.c olvwmrc.y
+	$(YACC) olvwmrc.y
+	$(MV) y.tab.c olvwmrc.c
 
 olvwmrc.o: parse.c olvwmrc.c
 
+ComplexProgramTarget(olvwm)
+
+#if NeedMenuFile
+InstallNonExecList($(MISC),$(LIBRARY_DEST))
+#endif
+
 version.c: ${SRCS} ${HEADERS}
 	@echo '#ident "@(#)olvwm version compiled '`date`'"' > version.c
 
 clean::
-	/bin/rm -f parse.c olvwmrc.c version.c
+	/bin/rm -f parse.c olvwmrc.c version.c .depend
 
 install.man:: $(MANPAGES)
 	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
@@ -142,7 +151,11 @@
 	@for i in $(MANPAGES) ;\
 	do \
 	echo "installing $$i"; \
+	$(RM) $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX)* ; \
 	$(INSTALL) -c $(INSTMANFLAGS) $$i $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \
+	$(COMPRESSMANCMD) $(DESTDIR)$(MANDIR)/`basename $$i .man`.$(MANSUFFIX) ; \
 	done
+
+depend:: olvwmrc.c
 
 #include <XView.prog>
*** defaults.c.orig	Thu Jan 13 16:36:03 1994
--- defaults.c	Sun Jan 24 20:50:32 1999
***************
*** 30,38 ****
  #include <X11/Xutil.h>
  #include <X11/Xatom.h>
  #include <X11/Xresource.h>
- #ifdef OW_I18N_L4
  #include <sys/param.h>
- #endif
  
  #include "i18n.h"
  #include "ollocale.h"
--- 30,36 ----
***************
*** 90,97 ****
--- 88,99 ----
  #ifdef SVR4
  	    if (sysinfo(SI_HOSTNAME, hostname, sizeof(hostname)) != -1) {
  #else
+ #ifdef BSD
+ 	    if (0 == gethostname(hostname, sizeof(hostname))) {
+ #else
  	    if (0 == gethostname(hostname, sizeof(hostname), &namelen)) {
  #endif
+ #endif
  		(void) strcat(filename, hostname);
  		fileDB = XrmGetFileDatabase(filename);
  	    }
***************
*** 159,165 ****
  	    return appDB;
      }
  
!     appDB = XrmGetFileDatabase("/usr/lib/X11/app-defaults/Olwm");
      return appDB;
  }
  
--- 161,167 ----
  	    return appDB;
      }
  
!     appDB = XrmGetFileDatabase("/usr/X11R6/lib/X11/app-defaults/Olwm");
      return appDB;
  }
  
--- gif.c.orig	Thu Jan 13 15:36:06 1994
+++ gif.c	Mon Oct 19 13:46:15 1998
@@ -56,6 +56,10 @@
 	int     disposal;
 } Gif89 = { -1, -1, -1, 0 };
 
+static        ReadColorMap();
+static        DoExtension();
+static        GetDataBlock();
+
 extern XImage* ReadImage();
 
 XImage *ReadGIF(dpy, fd, pNcolors, pColors)
@@ -456,7 +460,7 @@
 	return code;
 }
 
-static XImage*
+extern XImage*
 ReadImage(dpy, fd, len, height, cmap, interlace, ignore)
 Display *dpy;
 FILE    *fd;
--- mem.c.orig	Thu Jan 13 15:36:08 1994
+++ mem.c	Mon Oct 19 13:47:49 1998
@@ -18,7 +18,12 @@
 
 
 #include <sys/types.h>
+#include <sys/param.h>
+#ifndef __STDC__
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <memory.h>
 #include <stdio.h>
 
--- olvwmrc.y.orig	Mon Oct 19 14:21:34 1998
+++ olvwmrc.y	Mon Oct 19 14:04:33 1998
@@ -37,7 +37,7 @@
 char	*LookupToken();
 char	*FindOlvwmRC();
 void	resetKeys();
-char	*strexpand();
+static	char *strexpand();
 
 typedef struct progscreen {
     char        *target;
@@ -527,7 +527,9 @@
 	    }
 %%
 /* Programs */
+#ifndef YYDEBUG
 #define YYDEBUG 1
+#endif
 #include "parse.c"
 
 extern List	*ActiveClientList;
--- olwm.c.orig	Thu Jan 13 15:36:12 1994
+++ olwm.c	Mon Oct 19 14:08:54 1998
@@ -677,9 +677,15 @@
         pid_t pid;
         int status;
 #else
+#ifdef BSD
+	int oldmask;
+	int pid;
+	int status;
+#else
 	int oldmask;
 	int pid;
 	union wait status;
+#endif
 #endif
 
 	if (!deadChildren)
*** screen.c.orig	Sun Jan 24 20:03:43 1999
--- screen.c	Sun Jan 24 20:58:29 1999
***************
*** 66,71 ****
--- 66,78 ----
   *-------------------------------------------------------------------------*/
  List	*ScreenInfoList;			/* List of managed screens */
  extern	Bool BoolString();
+ static	updateScreenWorkspaceColor();
+ static	updateScreenWindowColor();
+ static	updateScreenForegroundColor();
+ static	updateScreenBackgroundColor();
+ static	updateScreenBorderColor();
+ static	updateScreenInputFocusColor();
+ static	updateScreenGlyphFont();
  
  /*-------------------------------------------------------------------------
   *	Local Data
***************
*** 282,287 ****
--- 289,295 ----
  		     	case PseudoColor:
  			case GrayScale:
  		     	case DirectColor:
+ 			case TrueColor:
  		    		return True;
  				/*NOTREACHED*/
  		    		break;
***************
*** 523,529 ****
   *      Construct bitmap search path as follows:
   *	      $OPENWINHOME/etc/workspace/patterns
   *	      $OPENWINHOME/include/X11/include/bitmaps
!  *	      /usr/X11/include/X11/include/bitmaps
   *
   * REMIND: this should be cleaned up so that it doesn't use a fixed-size
   * array.
--- 531,537 ----
   *      Construct bitmap search path as follows:
   *	      $OPENWINHOME/etc/workspace/patterns
   *	      $OPENWINHOME/include/X11/include/bitmaps
!  *	      /usr/X11R6/include/X11/include/bitmaps
   *
   * REMIND: this should be cleaned up so that it doesn't use a fixed-size
   * array.
***************
*** 546,552 ****
  	(void)sprintf(bmPath, "%s/include/X11/bitmaps",owHome);
  	bitmapSearchPath[i++] = MemNewString(bmPath);
  
! 	bitmapSearchPath[i++] = MemNewString("/usr/X11/include/X11/bitmaps");
  	bitmapSearchPath[i] = (char *)NULL;
  }
  
--- 554,560 ----
  	(void)sprintf(bmPath, "%s/include/X11/bitmaps",owHome);
  	bitmapSearchPath[i++] = MemNewString(bmPath);
  
! 	bitmapSearchPath[i++] = MemNewString("/usr/X11R6/include/X11/bitmaps");
  	bitmapSearchPath[i] = (char *)NULL;
  }
  
--- st.c.orig	Thu Jan 13 15:36:18 1994
+++ st.c	Mon Oct 19 14:12:31 1998
@@ -14,6 +14,7 @@
 #include "st.h"
 #include "mem.h"
 
+static rehash();
 
 #define max(a,b) ((a) > (b) ? (a) : (b))
 #define nil(type) ((type *) 0)
--- virtual.c.orig	Thu Jan 13 15:36:22 1994
+++ virtual.c	Mon Oct 19 14:13:27 1998
@@ -48,6 +48,9 @@
 #ident "@(#)virtual.c	1.6 olvwm version 07 Jan 1994"
 #endif
 
+static rexMatch();
+static rexInit();
+
 /* Class Function Vector; a virtual pane is the VDM window in which all
  * the little virtual windows appear (and to which said windows are
  * parented)
@@ -2108,7 +2111,9 @@
     }
 }
 
+#ifndef REGEXP
 static char expbuf[256];
+#endif
 
 static
 rexMatch(string)
--- winframe.c.orig	Thu Jan 13 15:36:25 1994
+++ winframe.c	Mon Oct 19 14:14:26 1998
@@ -52,6 +52,8 @@
 
 extern Time TimeFresh();
 
+static headerHeight();
+
 /***************************************************************************
 * private data
 ***************************************************************************/
--- winicon.c.orig	Thu Jan 13 15:36:26 1994
+++ winicon.c	Mon Oct 19 14:15:05 1998
@@ -37,6 +37,10 @@
 extern 	Bool	PropGetWMName();
 extern 	Bool	PropGetWMIconName();
 
+static	heightTopIcon();
+static	heightBottomIcon();
+static	widthBothIcon();
+
 /***************************************************************************
 * private data
 ***************************************************************************/