--- ./src/bin/geomview/x11/Makefile.orig	Sat Mar 14 00:42:39 1998
+++ ./src/bin/geomview/x11/Makefile	Tue Aug 15 03:41:13 2000
@@ -24,9 +24,9 @@
 install:	all install_script install_others
 
 install_others:	all
-	if [ -f gvx.MESA ]; then ${INSTALL} -m 775 -O -v -F ${GEOM}/bin/${MACHTYPE} gvx.MESA; fi
-	if [ -f gvx.C3D ]; then ${INSTALL} -m 775 -O -v -F ${GEOM}/bin/${MACHTYPE} gvx.C3D; fi
-	if [ -f gvx.X11 ]; then ${INSTALL} -m 775 -O -v -F ${GEOM}/bin/${MACHTYPE} gvx.X11; fi
+	if [ -f gvx.MESA ]; then ${INSTALL} -m 755 -O -v -F ${GEOM}/bin/${MACHTYPE} gvx.MESA; fi
+	if [ -f gvx.C3D ]; then ${INSTALL} -m 755 -O -v -F ${GEOM}/bin/${MACHTYPE} gvx.C3D; fi
+	if [ -f gvx.X11 ]; then ${INSTALL} -m 755 -O -v -F ${GEOM}/bin/${MACHTYPE} gvx.X11; fi
 
 _always:
 
@@ -40,10 +40,13 @@
 MESA C3D X11:
 	cd O.${MACHTYPE}; ${MAKE} $@
 
-install_script: demand_GEOMROOT geomview
+install_script: demand_GEOMROOT
 	sed -e 's|^GEOMROOT=.*$$|GEOMROOT=${GEOMROOT}|' \
-		-e 's/^MACHTYPE=.*/MACHTYPE=${MACHTYPE}/' < geomview-x11 > geomview
-	${INSTALL} -m 775 -O -v -F ${BINDIR} geomview
+		-e 's/^MACHTYPE=.*/MACHTYPE=${MACHTYPE}/' \
+		-e '/_GVX/s|$${GEOMROOT}|${PREFIX}/libexec/geomview|' \
+		-e '/_EMODULE/s|$${GEOMROOT}|${PREFIX}/libexec/geomview|' \
+			< geomview-x11 > geomview
+	${INSTALL} -m 755 -O -v -F ${BINDIR} geomview
 
 clang:	_always
 	@echo "lisp2c ..."
