Index: MP/INSTALL
===================================================================
--- MP/INSTALL	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/INSTALL	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -43,22 +43,31 @@
 
   2. Type `make install' to compile and install the gmp, MP, and MPT
-     libraries and header files. You can customize what is built and
-     where the libraries and header files are installed by giving
-     'configure' appropriate options (see below). NOTE: If you do not
-     have the header file 'gmp.h' installed in a standard location on
-     your system, then a './configure' followed by a simple 'make'
-     command will fail. You need to do './configure --enable-gmp'
-     followed by 'make install'. 
+     libraries and header files. The libraries will be installed in 
+     ./lib/<ARCH> where <ARCH> is an architecture-specific identifier
+     (e.g., SUN4, SGI5).  Similarly, executables are installed in 
+     ./bin/<ARCH>.  You can customize what is built and where libraries, 
+     header files, and executables are installed by giving 'configure' 
+     appropriate options (see below). NOTE: If you do not have the header 
+     file 'gmp.h' installed in a standard location on your system, then 
+     a './configure' followed by a simple 'make' command will fail. You 
+     need to do './configure --enable-gmp' followed by 'make install'. 
 
   3. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package
-     for a different architecture), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended
-     mainly for the package's developers.  If you use it, you may have
-     to install all sorts of other programs in order to regenerate
-     files that came with the distribution.
-
-  4. Other make targets are:
+     files that `configure' created, type `make distclean'.  There is
+     a `make maintainer-clean' target, but that is intended mainly for 
+     the package's developers.  If you use it, you may have to install 
+     all sorts of other programs in order to regenerate files that came 
+     with the distribution.
+
+  4. To remake the library for a different architecture, login to the
+     target machine and change directories to the MP source directory.
+     You must remove the library object files and create new Makefiles.
+     To do this, simply do a `make clean' in the top-level MP directory,
+     followed by `rm config.cache' to remove the cache file created by
+     configure.  Finally, rerun configure with the same options you gave 
+     it on other machines followed by a `make' or `make install'.
+  
+  5. Other make targets are:
      'MP','libMP.a'   : Creates the MP library only.
      'MPT','libMPT.a' : Creates the MPT library only.
@@ -128,30 +137,31 @@
           installed in the specified directories.
 
+
 `--enable-PACKAGE' option where PACKAGE can be:
 
   'examples' : The distribution comes with some example implementations
-              contained in the directory 'examples'. By default, the
-              examples are not built when MP is built. Use this option
-              to build the examples together with MP. NOTE: Make sure
-              that MP is installed before the examples are built. See
-              also the README file contained in the 'examples'
-              directory. 
+               contained in the directory 'examples'. By default, the
+               examples are not built when MP is built. Use this option
+               to build the examples when MP is built. NOTE: Make sure
+               that MP is installed before the examples are built. Also
+     	       see the README file contained in the 'examples' directory. 
 
   'mpviewer': The distribution comes with an mpviewer implementation
               contained in the directory 'mpviewer'. By default, the
               mpviewer is not built when MP is built. Use this option
-              to build the mpviewer together with MP. NOTE: Make sure
-              that MP is installed before the mpviewer is built. See
-              also the README file contained in the 'mpviewer'
-              directory. 
-
-  'mppvm' : The distribution comes with some pvm example
-              implementations (demonstrating the use of the PVM
-              transport device) contained in the directory
-              'mp-pvm3'. By default, the pvm examples are not built
-              when MP is build. Use this option to build the pvm
-              examples together with MP. NOTE: Make sure that MP is
-              installed before the examples are built. See also the
-              README file contained in the 'mp-pvm3' directory.
+              to build the mpviewer when MP is built. NOTE: Make sure
+              that MP is installed before the mpviewer is built.  Also
+	      see the README file contained in the 'mpviewer' directory. 
+
+  'mppvm' : The distribution comes with some pvm example implementations 
+	    (demonstrating the use of the PVM transport device) contained 
+	    in the directory 'mp-pvm3'. By default, the pvm examples are 
+	    not built when MP is built. Use this option to build the pvm 
+	    examples when MP is built. NOTE: Make sure that MP is installed 
+	    before the examples are built. Also see the README file in the 
+	    'mp-pvm3' directory.  If the pvm include files and libraries are 
+	    not in standard places, you must be sure the PVM_ARCH and PVM_ROOT 
+	    are set.  Note also that if you use this option, you must also 
+	    use the `--with-pvm' option (see below).
 
 
Index: MP/Makefile.in
===================================================================
--- MP/Makefile.in	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/Makefile.in	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -15,8 +15,22 @@
 
 ## 
