Index: branches/r9/Makefile.in
===================================================================
--- branches/r9/Makefile.in	(revision 4839)
+++ branches/r9/Makefile.in	(revision 4840)
@@ -1,90 +1,2188 @@
 
-bindir          = @bindir@
-datadir		= @datadir@
-datarootdir	= @datarootdir@
-exec_prefix     = @exec_prefix@
-includedir      = @includedir@
-libdir          = @libdir@
-mandir          = @mandir@
-prefix          = @prefix@
-srcdir		= @srcdir@
-
-INSTALL		= @INSTALL@
-SHELL		= @SHELL@
-MKDIR_P		= @MKDIR_P@
-RM		= rm -f
-VPATH		= $(srcdir)
-
-build_date	:= $(shell date +%Y%m%d)
-machine		:= $(shell uname -m | sed 's/\ //')
-os		:= $(shell uname -s)
-
-pkg_path	:= $(shell dirname $(prefix))
-pkg_name	:= $(shell basename $(prefix))
-SVN_VERSION	:= $(shell svnversion $(srcdir))
-
-rappture_binary_tarfile	= rappture-$(os)-$(machine)-$(build_date).tar.gz
-rappture_source_tarfile = rappture-src-$(build_date).tar.gz
-runtime_source_tarfile = rappture-runtime-src-$(build_date).tar.gz
-
-runtime_repo = https://nanohub.org/infrastructure/rappture-runtime/svn/trunk
-rappture_repo = https://nanohub.org/infrastructure/rappture/svn/trunk
-
-ENABLE_GUI	= @ENABLE_GUI@
-ENABLE_LANG	= @ENABLE_LANG@
-HAVE_FFMPEG	= @HAVE_FFMPEG_LIBS@
-TARGETS		= src lib
-
-ifneq ($(ENABLE_LANG),)
-  TARGETS += lang
+# ------------------------------------------------------------------------
+# 	Makefile for Rappture 
+# ------------------------------------------------------------------------
+
+# ------------------------------------------------------------------------
+# 	C Compiler options 
+# ------------------------------------------------------------------------
+
+RAPPTURE_MAJOR_VERSION =	@RAPPTURE_MAJOR_VERSION@
+RAPPTURE_MINOR_VERSION =	@RAPPTURE_MINOR_VERSION@
+RAPPTURE_RELEASE_SERIAL =	@RAPPTURE_RELEASE_SERIAL@
+X_INCLUDES =		@X_INCLUDES@
+X_LIBRARIES =		@X_LIBRARIES@
+WORDSIZE =		@WORDSIZE@
+version = $(RAPPTURE_MAJOR_VERSION).$(RAPPTURE_MINOR_VERSION).$(RAPPTURE_RELEASE_SERIAL)
+runtime =		$(shell cd ../runtime; pwd)
+TAG =			trunk
+
+# ------------------------------------------------------------------------
+# 	Source and targer installation directories 
+# ------------------------------------------------------------------------
+
+bindir =		$(exec_prefix)/bin
+datadir =		@datadir@
+datarootdir =		@datarootdir@
+exec_prefix =		@exec_prefix@
+incdir =		$(prefix)/include
+includedir =		@includedir@
+libdir =		@libdir@
+prefix =		@prefix@
+scriptdir =		$(exec_prefix)/scripts
+pkgdir =		$(exec_prefix)/lib
+srcdir =		$(shell cd @srcdir@; pwd)
+statsdir =		@STATSDIR@
+
+# ------------------------------------------------------------------------
+# 	You don't need to edit anything beyond this point
+# ------------------------------------------------------------------------
+
+INSTALL =		@INSTALL@
+INSTALL_DATA =		@INSTALL_DATA@
+DESTDIR =  
+RANLIB =		@RANLIB@
+MAKE =			make
+SHELL =			/bin/sh
+AR =			ar rc
+RM =			rm -f
+LN_S =			@LN_S@
+VPATH =			$(srcdir)
+MKDIR_P =		@MKDIR_P@
+CP = 			/bin/cp
+
+common_flags =		--prefix=$(prefix) --exec_prefix=$(exec_prefix) 
+x_flags = 
+ifneq ("$(X_INCLUDES)", )
+x_flags += --x-includes=$(X_INCLUDES)
 endif
-ifneq ($(ENABLE_GUI),)
-  TARGETS += gui builder tester examples 
+ifneq ("$(X_LIBRARIES)", )
+x_flags += --x-includes=$(X_LIBRARIES)
 endif
