--- Imakefile	2016-05-15 11:06:29.000000000 -0400
+++ Imakefile	2016-05-15 13:11:06.000000000 -0400
@@ -30,9 +30,12 @@
 XCOMM Also, you may have to uncomment and redefine MKDIRHIER because "make" looks
 XCOMM for it relative to the BINDIR variable.
 XCOMM
-XCOMM BINDIR = /usr/bin
-XCOMM MKDIRHIER = /bin/sh /usr/bin/X11/mkdirhier -p
-MKDIRHIER = mkdirhier 
+BINDIR = __PREFIX/bin
+DESTDIR = __DESTROOT
+MKDIRHIER = mkdirhier
+XCOMM MKDIRHIER = mkdirhier 
+
+EXTRA_LDOPTIONS = -L__PREFIX/lib
 
 XCOMM Uncomment and change XAPPLOADDIR to the directory where you want the
 XCOMM app-defaults resource files to go.  You will have to use the environment
@@ -45,7 +48,7 @@
 XCOMM different tree than the "correct" tree that your X system expects. The usual
 XCOMM purpose of DESTDIR is to test an install process by installing in a benign area.
 
-XCOMM XAPPLOADDIR = /home/user/xfig
+XAPPLOADDIR = __PREFIX/lib/X11/app-defaults
 
 XCOMM Comment out the following definition for XAW3D if you don't to want to use
 XCOMM the 3d Athena Widget Set
@@ -75,9 +78,9 @@
 XCOMM Redefine the following if your PNG library, zlib library and/or include file
 XCOMM are in different places
 
-PNGLIBDIR = $(USRLIBDIR)
-PNGINC = -I/usr/include
-ZLIBDIR = $(USRLIBDIR)
+PNGLIBDIR = __PREFIX/lib
+PNGINC = -I__PREFIX/include
+ZLIBDIR = __PREFIX/lib
 
 XCOMM If don't want JPEG support, comment out the #define USEJPEG line
 XCOMM Uncomment the #define for USEJPEG if you want to be able to import
@@ -96,8 +99,8 @@
 
 #ifdef USEJPEG
 #    ifdef USEINSTALLEDJPEG
-	JPEGLIBDIR = /usr/local/lib
-	JPEGINC = -I/usr/include/X11
+      JPEGLIBDIR = __PREFIX/lib
+      JPEGINC = -I__PREFIX/include
 #    else
 	JPEGLIBDIR = ../jpeg
 	JPEGINC = -I$(JPEGLIBDIR)
@@ -119,8 +122,8 @@
 #define USEXPM_ICON
 
 #ifdef USEXPM
-XPMLIBDIR = /usr/local/lib
-XPMINC = -I/usr/include/X11
+XPMLIBDIR = __PREFIX/lib
+XPMINC = -I__PREFIX/include/X11
 #endif
 
 XCOMM Uncomment the following definiton if you want to use the small icons
@@ -170,16 +173,15 @@
 XCOMM XFIGLIBDIR = $(LIBDIR)
 
 XCOMM use this if you want the multi-key data base file in the standard X11 tree
-XFIGLIBDIR = $(LIBDIR)/xfig
+XFIGLIBDIR = __PREFIX/lib/xfig
 
 XCOMM XFIGDOCDIR tells where the html and pdf documentation should go
 XCOMM XFIGDOCDIR = $(DOCDIR)/xfig
-XFIGDOCDIR = /usr/local/xfig/doc
+XFIGDOCDIR = __PREFIX/share/doc/xfig
 
 XCOMM MANDIR tells where the standard man pages should go (no need to change it
 XCOMM if you want the man pages installed in the standard place on your system
-MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
-XCOMM MANDIR = /usr/local/xfig/man
+MANDIR = __PREFIX/share/man/man$(MANSUFFIX)
 
 XCOMM If your system doesn't have strstr undefine the following definition
 XCOMM HAVE_NO_NOSTRSTR = -DNOSTRSTR
