Index: /branches/1.3/configure
===================================================================
--- /branches/1.3/configure	(revision 4521)
+++ /branches/1.3/configure	(revision 4522)
@@ -626,5 +626,6 @@
 LIBOBJS
 subdirs
-VTKDIR
+VTK_VERSION
+VTK_TCL_DIR
 TK_VERSION
 TK_XLIBSW
@@ -684,4 +685,6 @@
 HAVE_INTTYPES_H
 HAVE_FFMPEG_LIBS
+ENABLE_VTK_DICOM
+ENABLE_VTK
 ENABLE_GUI
 ENABLE_LANG
@@ -822,4 +825,5 @@
 with_tclsh
 with_vtk
+enable_vtkdicom
 with_matlab
 with_octave
@@ -1470,4 +1474,5 @@
   --enable-gui            build code related to the graphical user interface
                           [default=yes]
+  --enable-vtkdicom       Use vtkDICOM package [default=no]
   --enable-shared         build and link with shared libraries --enable-shared
   --enable-symbols        build with debugging symbols --disable-symbols
@@ -1479,5 +1484,5 @@
   --with-ffmpeg=DIR       location of ffmpeg [default=yes]
   --with-tclsh=DIR        location of tclsh [default=yes]
-  --with-vtk=DIR          location of vtk library [default=yes]
+  --with-vtk=version      VTK library version [default=6.0]
   --with-matlab=DIR       location of matlab and mex compiler [default=yes]
   --with-octave=DIR       path of default octave compiler `mkoctfile'
@@ -7467,28 +7472,56 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vtk" >&5
 $as_echo_n "checking for vtk... " >&6; }
-VTKDIR=""
-
+VTK_VERSION=6.0
+VTK_TCL_DIR=""
+
+ENABLE_VTK=
 if test "$with_vtk" != "no" ; then
-  if test "$with_vtk" = "yes" ; then
+  if test "$with_vtk" != "yes" ; then
+    VTK_VERSION=$with_vtk
+  fi
+  if test "x$with_vtk" != "x" ; then
+    ENABLE_VTK=yes
     for path in \
+     $libdir/tcltk \
+     $exec_prefix/lib/tcltk \
+     $prefix/lib/tcltk \
      $libdir \
-     $prefix/lib/tcltk \
      $prefix/lib \
      $exec_prefix/lib \
      /usr/lib
     do
-      for vtk in $path/vtk-* ; do
-        if test -d "${vtk}" ; then
-          VTKDIR=${vtk}
-        fi
-      done
-      if test "x${VTKDIR}" != "x" ; then
+      if test -d "$path/vtk-$VTK_VERSION" ; then
+        VTK_TCL_DIR="$path/vtk-$VTK_VERSION"
+      fi
+      if test "x${VTK_TCL_DIR}" != "x" ; then
         break
       fi
     done
   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VTKDIR" >&5
-$as_echo "$VTKDIR" >&6; }
+else
+  if test "${ENABLE_GUI}" = "yes" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: VTK missing: Rappture GUI requires VTK for some features" >&5
+$as_echo "$as_me: WARNING: VTK missing: Rappture GUI requires VTK for some features" >&2;}
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VTK_TCL_DIR" >&5
+$as_echo "$VTK_TCL_DIR" >&6; }
+
+# Check whether --enable-vtkdicom was given.
+if test "${enable_vtkdicom+set}" = set; then :
+  enableval=$enable_vtkdicom;
+else
+  enable_vtkdicom=no
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vtkDICOM" >&5
+$as_echo_n "checking for vtkDICOM... " >&6; }
+ENABLE_VTK_DICOM=
+if test "$enable_vtkdicom" != "no" ; then
+    ENABLE_VTK_DICOM="yes"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_vtkdicom" >&5
+$as_echo "$enable_vtkdicom" >&6; }
 
 
@@ -10099,5 +10132,8 @@
 
 
+
+
 MAKE=${make_command}
+
 
 
Index: /branches/1.3/configure.in
===================================================================
--- /branches/1.3/configure.in	(revision 4521)
+++ /branches/1.3/configure.in	(revision 4522)
@@ -186,33 +186,57 @@
 AC_ARG_WITH(
     [vtk],
-    [AS_HELP_STRING([--with-vtk[=DIR]],
-        [location of vtk library @<:@default=yes@:>@])],
+    [AS_HELP_STRING([--with-vtk[=version]],
+        [VTK library version @<:@default=6.0@:>@])],
     [], 
     [with_vtk=yes])
 
 AC_MSG_CHECKING([for vtk])
-VTKDIR=""
-
+VTK_VERSION=6.0
+VTK_TCL_DIR=""
+
+ENABLE_VTK=
 if test "$with_vtk" != "no" ; then
-  if test "$with_vtk" = "yes" ; then
+  if test "$with_vtk" != "yes" ; then
+    VTK_VERSION=$with_vtk
+  fi
+  if test "x$with_vtk" != "x" ; then
+    ENABLE_VTK=yes
     for path in \
+     $libdir/tcltk \
+     $exec_prefix/lib/tcltk \
+     $prefix/lib/tcltk \
      $libdir \
-     $prefix/lib/tcltk \
      $prefix/lib \
      $exec_prefix/lib \
      /usr/lib
     do
-      for vtk in $path/vtk-* ; do 
-        if test -d "${vtk}" ; then
-          VTKDIR=${vtk}
-        fi
-      done
-      if test "x${VTKDIR}" != "x" ; then
+      if test -d "$path/vtk-$VTK_VERSION" ; then
+        VTK_TCL_DIR="$path/vtk-$VTK_VERSION"
+      fi
+      if test "x${VTK_TCL_DIR}" != "x" ; then
         break
       fi
     done
   fi
-fi
-AC_MSG_RESULT([$VTKDIR])
+else
+  if test "${ENABLE_GUI}" = "yes" ; then
+    AC_MSG_WARN([VTK missing: Rappture GUI requires VTK for some features])
+  fi
+fi
+AC_MSG_RESULT([$VTK_TCL_DIR])
+
+AC_ARG_ENABLE(
+    [vtkdicom],
+    [AS_HELP_STRING([--enable-vtkdicom],
+        [Use vtkDICOM package @<:@default=no@:>@])],
+    [], 
+    [enable_vtkdicom=no])
+
+AC_MSG_CHECKING([for vtkDICOM])
+ENABLE_VTK_DICOM=
+if test "$enable_vtkdicom" != "no" ; then
+    ENABLE_VTK_DICOM="yes"
+fi
+AC_MSG_RESULT([$enable_vtkdicom])
 
 RP_LANG_MATLAB
@@ -354,4 +378,6 @@
 AC_SUBST(ENABLE_LANG)
 AC_SUBST(ENABLE_GUI)
+AC_SUBST(ENABLE_VTK)
+AC_SUBST(ENABLE_VTK_DICOM)
 AC_SUBST(FFMPEG)
 AC_SUBST(HAVE_FFMPEG_LIBS)
@@ -434,5 +460,6 @@
 AC_SUBST(TK_XLIBSW)
 AC_SUBST(TK_VERSION)
-AC_SUBST(VTKDIR)
+AC_SUBST(VTK_TCL_DIR)
+AC_SUBST(VTK_VERSION)
 AC_SUBST(XSUBPP)
 
Index: /branches/1.3/gui/apps/rappture-csh.env.in
===================================================================
--- /branches/1.3/gui/apps/rappture-csh.env.in	(revision 4521)
+++ /branches/1.3/gui/apps/rappture-csh.env.in	(revision 4522)
@@ -21,4 +21,5 @@
 set bindir=@bindir@
 set libdir=@libdir@
+set vtk_tcl_dir=@VTK_TCL_DIR@
 set python_version=@PYTHON_VERSION@
 set tcl_version=@TCL_VERSION@
@@ -88,7 +89,7 @@
 
 if ( $?TCLLIBPATH ) then
-  setenv TCLLIBPATH "${libdir}/tcltk/vtk $TCLLIBPATH"
+  setenv TCLLIBPATH "${vtk_tcl_dir} $TCLLIBPATH"
 else
-  setenv TCLLIBPATH "${libdir}/tcltk/vtk"
+  setenv TCLLIBPATH "${vtk_tcl_dir}"
 endif
 
Index: /branches/1.3/gui/apps/rappture.env.in
===================================================================
--- /branches/1.3/gui/apps/rappture.env.in	(revision 4521)
+++ /branches/1.3/gui/apps/rappture.env.in	(revision 4522)
@@ -20,4 +20,5 @@
 libdir=@libdir@
 bindir=@bindir@
+vtk_tcl_dir=@VTK_TCL_DIR@
 python_version=@PYTHON_VERSION@
 tcl_version=@TCL_VERSION@
@@ -46,5 +47,5 @@
 export PERL5LIB RUBYLIB PYTHONPATH
 
-TCLLIBPATH="${libdir}/tcltk/vtk $TCLLIBPATH"
+TCLLIBPATH="${vtk_tcl_dir} $TCLLIBPATH"
 TCL_LIBRARY=${libdir}/tcl${tcl_version}:$TCL_LIBRARY
 TK_LIBRARY=${libdir}/tk${tcl_version}:$TK_LIBRARY
Index: /branches/1.3/gui/apps/rappture.use.in
===================================================================
--- /branches/1.3/gui/apps/rappture.use.in	(revision 4521)
+++ /branches/1.3/gui/apps/rappture.use.in	(revision 4522)
@@ -11,4 +11,5 @@
 libdir=@libdir@
 bindir=@bindir@
+vtk_tcl_dir=@VTK_TCL_DIR@
 python_version=@PYTHON_VERSION@
 tcl_version=@TCL_VERSION@
@@ -28,5 +29,5 @@
 prepend PYTHONPATH ${libdir}/python${python_version}/site-packages
 
-prepend TCLLIBPATH ${libdir}/tcltk/vtk
+prepend TCLLIBPATH ${vtk_tcl_dir}
 prepend TCL_LIBRARY ${libdir}/tcl${tcl_version}
 prepend TK_LIBRARY ${libdir}/tk${tcl_version}
