--- Makefile.in.orig	Mon Jan 17 01:54:16 2005
+++ Makefile.in	Mon Jan 17 02:04:35 2005
@@ -6,7 +6,7 @@
 # IMPORTANT!!!!!
 # if you edit the install directory (INSTALL_DIR), 
 # make sure it ends with rtf2latex2e!!!!
-INSTALL_DIR = /usr/local/rtf2latex2e
+INSTALL_DIR = __PREFIX__/share/rtf2latex2e
 #----------------------------------------------------------------
 
 
@@ -32,39 +32,39 @@
 	  figure2eps.o \
 	  jpeg2eps.o
 
-      
+
 rtf2latex2e.bin : $(OBJ)
 	$(CC) $(CFLAGS) -o ../$@ $(OBJ)
-	
+
 all : rtf2latex2e.bin
 
 clean : 
 	rm -f $(OBJ) config.log config.cache
 
 installdirs:
-	@if test -d $(INSTALL_DIR);then \
+	@if test -d $(DESTDIR)$(INSTALL_DIR);then \
 		echo; \
 		echo "old distribution of rtf2latex2e found!"; \
-		echo "renaming directory to $(INSTALL_DIR).old"; \
-		rm -rf $(INSTALL_DIR).old; \
-		mv -bf $(INSTALL_DIR) $(INSTALL_DIR).old; \
+		echo "renaming directory to $(DESTDIR)$(INSTALL_DIR).old"; \
+		rm -rf $(DESTDIR)$(INSTALL_DIR).old; \
+		mv -bf $(DESTDIR)$(INSTALL_DIR) $(DESTDIR)$(INSTALL_DIR).old; \
 		echo; \
-		$(MKINSTALLDIRS) $(INSTALL_DIR); \
-	else $(MKINSTALLDIRS) $(INSTALL_DIR); fi
+		$(MKINSTALLDIRS) $(DESTDIR)$(INSTALL_DIR); \
+	else $(MKINSTALLDIRS) $(DESTDIR)$(INSTALL_DIR); fi
 
 install : rtf2latex2e.bin clean installdirs
-	cp ../rtf2latex2e.bin $(INSTALL_DIR)/
-	cp ../INSTALL $(INSTALL_DIR)/
-	cp ../README $(INSTALL_DIR)/
-	cp -r ../doc $(INSTALL_DIR)/
-	cp -r ../examples $(INSTALL_DIR)/
-	cp -r ../pref $(INSTALL_DIR)/
-	cp -r ../src $(INSTALL_DIR)/
-	cp -r ../Unix $(INSTALL_DIR)/
-	ln -sf $(INSTALL_DIR)/rtf2latex2e.bin /usr/bin/rtf2latex2e
+	cp ../rtf2latex2e.bin $(DESTDIR)$(INSTALL_DIR)/
+	cp ../INSTALL $(DESTDIR)$(INSTALL_DIR)/
+	cp ../README $(DESTDIR)$(INSTALL_DIR)/
+	cp -r ../doc $(DESTDIR)$(INSTALL_DIR)/
+	cp -r ../examples $(DESTDIR)$(INSTALL_DIR)/
+	cp -r ../pref $(DESTDIR)$(INSTALL_DIR)/
+	cp -r ../src $(DESTDIR)$(INSTALL_DIR)/
+	cp -r ../Unix $(DESTDIR)$(INSTALL_DIR)/
+	ln -sf $(DESTDIR)$(INSTALL_DIR)/rtf2latex2e.bin $(DESTDIR)__PREFIX__/bin/rtf2latex2e
 	@echo
 	@echo "rtf2latex2e has been installed in $(INSTALL_DIR)"
-	@echo "A symbolic link /usr/bin/rtf2latex2e has been created"
+	@echo "A symbolic link __PREFIX__/bin/rtf2latex2e has been created"
 	@echo
 	@echo "Please set the environment variable RTF2LATEX2E_DIR to $(INSTALL_DIR)."
 	@echo