+## various paths
+##
+prefix 		= @prefix@
+exec_prefix 	= @exec_prefix@
+includedir	= @includedir@
+libdir 		= @libdir@
+
+## 
 ## various programs
 ##
 @SET_MAKE@
 CLEAN		= @CLEAN@
+RANLIB		= ranlib
+RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
+INSTALL		= ./install-sh -c
+INSTALL_PROGRAM	= ${INSTALL}
+INSTALL_DATA	= ${INSTALL} -m 644
+MKINSTALLDIRS   = ./mkinstalldirs
 
 ## 
@@ -34,8 +48,16 @@
 	for SUBDIR in ${BUILD_SUBDIRS}; \
 	do \
-		echo ${MAKE} $@ in $${SUBDIR}; \
-		cd $${SUBDIR}; \
-		${MAKE} $@; \
-		cd .. ;\
+		if test "$${SUBDIR}" = gmp && test "$@" != all; then \
+			if test "$@" = install; then \
+				${MAKE} installgmp; \
+			else \
+				${MAKE} uninstallgmp; \
+			fi; \
+		else \
+		       echo ${MAKE} $@ in $${SUBDIR}; \
+			cd $${SUBDIR}; \
+			${MAKE} $@; \
+			cd .. ;\
+		fi; \
 	done
 
@@ -53,5 +75,5 @@
 	distclean) ${CLEAN}; \
                rm -rf Makefile config.status config.log config.cache TAGS* \
-                      *.gz *.tar *.tgz lib include info;;\
+                      *.gz *.tar *.tgz lib include info bin;;\
 	maintainer-clean) rm -f configure; ${CLEAN}; \
                rm -rf Makefile config.status config.log config.cache TAGS* \
@@ -64,4 +86,18 @@
 libMPT.a MPT : force
 	cd MPT; $(MAKE) all
+
+gmp/libgmp.a :
+	cd gmp; $(MAKE) libgmp.a
+
+installgmp: gmp/libgmp.a 
+	${MKINSTALLDIRS} ${libdir}
+	${MKINSTALLDIRS} ${includedir}
+	$(INSTALL_DATA) gmp/libgmp.a ${libdir}
+	if $(RANLIB_TEST) ; then $(RANLIB) $(libdir)/libgmp.a; else true; fi
+	$(INSTALL_DATA) gmp/gmp.h $(includedir)
+
+uninstallgmp: force
+	rm -f $(libdir)/libgmp.a $(includedir)/gmp.h
+	- rmdir $(libdir) $(includedir)
 
 examples: force
Index: MP/examples/Makefile.in
===================================================================
--- MP/examples/Makefile.in	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/examples/Makefile.in	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -11,6 +11,9 @@
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
-libdir		= $(exec_prefix)/lib
+libdir		= @libdir@
 includedir	= $(prefix)/include
+bindir		= @bindir@
+# MP sources and MP.h reside here
+mp_srcdir	= ../MP
 BIGNUM_INCL     = $(prefix)/gmp
 
@@ -18,4 +21,5 @@
 SHELL		= /bin/sh
 CFLAGS          = @CFLAGS@
+CPPFLAGS	= -I. @CPPFLAGS@
 DEFS            = @DEFS@ 
 
@@ -24,6 +28,7 @@
 LIBDIR		= $(libdir)
 