-ifneq ($(HAVE_FFMPEG),)
-  TARGETS += video
-endif
-
-.PHONY: all test install clean distclean package distrib runtime-distrib \
-	$(TARGETS)
-
-all:
-	for i in $(TARGETS) ; do \
-	  $(MAKE) -C $$i all || exit 1 ;\
-	done
-
-test:
-	$(MAKE) -C test all
-
-install: 
-	for i in $(TARGETS) ; do \
-	  $(MAKE) -C $$i install || exit 1 ;\
-	done
-
-clean: 
-	for i in $(TARGETS) ; do \
-	  $(MAKE) -C $$i clean || exit 1 ;\
-	done
-
-distclean: clean
-	$(RM) Makefile config.status config.log  *~
-	for i in $(TARGETS) ; do \
-	  $(MAKE) -C $$i distclean || exit 1 ;\
-	done
-
-package: 
-	tar -C $(pkg_path) -czlf $(rappture_binary_tarfile) $(pkg_name)
-
-distrib: 
-	$(RM) -r exported
-	$(MKDIR_P) -m 0755 exported
-	(cd exported; svn export -q $(rappture_repo) rappture)
-	tar -C exported -czlf $(rappture_source_tarfile) rappture
-	$(RM) -r exported
-
-runtime-distrib:
-	$(RM) -r exported
-	$(MKDIR_P) -m 0755 exported
-	(cd exported; svn export -q $(runtime_repo) runtime)
-	tar -C exported -czlf $(runtime_source_tarfile) runtime
-	$(RM) -r exported
+
+PATH := $(bindir):$(PATH)
+
+targets = \
+	blt builder cmake examples expat expect glew gui geovis \
+	htmlwidget itcl itk lang librappture nanovis nanoscale \
+	optimizer osg osgearth pymol \
+	pymolproxy shape sqlitetcl tcl tcllib tdom tester tk \
+	tkimg tls video voronoi vtk vtkvis zlib  
+
+.PHONY: $(targets)
+
+.NOTPARALLEL:
+
+all: gui
+
+fullpkg: tester builder renderservers
+
+renderservers: nanoscale nanovis vtkvis geovis pymolproxy 
+
+libshell: $(tcllib)/timestamp $(tls)/timestamp $(itcl)/timestamp 
+
+# Aliases for package directory names.
+
+blt = blt2.4z
+builder = builder
+cmake = cmake-2.8.12
+examples =examples
+expat = expat-2.0.1
+expect = expect5.45
+glew = glew
+gui = gui
+htmlwidget = htmlwidget-3a14
+itcl = itcl3.3
+itk = itk3.3
+lang = lang
+librappture = librappture
+nanoscale = nanoscale
+nanovis = nanovis
+optimizer = optimizer
+osg = OpenSceneGraph-3.2.0
+osgearth = osgearth-2.5
+pymol = pymol
+pymolproxy = pymolproxy
+shape = shape0.4
+sqlitetcl = sqlite-3071502/tea
+tcl = tcl8.4.19
+tcllib = tcllib-1.12
+tdom = tDOM-0.8.2
+tester = tester
+tk = tk8.4.19
+tkimg = tkimg1.3
+tls = tls1.6
+video = video
+voronoi = voronoi
+vtk = vtk-6.0.0
+vtkvis = vtkvis
+geovis = geovis
+zlib = zlib
+
+subdirs = \
+	$(blt) $(builder) $(cmake) $(examples) $(expat) $(expect) $(glew) \
+	$(gui) $(htmlwidget) $(itcl) $(itk) $(lang) $(librappture) $(nanovis) \
+	$(optimizer) $(osg) $(osgearth) $(pymol) $(pymolproxy) $(shape) \
+	$(sqlitetcl) $(tcl) $(tcllib) $(tdom) $(tester) $(tk) $(tkimg) \
+	$(tls) $(video) $(voronoi) $(vtk) $(vtkvis) $(zlib) $(geovis)
+
+
+clean:
+	$(RM) -r $(subdirs)
+
+# -------------------------------------------------------------------------
+#  BLT
+# -------------------------------------------------------------------------
+
+blt_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+blt: $(blt)/timestamp
+
+clean-blt: 
+	$(clean_blt)
+fetch-blt: 
+	$(fetch_blt)
+configure-blt: 
+	$(configure_blt)
+build-blt: 
+	$(build_blt)
+install-blt: 
+	$(install_blt)
+touch-blt: 
+	$(touch_blt)
+force-blt: $(tcl)/timestamp $(tk)/timestamp
+	+ $(clean_blt)
+	+ $(fetch_blt)
+	+ $(configure_blt)
+	+ $(build_blt)
+	+ $(install_blt)
+	+ $(touch_blt)
+
+define clean_blt
+	$(RM) -r $(blt)
+endef
+define fetch_blt
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(blt)
+endef
+define configure_blt
+	$(MKDIR_P) $(blt)
+	cd $(blt); $(runtime)/$(blt)/configure $(blt_flags) 
+endef
+define build_blt
+	$(MAKE)  -C $(blt) all
+endef
+define install_blt
+	$(MAKE) -C $(blt) install
+endef
+define touch_blt
+	touch $(blt)/timestamp
+endef
+
+$(blt)/timestamp: $(tcl)/timestamp $(tk)/timestamp
+	+ $(clean_blt)
+	+ $(fetch_blt)
+	+ $(configure_blt)
+	+ $(build_blt)
+	+ $(install_blt)
+	+ $(touch_blt)
+
+# -------------------------------------------------------------------------
+#  BUILDER
+# -------------------------------------------------------------------------
+
+builder_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+builder: $(builder)/timestamp
+
+clean-builder: 
+	$(clean_builder)
+fetch-builder: 
+	$(fetch_builder)
+configure-builder: 
+build-builder: 
+	$(build_builder)
+install-builder: 
+	$(install_builder)
+touch-builder: 
+	$(touch_builder)
+force-builder: $(gui)/timestamp 
+	+ $(clean_builder)
+	+ $(fetch_builder)
+	+ $(configure_builder)
+	+ $(build_builder)
+	+ $(install_builder)
+	+ $(touch_builder)
+
+define clean_builder
+	$(MAKE) -C $(builder) clean
+endef
+define fetch_builder
+endef
+define build_builder
+	$(MAKE) -C $(builder) all
+endef
+define install_builder
+	$(MAKE) -C $(builder) install
+endef
+define touch_builder
+	touch $(builder)/timestamp
+endef
+
+$(builder)/timestamp: $(gui)/timestamp 
+	+ $(clean_builder)
+	+ $(fetch_builder)
+	+ $(configure_builder)
+	+ $(build_builder)
+	+ $(install_builder)
+	+ $(touch_builder)
+
+# -------------------------------------------------------------------------
+#  CMAKE
+# -------------------------------------------------------------------------
+
+cmake_flags =	\
+	--prefix=$(prefix)
+
+cmake: $(cmake)/timestamp
+
+clean-cmake: 
+	$(clean_cmake)
+fetch-cmake: 
+	$(fetch_cmake)
+configure-cmake: 
+	$(configure_cmake)
+build-cmake: 
+	$(build_cmake)
+install-cmake: 
+	$(install_cmake)
+touch-cmake: 
+	$(touch_cmake)
+force-cmake: 
+	+ $(clean_cmake)
+	+ $(fetch_cmake)
+	+ $(configure_cmake)
+	+ $(build_cmake)
+	+ $(install_cmake)
+	+ $(touch_cmake)
+
+define clean_cmake
+	$(RM) -r $(cmake)
+endef
+define fetch_cmake
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(cmake)
+endef
+define configure_cmake
+	$(MKDIR_P) $(cmake)
+	cd $(cmake); $(runtime)/$(cmake)/configure $(cmake_flags) 
+endef
+define build_cmake
+	$(MAKE)  -C $(cmake) all
+endef
+define install_cmake
+	$(MAKE) -C $(cmake) install
+endef
+define touch_cmake
+	touch $(cmake)/timestamp
+endef
+
+$(cmake)/timestamp: 
+	+ $(clean_cmake)
+	+ $(fetch_cmake)
+	+ $(configure_cmake)
+	+ $(build_cmake)
+	+ $(install_cmake)
+	+ $(touch_cmake)
+
+# -------------------------------------------------------------------------
+#  EXAMPLES
+# -------------------------------------------------------------------------
+
+examples_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+examples: $(examples)/timestamp
+
+clean-examples: 
+	$(clean_examples)
+fetch-examples: 
+	$(fetch_examples)
+configure-examples: 
+	$(configure_examples)
+build-examples: 
+	$(build_examples)
+install-examples: 
+	$(install_examples)
+touch-examples: 
+	$(touch_examples)
+force-examples: $(gui)/timestamp 
+	+ $(clean_examples)
+	+ $(fetch_examples)
+	+ $(configure_examples)
+	+ $(build_examples)
+	+ $(install_examples)
+	+ $(touch_examples)
+
+define clean_examples
+	$(MAKE) -C $(examples) clean
+endef
+define fetch_examples
+endef
+define configure_examples
+	$(MKDIR_P) $(examples)
+endef
+define build_examples
+	$(MAKE) -C $(examples) all
+endef
+define install_examples
+	$(MAKE) -C $(examples) install
+endef
+define touch_examples
+	touch $(examples)/timestamp
+endef
+
+$(examples)/timestamp: $(gui)/timestamp 
+	+ $(clean_examples)
+	+ $(fetch_examples)
+	+ $(configure_examples)
+	+ $(build_examples)
+	+ $(install_examples)
+	+ $(touch_examples)
+
+# -------------------------------------------------------------------------
+#  EXPAT
+# -------------------------------------------------------------------------
+
+expat_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+expat: $(expat)/timestamp
+
+clean-expat: 
+	$(clean_expat)
+fetch-expat: 
+	$(fetch_expat)
+configure-expat: 
+	$(configure_expat)
+build-expat: 
+	$(build_expat)
+install-expat: 
+	$(install_expat)
+touch-expat: 
+	$(touch_expat)
+force-expat: 
+	+ $(clean_expat)
+	+ $(fetch_expat)
+	+ $(configure_expat)
+	+ $(build_expat)
+	+ $(install_expat)
+	+ $(touch_expat)
+
+define clean_expat
+	$(RM) -r $(expat)
+endef
+define fetch_expat
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(expat)
+endef
+define configure_expat
+	$(MKDIR_P) $(expat)
+	cd $(expat); $(runtime)/$(expat)/configure $(expat_flags) 
+endef
+define build_expat
+	$(MAKE)  -C $(expat) all
+endef
+define install_expat
+	$(MAKE) -C $(expat) install
+endef
+define touch_expat
+	touch $(expat)/timestamp
+endef
+
+$(expat)/timestamp: 
+	+ $(clean_expat)
+	+ $(fetch_expat)
+	+ $(configure_expat)
+	+ $(build_expat)
+	+ $(install_expat)
+	+ $(touch_expat)
+
+# -------------------------------------------------------------------------
+#  EXPECT
+# -------------------------------------------------------------------------
+
+expect_flags =	\
+	--enable-shared \
+	--enable-64bit \
+	--with-tcl=$(libdir) \
+	--with-tclinclude=$(incdir) \
+	$(common_flags)
+
+expect: $(expect)/timestamp
+
+clean-expect: 
+	$(clean_expect)
+fetch-expect: 
+	$(fetch_expect)
+configure-expect: 
+	$(configure_expect)
+build-expect: 
+	$(build_expect)
+install-expect: 
+	$(install_expect)
+touch-expect: 
+	$(touch_expect)
+force-expect: $(tcl)/timestamp $(tk)/timestamp
+	+ $(clean_expect)
+	+ $(fetch_expect)
+	+ $(configure_expect)
+	+ $(build_expect)
+	+ $(install_expect)
+	+ $(touch_expect)
+
+define clean_expect
+	$(RM) -r $(expect)
+endef
+define fetch_expect
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(expect)
+endef
+define configure_expect
+	$(MKDIR_P) $(expect)
+	cd $(expect); $(runtime)/$(expect)/configure $(expect_flags) 
+endef
+define build_expect
+	$(MAKE)  -C $(expect) all
+endef
+define install_expect
+	$(MAKE) -C $(expect) install
+endef
+define touch_expect
+	touch $(expect)/timestamp
+endef
+
+$(expect)/timestamp: $(tcl)/timestamp $(tk)/timestamp
+	+ $(clean_expect)
+	+ $(fetch_expect)
+	+ $(configure_expect)
+	+ $(build_expect)
+	+ $(install_expect)
+	+ $(touch_expect)
+
+# -------------------------------------------------------------------------
+#  GLEW
+# -------------------------------------------------------------------------
+
+glew_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+glew: $(glew)/timestamp
+
+clean-glew: 
+	$(clean_glew)
+fetch-glew: 
+	$(fetch_glew)
+configure-glew: 
+	$(configure_glew)
+build-glew: 
+	$(build_glew)
+install-glew: 
+	$(install_glew)
+touch-glew: 
+	$(touch_glew)
+force-glew: 
+	+ $(clean_glew)
+	+ $(fetch_glew)
+	+ $(configure_glew)
+	+ $(build_glew)
+	+ $(install_glew)
+	+ $(touch_glew)
+
+define clean_glew
+	$(RM) -r $(glew)
+endef
+define fetch_glew
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(glew)
+endef
+define configure_glew
+	$(MKDIR_P) $(glew)
+	cd $(glew); $(runtime)/$(glew)/configure $(glew_flags) 
+endef
+define build_glew
+	$(MAKE)  -C $(glew) all
+endef
+define install_glew
+	$(MAKE) -C $(glew) install
+endef
+define touch_glew
+	touch $(glew)/timestamp
+endef
+
+$(glew)/timestamp: 
+	+ $(clean_glew)
+	+ $(fetch_glew)
+	+ $(configure_glew)
+	+ $(build_glew)
+	+ $(install_glew)
+	+ $(touch_glew)
+
+# -------------------------------------------------------------------------
+#  GUI
+# -------------------------------------------------------------------------
+
+gui_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+gui: $(gui)/timestamp
+
+clean-gui: 
+	$(clean_gui)
+fetch-gui: 
+	$(fetch_gui)
+configure-gui: 
+	$(configure_gui)
+build-gui: 
+	$(build_gui)
+install-gui: 
+	$(install_gui)
+touch-gui: 
+	$(touch_gui)
+force-gui: $(librappture)/timestamp \
+		  $(blt)/timestamp \
+		  $(itk)/timestamp \
+		  $(htmlwidget)/timestamp \
+		  $(shape)/timestamp \
+		  $(sqlitetcl)/timestamp \
+		  $(vtk)/timestamp 
+	+ $(clean_gui)
+	+ $(fetch_gui)
+	+ $(configure_gui)
+	+ $(build_gui)
+	+ $(install_gui)
+	+ $(touch_gui)
+
+define clean_gui
+	$(RM) -r $(gui)
+endef
+define fetch_gui
+endef
+define configure_gui
+	$(MKDIR_P) $(gui)
+	cd $(gui); $(srcdir)/$(gui)/configure $(gui_flags) 
+endef
+define build_gui
+	$(MAKE) -C $(gui) all
+endef
+define install_gui
+	$(MAKE) -C $(gui) install
+endef
+define touch_gui
+	touch $(gui)/timestamp
+endef
+
+$(gui)/timestamp: $(librappture)/timestamp \
+		  $(blt)/timestamp \
+		  $(itk)/timestamp \
+		  $(htmlwidget)/timestamp \
+		  $(shape)/timestamp \
+		  $(sqlitetcl)/timestamp \
+		  $(vtk)/timestamp 
+	+ $(clean_gui)
+	+ $(fetch_gui)
+	+ $(configure_gui)
+	+ $(build_gui)
+	+ $(install_gui)
+	+ $(touch_gui)
+
+# -------------------------------------------------------------------------
+#  HTMLWIDGET
+# -------------------------------------------------------------------------
+
+htmlwidget_flags = \
+	--enable-shared \
+	$(common_flags)
+
+htmlwidget: $(htmlwidget)/timestamp
+
+clean-htmlwidget: 
+	$(clean_htmlwidget)
+fetch-htmlwidget: 
+	$(fetch_htmlwidget)
+configure-htmlwidget: 
+	$(configure_htmlwidget)
+build-htmlwidget: 
+	$(build_htmlwidget)
+install-htmlwidget: 
+	$(install_htmlwidget)
+touch-htmlwidget: 
+	$(touch_htmlwidget)
+force-htmlwidget: $(tk)/timestamp
+	+ $(clean_htmlwidget)
+	+ $(fetch_htmlwidget)
+	+ $(configure_htmlwidget)
+	+ $(build_htmlwidget)
+	+ $(install_htmlwidget)
+	+ $(touch_htmlwidget)
+
+define clean_htmlwidget
+	$(RM) -r $(htmlwidget)
+endef
+define fetch_htmlwidget
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(htmlwidget)
+endef
+define configure_htmlwidget
+	$(MKDIR_P) $(htmlwidget)
+	cd $(htmlwidget); $(runtime)/$(htmlwidget)/configure $(htmlwidget_flags) 
+endef
+define build_htmlwidget
+	$(MAKE) -C $(htmlwidget) all
+endef
+define install_htmlwidget
+	$(MAKE) -C $(htmlwidget) install
+endef
+define touch_htmlwidget
+	touch $(htmlwidget)/timestamp
+endef
+
+$(htmlwidget)/timestamp: $(tk)/timestamp
+	+ $(clean_htmlwidget)
+	+ $(fetch_htmlwidget)
+	+ $(configure_htmlwidget)
+	+ $(build_htmlwidget)
+	+ $(install_htmlwidget)
+	+ $(touch_htmlwidget)
+
+# -------------------------------------------------------------------------
+#  ITCL
+# -------------------------------------------------------------------------
+
+itcl_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+itcl: $(itcl)/timestamp
+
+clean-itcl: 
+	$(clean_itcl)
+fetch-itcl: 
+	$(fetch_itcl)
+configure-itcl: 
+	$(configure_itcl)
+build-itcl: 
+	$(build_itcl)
+install-itcl: 
+	$(install_itcl)
+touch-itcl: 
+	$(touch_itcl)
+force-itcl: 
+	+ $(clean_itcl)
+	+ $(fetch_itcl)
+	+ $(configure_itcl)
+	+ $(build_itcl)
+	+ $(install_itcl)
+	+ $(touch_itcl)
+
+define clean_itcl
+	$(RM) -r $(itcl)
+endef
+define fetch_itcl
+	sh $(srcdir)/fetch.sh $(TAG) $(srcdir) $(itcl)
+endef
+define configure_itcl
+	$(MKDIR_P) $(itcl)
+	cd $(itcl); $(runtime)/$(itcl)/configure $(itcl_flags) 
+endef
+define build_itcl
+	$(MAKE)  -C $(itcl) all
+endef
+define install_itcl
+	$(MAKE) -C $(itcl) install
+endef
+define touch_itcl
+	touch $(itcl)/timestamp
+endef
+
+$(itcl)/timestamp: $(tcl)/timestamp
+	+ $(clean_itcl)
+	+ $(fetch_itcl)
+	+ $(configure_itcl)
+	+ $(build_itcl)
+	+ $(install_itcl)
+	+ $(touch_itcl)
+
+# -------------------------------------------------------------------------
+#  ITK
+# -------------------------------------------------------------------------
+
+itk_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+itk: $(itk)/timestamp
+
+clean-itk: 
+	$(clean_itk)
+fetch-itk: 
+	$(fetch_itk)
+configure-itk: 
+	$(configure_itk)
+build-itk: 
+	$(build_itk)
+install-itk: 
+	$(install_itk)
+touch-itk: 
+	$(touch_itk)
+force-itk: $(itcl)/timestamp $(tk)/timestamp
+	+ $(clean_itk)
+	+ $(fetch_itk)
+	+ $(configure_itk)
+	+ $(build_itk)
+	+ $(install_itk)
+	+ $(touch_itk)
+
+define clean_itk
+	$(RM) -r $(itk)
+endef
+define fetch_itk
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(itk)
+endef
+define configure_itk
+	$(MKDIR_P) $(itk)
+	cd $(itk); $(runtime)/$(itk)/configure $(itk_flags) 
+endef
+define build_itk
+	$(MAKE) -C $(itk) all
+endef
+define install_itk
+	$(MAKE) -C $(itk) install
+endef
+define touch_itk
+	touch $(itk)/timestamp
+endef
+
+$(itk)/timestamp: $(itcl)/timestamp $(tk)/timestamp
+	+ $(clean_itk)
+	+ $(fetch_itk)
+	+ $(configure_itk)
+	+ $(build_itk)
+	+ $(install_itk)
+	+ $(touch_itk)
+
+# -------------------------------------------------------------------------
+#  LANG
+# -------------------------------------------------------------------------
+
+lang_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+lang: $(lang)/timestamp
+
+clean-lang: 
+	$(clean_lang)
+fetch-lang: 
+	$(fetch_lang)
+configure-lang: 
+	$(configure_lang)
+build-lang: 
+	$(build_lang)
+install-lang: 
+	$(install_lang)
+touch-lang: 
+	$(touch_lang)
+force-lang: $(gui)/timestamp 
+	+ $(clean_lang)
+	+ $(fetch_lang)
+	+ $(configure_lang)
+	+ $(build_lang)
+	+ $(install_lang)
+	+ $(touch_lang)
+
+define clean_lang
+	$(RM) -r $(lang)
+endef
+define fetch_lang
+endef
+define configure_lang
+	$(MKDIR_P) $(lang)
+	cd $(lang); $(srcdir)/$(lang)/configure $(lang_flags) 
+endef
+define build_lang
+	$(MAKE) -C $(lang) all
+endef
+define install_lang
+	$(MAKE) -C $(lang) install
+endef
+define touch_lang
+	touch $(lang)/timestamp
+endef
+
+$(lang)/timestamp: $(librappture)/timestamp  $(tcl)/timestamp $(itcl)/timestamp
+	+ $(clean_lang)
+	+ $(fetch_lang)
+	+ $(configure_lang)
+	+ $(build_lang)
+	+ $(install_lang)
+	+ $(touch_lang)
+
+
+# -------------------------------------------------------------------------
+#  LIBRAPPTURE
+# -------------------------------------------------------------------------
+
+librappture_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+librappture: $(librappture)/timestamp
+
+clean-librappture: 
+	$(clean_librappture)
+fetch-librappture: 
+	$(fetch_librappture)
+configure-librappture: 
+	$(configure_librappture)
+build-librappture: 
+	$(build_librappture)
+install-librappture: 
+	$(install_librappture)
+touch-librappture: 
+	$(touch_librappture)
+force-librappture: 
+	+ $(clean_librappture)
+	+ $(fetch_librappture)
+	+ $(configure_librappture)
+	+ $(build_librappture)
+	+ $(install_librappture)
+	+ $(touch_librappture)
+
+define clean_librappture
+	$(RM) -r $(librappture)
+endef
+define fetch_librappture
+endef
+define configure_librappture
+	$(MKDIR_P) $(librappture)
+	cd $(librappture); $(srcdir)/src/configure $(librappture_flags) 
+endef
+define build_librappture
+	$(MAKE)  -C $(librappture) all
+endef
+define install_librappture
+	$(MAKE) -C $(librappture) install
+endef
+define touch_librappture
+	touch $(librappture)/timestamp
+endef
+
+$(librappture)/timestamp: 
+	+ $(clean_librappture)
+	+ $(fetch_librappture)
+	+ $(configure_librappture)
+	+ $(build_librappture)
+	+ $(install_librappture)
+	+ $(touch_librappture)
+
+# -------------------------------------------------------------------------
+#  NANOSCALE
+# -------------------------------------------------------------------------
+
+nanoscale_flags =	\
+	--with-statsdir=$(statsdir) \
+	$(common_flags)
+
+nanoscale: $(nanoscale)/timestamp
+
+clean-nanoscale: 
+	$(clean_nanoscale)
+fetch-nanoscale: 
+	$(fetch_nanoscale)
+configure-nanoscale: 
+	$(configure_nanoscale)
+build-nanoscale: 
+	$(build_nanoscale)
+install-nanoscale: 
+	$(install_nanoscale)
+touch-nanoscale: 
+	$(touch_nanoscale)
+force-nanoscale: $(pymol)/timestamp 
+	+ $(clean_nanoscale)
+	+ $(fetch_nanoscale)
+	+ $(configure_nanoscale)
+	+ $(build_nanoscale)
+	+ $(install_nanoscale)
+	+ $(touch_nanoscale)
+
+define clean_nanoscale
+	$(RM) -r $(nanoscale)
+endef
+define fetch_nanoscale
+endef
+define configure_nanoscale
+	$(MKDIR_P) $(nanoscale)
+	cd $(nanoscale); $(srcdir)/packages/vizservers/$(nanoscale)/configure $(nanoscale_flags) 
+endef
+define build_nanoscale
+	$(MAKE) -C $(nanoscale) all
+endef
+define install_nanoscale
+	$(MAKE) -C $(nanoscale) install
+endef
+define touch_nanoscale
+	touch $(nanoscale)/timestamp
+endef
+
+$(nanoscale)/timestamp: $(pymol)/timestamp 
+	+ $(clean_nanoscale)
+	+ $(fetch_nanoscale)
+	+ $(configure_nanoscale)
+	+ $(build_nanoscale)
+	+ $(install_nanoscale)
+	+ $(touch_nanoscale)
+
+
+# -------------------------------------------------------------------------
+#  NANOVIS
+# -------------------------------------------------------------------------
+
+nanovis_flags =	\
+	--with-tcllib=$(libdir) \
+	--with-rappture=$(exec_prefix) \
+	--with-vtk="6.0" \
+	--with-vtk-includes=$(incdir) \
+	--with-vtk-libs=$(libdir) \
+	--with-statsdir=$(statsdir) \
+	$(common_flags)
+
+nanovis: $(nanovis)/timestamp
+
+clean-nanovis: 
+	$(clean_nanovis)
+fetch-nanovis: 
+	$(fetch_nanoscale)
+configure-nanovis: 
+	$(configure_nanovis)
+build-nanovis: 
+	$(build_nanovis)
+install-nanovis: 
+	$(install_nanovis)
+touch-nanovis: 
+	$(touch_nanovis)
+force-nanovis: $(librappture)/timestamp $(vtk)/timestamp 
+	+ $(clean_nanovis)
+	+ $(fetch_nanovis)
+	+ $(configure_nanovis)
+	+ $(build_nanovis)
+	+ $(install_nanovis)
+	+ $(touch_nanovis)
+
+define clean_nanovis
+	$(RM) -r $(nanovis)
+endef
+define fetch_nanovis
+endef
+define configure_nanovis
+	$(MKDIR_P) $(nanovis)
+	cd $(nanovis); $(srcdir)/packages/vizservers/$(nanovis)/configure $(nanovis_flags) 
+endef
+define build_nanovis
+	$(MAKE) -C $(nanovis) all
+endef
+define install_nanovis
+	$(MAKE) -C $(nanovis) install
+endef
+define touch_nanovis
+	touch $(nanovis)/timestamp
+endef
+
+$(nanovis)/timestamp: $(librappture)/timestamp $(vtk)/timestamp 
+	+ $(clean_nanovis)
+	+ $(fetch_nanovis)
+	+ $(configure_nanovis)
+	+ $(build_nanovis)
+	+ $(install_nanovis)
+	+ $(touch_nanovis)
+
+# -------------------------------------------------------------------------
+#  OPTIMIZER
+# -------------------------------------------------------------------------
+
+optimizer_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+optimizer: $(optimizer)/timestamp
+
+clean-optimizer: 
+	$(clean_optimizer)
+fetch-optimizer: 
+	$(fetch_optimizer)
+configure-optimizer: 
+	$(configure_optimizer)
+build-optimizer: 
+	$(build_optimizer)
+install-optimizer: 
+	$(install_optimizer)
+touch-optimizer: 
+	$(touch_optimizer)
+force-optimizer: $(gui)/timestamp 
+	+ $(clean_optimizer)
+	+ $(fetch_optimizer)
+	+ $(configure_optimizer)
+	+ $(build_optimizer)
+	+ $(install_optimizer)
+	+ $(touch_optimizer)
+
+define clean_optimizer
+	$(RM) -r $(optimizer)
+endef
+define fetch_optimizer
+endef
+define configure_optimizer
+	$(MKDIR_P) $(optimizer)
+	cd $(optimizer); $(srcdir)/$(optimizer)/configure $(optimizer_flags) 
+endef
+define build_optimizer
+	$(MAKE) -C $(optimizer) all
+endef
+define install_optimizer
+	$(MAKE) -C $(optimizer) install
+endef
+define touch_optimizer
+	touch $(optimizer)/timestamp
+endef
+
+$(optimizer)/timestamp: $(gui)/timestamp 
+	+ $(clean_optimizer)
+	+ $(fetch_optimizer)
+	+ $(configure_optimizer)
+	+ $(build_optimizer)
+	+ $(install_optimizer)
+	+ $(touch_optimizer)
+
+# -------------------------------------------------------------------------
+#  OSG
+# -------------------------------------------------------------------------
+
+osg_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+osg: $(osg)/timestamp
+
+clean-osg: 
+	$(clean_osg)
+fetch-osg: 
+	$(fetch_osg)
+configure-osg: 
+	$(configure_osg)
+build-osg: 
+	$(build_osg)
+install-osg: 
+	$(install_osg)
+touch-osg: 
+	$(touch_osg)
+force-osg: $(gui)/timestamp 
+	+ $(clean_osg)
+	+ $(fetch_osg)
+	+ $(configure_osg)
+	+ $(build_osg)
+	+ $(install_osg)
+	+ $(touch_osg)
+
+define clean_osg
+	$(RM) -r $(osg)
+endef
+define fetch_osg
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(osg)
+endef
+define configure_osg
+	$(MKDIR_P) $(osg)
+	cd $(osg); $(runtime)/$(osg)/configure $(osg_flags) 
+endef
+define build_osg
+	$(MAKE) -C $(osg) all
+endef
+define install_osg
+	$(MAKE) -C $(osg) install
+endef
+define touch_osg
+	touch $(osg)/timestamp
+endef
+
+$(osg)/timestamp: 
+	+ $(clean_osg)
+	+ $(fetch_osg)
+	+ $(configure_osg)
+	+ $(build_osg)
+	+ $(install_osg)
+	+ $(touch_osg)
+
+# -------------------------------------------------------------------------
+#  OSGEARTH
+# -------------------------------------------------------------------------
+
+osgearth_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+osgearth: $(osgearth)/timestamp
+
+clean-osgearth: 
+	$(clean_osgearth)
+fetch-osgearth: 
+	$(fetch_osgearth)
+configure-osgearth: 
+	$(configure_osgearth)
+build-osgearth: 
+	$(build_osgearth)
+install-osgearth: 
+	$(install_osgearth)
+touch-osgearth: 
+	$(touch_osgearth)
+force-osgearth: $(gui)/timestamp 
+	+ $(clean_osgearth)
+	+ $(fetch_osgearth)
+	+ $(configure_osgearth)
+	+ $(build_osgearth)
+	+ $(install_osgearth)
+	+ $(touch_osgearth)
+
+define clean_osgearth
+	$(RM) -r $(osgearth)
+endef
+define fetch_osgearth
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(osgearth)
+endef
+define configure_osgearth
+	$(MKDIR_P) $(osgearth)
+	cd $(osgearth); $(runtime)/$(osgearth)/configure $(osgearth_flags) 
+endef
+define build_osgearth
+	$(MAKE) -C $(osgearth) all
+endef
+define install_osgearth
+	$(MAKE) -C $(osgearth) install
+endef
+define touch_osgearth
+	touch $(osgearth)/timestamp
+endef
+
+$(osgearth)/timestamp: $(osg)/timestamp 
+	+ $(clean_osgearth)
+	+ $(fetch_osgearth)
+	+ $(configure_osgearth)
+	+ $(build_osgearth)
+	+ $(install_osgearth)
+	+ $(touch_osgearth)
+
+# -------------------------------------------------------------------------
+#  PYMOL
+# -------------------------------------------------------------------------
+
+pymol_flags =	\
+	$(common_flags)
+
+pymol: $(pymol)/timestamp
+
+clean-pymol: 
+	$(clean_pymol)
+fetch-pymol: 
+	$(fetch_pymol)
+configure-pymol: 
+	$(configure_pymol)
+build-pymol: 
+	$(build_pymol)
+install-pymol: 
+	$(install_pymol)
+touch-pymol: 
+	$(touch_pymol)
+force-pymol: $(glew)/timestamp 
+	+ $(clean_pymol)
+	+ $(fetch_pymol)
+	+ $(configure_pymol)
+	+ $(build_pymol)
+	+ $(install_pymol)
+	+ $(touch_pymol)
+
+define clean_pymol
+	$(RM) -r $(pymol)
+endef
+define fetch_pymol
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(pymol)
+endef
+define configure_pymol
+	$(MKDIR_P) $(pymol)
+	cd $(pymol); $(runtime)/$(pymol)/configure $(pymol_flags) 
+endef
+define build_pymol
+	$(MAKE) -C $(pymol) all
+endef
+define install_pymol
+	$(MAKE) -C $(pymol) install
+endef
+define touch_pymol
+	touch $(pymol)/timestamp
+endef
+
+$(pymol)/timestamp: $(glew)/timestamp 
+	+ $(clean_pymol)
+	+ $(fetch_pymol)
+	+ $(configure_pymol)
+	+ $(build_pymol)
+	+ $(install_pymol)
+	+ $(touch_pymol)
+
+
+# -------------------------------------------------------------------------
+#  PYMOLPROXY
+# -------------------------------------------------------------------------
+
+pymolproxy_flags =	\
+	--with-tcllib=$(libdir) \
+	--with-statsdir=$(statsdir) \
+	$(common_flags)
+
+pymolproxy: $(pymolproxy)/timestamp
+
+clean-pymolproxy: 
+	$(clean_pymolproxy)
+fetch-pymolproxy: 
+	$(fetch_pymolproxy)
+configure-pymolproxy: 
+	$(configure_pymolproxy)
+build-pymolproxy: 
+	$(build_pymolproxy)
+install-pymolproxy: 
+	$(install_pymolproxy)
+touch-pymolproxy: 
+	$(touch_pymolproxy)
+force-pymolproxy: $(pymol)/timestamp 
+	+ $(clean_pymolproxy)
+	+ $(fetch_pymolproxy)
+	+ $(configure_pymolproxy)
+	+ $(build_pymolproxy)
+	+ $(install_pymolproxy)
+	+ $(touch_pymolproxy)
+
+define clean_pymolproxy
+	$(RM) -r $(pymolproxy)
+endef
+define fetch_pymolproxy
+endef
+define configure_pymolproxy
+	$(MKDIR_P) $(pymolproxy)
+	cd $(pymolproxy); $(srcdir)/packages/vizservers/$(pymolproxy)/configure $(pymolproxy_flags) 
+endef
+define build_pymolproxy
+	$(MAKE) -C $(pymolproxy) all
+endef
+define install_pymolproxy
+	$(MAKE) -C $(pymolproxy) install
+endef
+define touch_pymolproxy
+	touch $(pymolproxy)/timestamp
+endef
+
+$(pymolproxy)/timestamp: $(pymol)/timestamp 
+	+ $(clean_pymolproxy)
+	+ $(fetch_pymolproxy)
+	+ $(configure_pymolproxy)
+	+ $(build_pymolproxy)
+	+ $(install_pymolproxy)
+	+ $(touch_pymolproxy)
+
+# -------------------------------------------------------------------------
+#  SHAPE
+# -------------------------------------------------------------------------
+
+shape_flags =	\
+	--enable-shared \
+	--with-tclconf=$(libdir) \
+	--with-tkconf=$(libdir) \
+	$(common_flags)
+
+shape: $(shape)/timestamp
+
+clean-shape: 
+	$(clean_shape)
+fetch-shape: 
+	$(fetch_shape)
+configure-shape: 
+	$(configure_shape)
+build-shape: 
+	$(build_shape)
+install-shape: 
+	$(install_shape)
+touch-shape: 
+	$(touch_shape)
+force-shape: $(tk)/timestamp
+	+ $(clean_shape)
+	+ $(fetch_shape)
+	+ $(configure_shape)
+	+ $(build_shape)
+	+ $(install_shape)
+	+ $(touch_shape)
+
+define clean_shape
+	$(RM) -r $(shape)
+endef
+define fetch_shape
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(shape)
+endef
+define configure_shape
+	$(MKDIR_P) $(shape)
+	cd $(shape); $(runtime)/$(shape)/unix/configure $(shape_flags) 
+endef
+define build_shape
+	$(MAKE) -C $(shape) all
+endef
+define install_shape
+	$(MAKE) -C $(shape) install
+endef
+define touch_shape
+	touch $(shape)/timestamp
+endef
+
+$(shape)/timestamp: $(tk)/timestamp
+	+ $(clean_shape)
+	+ $(fetch_shape)
+	+ $(configure_shape)
+	+ $(build_shape)
+	+ $(install_shape)
+	+ $(touch_shape)
+
+# -------------------------------------------------------------------------
+#  SQLITETCL
+# -------------------------------------------------------------------------
+
+sqlitetcl_flags = \
+	--enable-shared \
+	$(common_flags)
+
+sqlitetcl: $(sqlitetcl)/timestamp
+
+clean-sqlitetcl: 
+	$(clean_sqlitetcl)
+fetch-sqlitetcl: 
+	$(fetch_sqlitetcl)
+configure-sqlitetcl: 
+	$(configure_sqlitetcl)
+build-sqlitetcl: 
+	$(build_sqlitetcl)
+install-sqlitetcl: 
+	$(install_sqlitetcl)
+touch-sqlitetcl: 
+	$(touch_sqlitetcl)
+force-sqlitetcl: $(tcl)/timestamp
+	+ $(clean_sqlitetcl)
+	+ $(fetch_sqlitelcl)
+	+ $(configure_sqlitetcl)
+	+ $(build_sqlitetcl)
+	+ $(install_sqlitetcl)
+	+ $(touch_sqlitetcl)
+
+define clean_sqlitetcl
+	$(RM) -r $(sqlitetcl)
+endef
+define fetch_sqlitetcl
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(sqllitetcl)
+endef
+define configure_sqlitetcl
+	$(MKDIR_P) $(sqlitetcl)
+	cd $(sqlitetcl); $(runtime)/$(sqlitetcl)/configure $(sqlitetcl_flags) 
+endef
+define build_sqlitetcl
+	$(MAKE) -C $(sqlitetcl) all
+endef
+define install_sqlitetcl
+	$(MAKE) -C $(sqlitetcl) install
+endef
+define touch_sqlitetcl
+	touch $(sqlitetcl)/timestamp
+endef
+
+$(sqlitetcl)/timestamp: $(tcl)/timestamp
+	+ $(clean_sqlitetcl)
+	+ $(fetch_sqlitelcl)
+	+ $(configure_sqlitetcl)
+	+ $(build_sqlitetcl)
+	+ $(install_sqlitetcl)
+	+ $(touch_sqlitetcl)
+
+# -------------------------------------------------------------------------
+#  TCL
+# -------------------------------------------------------------------------
+
+tcl_flags =	\
+	--enable-shared \
+	--disable-threads \
+	$(common_flags)
+
+tcl: $(tcl)/timestamp
+
+clean-tcl: 
+	$(clean_tcl)
+fetch-tcl:
+	$(fetch_tcl)
+configure-tcl: 
+	$(configure_tcl)
+build-tcl: 
+	$(build_tcl)
+install-tcl: 
+	$(install_tcl)
+touch-tcl: 
+	$(touch_tcl)
+force-tcl: 
+	+ $(clean_tcl)
+	+ $(fetch_tcl)
+	+ $(configure_tcl)
+	+ $(build_tcl)
+	+ $(install_tcl)
+	+ $(touch_tcl)
+
+define fetch_tcl
+	sh $(srcdir)/fetch.sh trunk $(srcdir) $(tcl)
+endef
+define clean_tcl
+	$(RM) -r $(tcl)
+endef
+define fetch_tcl
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(tcl)
+endef
+define configure_tcl
+	$(MKDIR_P) $(tcl)
+	cd $(tcl); $(srcdir)/runtime/$(tcl)/unix/configure $(tcl_flags) 
+endef
+define build_tcl
+	$(MAKE)  -C $(tcl) all
+endef
+define install_tcl
+	$(MAKE) -C $(tcl) install
+endef
+define touch_tcl
+	touch $(tcl)/timestamp
+endef
+
+$(tcl)/timestamp: 
+	+ $(clean_tcl)
+	+ $(fetch_tcl)
+	+ $(configure_tcl)
+	+ $(build_tcl)
+	+ $(install_tcl)
+	+ $(touch_tcl)
+
+# -------------------------------------------------------------------------
+#  TCLLIB
+# -------------------------------------------------------------------------
+
+tcllib_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+tcllib: $(tcllib)/timestamp
+
+clean-tcllib: 
+	$(clean_tcllib)
+fetch-tcllib: 
+	$(fetch_tcllib)
+configure-tcllib: 
+	$(configure_tcllib)
+build-tcllib: 
+	$(build_tcllib)
+install-tcllib: 
+	$(install_tcllib)
+touch-tcllib: 
+	$(touch_tcllib)
+force-tcllib: $(tcl)/timestamp
+	+ $(clean_tcllib)
+	+ $(fetch_tcllib)
+	+ $(configure_tcllib)
+	+ $(build_tcllib)
+	+ $(install_tcllib)
+	+ $(touch_tcllib)
+
+define clean_tcllib
+	$(RM) -r $(tcllib)
+endef
+define fetch_tcllib
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(tcllib)
+endef
+define configure_tcllib
+	$(MKDIR_P) $(tcllib)
+	cd $(tcllib); $(runtime)/$(tcllib)/configure $(tcllib_flags) 
+endef
+define build_tcllib
+	$(MAKE) -C $(tcllib) all
+endef
+define install_tcllib
+	$(MAKE) -C $(tcllib) install
+endef
+define touch_tcllib
+	touch $(tcllib)/timestamp
+endef
+
+$(tcllib)/timestamp: $(tcl)/timestamp
+	+ $(clean_tcllib)
+	+ $(fetch_tcllib)
+	+ $(configure_tcllib)
+	+ $(build_tcllib)
+	+ $(install_tcllib)
+	+ $(touch_tcllib)
+
+# -------------------------------------------------------------------------
+#  TDOM
+# -------------------------------------------------------------------------
+
+tdom_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+tdom: $(tdom)/timestamp
+
+clean-tdom: 
+	$(clean_tdom)
+fetch-tdom: 
+	$(fetch_tdom)
+configure-tdom: 
+	$(configure_tdom)
+build-tdom: 
+	$(build_tdom)
+install-tdom: 
+	$(install_tdom)
+touch-tdom: 
+	$(touch_tdom)
+force-tdom: $(tcl)/timestamp
+	+ $(clean_tdom)
+	+ $(fetch_tdom)
+	+ $(configure_tdom)
+	+ $(build_tdom)
+	+ $(install_tdom)
+	+ $(touch_tdom)
+
+define clean_tdom
+	$(RM) -r $(tdom)
+endef
+define fetch_tdom
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(tdom)
+endef
+define configure_tdom
+	$(MKDIR_P) $(tdom)
+	cd $(tdom); $(runtime)/$(tdom)/configure $(tdom_flags) 
+endef
+define build_tdom
+	$(MAKE) -C $(tdom) all
+endef
+define install_tdom
+	$(MAKE) -C $(tdom) install
+endef
+define touch_tdom
+	touch $(tdom)/timestamp
+endef
+
+$(tdom)/timestamp: $(tcl)/timestamp
+	+ $(clean_tdom)
+	+ $(fetch_tdom)
+	+ $(configure_tdom)
+	+ $(build_tdom)
+	+ $(install_tdom)
+	+ $(touch_tdom)
+
+# -------------------------------------------------------------------------
+#  TESTER
+# -------------------------------------------------------------------------
+
+tester_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+tester: $(tester)/timestamp
+
+clean-tester: 
+	$(clean_tester)
+fetch-tester: 
+	$(fetch_tester)
+configure-tester: 
+	$(configure_tester)
+build-tester: 
+	$(build_tester)
+install-tester: 
+	$(install_tester)
+touch-tester: 
+	$(touch_tester)
+force-tester: $(gui)/timestamp 
+	+ $(clean_tester)
+	+ $(fetch_tester)
+	+ $(configure_tester)
+	+ $(build_tester)
+	+ $(install_tester)
+	+ $(touch_tester)
+
+define clean_tester
+	$(MAKE) -C $(tester) clean
+endef
+define fetch_tester
+endef
+define configure_tester
+	$(MKDIR_P) $(tester)
+endef
+define build_tester
+	$(MAKE) -C $(tester) all
+endef
+define install_tester
+	$(MAKE) -C $(tester) install
+endef
+define touch_tester
+	touch $(tester)/timestamp
+endef
+
+$(tester)/timestamp: $(gui)/timestamp 
+	+ $(clean_tester)
+	+ $(fetch_tester)
+	+ $(configure_tester)
+	+ $(build_tester)
+	+ $(install_tester)
+	+ $(touch_tester)
+
+# -------------------------------------------------------------------------
+#  TK
+# -------------------------------------------------------------------------
+
+tk_flags =	\
+	--enable-shared \
+	--disable-threads \
+	$(common_flags)
+
+tk: $(tk)/timestamp
+
+clean-tk: 
+	$(clean_tk)
+fetch-tk: 
+	$(fetch_tk)
+configure-tk: 
+	$(configure_tk)
+build-tk: 
+	$(build_tk)
+install-tk: 
+	$(install_tk)
+touch-tk: 
+	$(touch_tk)
+force-tk: $(tcl)/timestamp
+	+ $(clean_tk)
+	+ $(fetch_tk)
+	+ $(configure_tk)
+	+ $(build_tk)
+	+ $(install_tk)
+	+ $(touch_tk)
+
+define clean_tk
+	$(RM) -r $(tk)
+endef
+define fetch_tk
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(tk)
+endef
+define configure_tk
+	$(MKDIR_P) $(tk)
+	cd $(tk); $(runtime)/$(tk)/unix/configure $(tk_flags) 
+endef
+define build_tk
+	$(MAKE)  -C $(tk) all
+endef
+define install_tk
+	$(MAKE) -C $(tk) install
+endef
+define touch_tk
+	touch $(tk)/timestamp
+endef
+
+$(tk)/timestamp: $(tcl)/timestamp
+	+ $(clean_tk)
+	+ $(fetch_tk)
+	+ $(configure_tk)
+	+ $(build_tk)
+	+ $(install_tk)
+	+ $(touch_tk)
+
+# -------------------------------------------------------------------------
+#  TKING
+# -------------------------------------------------------------------------
+
+tkimg_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+tkimg: $(tkimg)/timestamp
+
+clean-tkimg: 
+	$(clean_tkimg)
+fetch-tkimg: 
+	$(fetch_tkimg)
+configure-tkimg: 
+	$(configure_tkimg)
+build-tkimg: 
+	$(build_tkimg)
+install-tkimg: 
+	$(install_tkimg)
+touch-tkimg: 
+	$(touch_tkimg)
+force-tkimg: $(tk)/timestamp
+	+ $(clean_tkimg)
+	+ $(fetch_tkimg)
+	+ $(configure_tkimg)
+	+ $(build_tkimg)
+	+ $(install_tkimg)
+	+ $(touch_tkimg)
+
+define clean_tkimg
+	$(RM) -r $(tkimg)
+endef
+define fetch_tkimg
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(tkimg)
+endef
+define configure_tkimg
+	$(MKDIR_P) $(tkimg)
+	cd $(tkimg); $(runtime)/$(tkimg)/configure $(tkimg_flags) 
+endef
+define build_tkimg
+	$(MAKE) -C $(tkimg) all
+endef
+define install_tkimg
+	$(MAKE) -C $(tkimg) install
+endef
+define touch_tkimg
+	touch $(tkimg)/timestamp
+endef
+
+$(tkimg)/timestamp: $(tk)/timestamp
+	+ $(clean_tkimg)
+	+ $(fetch_tkimg)
+	+ $(configure_tkimg)
+	+ $(build_tkimg)
+	+ $(install_tkimg)
+	+ $(touch_tkimg)
+
+# -------------------------------------------------------------------------
+#  TLS
+# -------------------------------------------------------------------------
+
+tls_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+tls: $(tls)/timestamp
+
+clean-tls: 
+	$(clean_tls)
+fetch-tls: 
+	$(fetch_tls)
+configure-tls: 
+	$(configure_tls)
+build-tls: 
+	$(build_tls)
+install-tls: 
+	$(install_tls)
+touch-tls: 
+	$(touch_tls)
+force-tls: $(tcl)/timestamp
+	+ $(clean_tls)
+	+ $(fetch_tls)
+	+ $(configure_tls)
+	+ $(build_tls)
+	+ $(install_tls)
+	+ $(touch_tls)
+
+define clean_tls
+	$(RM) -r $(tls)
+endef
+define fetch_tls
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(tkimg)
+endef
+define configure_tls
+	$(MKDIR_P) $(tls)
+	cd $(tls); $(runtime)/$(tls)/configure $(tls_flags) 
+endef
+define build_tls
+	$(MAKE) -C $(tls) all
+endef
+define install_tls
+	$(MAKE) -C $(tls) install
+endef
+define touch_tls
+	touch $(tls)/timestamp
+endef
+
+$(tls)/timestamp: $(tcl)/timestamp
+	+ $(clean_tls)
+	+ $(fetch_tls)
+	+ $(configure_tls)
+	+ $(build_tls)
+	+ $(install_tls)
+	+ $(touch_tls)
+
+# -------------------------------------------------------------------------
+#  VIDEO
+# -------------------------------------------------------------------------
+
+video_flags =	\
+	--with-tclsh="$(bindir)/tclsh8.4" \
+	--enable-shared \
+	$(common_flags)
+
+video: $(video)/timestamp
+
+clean-video: 
+	$(clean_video)
+fetch-video: 
+	$(fetch_video)
+configure-video: 
+	$(configure_video)
+build-video: 
+	$(build_video)
+install-video: 
+	$(install_video)
+touch-video: 
+	$(touch_video)
+force-video: $(gui)/timestamp 
+	+ $(clean_video)
+	+ $(fetch_video)
+	+ $(configure_video)
+	+ $(build_video)
+	+ $(install_video)
+	+ $(touch_video)
+
+define clean_video
+	$(RM) -r $(video)
+endef
+define fetch_video
+endef
+define configure_video
+	$(MKDIR_P) $(video)
+	cd $(video); $(srcdir)/$(video)/configure $(video_flags) 
+endef
+define build_video
+	$(MAKE) -C $(video) all
+endef
+define install_video
+	$(MAKE) -C $(video) install
+endef
+define touch_video
+	touch $(video)/timestamp
+endef
+
+$(video)/timestamp: $(gui)/timestamp 
+	+ $(clean_video)
+	+ $(fetch_video)
+	+ $(configure_video)
+	+ $(build_video)
+	+ $(install_video)
+	+ $(touch_video)
+
+
+# -------------------------------------------------------------------------
+#  VORONOI
+# -------------------------------------------------------------------------
+
+voronoi_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+voronoi: $(voronoi)/timestamp
+
+clean-voronoi: 
+	$(clean_voronoi)
+fetch-voronoi: 
+	$(fetch_voronoi)
+configure-voronoi: 
+	$(configure_voronoi)
+build-voronoi: 
+	$(build_voronoi)
+install-voronoi: 
+	$(install_voronoi)
+touch-voronoi: 
+	$(touch_voronoi)
+force-voronoi: 
+	+ $(clean_voronoi)
+	+ $(fetch_voronoi)
+	+ $(configure_voronoi)
+	+ $(build_voronoi)
+	+ $(install_voronoi)
+	+ $(touch_voronoi)
+
+define clean_voronoi
+	$(RM) -r $(voronoi)
+endef
+define fetch_voronoi
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(voronoi)
+endef
+define configure_voronoi
+	$(MKDIR_P) $(voronoi)
+	cd $(voronoi); $(runtime)/$(voronoi)/configure $(voronoi_flags) 
+endef
+define build_voronoi
+	$(MAKE)  -C $(voronoi) all
+endef
+define install_voronoi
+	$(MAKE) -C $(voronoi) install
+endef
+define touch_voronoi
+	touch $(voronoi)/timestamp
+endef
+
+$(voronoi)/timestamp: 
+	+ $(clean_voronoi)
+	+ $(fetch_voronoi)
+	+ $(configure_voronoi)
+	+ $(build_voronoi)
+	+ $(install_voronoi)
+	+ $(touch_voronoi)
+
+# -------------------------------------------------------------------------
+#  VTK
+# -------------------------------------------------------------------------
+
+vtk_flags =	\
+	$(common_flags)
+
+vtk: $(vtk)/timestamp
+
+clean-vtk: 
+	$(clean_vtk)
+fetch-vtk: 
+	$(fetch_vtk)
+configure-vtk: 
+	$(configure_vtk)
+build-vtk: 
+	$(build_vtk)
+install-vtk: 
+	$(install_vtk)
+touch-vtk: 
+	$(touch_vtk)
+force-vtk: $(cmake)/timestamp $(glew)/timestamp $(tk)/timestamp
+	+ $(clean_vtk)
+	+ $(fetch_vtk)
+	+ $(configure_vtk)
+	+ $(build_vtk)
+	+ $(install_vtk)
+	+ $(touch_vtk)
+
+define clean_vtk
+	$(RM) -r $(vtk)
+endef
+define fetch_vtk
+	sh $(srcdir)/fetch.sh $(TAG) $(srcdir) $(vtk)
+endef
+define configure_vtk
+	$(MKDIR_P) $(vtk)
+	cd $(vtk); $(runtime)/$(vtk)/configure $(vtk_flags) 
+endef
+define build_vtk
+	$(MAKE)  -C $(vtk) all
+endef
+define install_vtk
+	$(MAKE) -C $(vtk) install
+endef
+define touch_vtk
+	touch $(vtk)/timestamp
+endef
+
+$(vtk)/timestamp: $(cmake)/timestamp $(glew)/timestamp $(tk)/timestamp
+	+ $(clean_vtk)
+	+ $(fetch_vtk)
+	+ $(configure_vtk)
+	+ $(build_vtk)
+	+ $(install_vtk)
+	+ $(touch_vtk)
+
+# -------------------------------------------------------------------------
+#  VTKVIS
+# -------------------------------------------------------------------------
+
+vtkvis_flags =	\
+	--with-tcllib=$(libdir) \
+	--with-rappture=$(libdir) \
+	--with-vtk="6.0" \
+	--with-vtk-includes=$(incdir) \
+	--with-vtk-libs=$(libdir) \
+	--with-statsdir=$(statsdir) \
+	$(common_flags)
+
+vtkvis: $(vtkvis)/timestamp
+
+clean-vtkvis: 
+	$(clean_vtkvis)
+fetch-vtkvis: 
+	$(fetch_vtkvis)
+configure-vtkvis: 
+	$(configure_vtkvis)
+build-vtkvis: 
+	$(build_vtkvis)
+install-vtkvis: 
+	$(install_vtkvis)
+touch-vtkvis: 
+	$(touch_vtkvis)
+force-vtkvis: $(vtk)/timestamp 
+	+ $(clean_vtkvis)
+	+ $(fetch_vtkvis)
+	+ $(configure_vtkvis)
+	+ $(build_vtkvis)
+	+ $(install_vtkvis)
+	+ $(touch_vtkvis)
+
+define clean_vtkvis
+	$(RM) -r $(vtkvis)
+endef
+define fetch_vtkvis
+endef
+define configure_vtkvis
+	$(MKDIR_P) $(vtkvis)
+	cd $(vtkvis); $(srcdir)/packages/vizservers/$(vtkvis)/configure $(vtkvis_flags) 
+endef
+define build_vtkvis
+	$(MAKE) -C $(vtkvis) all
+endef
+define install_vtkvis
+	$(MAKE) -C $(vtkvis) install
+endef
+define touch_vtkvis
+	touch $(vtkvis)/timestamp
+endef
+
+$(vtkvis)/timestamp: $(vtk)/timestamp 
+	+ $(clean_vtkvis)
+	+ $(fetch_vtkvis)
+	+ $(configure_vtkvis)
+	+ $(build_vtkvis)
+	+ $(install_vtkvis)
+	+ $(touch_vtkvis)
+
+# -------------------------------------------------------------------------
+#  GEOVIS
+# -------------------------------------------------------------------------
+
+geovis_flags =	\
+	--with-tcllib=$(libdir) \
+	--with-rappture=$(libdir) \
+	--with-vtk="6.0" \
+	--with-vtk-includes=$(incdir) \
+	--with-vtk-libs=$(libdir) \
+	--with-statsdir=$(statsdir) \
+	$(common_flags)
+
+geovis: $(geovis)/timestamp
+
+clean-geovis: 
+	$(clean_geovis)
+fetch-geovis: 
+	$(fetch_geovis)
+configure-geovis: 
+	$(configure_geovis)
+build-geovis: 
+	$(build_geovis)
+install-geovis: 
+	$(install_geovis)
+touch-geovis: 
+	$(touch_geovis)
+force-geovis: $(vtk)/timestamp 
+	+ $(clean_geovis)
+	+ $(fetch_geovis)
+	+ $(configure_geovis)
+	+ $(build_geovis)
+	+ $(install_geovis)
+	+ $(touch_geovis)
+
+define clean_geovis
+	$(RM) -r $(geovis)
+endef
+define fetch_geovis
+endef
+define configure_geovis
+	$(MKDIR_P) $(geovis)
+	cd $(geovis); $(srcdir)/packages/vizservers/$(geovis)/configure $(geovis_flags) 
+endef
+define build_geovis
+	$(MAKE) -C $(geovis) all
+endef
+define install_geovis
+	$(MAKE) -C $(geovis) install
+endef
+define touch_geovis
+	touch $(geovis)/timestamp
+endef
+
+$(geovis)/timestamp: $(osgearth)/timestamp
+	+ $(clean_geovis)
+	+ $(fetch_geovis)
+	+ $(configure_geovis)
+	+ $(build_geovis)
+	+ $(install_geovis)
+	+ $(touch_geovis)
+
+# -------------------------------------------------------------------------
+#  ZLIB
+# -------------------------------------------------------------------------
+
+zlib_flags =	\
+	--enable-shared \
+	$(common_flags)
+
+zlib: $(zlib)/timestamp
+
+clean-zlib: 
+	$(clean_zlib)
+fetch-zlib: 
+	$(fetch_zlib)
+configure-zlib: 
+	$(configure_zlib)
+build-zlib: 
+	$(build_zlib)
+install-zlib: 
+	$(install_zlib)
+touch-zlib: 
+	$(touch_zlib)
+force-zlib: 
+	+ $(clean_zlib)
+	+ $(fetch_zlib)
+	+ $(configure_zlib)
+	+ $(build_zlib)
+	+ $(install_zlib)
+	+ $(touch_zlib)
+
+define clean_zlib
+	$(RM) -r $(zlib)
+endef
+define fetch_zlib
+	sh $(srcdir)/fetch.sh $(TAG) $(runtime) $(zlib)
+endef
+define configure_zlib
+	$(MKDIR_P) $(zlib)
+	cd $(zlib); $(runtime)/$(zlib)/configure $(zlib_flags) 
+endef
+define build_zlib
+	$(MAKE) -C $(zlib) all
+endef
+define install_zlib
+	$(MAKE) -C $(zlib) install
+endef
+define touch_zlib
+	touch $(zlib)/timestamp
+endef
+
+$(zlib)/timestamp: 
+	+ $(clean_zlib)
+	+ $(fetch_zlib)
+	+ $(configure_zlib)
+	+ $(build_zlib)
+	+ $(install_zlib)
+	+ $(touch_zlib)
Index: branches/r9/builder/scripts/Makefile.in
===================================================================
--- branches/r9/builder/scripts/Makefile.in	(revision 4839)
+++ branches/r9/builder/scripts/Makefile.in	(revision 4840)
@@ -13,5 +13,6 @@
 INSTALL		= @INSTALL@
 MKDIR_P		= @MKDIR_P@
