Index: trunk/FACT++/Makefile.in
===================================================================
--- trunk/FACT++/Makefile.in	(revision 10437)
+++ trunk/FACT++/Makefile.in	(revision 10438)
@@ -46,7 +46,7 @@
 	.aux_dir/ltmain.sh .aux_dir/missing AUTHORS COPYING ChangeLog \
 	INSTALL NEWS
-bin_PROGRAMS = dns$(EXEEXT) did$(EXEEXT) log$(EXEEXT) logtime$(EXEEXT) \
-	argv$(EXEEXT) time$(EXEEXT) test3$(EXEEXT) dclient5$(EXEEXT) \
-	dserver2$(EXEEXT) dataLogger$(EXEEXT)
+bin_PROGRAMS = $(am__EXEEXT_1) dns$(EXEEXT) did$(EXEEXT) log$(EXEEXT) \
+	logtime$(EXEEXT) time$(EXEEXT) argv$(EXEEXT) test3$(EXEEXT) \
+	dclient5$(EXEEXT) dserver2$(EXEEXT) dataLogger$(EXEEXT)
 @HAS_GROFF_TRUE@am__append_1 = $(dist_man1_MANS:.man=.html)
 @HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@am__append_2 = $(dist_man1_MANS:.man=.pdf)
@@ -64,4 +64,6 @@
 	$(top_srcdir)/.macro_dir/mysql++_devel.m4 \
 	$(top_srcdir)/.macro_dir/mysql_devel.m4 \
+	$(top_srcdir)/.macro_dir/qt4_do_it_all.m4 \
+	$(top_srcdir)/.macro_dir/root_path.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -118,9 +120,11 @@
 am_libStateMachine_la_OBJECTS = src/WindowLog.lo src/Readline.lo \
 	src/ReadlineColor.lo src/ReadlineWindow.lo src/Console.lo \
-	src/Shell.lo src/EventImp.lo src/Event.lo src/Description.lo \
-	src/MessageImp.lo src/Converter.lo src/StateMachineImp.lo \
-	src/StateMachine.lo src/MessageDim.lo src/StateMachineDim.lo \
-	src/ServiceList.lo src/DimErrorRedirecter.lo \
-	src/DimDescriptionService.lo src/Connection.lo
+	src/Shell.lo src/EventImp.lo src/Event.lo src/State.lo \
+	src/Description.lo src/MessageImp.lo src/Converter.lo \
+	src/StateMachineImp.lo src/StateMachine.lo src/MessageDim.lo \
+	src/StateMachineDim.lo src/DimServerList.lo \
+	src/DimServiceInfoList.lo src/DimNetwork.lo src/ServiceList.lo \
+	src/DimErrorRedirecter.lo src/DimDescriptionService.lo \
+	src/Connection.lo
 libStateMachine_la_OBJECTS = $(am_libStateMachine_la_OBJECTS)
 libTime_la_LIBADD =
@@ -130,4 +134,5 @@
 am_libTools_la_OBJECTS = src/tools.lo
 libTools_la_OBJECTS = $(am_libTools_la_OBJECTS)
+@HAS_QT4_TRUE@am__EXEEXT_1 = fact$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS)
 am_argv_OBJECTS = src/argv.$(OBJEXT)
@@ -135,5 +140,5 @@
 argv_DEPENDENCIES = libConfiguration.la
 am_dataLogger_OBJECTS = src/dataLogger.$(OBJEXT) \
-	src/LocalControl.$(OBJEXT)
+	src/LocalControl.$(OBJEXT) src/Fits.$(OBJEXT)
 dataLogger_OBJECTS = $(am_dataLogger_OBJECTS)
 dataLogger_DEPENDENCIES = libDim.la libDim++.la libTools.la libTime.la \
@@ -155,4 +160,27 @@
 dserver2_DEPENDENCIES = libTime.la libTools.la libStateMachine.la \
 	libDim.la libDim++.la
+am__fact_SOURCES_DIST = gui/design.h gui/design.cc \
+	gui/HtmlDelegate.moc.cc gui/CheckBoxDelegate.moc.cc \
+	gui/DockWindow.moc.cc gui/MainWindow.moc.cc \
+	gui/HtmlDelegate.cc gui/CheckBoxDelegate.cc gui/DockWindow.cc \
+	gui/MainWindow.cc gui/fact.cc gui/FactGui.cc
+am__objects_1 =
+@HAS_QT4_TRUE@am__objects_2 = gui/design.$(OBJEXT)
+@HAS_QT4_TRUE@am__objects_3 = gui/HtmlDelegate.moc.$(OBJEXT) \
+@HAS_QT4_TRUE@	gui/CheckBoxDelegate.moc.$(OBJEXT) \
+@HAS_QT4_TRUE@	gui/DockWindow.moc.$(OBJEXT) \
+@HAS_QT4_TRUE@	gui/MainWindow.moc.$(OBJEXT)
+am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3)
+@HAS_QT4_TRUE@am__objects_5 = gui/HtmlDelegate.$(OBJEXT) \
+@HAS_QT4_TRUE@	gui/CheckBoxDelegate.$(OBJEXT) \
+@HAS_QT4_TRUE@	gui/DockWindow.$(OBJEXT) \
+@HAS_QT4_TRUE@	gui/MainWindow.$(OBJEXT)
+am_fact_OBJECTS = $(am__objects_4) $(am__objects_5) gui/fact.$(OBJEXT) \
+	gui/FactGui.$(OBJEXT)
+fact_OBJECTS = $(am_fact_OBJECTS)
+am__DEPENDENCIES_1 =
+fact_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) libDim.la libDim++.la libTools.la \
+	libTime.la libStateMachine.la
 am_log_OBJECTS = src/log.$(OBJEXT)
 log_OBJECTS = $(am_log_OBJECTS)
