File dxsamples-4.4.0-DESTDIR.patch of Package dx

--- acinclude.m4
+++ acinclude.m4
@@ -18,7 +18,7 @@
 AC_CACHE_CHECK([for dx install path], ac_cv_dx_install_path,
 [
 AC_MSG_RESULT(locating)
-DX_DEFAULT_INST=/usr/local/dx
+DX_DEFAULT_INST=/opt/dx
 AC_CHECK_PROGS( DX, dx )
 
 DXINST=""
@@ -55,7 +55,12 @@
 [
   AC_MSG_CHECKING(for platform architecture via dx -whicharch)
 AC_CHECK_PROGS( DX, dx )
-  DXARCH=`$DX -whicharch`
+  if test -e $DX ; then
+    DXARCH=`$DX -whicharch`
+  else
+    chmod 755 $RPM_BUILD_DIR/dx-$VERSION/bin/dxworker
+    DXARCH=`$RPM_BUILD_DIR/dx-$VERSION/bin/dxworker -whicharch`
+  fi    
   AC_MSG_RESULT(found $DXARCH)
 ])
 
--- programs/2D_DATA/Makefile.am
+++ programs/2D_DATA/Makefile.am
@@ -35,9 +35,9 @@
          UsingOverlay.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/3D_DATA/Makefile.am
+++ programs/3D_DATA/Makefile.am
@@ -75,9 +75,9 @@
          WindVorticity.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/ANNOTATION/Makefile.am
+++ programs/ANNOTATION/Makefile.am
@@ -59,9 +59,9 @@
          UsingTextAndTextGlyphs.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/CATEGORICAL/Makefile.am
+++ programs/CATEGORICAL/Makefile.am
@@ -19,9 +19,9 @@
          ZipCodes.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/COLORMAP_EDITOR/Makefile.am
+++ programs/COLORMAP_EDITOR/Makefile.am
@@ -15,9 +15,9 @@
          VolumeRendering.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/COMPUTE/Makefile.am
+++ programs/COMPUTE/Makefile.am
@@ -15,9 +15,9 @@
          WarpingPositions.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/DATA_DRIVEN_INTERACTORS/Makefile.am
+++ programs/DATA_DRIVEN_INTERACTORS/Makefile.am
@@ -11,9 +11,9 @@
          Imide_potential.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/DEBUGGING/Makefile.am
+++ programs/DEBUGGING/Makefile.am
@@ -9,9 +9,9 @@
          VisualObject.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/DISTRIBUTED_PROCESSING/Makefile.am
+++ programs/DISTRIBUTED_PROCESSING/Makefile.am
@@ -7,9 +7,9 @@
          Distributed.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/IMAGE_PROCESSING/Makefile.am
+++ programs/IMAGE_PROCESSING/Makefile.am
@@ -19,9 +19,9 @@
          UsingOverlay.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/IMPORTING/Makefile.am
+++ programs/IMPORTING/Makefile.am
@@ -17,9 +17,9 @@
          ZipCodes.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/INTERFACE_CONTROL/Makefile.am
+++ programs/INTERFACE_CONTROL/Makefile.am
@@ -13,9 +13,9 @@
          InterfaceControl3.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/LOOPING/Makefile.am
+++ programs/LOOPING/Makefile.am
@@ -11,9 +11,9 @@
          SimpleGetSetLoop.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/MISC/Makefile.am
+++ programs/MISC/Makefile.am
@@ -57,9 +57,9 @@
          UsingSwitchAndRoute.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/PLOTTING/Makefile.am
+++ programs/PLOTTING/Makefile.am
@@ -31,9 +31,9 @@
          UsingEqualize.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/PROBES/Makefile.am
+++ programs/PROBES/Makefile.am
@@ -13,9 +13,9 @@
          UsingStreakline.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/RENDERING/Makefile.am
+++ programs/RENDERING/Makefile.am
@@ -25,9 +25,9 @@
          VolumeRenderingSimple.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/SCATTERED/Makefile.am
+++ programs/SCATTERED/Makefile.am
@@ -11,9 +11,9 @@
          ScatterData.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/SEQUENCER/Makefile.am
+++ programs/SEQUENCER/Makefile.am
@@ -25,9 +25,9 @@
          Streamline.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/SIMPLE/Makefile.am
+++ programs/SIMPLE/Makefile.am
@@ -89,9 +89,9 @@
          VisualObject.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'
--- programs/SUPERVISE/Makefile.am
+++ programs/SUPERVISE/Makefile.am
@@ -17,9 +17,9 @@
          SupervisePicking.net
 
 myinstall: 
-	$(mkinstalldirs) $(sampleprogdir)
-	@-sh -c '( echo "cd $(sampleprogdir)" ; \
-		cd $(sampleprogdir) && for s in $(LINKLIST) ; do \
+	$(mkinstalldirs) $(DESTDIR)$(sampleprogdir)
+	@-sh -c '( echo "cd $(DESTDIR)$(sampleprogdir)" ; \
+		cd $(DESTDIR)$(sampleprogdir) && for s in $(LINKLIST) ; do \
 		$(LN_S) ../$$s $$s ; \
 		echo "$(LN_S) ../$$s $$s" ; \
 	done )'