-CLEAN           = @CLEAN@  rm -f *.out
-
+CLEAN           = @CLEAN@  rm -f *.out *.o
+INSTALL         = ../install-sh -c
+INSTALL_PROGRAM = ${INSTALL}
 
 COMPILE = $(CC) $(DEFS) -L$(LIBDIR) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 
@@ -37,7 +42,10 @@
         send-vec recv-vec
 
-all:    mk-progs
+all:    mk-bindir mk-progs
 
-install: mk-progs
+install: mk-bindir mk-progs
+
+mk-bindir:
+	$(top_srcdir)/mkinstalldirs $(bindir)
 
 mk-progs: $(PROGRAMS)
@@ -50,34 +58,54 @@
 	rm -f Makefile
 
-gmptest : gmptest.c $(libdir)/libMP.a
+
+gmptest : gmptest.c 
 	${COMPILE} $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-client : client.c $(libdir)/libMP.a
+client : client.c ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-server : server.c util $(libdir)/libMP.a
+server : server.c util.o ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} util.o $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-imp-client : imp-client.c $(libdir)/libMP.a
+imp-client : imp-client.c ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-imp-server : imp-server.c util $(libdir)/libMP.a
+imp-server : imp-server.c util.o ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} util.o $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-send-tree : send-tree.c $(libdir)/libMP.a
+send-tree : send-tree.c ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-recv-tree : recv-tree.c node util $(libdir)/libMP.a
+recv-tree : recv-tree.c node.o util.o ${mp_srcdir}/libMP.a ${mp_srcdir}/MP_Config.h ${mp_srcdir}/MP.h 
 	${COMPILE} node.o util.o $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-send-vec : send-vec.c $(libdir)/libMP.a
+send-vec : send-vec.c ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-recv-vec : recv-vec.c $(libdir)/libMP.a
+recv-vec : recv-vec.c ${mp_srcdir}/libMP.a ${mp_srcdir}/MP.h ${mp_srcdir}/MP_Config.h
 	${COMPILE} $@.c -o $@ $(LIBS)
+	${INSTALL} $@ ${bindir}
 
-node : node.c
-	${OBJCOMPILE} $(INCLUDES) $@.c
+node.o : 
+	${OBJCOMPILE} $(INCLUDES) node.c
 
-util : util.c
-	${OBJCOMPILE} $(INCLUDES) $@.c
+util.o :
+	${OBJCOMPILE} $(INCLUDES)  util.c
+
+${mp_srcdir}/libMP.a:
+	cd ${mp_srcdir}; ${MAKE} install
+
+${mp_srcdir}/MP.h:
+	cd ${mp_srcdir}; ${MAKE} MP.h
+
+${mp_srcdir}/MP_Config.h:
+	cd ${mp_srcdir}; ${MAKE} MP_Config.h
+
Index: MP/examples/gmptest.c
===================================================================
--- MP/examples/gmptest.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/examples/gmptest.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -8,5 +8,5 @@
 
 #include <stdio.h>
-#include "MP.h"
+/*#include "MP.h"*/
 #include  "gmp.h" 
 
Index: MP/mp-pvm3/Makefile.in
===================================================================
--- MP/mp-pvm3/Makefile.in	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/Makefile.in	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -86,5 +86,5 @@
 	mv put-vec $(XDIR)
 
-master: master.c util
+master: master.c util.o
 	${COMPILE} util.o $@.c -o $@ $(LIBS)
 	mv master $(XDIR)
@@ -94,5 +94,5 @@
 	mv put-tree $(XDIR)
 
-get-tree: get-tree.c util
+get-tree: get-tree.c util.o
 	${COMPILE} util.o $@.c -o $@ $(LIBS)
 	mv get-tree $(XDIR)
@@ -102,5 +102,5 @@
 	mv mcast-put-tree $(XDIR)
 
-mcast-get-tree: mcast-get-tree.c  util
+mcast-get-tree: mcast-get-tree.c  util.o
 	${COMPILE} util.o $@.c -o $@ $(LIBS)
 	mv mcast-get-tree $(XDIR)