-TCLSH		= @TCLSH@
+TCL_VERSION	= @TCL_VERSION@
+TCLSH           = $(bindir)/tclsh$(TCL_VERSION)
 VPATH		= $(srcdir)
 PACKAGE_VERSION = @PACKAGE_VERSION@
Index: branches/r9/configure
===================================================================
--- branches/r9/configure	(revision 4839)
+++ branches/r9/configure	(revision 4840)
@@ -626,4 +626,8 @@
 LIBOBJS
 subdirs
+WORDSIZE
+X_LIBRARIES
+X_INCLUDES
+STATSDIR
 VTK_VERSION
 VTK_TCL_DIR
@@ -726,5 +730,4 @@
 MEX
 MATLAB
-TCLSH
 INSTALL_STUB_LIB
 INSTALL_LIB
@@ -751,4 +754,5 @@
 AR
 CXXCPP
+XMKMF
 EGREP
 GREP
@@ -815,5 +819,7 @@
 ac_user_opts='
 enable_option_checking
+with_x
 with_install
+with_statsdir
 enable_64bit
 enable_64bit_vis
@@ -823,5 +829,4 @@
 enable_gui
 with_ffmpeg
-with_tclsh
 with_vtk
 enable_vtkdicom
@@ -853,4 +858,5 @@
 FFLAGS
 CPP
