--- fig2dev/Imakefile.orig	Fri Jan 14 04:59:04 2000
+++ fig2dev/Imakefile	Sun Mar 12 03:39:47 2000
@@ -27,7 +27,7 @@
 XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled
 XCOMM and installed xfig.  This will be made automatic in the future.
 
-XFIGLIBDIR =	/usr/local/lib/X11/xfig
+XFIGLIBDIR =	$(LIBDIR)/xfig
 
 XCOMM If your system has the strerror() function (doesn't have sys_errlist) then
 XCOMM comment out NEED_STRERROR with an XCOMM comment.
@@ -38,7 +38,7 @@
 XCOMM inline functions. With the "INLINE" keyword, you should notice that
 XCOMM the display will be a bit faster in complex figures
 
-XCOMM USEINLINE = -DUSE_INLINE
+USEINLINE = -DUSE_INLINE
 
 XCOMM Change RGB if necessary, to point to your rgb.txt color database
 XCOMM file (for X11).  This is needed for the -g (background color) option.
@@ -54,11 +54,11 @@
 XCOMM Change XPMINC if necessary to point to the include file for xpm (xpm.h)
 XCOMM
 
-XCOMM #define USEXPM
+#define USEXPM
 
 #ifdef USEXPM
 XPMLIBDIR = $(USRLIBDIR)
-XPMINC = -I/usr/include/X11
+XPMINC = -I/usr/X11R6/include/X11 -I$(INCDIR)/X11
 #endif
 
 XCOMM For Linux machines or any machines that have a separate library for
@@ -88,7 +88,7 @@
 #ifdef USEJPEG
 #ifdef USEINSTALLEDJPEG
 JPEGLIBDIR = /usr/local/lib
-JPEGINCDIR = /usr/include/X11
+JPEGINCDIR = /usr/local/include
 #else
 JPEGLIBDIR = ../jpeg
 JPEGINCDIR = $(JPEGLIBDIR)
@@ -127,23 +127,23 @@
 
 XCOMM Uncomment the next line if you want use Japanese (i18n) on xfig.
 
-XCOMM #define I18N
+#define I18N
 
 #ifdef I18N
 I18N_DEFS = -DI18N 
-FIG2DEV_LIBDIR = /usr/local/lib/fig2dev
-I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR='\"/usr/local/lib/fig2dev\"'
+FIG2DEV_LIBDIR = $(LIBDIR)/fig2dev
+I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR='\"$(FIG2DEV_LIBDIR)\"'
 
 install::
-	[ -d $(FIG2DEV_LIBDIR) ] || mkdir $(FIG2DEV_LIBDIR)
-	$(INSTALL) -c dev/japanese.ps $(FIG2DEV_LIBDIR)
-	( cd $(FIG2DEV_LIBDIR); \
+	[ -d $(DESTDIR)$(FIG2DEV_LIBDIR) ] || mkdir $(DESTDIR)$(FIG2DEV_LIBDIR)
+	$(INSTALL) -c dev/japanese.ps $(DESTDIR)$(FIG2DEV_LIBDIR)
+	( cd $(DESTDIR)$(FIG2DEV_LIBDIR); \
 	  rm -f ja.ps ja_JP.ps ja_JP.ujis.ps ja_JP.eucJP.ps ja_JP.EUC.ps; \
 	  ln -s japanese.ps ja.ps; ln -s japanese.ps ja_JP.ps; \
 	  ln -s japanese.ps ja_JP.ujis.ps; ln -s japanese.ps ja_JP.eucJP.ps; \
 	  ln -s japanese.ps ja_JP.EUC.ps )
-	$(INSTALL) -c  dev/korean.ps $(FIG2DEV_LIBDIR)
-	( cd $(FIG2DEV_LIBDIR); \
+	$(INSTALL) -c  dev/korean.ps $(DESTDIR)$(FIG2DEV_LIBDIR)
+	( cd $(DESTDIR)$(FIG2DEV_LIBDIR); \
 	  rm -f ko.ps ko_KR.ps ko_KR.ujis.ps ko_KR.eucKR.ps ko_KR.EUC.ps; \
 	  ln -s korean.ps ko.ps; ln -s korean.ps ko_KR.ps; \
 	  ln -s korean.ps ko_KR.ujis.ps; ln -s korean.ps ko_KR.eucKR.ps; \
@@ -258,11 +258,11 @@
 XCOMM Install the tk bitmaps here
 install::
 	@(cd bitmaps ; \
-	if [ -d $(XFIGLIBDIR)/bitmaps ]; then set +x; \
-	else (set -x; $(MKDIRHIER) $(XFIGLIBDIR)/bitmaps ); fi ; \
-	echo Copying bitmap files for tk to $(XFIGLIBDIR)/bitmaps ; \
+	if [ -d $(DESTDIR)$(XFIGLIBDIR)/bitmaps ]; then set +x; \
+	else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGLIBDIR)/bitmaps ); fi ; \
+	echo Copying bitmap files for tk to $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \
 	for f in * ; do \
-	      $(INSTALL) -c $$f $(XFIGLIBDIR)/bitmaps ; \
+	      $(INSTALL) -c $$f $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \
 	done) ; 
 
 InstallScript(fig2ps2tex,$(BINDIR))