@@ -217,12 +245,14 @@
 	$(libTime_la_SOURCES) $(libTools_la_SOURCES) $(argv_SOURCES) \
 	$(dataLogger_SOURCES) $(dclient5_SOURCES) $(did_SOURCES) \
-	$(dns_SOURCES) $(dserver2_SOURCES) $(log_SOURCES) \
-	$(logtime_SOURCES) $(test3_SOURCES) $(time_SOURCES)
+	$(dns_SOURCES) $(dserver2_SOURCES) $(fact_SOURCES) \
+	$(log_SOURCES) $(logtime_SOURCES) $(test3_SOURCES) \
+	$(time_SOURCES)
 DIST_SOURCES = $(libConfiguration_la_SOURCES) $(libDim___la_SOURCES) \
 	$(libDim_la_SOURCES) $(libStateMachine_la_SOURCES) \
 	$(libTime_la_SOURCES) $(libTools_la_SOURCES) $(argv_SOURCES) \
 	$(dataLogger_SOURCES) $(dclient5_SOURCES) $(did_SOURCES) \
-	$(dns_SOURCES) $(dserver2_SOURCES) $(log_SOURCES) \
-	$(logtime_SOURCES) $(test3_SOURCES) $(time_SOURCES)
+	$(dns_SOURCES) $(dserver2_SOURCES) $(am__fact_SOURCES_DIST) \
+	$(log_SOURCES) $(logtime_SOURCES) $(test3_SOURCES) \
+	$(time_SOURCES)
 man1dir = $(mandir)/man1
 NROFF = nroff
@@ -323,4 +353,5 @@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+MOC4 = @MOC4@
 MOTIF_CFLAGS = @MOTIF_CFLAGS@
 MOTIF_INCL = @MOTIF_INCL@
@@ -344,15 +375,47 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PS2PDF = @PS2PDF@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
+QT4DIR = @QT4DIR@
+QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@
+QT4_CORE_INCLUDES = @QT4_CORE_INCLUDES@
+QT4_CORE_LDFLAGS = @QT4_CORE_LDFLAGS@
+QT4_CORE_LIB = @QT4_CORE_LIB@
+QT4_CORE_LIBS = @QT4_CORE_LIBS@
+QT4_FRONTEND_CFLAGS = @QT4_FRONTEND_CFLAGS@
+QT4_FRONTEND_LIBS = @QT4_FRONTEND_LIBS@
+QT4_INCLUDES = @QT4_INCLUDES@
+QT4_LDFLAGS = @QT4_LDFLAGS@
+QT4_LIB = @QT4_LIB@
+QT4_VERSION = @QT4_VERSION@
 RANLIB = @RANLIB@
+RCC4 = @RCC4@
 READLINE_INCLUDES = @READLINE_INCLUDES@
 READLINE_LIBS = @READLINE_LIBS@
+ROOTAUXCFLAGS = @ROOTAUXCFLAGS@
+ROOTAUXLIBS = @ROOTAUXLIBS@
+ROOTCFLAGS = @ROOTCFLAGS@
+ROOTCINT = @ROOTCINT@
+ROOTCONF = @ROOTCONF@
+ROOTCPPFLAGS = @ROOTCPPFLAGS@
+ROOTEXEC = @ROOTEXEC@
+ROOTGLIBS = @ROOTGLIBS@
+ROOTINCDIR = @ROOTINCDIR@
+ROOTLDFLAGS = @ROOTLDFLAGS@
+ROOTLIBDIR = @ROOTLIBDIR@
+ROOTLIBS = @ROOTLIBS@
+ROOTRPATH = @ROOTRPATH@
+ROOTSOVERSION = @ROOTSOVERSION@
+ROOTVERSION = @ROOTVERSION@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+UIC4 = @UIC4@
 VERSION = @VERSION@
 XMKMF = @XMKMF@
@@ -444,12 +507,23 @@
 DIM_FLAGS = -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux
 BOOST_FLAGS = -DBOOST_DISABLE_ASSERTS