+XMKMF
 CXXCPP'
 ac_subdirs_all='packages/optimizer/src '
@@ -1451,4 +1457,8 @@
   cat <<\_ACEOF
 
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
@@ -1481,7 +1491,8 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-x                use the X Window System
   --with-install=DIR      location of installation [default=yes]
+  --with-statsdir=DIR     Write statistics in DIR
   --with-ffmpeg=DIR       location of ffmpeg [default=yes]
-  --with-tclsh=DIR        location of tclsh [default=yes]
   --with-vtk=version      VTK library version [default=6.1]
   --with-matlab=DIR       location of matlab and mex compiler [default=yes]
@@ -1511,4 +1522,5 @@
   FFLAGS      Fortran 77 compiler flags
   CPP         C preprocessor
+  XMKMF       Path to xmkmf, Makefile generator for X Window System
   CXXCPP      C++ preprocessor
 
@@ -1899,4 +1911,41 @@
 } # ac_fn_c_check_func
 
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
 # ac_fn_cxx_try_link LINENO
 # -------------------------
@@ -2011,41 +2060,4 @@
 
 } # ac_fn_cxx_check_func
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
 
 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
@@ -2790,27 +2802,4 @@
 fi
 
-
-# Check whether --with-install was given.
-if test "${with_install+set}" = set; then :
-  withval=$with_install;
-else
-  with_install=yes
-fi
-
-
-if test "$with_install" != "yes"; then
-    INSTALL_PREFIX=$with_install
-else
-    INSTALL_PREFIX=$prefix
-fi
-
-
-if test "${libdir}" != "${prefix}/lib"; then
-    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
-else
-    LIB_SEARCH_DIRS="-L${libdir}"
-fi
-
-
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -4747,42 +4736,4 @@
 
 
-
-for ac_func in sysinfo
-do :
-  ac_fn_cxx_check_func "$LINENO" "sysinfo" "ac_cv_func_sysinfo"
-if test "x$ac_cv_func_sysinfo" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYSINFO 1
-_ACEOF
-
-fi
-done
-
-for ac_func in gettimeofday
-do :
-  ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
-if test "x$ac_cv_func_gettimeofday" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_GETTIMEOFDAY 1
-_ACEOF
-
-fi
-done
-
-ac_fn_cxx_check_func "$LINENO" "localtime" "ac_cv_func_localtime"
-if test "x$ac_cv_func_localtime" = xyes; then :
-
-else
-  as_fn_error $? "oops! no localtime ?!?" "$LINENO" 5
-fi
-
-ac_fn_cxx_check_func "$LINENO" "getenv" "ac_cv_func_getenv"
-if test "x$ac_cv_func_getenv" = xyes; then :
-
-else
-  as_fn_error $? "oops! no getenv ?!?" "$LINENO" 5
-fi
-
-
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -4917,4 +4868,266 @@
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+  withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  case $x_includes,$x_libraries in #(
+    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  cat >Imakefile <<'_ACEOF'
+incroot:
+	@echo incroot='${INCROOT}'
+usrlibdir:
+	@echo usrlibdir='${USRLIBDIR}'
+libdir:
+	@echo libdir='${LIBDIR}'
+_ACEOF
+  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+    for ac_var in incroot usrlibdir libdir; do
+      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+    done
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl dylib la dll; do
+      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ac_x_includes= ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Xlib.h.
+  # First, try using that file with no special directory specified.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Xlib.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lX11 $LIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl dylib la dll; do
+    if test -r "$ac_dir/libX11.$ac_extension"; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+  no,* | *,no | *\'*)
+    # Didn't find X, or a directory has "'" in its name.
+    ac_cv_have_x="have_x=no";; #(
+  *)
+    # Record where we found X for the cache.
+    ac_cv_have_x="have_x=yes\
+	ac_x_includes='$ac_x_includes'\
+	ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+    *) have_x=yes;;
+  esac
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes\
+	ac_x_includes='$x_includes'\
+	ac_x_libraries='$x_libraries'"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+
+
+# Check whether --with-install was given.
+if test "${with_install+set}" = set; then :
+  withval=$with_install;
+else
+  with_install=yes
+fi
+
+
+if test "$with_install" != "yes"; then
+    INSTALL_PREFIX=$with_install
+else
+    INSTALL_PREFIX=$prefix
+fi
+
+if test "${libdir}" != "${prefix}/lib"; then
+    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
+else
+    LIB_SEARCH_DIRS="-L${libdir}"
+fi
+
+
+# Check whether --with-statsdir was given.
+if test "${with_statsdir+set}" = set; then :
+  withval=$with_statsdir; STATSDIR=$withval
+else
+  STATSDIR="/var/tmp/visservers"
+fi
+
+
+
+for ac_func in sysinfo
+do :
+  ac_fn_cxx_check_func "$LINENO" "sysinfo" "ac_cv_func_sysinfo"
+if test "x$ac_cv_func_sysinfo" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYSINFO 1
+_ACEOF
+
+fi
+done
+
+for ac_func in gettimeofday
+do :
+  ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
+if test "x$ac_cv_func_gettimeofday" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETTIMEOFDAY 1
+_ACEOF
+
+fi
+done
+
+ac_fn_cxx_check_func "$LINENO" "localtime" "ac_cv_func_localtime"
+if test "x$ac_cv_func_localtime" = xyes; then :
+
+else
+  as_fn_error $? "oops! no localtime ?!?" "$LINENO" 5
+fi
+
+ac_fn_cxx_check_func "$LINENO" "getenv" "ac_cv_func_getenv"
+if test "x$ac_cv_func_getenv" = xyes; then :
+
+else
+  as_fn_error $? "oops! no getenv ?!?" "$LINENO" 5
+fi
 
 
@@ -7356,107 +7569,4 @@
 
 
-
-# Check whether --with-tclsh was given.
-if test "${with_tclsh+set}" = set; then :
-  withval=$with_tclsh;
-else
-  with_tclsh=yes
-fi
-
-
-TCLSH=""
-if test "${with_tclsh}" != "no" ; then
-  tclsh="tclsh${TCL_VERSION}"
-  if test "${with_tclsh}" = "yes" ; then
-    # Extract the first word of "${tclsh}", so it can be a program name with args.
-set dummy ${tclsh}; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TCLSH+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TCLSH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="${exec_prefix}/bin:${PATH}"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-TCLSH=$ac_cv_path_TCLSH
-if test -n "$TCLSH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
-$as_echo "$TCLSH" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  else
-    # Extract the first word of "${tclsh}", so it can be a program name with args.
-set dummy ${tclsh}; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TCLSH+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TCLSH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="${with_tclsh}/bin:${with_tclsh}"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-TCLSH=$ac_cv_path_TCLSH
-if test -n "$TCLSH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
-$as_echo "$TCLSH" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-  if test "x${TCLSH}" = "x" ; then
-    as_fn_error $? "can't find tclsh" "$LINENO" 5
-  fi
-fi
-
-
 TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
 
