--- Makefile.orig	2007-11-17 23:10:57.000000000 -0700
+++ Makefile	2008-03-04 20:34:21.000000000 -0700
@@ -1,6 +1,6 @@
 # $Id: Makefile,v 1.113 2005/01/30 02:14:14 prahl Exp $
 
-CC=gcc
+#CC=gcc
 MKDIR=mkdir -p
 TAR=gnutar
 RM=rm
@@ -17,20 +17,20 @@
 #PREFIX_DRIVE=c:
 
 #Uncomment next line when using gcc compiler, target linux
-LINK_FLAGS = -lm
+#LINK_FLAGS = -lm
 
 #Uncomment next line when using rsx compiler, target win32
 #CFLAGS:=$(CFLAGS) -Zwin32  
 
 #Base directory - adapt as needed
-PREFIX=$(PREFIX_DRIVE)/usr/local
+#PREFIX=$(PREFIX_DRIVE)/usr/local
 
 #Name of executable binary --- beware of 8.3 restriction under DOS
 BINARY_NAME=latex2rtf$(EXE_SUFFIX)
 
 # Location of binary, man, info, and support files - adapt as needed
 BIN_INSTALL=$(PREFIX)/bin
-MAN_INSTALL=$(PREFIX)/man/man1
+MAN_INSTALL=$(PREFIX)/share/man/man1
-INFO_INSTALL=$(PREFIX)/info
+INFO_INSTALL=$(PREFIX)/share/info
 SUPPORT_INSTALL=$(PREFIX)/share/latex2rtf
 CFG_INSTALL=$(PREFIX)/share/latex2rtf/cfg
@@ -132,7 +132,7 @@
 	test/bib_apacite2.bib        test/fig_subfig.tex     test/include4.tex      \
 	test/include5.tex            test/hyperref.tex       test/bib_super.bib     \
 	test/longstack.tex
-	
+
 OBJS=fonts.o direct.o encodings.o commands.o stack.o funct1.o tables.o \
 	chars.o ignore.o cfg.o main.o utils.o parser.o lengths.o counters.o \
 	preamble.o letterformat.o equations.o convert.o xrefs.o definitions.o graphics.o \
@@ -153,7 +153,7 @@
 	cd scripts && $(MAKE)
 	cd test && $(MAKE) 
 	cd test && $(MAKE) check
-	
+
 fullcheck: latex2rtf
 	cd scripts && $(MAKE)
 	cd test && $(MAKE) clean
@@ -203,17 +203,17 @@
 
 install: latex2rtf doc/latex2rtf.1 $(CFGS) scripts/latex2png
 	cd doc && $(MAKE)
-	$(MKDIR) $(BIN_INSTALL)
-	$(MKDIR) $(MAN_INSTALL)
-	$(MKDIR) $(CFG_INSTALL)
-	cp $(BINARY_NAME)     $(BIN_INSTALL)
-	cp scripts/latex2png  $(BIN_INSTALL)
-	cp doc/latex2rtf.1    $(MAN_INSTALL)
-	cp doc/latex2png.1    $(MAN_INSTALL)
-	cp $(CFGS)            $(CFG_INSTALL)
-	cp doc/latex2rtf.html $(SUPPORT_INSTALL)
-	cp doc/latex2rtf.pdf  $(SUPPORT_INSTALL)
-	cp doc/latex2rtf.txt  $(SUPPORT_INSTALL)
+	$(MKDIR) $(DESTDIR)$(BIN_INSTALL)
+	$(MKDIR) $(DESTDIR)$(MAN_INSTALL)
+	$(MKDIR) $(DESTDIR)$(CFG_INSTALL)
+	cp $(BINARY_NAME)     $(DESTDIR)$(BIN_INSTALL)
+	cp scripts/latex2png  $(DESTDIR)$(BIN_INSTALL)
+	cp doc/latex2rtf.1    $(DESTDIR)$(MAN_INSTALL)
+	cp doc/latex2png.1    $(DESTDIR)$(MAN_INSTALL)
+	cp $(CFGS)            $(DESTDIR)$(CFG_INSTALL)
+	cp doc/latex2rtf.html $(DESTDIR)$(SUPPORT_INSTALL)
+	cp doc/latex2rtf.pdf  $(DESTDIR)$(SUPPORT_INSTALL)
+	cp doc/latex2rtf.txt  $(DESTDIR)$(SUPPORT_INSTALL)
 	@echo "******************************************************************"
 	@echo "*** latex2rtf successfully installed as \"$(BINARY_NAME)\""
 	@echo "*** in directory \"$(BIN_INSTALL)\""
@@ -230,9 +230,9 @@
 	@echo "******************************************************************"
 
 install-info: doc/latex2rtf.info
-	$(MKDIR) $(INFO_INSTALL)
-	cp doc/latex2rtf.info $(INFO_INSTALL)
-	install-info --info-dir=$(INFO_INSTALL) doc/latex2rtf.info
+	$(MKDIR) $(DESTDIR)$(INFO_INSTALL)
+	cp doc/latex2rtf.info $(DESTDIR)$(INFO_INSTALL)
+	install-info --info-dir=$(DESTDIR)$(INFO_INSTALL) doc/latex2rtf.info
 
 realclean: checkdir clean
 	$(RM) -f makefile.depend latex2rtf-$(VERSION).tar.gz
@@ -262,16 +262,16 @@
 	cp macosx/License.rtf $(PKG_RESOURCES)
 	cp macosx/ReadMe.html $(PKG_RESOURCES)
 	cp macosx/Welcome.html $(PKG_RESOURCES)
-	
+
 	-$(PKG_MAKER) -build -p $(PKG_NAME) -r $(PKG_RESOURCES) -f $(PKG_CONTENTS)
 	mkdmg $(DMG_DIR)
-	
+
 	$(RM) -rf $(PKG_DIR)
-	
+
 	mkdmg 
-	
-	
-	
+
+
+
 .PHONY: all check checkdir clean depend dist doc install install_info realclean latex2rtf uptodate releasedate splint fullcheck
 
 # created using "make depend"