-AM_CPPFLAGS = \
-   -O3 -Wall -Winit-self -Wpointer-arith -Wcast-align -Wextra -Wformat=2 \
-   -Idim/dim $(DIM_FLAGS) $(BOOST_FLAGS)
-
-AM_CXXFLAGS = $(AM_CPPFLAGS) -Woverloaded-virtual -Wshadow -std=c++0x
+AM_CPPFLAGS = -Idim/dim $(DIM_FLAGS) $(BOOST_FLAGS) $(ROOTCPPFLAGS) \
+   -O3 -Wall -Winit-self -Wpointer-arith -Wcast-align -Wextra -Wformat=2
+
+AM_CXXFLAGS = $(AM_CPPFLAGS) $(QT4_INCLUDES) \
+   -Woverloaded-virtual -Wshadow -std=c++0x
+
 
 # -no-undefined
 AM_LDFLAGS = -module -avoid-version
+
+#$(man3_MANS): doxygen-doc
+#DX_CLEANFILES = everything to clean.
+# Add to MOSTLYCLEANFILES.
+
+#-------------------------------------------------------------------------
+@HAS_QT4_TRUE@QT4_EXECUTABLES = fact
+#	ftmctrl ftm \
+#	chatclient chatserv \
+#	fitsgrep test \
 #	sched astro test ftm ftmctrl 
 lib_LTLIBRARIES = libDim.la libDim++.la libTime.la libTools.la \
@@ -466,6 +540,8 @@
 	dim/README_v14.txt dim/README_v17.txt dim/README_v16.txt \
 	dim/README_v17.txt dim/README_v18.txt dim/README_v19.txt \
-	$(dist_man1_MANS:.man=.html) $(dist_man1_MANS:.man=.pdf)
-CLEANFILES = $(dist_man1_MANS:.man=.pdf)  $(dist_man1_MANS:.man=.html)
+	$(dist_man1_MANS:.man=.html) $(dist_man1_MANS:.man=.pdf) \
+	$(DIALOGS) $(RESOURCES)
+CLEANFILES = $(dist_man1_MANS:.man=.pdf) $(dist_man1_MANS:.man=.html) \
+	$(BUILT_SOURCES)
 dns_LDADD = libDim.la
 dns_SOURCES = dim/src/dns.c
@@ -535,4 +611,5 @@
 	src/EventImp.h        src/EventImp.cc \
 	src/Event.h           src/Event.cc \
+	src/State.h           src/State.cc \
 	src/Description.h     src/Description.cc \
 	src/MessageImp.h      src/MessageImp.cc \
@@ -542,7 +619,10 @@
 	\
 	src/EventDim.h \
-	src/MessageDim.h      src/MessageDim.cc \
-	src/StateMachineDim.h src/StateMachineDim.cc \
-	src/ServiceList.h     src/ServiceList.cc \
+	src/MessageDim.h         src/MessageDim.cc \
+	src/StateMachineDim.h    src/StateMachineDim.cc \
+	src/DimServerList.h      src/DimServerList.cc \
+	src/DimServiceInfoList.h src/DimServiceInfoList.cc \
+	src/DimNetworkList.h     src/DimNetwork.cc \
+	src/ServiceList.h        src/ServiceList.cc \
 	src/DimErrorRedirecter.h  \
 	src/DimErrorRedirecter.cc \
@@ -559,5 +639,5 @@
 dserver2_LDADD = libTime.la libTools.la libStateMachine.la libDim.la libDim++.la
 
-#ftm_SOURCES = src/ftm.cc 
+#ftm_SOURCES = src/ftm.cc src/HeadersFTM.cc
 #ftm_LDADD   = libTime.la libTools.la libStateMachine.la libDim.la libDim++.la
 log_SOURCES = src/log.cc
@@ -565,4 +645,7 @@
 logtime_LDADD = libStateMachine.la libTools.la libTime.la libDim.la libDim++.la
 logtime_SOURCES = src/logtime.cc
+
+#chatserv_LDADD = libStateMachine.la libConfiguration.la libTools.la libTime.la libDim.la libDim++.la
+#chatserv_SOURCES = src/chatserv.cc src/LocalControl.cc src/LocalControl.h
 dclient5_SOURCES = src/dclient5.cc src/LocalControl.cc src/LocalControl.h
 dclient5_LDADD = libDim.la libDim++.la libTools.la libTime.la libStateMachine.la \
@@ -570,10 +653,6 @@
 
 
-#ftmctrl_SOURCES = src/ftmctrl.cc src/LocalControl.cc src/LocalControl.h
+#ftmctrl_SOURCES = src/ftmctrl.cc src/LocalControl.cc src/LocalControl.h src/HeadersFTM.cc
 #ftmctrl_LDADD   = libDim.la libDim++.la libTools.la libTime.la libStateMachine.la \
-#    libConfiguration.la
-
-#sched_SOURCES = src/sched.cc src/LocalControl.cc src/LocalControl.h
-#sched_LDADD   = libDim.la libDim++.la libTools.la libTime.la libStateMachine.la \
 #    libConfiguration.la
 argv_SOURCES = src/argv.cc
@@ -581,4 +660,7 @@
 test3_SOURCES = src/test3.cc src/RemoteControl.cc src/RemoteControl.h
 test3_LDADD = libStateMachine.la libTools.la libTime.la libDim.la libDim++.la libConfiguration.la