@@ -10135,4 +10245,7 @@
 
 MAKE=${make_command}
+
+
+
 
 
Index: branches/r9/configure.in
===================================================================
--- branches/r9/configure.in	(revision 4839)
+++ branches/r9/configure.in	(revision 4840)
@@ -14,4 +14,25 @@
     exec_prefix=$prefix
 fi
+
+AC_PROG_INSTALL
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_MAKE_SET
+
+# Check for C, C++, and FORTRAN 
+AC_PROG_CC
+AC_PROG_CXX
+# Avoid g95 
+AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
+
+AC_LANG([C])
+
+AC_HEADER_STDC
+AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
+
+AC_LANG([C++])
+AC_PATH_X
 
 AC_ARG_WITH(
@@ -28,5 +49,4 @@
 fi
 
-
 if test "${libdir}" != "${prefix}/lib"; then
     LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
@@ -35,24 +55,11 @@
 fi
 
-
-AC_PROG_INSTALL
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-AC_PROG_LN_S
-AC_PROG_MKDIR_P
-AC_PROG_MAKE_SET
-
-# Check for C, C++, and FORTRAN 
-AC_PROG_CC
-AC_PROG_CXX
-# Avoid g95 
-AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
-
-AC_LANG([C])
-
-AC_HEADER_STDC
-AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
-
-AC_LANG([C++])
+AC_ARG_WITH(
+    [statsdir],
+    [AS_HELP_STRING([--with-statsdir=DIR],
+        [Write statistics in DIR])],
+    [STATSDIR=$withval],
+    [STATSDIR="/var/tmp/visservers"])
+
 
 AC_CHECK_FUNCS(sysinfo)
@@ -160,25 +167,4 @@
     [],
     [with_ffmpeg=yes])