@@ -110,5 +110,5 @@
 	mv slave $(XDIR)
 
-util : util.c
-	${OBJCOMPILE} $(INCLUDES) $@.c
+util.o : 
+	${OBJCOMPILE} $(INCLUDES) util.c
 
Index: MP/mp-pvm3/get-tree.c
===================================================================
--- MP/mp-pvm3/get-tree.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/get-tree.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -12,5 +12,4 @@
 #include "pvm3.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 EXTERN MP_TranspOps_t pvm_ops;
Index: MP/mp-pvm3/get-vec.c
===================================================================
--- MP/mp-pvm3/get-vec.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/get-vec.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -14,5 +14,4 @@
 #include "pvm3.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 EXTERN MP_TranspOps_t pvm_ops;
Index: MP/mp-pvm3/master.c
===================================================================
--- MP/mp-pvm3/master.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/master.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -17,5 +17,4 @@
 #include "pvm3.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 #define ENCODING  PvmDataRaw
Index: MP/mp-pvm3/mcast-get-tree.c
===================================================================
--- MP/mp-pvm3/mcast-get-tree.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/mcast-get-tree.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -12,5 +12,4 @@
 #include "pvm3.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 EXTERN MP_TranspOps_t pvm_ops;
Index: MP/mp-pvm3/mcast-put-tree.c
===================================================================
--- MP/mp-pvm3/mcast-put-tree.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/mcast-put-tree.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -14,5 +14,4 @@
 #include "gmp.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 EXTERN MP_TranspOps_t pvm_ops;
Index: MP/mp-pvm3/put-tree.c
===================================================================
--- MP/mp-pvm3/put-tree.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/put-tree.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -12,5 +12,4 @@
 #include "gmp.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 EXTERN MP_TranspOps_t pvm_ops;
Index: MP/mp-pvm3/put-vec.c
===================================================================
--- MP/mp-pvm3/put-vec.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/put-vec.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -10,5 +10,4 @@
 #include "pvm3.h"
 #include "MP.h"
-#include "MP_PvmTransp.h"
 
 EXTERN MP_TranspOps_t pvm_ops;
Index: MP/mp-pvm3/slave.c
===================================================================
--- MP/mp-pvm3/slave.c	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mp-pvm3/slave.c	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -11,5 +11,4 @@
 #include "MP.h"
 #include "gmp.h"
-#include "MP_PvmTransp.h"
 
 #define ENCODING  PvmDataRaw
Index: MP/mpviewer/Makefile.in
===================================================================
--- MP/mpviewer/Makefile.in	(revision 1b7361be01a867690a1c01be2ea56e9b571e5982)
+++ MP/mpviewer/Makefile.in	(revision a708e05307ead3012a96e3d8308e940ea9cc7be0)
@@ -8,5 +8,6 @@
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
-libdir		= $(exec_prefix)/lib
+libdir		= @libdir@
+bindir		= @bindir@
 includedir	= $(prefix)/include
 
@@ -14,4 +15,5 @@
 SHELL		= /bin/sh
 CFLAGS          = @CFLAGS@
+CPPFLAGS        = -I. @CPPFLAGS@
 
 INCLUDES	= -I$(includedir) 
@@ -20,4 +22,6 @@
 
 CLEAN           = @CLEAN@
+INSTALL         = ../install-sh -c
+INSTALL_PROGRAM = ${INSTALL}
 
 
@@ -28,5 +32,5 @@
 
 .c.o:
-	${CC} $(INCLUDES) ${CFLAGS} ${DEFS} -c $<
+	${CC} $(INCLUDES) ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
 
 HEADER =  label.h  leaf.h node.h  ${prefix}/include/MP.h
@@ -40,5 +44,10 @@
 all: mpview
 
-install: mpview
+install: mk-bindir mpview
+	${INSTALL_PROGRAM} mpview ${bindir}
+
+mk-bindir:
+	${top_srcdir}/mkinstalldirs ${bindir}
+
 
 mpview: ${OBJ}