+
+#chatclient_SOURCES = src/chatclient.cc src/ChatClient.cc src/ChatClient.h
+#chatclient_LDADD = libStateMachine.la libTools.la libTime.la libDim.la libDim++.la libConfiguration.la
 time_SOURCES = src/time.cc
 time_LDADD = libTime.la 
@@ -589,15 +671,43 @@
 #test_SOURCES = src/test.cc
 #test_LDADD = libStateMachine.la libTools.la libTime.la libDim.la libDim++.la libConfiguration.la
-dataLogger_SOURCES = src/dataLogger.cc src/LocalControl.cc src/LocalControl.h
+dataLogger_SOURCES = src/dataLogger.cc src/LocalControl.cc src/LocalControl.h src/Fits.cc
 dataLogger_LDADD = libDim.la libDim++.la libTools.la libTime.la libStateMachine.la \
     libConfiguration.la
 
 
+#fitsgrep_SOURCES = src/fitsgrep.cc
+#fitsgrep_LDADD   = libConfiguration.la
+
+# -----
+@HAS_QT4_TRUE@DIALOGS = \
+@HAS_QT4_TRUE@	gui/design.ui
+
+@HAS_QT4_TRUE@RESOURCES = \
+@HAS_QT4_TRUE@	gui/design.qrc
+
+@HAS_QT4_TRUE@QT_SOURCES = \
+@HAS_QT4_TRUE@	gui/HtmlDelegate.cc \
+@HAS_QT4_TRUE@	gui/CheckBoxDelegate.cc \
+@HAS_QT4_TRUE@	gui/DockWindow.cc \
+@HAS_QT4_TRUE@	gui/MainWindow.cc
+
+BUILT_SOURCES = $(DIALOGS:.ui=.h) $(RESOURCES:.qrc=.cc) $(QT_SOURCES:.cc=.moc.cc)
+fact_LDADD = $(ROOTLDFLAGS) $(QT4_LIB) $(QT4_LDFLAGS) \
+	libDim.la libDim++.la libTools.la libTime.la libStateMachine.la
+
+fact_SOURCES = $(BUILT_SOURCES) $(QT_SOURCES) \
+	gui/fact.cc gui/FactGui.cc
+
+
+#-------------------------------------------------------------------------
+SUFFIXES = .moc.cc
+
 #-------------------------------------------------------------------------
 MAN_TARGETS = $(am__append_1) $(am__append_2) $(am__append_3)
-all: all-am
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .cc .cxx .html .lo .man .o .obj .pdf
+.SUFFIXES: .moc.cc .c .cc .cxx .h .html .lo .man .o .obj .pdf .qrc .ui
 am--refresh:
 	@:
@@ -731,4 +841,5 @@
 src/EventImp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/Event.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
+src/State.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/Description.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/MessageImp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
@@ -740,4 +851,9 @@
 src/StateMachineDim.lo: src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/DimServerList.lo: src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
+src/DimServiceInfoList.lo: src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
+src/DimNetwork.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/ServiceList.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/DimErrorRedirecter.lo: src/$(am__dirstamp) \
@@ -821,4 +937,5 @@
 src/LocalControl.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/Fits.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 dataLogger$(EXEEXT): $(dataLogger_OBJECTS) $(dataLogger_DEPENDENCIES) 
 	@rm -f dataLogger$(EXEEXT)
@@ -852,4 +969,34 @@
 	@rm -f dserver2$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(dserver2_OBJECTS) $(dserver2_LDADD) $(LIBS)
+gui/$(am__dirstamp):
+	@$(MKDIR_P) gui
+	@: > gui/$(am__dirstamp)
+gui/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) gui/$(DEPDIR)
+	@: > gui/$(DEPDIR)/$(am__dirstamp)
+gui/design.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/HtmlDelegate.moc.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/CheckBoxDelegate.moc.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/DockWindow.moc.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/MainWindow.moc.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/HtmlDelegate.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/CheckBoxDelegate.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/DockWindow.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/MainWindow.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+gui/fact.$(OBJEXT): gui/$(am__dirstamp) gui/$(DEPDIR)/$(am__dirstamp)
+gui/FactGui.$(OBJEXT): gui/$(am__dirstamp) \
+	gui/$(DEPDIR)/$(am__dirstamp)
+fact$(EXEEXT): $(fact_OBJECTS) $(fact_DEPENDENCIES) 
+	@rm -f fact$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(fact_OBJECTS) $(fact_LDADD) $(LIBS)
 src/log.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 log$(EXEEXT): $(log_OBJECTS) $(log_DEPENDENCIES) 
@@ -913,4 +1060,15 @@
 	-rm -f dim/src/utilities.$(OBJEXT)
 	-rm -f dim/src/utilities.lo
+	-rm -f gui/CheckBoxDelegate.$(OBJEXT)
+	-rm -f gui/CheckBoxDelegate.moc.$(OBJEXT)
+	-rm -f gui/DockWindow.$(OBJEXT)
+	-rm -f gui/DockWindow.moc.$(OBJEXT)
+	-rm -f gui/FactGui.$(OBJEXT)
+	-rm -f gui/HtmlDelegate.$(OBJEXT)
+	-rm -f gui/HtmlDelegate.moc.$(OBJEXT)
+	-rm -f gui/MainWindow.$(OBJEXT)
+	-rm -f gui/MainWindow.moc.$(OBJEXT)
+	-rm -f gui/design.$(OBJEXT)
+	-rm -f gui/fact.$(OBJEXT)
 	-rm -f src/Configuration.$(OBJEXT)
 	-rm -f src/Configuration.lo