-
-AC_ARG_WITH(
-    [tclsh],
-    [AS_HELP_STRING([--with-tclsh[=DIR]],
-        [location of tclsh @<:@default=yes@:>@])],
-    [],
-    [with_tclsh=yes])
-
-TCLSH=""
-if test "${with_tclsh}" != "no" ; then
-  tclsh="tclsh${TCL_VERSION}"
-  if test "${with_tclsh}" = "yes" ; then 
-    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${exec_prefix}/bin:${PATH}])
-  else 
-    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${with_tclsh}/bin:${with_tclsh}])
-  fi
-  if test "x${TCLSH}" = "x" ; then
-    AC_ERROR([can't find tclsh])
-  fi
-fi
-
 
 TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
@@ -440,5 +426,4 @@
 AC_SUBST(SIZEOF_VOID_P)
 AC_SUBST(STLIB_LD)
-AC_SUBST(TCLSH)
 AC_SUBST(TCL_INC_SPEC)
 AC_SUBST(TCL_LIB_SPEC)
@@ -463,4 +448,8 @@
 AC_SUBST(VTK_VERSION)
 AC_SUBST(XSUBPP)
+AC_SUBST(STATSDIR)
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LIBRARIES)
+AC_SUBST(WORDSIZE)
 
 ac_configure_args="--disable-threads --enable-shared"
Index: branches/r9/fetch.sh
===================================================================
--- branches/r9/fetch.sh	(revision 4840)
+++ branches/r9/fetch.sh	(revision 4840)
@@ -0,0 +1,15 @@
+#
+# runtime.sh tags/1.3.1 libpng-1.6.4 
+#
+path=$1
+destdir=$2
+pkgdir=$3
+echo path=$path
+echo destdir=$destdir
+echo pkgdir=$pkgdir
+url="https://nanohub.org/infrastructure"
+if test -d "$destdir/$pkgdir" ; then
+  svn update $destdir/$pkgdir
+else
+  svn co -q $url/rappture-runtime/svn/$path/$pkgdir $destdir/$pkgdir
+fi
Index: branches/r9/gui/configure.in
===================================================================
--- branches/r9/gui/configure.in	(revision 4839)
+++ branches/r9/gui/configure.in	(revision 4840)
@@ -28,4 +28,17 @@
 AC_PROG_MAKE_SET
 AC_PROG_CC
+
+AC_ARG_WITH(
+    [install],
+    [AS_HELP_STRING([--with-install[=DIR]],
+        [location of installation @<:@default=yes@:>@])],
+    [],
+    [with_install=yes])
+
+if test "$with_install" != "yes"; then
+    INSTALL_PREFIX=$with_install
+else
+    INSTALL_PREFIX=$prefix
+fi
 
 #SC_CONFIG_CFLAGS
@@ -146,4 +159,6 @@
   . ${exec_prefix}/lib/tkConfig.sh	
 fi
+
+AC_SUBST(INSTALL_PREFIX)
 AC_SUBST(TCL_INC_SPEC)
 AC_SUBST(TCL_LIB_SPEC)
Index: branches/r9/tester/scripts/Makefile.in
===================================================================
--- branches/r9/tester/scripts/Makefile.in	(revision 4839)
+++ branches/r9/tester/scripts/Makefile.in	(revision 4840)
@@ -13,5 +13,6 @@
 INSTALL		= @INSTALL@
 MKDIR_P		= @MKDIR_P@
-TCLSH		= @TCLSH@
+TCL_VERSION	= @TCL_VERSION@
+TCLSH           = $(bindir)/tclsh$(TCL_VERSION)
 VPATH		= $(srcdir)
 PACKAGE_VERSION = @PACKAGE_VERSION@