@@ -927,8 +1085,15 @@
 	-rm -f src/DimErrorRedirecter.$(OBJEXT)
 	-rm -f src/DimErrorRedirecter.lo
+	-rm -f src/DimNetwork.$(OBJEXT)
+	-rm -f src/DimNetwork.lo
+	-rm -f src/DimServerList.$(OBJEXT)
+	-rm -f src/DimServerList.lo
+	-rm -f src/DimServiceInfoList.$(OBJEXT)
+	-rm -f src/DimServiceInfoList.lo
 	-rm -f src/Event.$(OBJEXT)
 	-rm -f src/Event.lo
 	-rm -f src/EventImp.$(OBJEXT)
 	-rm -f src/EventImp.lo
+	-rm -f src/Fits.$(OBJEXT)
 	-rm -f src/LocalControl.$(OBJEXT)
 	-rm -f src/MessageDim.$(OBJEXT)
@@ -947,4 +1112,6 @@
 	-rm -f src/Shell.$(OBJEXT)
 	-rm -f src/Shell.lo
+	-rm -f src/State.$(OBJEXT)
+	-rm -f src/State.lo
 	-rm -f src/StateMachine.$(OBJEXT)
 	-rm -f src/StateMachine.lo
@@ -992,4 +1159,15 @@
 @AMDEP_TRUE@@am__include@ @am__quote@dim/src/did/$(DEPDIR)/did-did.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@dim/src/did/$(DEPDIR)/did-dui_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/CheckBoxDelegate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/CheckBoxDelegate.moc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/DockWindow.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/DockWindow.moc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/FactGui.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/HtmlDelegate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/HtmlDelegate.moc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/MainWindow.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/MainWindow.moc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/design.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gui/$(DEPDIR)/fact.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Configuration.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Connection.Plo@am__quote@
@@ -999,6 +1177,10 @@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/DimDescriptionService.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/DimErrorRedirecter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/DimNetwork.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/DimServerList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/DimServiceInfoList.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Event.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/EventImp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Fits.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/LocalControl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/MessageDim.Plo@am__quote@
@@ -1010,4 +1192,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ServiceList.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Shell.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/State.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/StateMachine.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/StateMachineDim.Plo@am__quote@
@@ -1436,5 +1619,6 @@
 	       exit 1; } >&2
 check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) \
 		$(HEADERS)
@@ -1445,5 +1629,6 @@
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: install-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -1471,4 +1656,6 @@
 	-rm -f dim/src/did/$(DEPDIR)/$(am__dirstamp)
 	-rm -f dim/src/did/$(am__dirstamp)
+	-rm -f gui/$(DEPDIR)/$(am__dirstamp)
+	-rm -f gui/$(am__dirstamp)
 	-rm -f src/$(DEPDIR)/$(am__dirstamp)
 	-rm -f src/$(am__dirstamp)
@@ -1477,4 +1664,5 @@
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-am
 
@@ -1484,5 +1672,5 @@
 distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf dim/src/$(DEPDIR) dim/src/did/$(DEPDIR) src/$(DEPDIR)
+	-rm -rf dim/src/$(DEPDIR) dim/src/did/$(DEPDIR) gui/$(DEPDIR) src/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -1533,5 +1721,5 @@
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -rf dim/src/$(DEPDIR) dim/src/did/$(DEPDIR) src/$(DEPDIR)
+	-rm -rf dim/src/$(DEPDIR) dim/src/did/$(DEPDIR) gui/$(DEPDIR) src/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1556,5 +1744,5 @@
 uninstall-man: uninstall-man1
 
-.MAKE: install-am install-strip
+.MAKE: all check install install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
@@ -1619,9 +1807,18 @@
 @DX_COND_doc_TRUE@	$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
 
+.ui.h: $<
+	$(AM_V_GEN)$(UIC4) $< -o $@
+
+.h.moc.cc: $<
+	$(AM_V_GEN)$(MOC4) $(EXTRA_CPPFLAGS) $< -o $@
+
+.qrc.cc: $<
+	$(AM_V_GEN)$(RCC4) -name `echo "$<" | sed 's|^.*/\(.*\)\.qrc$$|\1|'` $< -o $@
+
 @HAS_GROFF_TRUE@.man.html: $<
-@HAS_GROFF_TRUE@	$(AM_V_GEN)groff -mandoc `man -w ./$<` -T html > $@
+@HAS_GROFF_TRUE@	$(AM_V_GEN)groff -mandoc `man -w -l $<` -T html > $@
 
 @HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@.man.pdf: $<
-@HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@	$(AM_V_GEN)groff -mandoc `man -w ./$<` | ps2pdf - $@
+@HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@	$(AM_V_GEN)groff -mandoc `man -w -l $<` | ps2pdf - $@
 
 @HAS_HELP2MAN_TRUE@$(dist_man1_MANS): $(dist_man1_MANS:.man=)
@@ -1633,4 +1830,6 @@
 diff:
 	@svn diff | $(COLORDIFF)
+
+#-------------------------------------------------------------------------
 
 # Overwrite rules for silent or other verbosity levels
@@ -1649,4 +1848,9 @@
 #        done
 
+#CLEANFILES = *~ *.rej *.orig
+#MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
+#        stamp-h.in stamp-h[0-9].in
+#DISTCLEANFILES = config.cache config.log
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
Index: trunk/FACT++/configure
===================================================================
--- trunk/FACT++/configure	(revision 10437)
+++ trunk/FACT++/configure	(revision 10438)
@@ -747,4 +747,10 @@
 LTLIBOBJS
 LIBOBJS
+HAS_GUI_FALSE
+HAS_GUI_TRUE
+HAS_ROOT_QT_FALSE
+HAS_ROOT_QT_TRUE
+HAS_ROOT_FALSE
+HAS_ROOT_TRUE
 HAS_QT4_FALSE
 HAS_QT4_TRUE
@@ -767,4 +773,19 @@
 GROFF
 COLORDIFF
+ROOTLDFLAGS
+ROOTCPPFLAGS
+ROOTSOVERSION
+ROOTVERSION
+ROOTRPATH
+ROOTAUXCFLAGS
+ROOTAUXLIBS
+ROOTGLIBS
+ROOTLIBS
+ROOTCFLAGS
+ROOTINCDIR
+ROOTLIBDIR
+ROOTCINT
+ROOTEXEC
+ROOTCONF
 RCC4
 UIC4
@@ -1023,4 +1044,6 @@
 with_qt4_includes
 with_qt4_libraries
+with_root
+with_rootsys
 '
       ac_precious_vars='build_alias
@@ -1756,4 +1779,6 @@
   --with-qt4-includes     where the Qt 4 includes are
   --with-qt4-libraries    where the Qt 4 library is installed
+  --without-root          Disable root, i.e. disable gui support.
+  --with-rootsys          top of the ROOT installation directory
 
 Some influential environment variables:
@@ -4420,11 +4445,11 @@
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4422: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4447: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4425: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4450: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4428: output\"" >&5)
+  (eval echo "\"\$as_me:4453: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
@@ -5632,5 +5657,5 @@
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5634 "configure"' > conftest.$ac_ext
+  echo '#line 5659 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7560,9 +7585,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7562: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7587: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7566: \$? = $ac_status" >&5
+   echo "$as_me:7591: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -7899,9 +7924,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7901: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7926: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7905: \$? = $ac_status" >&5
+   echo "$as_me:7930: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -8004,9 +8029,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8006: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8031: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8010: \$? = $ac_status" >&5
+   echo "$as_me:8035: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -8059,9 +8084,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8061: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8086: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8065: \$? = $ac_status" >&5
+   echo "$as_me:8090: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -10443,5 +10468,5 @@
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10445 "configure"
+#line 10470 "configure"
 #include "confdefs.h"
 
@@ -10539,5 +10564,5 @@
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10541 "configure"
+#line 10566 "configure"
 #include "confdefs.h"
 
@@ -12495,9 +12520,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12497: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12522: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12501: \$? = $ac_status" >&5
+   echo "$as_me:12526: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -12594,9 +12619,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12596: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12621: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12600: \$? = $ac_status" >&5
+   echo "$as_me:12625: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -12646,9 +12671,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12648: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12673: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12652: \$? = $ac_status" >&5
+   echo "$as_me:12677: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -21531,5 +21556,5 @@
 
 		cat > conftest.$ac_ext <<EOF
-#line 21533 "configure"
+#line 21558 "configure"
 #include "confdefs.h"
 #include <qglobal.h>
@@ -21694,31 +21719,244 @@
 
 
-#AC_CHECK_PROG(QT4_MOC, moc, moc,
-#   AC_MSG_ERROR([QT4 executable 'moc' not found in path.]))
-#AC_CHECK_PROG(QT4_UIC, uic, uic,
-#   AC_MSG_ERROR([QT4 executable 'moc' not found in path.]))
-
 ######################################################################
 # ROOT SUPPORT
 ######################################################################
 
-# ROOT_PATH([5.12/00, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]])
-# ROOT_PATH([5.12/00])
-# ROOT_PATH(3.03/05, , AC_MSG_ERROR(Your ROOT version is too old))
-# ROOT_PATH(, AC_DEFINE([HAVE_ROOT]))
-
-# ROOTCONF           full path to root-config
-# ROOTEXEC           full path to root
-# ROOTCINT           full path to rootcint
-# ROOTLIBDIR         Where the ROOT libraries are
-# ROOTINCDIR         Where the ROOT headers are
-# ROOTETCDIR         Where the ROOT configuration is
-# ROOTCFLAGS         Extra compiler flags
-# ROOTLIBS           ROOT basic libraries
-# ROOTGLIBS          ROOT basic + GUI libraries
-# ROOTAUXLIBS        Auxilary libraries and linker flags for ROOT
-# ROOTAUXCFLAGS      Auxilary compiler flags
-# ROOTRPATH          Same as ROOTLIBDIR
-
+
+# Check whether --with-root was given.
+if test "${with_root+set}" = set; then :
+  withval=$with_root;
+else
+
+
+# Check whether --with-rootsys was given.
+if test "${with_rootsys+set}" = set; then :
+  withval=$with_rootsys; user_rootsys=$withval
+else
+  user_rootsys="none"
+fi
+
+  if test ! x"$user_rootsys" = xnone; then
+    rootbin="$user_rootsys"
+  elif test ! x"$ROOTSYS" = x ; then
+    rootbin="$ROOTSYS/bin"
+  else
+   rootbin=$PATH
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for root in" >&5
+$as_echo_n "checking for root in... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rootbin" >&5
+$as_echo "$rootbin" >&6; }
+
+  # Extract the first word of "root-config ", so it can be a program name with args.
+set dummy root-config ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ROOTCONF+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ROOTCONF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ROOTCONF="$ROOTCONF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $rootbin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ROOTCONF="$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
+
+  test -z "$ac_cv_path_ROOTCONF" && ac_cv_path_ROOTCONF="no"
+  ;;
+esac
+fi
+ROOTCONF=$ac_cv_path_ROOTCONF
+if test -n "$ROOTCONF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ROOTCONF" >&5
+$as_echo "$ROOTCONF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  # Extract the first word of "root ", so it can be a program name with args.
+set dummy root ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ROOTEXEC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ROOTEXEC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ROOTEXEC="$ROOTEXEC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $rootbin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ROOTEXEC="$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
+
+  test -z "$ac_cv_path_ROOTEXEC" && ac_cv_path_ROOTEXEC="no"
+  ;;
+esac
+fi
+ROOTEXEC=$ac_cv_path_ROOTEXEC
+if test -n "$ROOTEXEC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ROOTEXEC" >&5
+$as_echo "$ROOTEXEC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  # Extract the first word of "rootcint ", so it can be a program name with args.
+set dummy rootcint ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ROOTCINT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ROOTCINT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ROOTCINT="$ROOTCINT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $rootbin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ROOTCINT="$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
+
+  test -z "$ac_cv_path_ROOTCINT" && ac_cv_path_ROOTCINT="no"
+  ;;
+esac
+fi
+ROOTCINT=$ac_cv_path_ROOTCINT
+if test -n "$ROOTCINT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ROOTCINT" >&5
+$as_echo "$ROOTCINT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+  if test ! x"$ROOTCONF" = "xno" && \
+     test ! x"$ROOTCINT" = "xno" ; then
+
+    # define some variables
+    ROOTLIBDIR=`$ROOTCONF --libdir`
+    ROOTINCDIR=`$ROOTCONF --incdir`
+#    ROOTETCDIR=`$ROOTCONF --etcdir`
+    ROOTCFLAGS=`$ROOTCONF --noauxcflags --cflags`
+    ROOTLIBS=`$ROOTCONF --noauxlibs --noldflags --libs`
+    ROOTGLIBS=`$ROOTCONF --noauxlibs --noldflags --glibs`
+    ROOTAUXCFLAGS=`$ROOTCONF --auxcflags`
+    ROOTAUXLIBS=`$ROOTCONF --auxlibs`
+    ROOTRPATH=$ROOTLIBDIR
+    ROOTVERSION=`$ROOTCONF --version`
+    ROOTSOVERSION=`dirname $ROOTVERSION`
+
+    if test 5.12/00 ; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking wether ROOT version >= 5.12/00" >&5
+$as_echo_n "checking wether ROOT version >= 5.12/00... " >&6; }
+      vers=`$ROOTCONF --version | tr './' ' ' | awk 'BEGIN { FS = " "; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
+      requ=`echo 5.12/00 | tr './' ' ' | awk 'BEGIN { FS = " "; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
+      if test $vers -lt $requ ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	no_root="yes"
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      fi
+    fi
+  else
+    # otherwise, we say no_root
+    no_root="yes"
+  fi
+
+
+
+#  AC_SUBST(ROOTETCDIR)
+
+
+
+
+
+
+
+
+
+  if test "x$no_root" = "x" ; then
+    :
+  else
+    :
+  fi
+
+
+fi
+
+
+HAVE_ROOT_QT=no
+
+if test "$ROOTEXEC" != no ;
+then
+
+   ROOTCPPFLAGS=$ROOTCFLAGS" "$ROOTAUXCFLAGS
+   ROOTLDFLAGS="-L"$ROOTLIBDIR" -lGQt "
+
+
+
+  feat=qt
+  res=`$ROOTCONF --has-$feat`
+  if test "x$res" = "xyes" ; then
+    HAVE_ROOT_QT=yes
+  else
+    :
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether root was built with --with-qt" >&5
+$as_echo_n "checking whether root was built with --with-qt... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res" >&5
+$as_echo "$res" >&6; }
+
+
+
+
+
+fi
 
 ######################################################################
@@ -21967,4 +22205,28 @@
   HAS_QT4_TRUE='#'
   HAS_QT4_FALSE=
+fi
+
+ if test "$ROOTEXEC" != no; then
+  HAS_ROOT_TRUE=
+  HAS_ROOT_FALSE='#'
+else
+  HAS_ROOT_TRUE='#'
+  HAS_ROOT_FALSE=
+fi
+
+ if test "$HAVE_ROOT_QT" = yes; then
+  HAS_ROOT_QT_TRUE=
+  HAS_ROOT_QT_FALSE='#'
+else
+  HAS_ROOT_QT_TRUE='#'
+  HAS_ROOT_QT_FALSE=
+fi
+
+ if test "$QT4_VERSION" -a "$HAVE_ROOT_QT" = yes; then
+  HAS_GUI_TRUE=
+  HAS_GUI_FALSE='#'
+else
+  HAS_GUI_TRUE='#'
+  HAS_GUI_FALSE=
 fi
 
@@ -22254,4 +22516,16 @@
 if test -z "${HAS_QT4_TRUE}" && test -z "${HAS_QT4_FALSE}"; then
   as_fn_error $? "conditional \"HAS_QT4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_ROOT_TRUE}" && test -z "${HAS_ROOT_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_ROOT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_ROOT_QT_TRUE}" && test -z "${HAS_ROOT_QT_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_ROOT_QT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_GUI_TRUE}" && test -z "${HAS_GUI_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_GUI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
@@ -24610,11 +24884,15 @@
 fi
 if test -n "$QT4_VERSION"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}:  GUI support enabled    / QT4 toolkit      found: yes" >&5
-$as_echo "$as_me:  GUI support enabled    / QT4 toolkit      found: yes" >&6;}
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}:  GUI support enabled    / QT4 toolkit      found: no" >&5
-$as_echo "$as_me:  GUI support enabled    / QT4 toolkit      found: no" >&6;}
-
-fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}:  QT4 support enabled    /  QT4 toolkit     found: yes" >&5
+$as_echo "$as_me:  QT4 support enabled    /  QT4 toolkit     found: yes" >&6;}
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}:  QT4 support enabled    /  QT4 toolkit     found: no" >&5
+$as_echo "$as_me:  QT4 support enabled    /  QT4 toolkit     found: no" >&6;}
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}:  ROOT support enabled   /  root >= 5.12/00 found: $ROOTEXEC" >&5
+$as_echo "$as_me:  ROOT support enabled   /  root >= 5.12/00 found: $ROOTEXEC" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}:  ROOT built with --with-qt                 found: $HAVE_ROOT_QT" >&5
+$as_echo "$as_me:  ROOT built with --with-qt                 found: $HAVE_ROOT_QT" >&6;}
 if test -n "$QT4_VERSION"; then
 
@@ -24645,4 +24923,28 @@
 
 fi
+if test -n "$QT4_VERSION"; then
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}: --------------------------------------------------------------------" >&5
+$as_echo "$as_me: --------------------------------------------------------------------" >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}:  ROOTVERSION   = $ROOTVERSION" >&5
+$as_echo "$as_me:  ROOTVERSION   = $ROOTVERSION" >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}:  ROOTEXEC      = $ROOTEXEC" >&5
+$as_echo "$as_me:  ROOTEXEC      = $ROOTEXEC" >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}:  ROOTCONF      = $ROOTCONF" >&5
+$as_echo "$as_me:  ROOTCONF      = $ROOTCONF" >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}:  ROOTCINT      = $ROOTCINT" >&5
+$as_echo "$as_me:  ROOTCINT      = $ROOTCINT" >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}:  ROOTCPPFLAGS  = $ROOTCPPFLAGS" >&5
+$as_echo "$as_me:  ROOTCPPFLAGS  = $ROOTCPPFLAGS" >&6;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}:  ROOTLDFLAGS   = $ROOTLDFLAGS" >&5
+$as_echo "$as_me:  ROOTLDFLAGS   = $ROOTLDFLAGS" >&6;}
+
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
 $as_echo "$as_me: " >&6;}
@@ -24710,8 +25012,25 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
 $as_echo "$as_me: " >&6;}
-
-#[AC_]PACKAGE_NAME
-#[AC_]PACKAGE_TARNAME
-#[AC_]PACKAGE_VERSION
-#[AC_]PACKAGE_STRING
-#[AC_]PACKAGE_BUGREPORT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: --------------------------------------------------------------------" >&5
+$as_echo "$as_me: --------------------------------------------------------------------" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+if test "$ROOTEXEC" != no; then
+  if test "$HAVE_ROOT_QT" = yes; then
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  root found but it was built without the --with-qt option" >&5
+$as_echo "$as_me: WARNING:  root found but it was built without the --with-qt option" >&2;}
+
+fi
+
+fi
+if test "$QT4_VERSION" -a "$HAVE_ROOT_QT" = yes; then
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Either QT4 or qt-root is missing: GUI disabled!" >&5
+$as_echo "$as_me: WARNING:  Either QT4 or qt-root is missing: GUI disabled!" >&2;}
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
