Index: trunk/FACT++/Makefile.am
===================================================================
--- trunk/FACT++/Makefile.am	(revision 10692)
+++ trunk/FACT++/Makefile.am	(revision 10693)
@@ -234,5 +234,8 @@
 test_LDADD = libTools.la libStateMachine.la libTime.la libDim.la libDim++.la libConfiguration.la
 
-dataLogger_SOURCES = src/dataLogger.cc src/LocalControl.cc src/LocalControl.h src/Fits.cc
+dataLogger_SOURCES = src/dataLogger.cc src/LocalControl.cc src/LocalControl.h
+if HAS_FITS
+dataLogger_SOURCES += src/Fits.cc
+endif
 dataLogger_LDADD   = libDim.la libDim++.la libTime.la libTools.la libStateMachine.la \
     libConfiguration.la
Index: trunk/FACT++/Makefile.in
===================================================================
--- trunk/FACT++/Makefile.in	(revision 10692)
+++ trunk/FACT++/Makefile.in	(revision 10693)
@@ -60,11 +60,12 @@
 @IS_FALSE@	sched astro fadctrl
 
-@HAS_HELP2MAN_TRUE@am__append_3 = $(dist_man1_MANS)
-@HAS_GROFF_TRUE@am__append_4 = $(dist_man1_MANS:.man=.html)
-@HAS_GROFF_TRUE@am__append_5 = $(dist_man1_MANS:.man=.html) 
+@HAS_FITS_TRUE@am__append_3 = src/Fits.cc
+@HAS_HELP2MAN_TRUE@am__append_4 = $(dist_man1_MANS)
+@HAS_GROFF_TRUE@am__append_5 = $(dist_man1_MANS:.man=.html)
 @HAS_GROFF_TRUE@am__append_6 = $(dist_man1_MANS:.man=.html) 
-@HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@am__append_7 = $(dist_man1_MANS:.man=.pdf)
+@HAS_GROFF_TRUE@am__append_7 = $(dist_man1_MANS:.man=.html) 
 @HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@am__append_8 = $(dist_man1_MANS:.man=.pdf)
 @HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@am__append_9 = $(dist_man1_MANS:.man=.pdf)
+@HAS_GROFF_TRUE@@HAS_PS2PDF_TRUE@am__append_10 = $(dist_man1_MANS:.man=.pdf)
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -170,6 +171,9 @@
 chatserv_DEPENDENCIES = libTools.la libStateMachine.la \
 	libConfiguration.la libTime.la libDim.la libDim++.la
+am__dataLogger_SOURCES_DIST = src/dataLogger.cc src/LocalControl.cc \
+	src/LocalControl.h src/Fits.cc
+@HAS_FITS_TRUE@am__objects_1 = src/Fits.$(OBJEXT)
 am_dataLogger_OBJECTS = src/dataLogger.$(OBJEXT) \
-	src/LocalControl.$(OBJEXT) src/Fits.$(OBJEXT)
+	src/LocalControl.$(OBJEXT) $(am__objects_1)
 dataLogger_OBJECTS = $(am_dataLogger_OBJECTS)
 dataLogger_DEPENDENCIES = libDim.la libDim++.la libTime.la libTools.la \
@@ -195,12 +199,12 @@
 	gui/MainWindow.cc gui/CheckBoxDelegate.cc gui/HtmlDelegate.cc \
 	gui/fact.cc gui/FactGui.cc src/HeadersFTM.cc
-am__objects_1 =
-@HAS_GUI_TRUE@am__objects_2 = gui/design.$(OBJEXT)
-@HAS_GUI_TRUE@am__objects_3 = gui/DockWindow.moc.$(OBJEXT) \
+am__objects_2 =
+@HAS_GUI_TRUE@am__objects_3 = gui/design.$(OBJEXT)
+@HAS_GUI_TRUE@am__objects_4 = gui/DockWindow.moc.$(OBJEXT) \
 @HAS_GUI_TRUE@	gui/MainWindow.moc.$(OBJEXT)
-am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3)
-@HAS_GUI_TRUE@am__objects_5 = gui/DockWindow.$(OBJEXT) \
+am__objects_5 = $(am__objects_2) $(am__objects_3) $(am__objects_4)
+@HAS_GUI_TRUE@am__objects_6 = gui/DockWindow.$(OBJEXT) \
 @HAS_GUI_TRUE@	gui/MainWindow.$(OBJEXT)
-am_fact_OBJECTS = $(am__objects_4) $(am__objects_5) \
+am_fact_OBJECTS = $(am__objects_5) $(am__objects_6) \
 	gui/CheckBoxDelegate.$(OBJEXT) gui/HtmlDelegate.$(OBJEXT) \
 	gui/fact.$(OBJEXT) gui/FactGui.$(OBJEXT) \
@@ -317,10 +321,11 @@
 	$(libTime_la_SOURCES) $(libTools_la_SOURCES) $(argv_SOURCES) \
 	astro.c $(chatclient_SOURCES) $(chatserv_SOURCES) \
-	$(dataLogger_SOURCES) $(dclient5_SOURCES) $(did_SOURCES) \
-	$(dns_SOURCES) $(dserver2_SOURCES) $(am__fact_SOURCES_DIST) \
-	$(fadctrl_SOURCES) fitsgrep.c $(ftm_SOURCES) \
-	$(ftmctrl_SOURCES) $(log_SOURCES) $(logtime_SOURCES) sched.c \
-	$(scheduler_SOURCES) $(test_SOURCES) $(test3_SOURCES) \
-	$(time_SOURCES) $(triggerschedule_SOURCES)
+	$(am__dataLogger_SOURCES_DIST) $(dclient5_SOURCES) \
+	$(did_SOURCES) $(dns_SOURCES) $(dserver2_SOURCES) \
+	$(am__fact_SOURCES_DIST) $(fadctrl_SOURCES) fitsgrep.c \
+	$(ftm_SOURCES) $(ftmctrl_SOURCES) $(log_SOURCES) \
+	$(logtime_SOURCES) sched.c $(scheduler_SOURCES) \
+	$(test_SOURCES) $(test3_SOURCES) $(time_SOURCES) \
+	$(triggerschedule_SOURCES)
 man1dir = $(mandir)/man1
 NROFF = nroff
@@ -601,5 +606,5 @@
 
 #-------------------------------------------------------------------------
-CLEANFILES = $(BUILT_SOURCES) $(am__append_6) $(am__append_9)
+CLEANFILES = $(BUILT_SOURCES) $(am__append_7) $(am__append_10)
 dist_noinst_SCRIPTS = autogen.sh
 EXTRA_DIST = Doxyfile dim/DIM_Performance.pdf dim/LICENSE.GPL \
@@ -608,5 +613,5 @@
 	dim/README_v14.txt dim/README_v17.txt dim/README_v16.txt \
 	dim/README_v17.txt dim/README_v18.txt dim/README_v19.txt \
-	$(DIALOGS) $(RESOURCES) $(am__append_5) $(am__append_8)
+	$(DIALOGS) $(RESOURCES) $(am__append_6) $(am__append_9)
 dns_LDADD = libDim.la
 dns_SOURCES = dim/src/dns.c
@@ -741,5 +746,6 @@
 test_SOURCES = src/test.cc
 test_LDADD = libTools.la libStateMachine.la libTime.la libDim.la libDim++.la libConfiguration.la
-dataLogger_SOURCES = src/dataLogger.cc src/LocalControl.cc src/LocalControl.h src/Fits.cc
+dataLogger_SOURCES = src/dataLogger.cc src/LocalControl.cc \
+	src/LocalControl.h $(am__append_3)
 dataLogger_LDADD = libDim.la libDim++.la libTime.la libTools.la libStateMachine.la \
     libConfiguration.la
@@ -778,5 +784,5 @@
 
 #-------------------------------------------------------------------------
-MAN_TARGETS = $(am__append_3) $(am__append_4) $(am__append_7)
+MAN_TARGETS = $(am__append_4) $(am__append_5) $(am__append_8)
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
Index: trunk/FACT++/configure
===================================================================
--- trunk/FACT++/configure	(revision 10692)
+++ trunk/FACT++/configure	(revision 10693)
@@ -751,4 +751,10 @@
 IS_FALSE_FALSE
 IS_FALSE_TRUE
+HAS_FITS_FALSE
+HAS_FITS_TRUE
+HAS_CCFITS_FALSE
+HAS_CCFITS_TRUE
+HAS_CFITSIO_FALSE
+HAS_CFITSIO_TRUE
 HAS_GUI_FALSE
 HAS_GUI_TRUE
@@ -4450,11 +4456,11 @@
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4452: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4458: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4455: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4461: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4458: output\"" >&5)
+  (eval echo "\"\$as_me:4464: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
@@ -5662,5 +5668,5 @@
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5664 "configure"' > conftest.$ac_ext
+  echo '#line 5670 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7590,9 +7596,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7592: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7598: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7596: \$? = $ac_status" >&5
+   echo "$as_me:7602: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -7929,9 +7935,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7931: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7937: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7935: \$? = $ac_status" >&5
+   echo "$as_me:7941: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -8034,9 +8040,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8036: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8042: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8040: \$? = $ac_status" >&5
+   echo "$as_me:8046: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -8089,9 +8095,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8091: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8097: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8095: \$? = $ac_status" >&5
+   echo "$as_me:8101: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -10473,5 +10479,5 @@
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10475 "configure"
+#line 10481 "configure"
 #include "confdefs.h"
 
@@ -10569,5 +10575,5 @@
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10571 "configure"
+#line 10577 "configure"
 #include "confdefs.h"
 
@@ -12525,9 +12531,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12527: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12533: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12531: \$? = $ac_status" >&5
+   echo "$as_me:12537: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -12624,9 +12630,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12626: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12632: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12630: \$? = $ac_status" >&5
+   echo "$as_me:12636: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -12676,9 +12682,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12678: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12684: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12682: \$? = $ac_status" >&5
+   echo "$as_me:12688: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -18236,5 +18242,5 @@
 
 	if test "$no_good" = yes; then
-		as_fn_error $? "cfitsio not properly installed/not found." "$LINENO" 5
+		HAVE_CFITSIO=no
 
 		LIBS=$OLD_LIBS
@@ -18243,5 +18249,5 @@
 		CFLAGS=$OLD_CFLAGS
 	else
-
+		HAVE_CFITSIO=yes
 
 		$as_echo "#define HAVE_PKG_cfitsio 1" >>confdefs.h
@@ -18357,5 +18363,5 @@
 
 	if test "$no_good" = yes; then
-		as_fn_error $? "CCfits not properly installed/not found." "$LINENO" 5
+		HAVE_CCFITS=no
 
 		LIBS=$OLD_LIBS
@@ -18364,5 +18370,5 @@
 		CFLAGS=$OLD_CFLAGS
 	else
-
+		HAVE_CCFITS=yes
 
 		$as_echo "#define HAVE_PKG_ccfits 1" >>confdefs.h
@@ -21609,5 +21615,5 @@
 
 		cat > conftest.$ac_ext <<EOF
-#line 21611 "configure"
+#line 21617 "configure"
 #include "confdefs.h"
 #include <qglobal.h>
@@ -22287,4 +22293,28 @@
 fi
 
+ if test "$HAVE_CFITSIO" = yes; then
+  HAS_CFITSIO_TRUE=
+  HAS_CFITSIO_FALSE='#'
+else
+  HAS_CFITSIO_TRUE='#'
+  HAS_CFITSIO_FALSE=
+fi
+
+ if test "$HAVE_CCFITS" = yes; then
+  HAS_CCFITS_TRUE=
+  HAS_CCFITS_FALSE='#'
+else
+  HAS_CCFITS_TRUE='#'
+  HAS_CCFITS_FALSE=
+fi
+
+ if test "$HAVE_CFITSIO" = yes -a "$HAVE_CCFITS" = yes; then
+  HAS_FITS_TRUE=
+  HAS_FITS_FALSE='#'
+else
+  HAS_FITS_TRUE='#'
+  HAS_FITS_FALSE=
+fi
+
 
  if test "x" = "y"; then
@@ -22304,4 +22334,9 @@
 fi
 
+
+if test "$HAVE_CFITSIO" = yes -a "$HAVE_CCFITS" = yes; then
+  $as_echo "#define HAVE_FITS 1" >>confdefs.h
+
+fi
 
 ##########################################################################
@@ -22601,4 +22636,16 @@
 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
+if test -z "${HAS_CFITSIO_TRUE}" && test -z "${HAS_CFITSIO_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_CFITSIO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_CCFITS_TRUE}" && test -z "${HAS_CCFITS_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_CCFITS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_FITS_TRUE}" && test -z "${HAS_FITS_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_FITS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
@@ -24991,4 +25038,17 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
 $as_echo "$as_me: " >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}:  cfitsio                / 'fitsio.h'        found: $HAVE_CFITSIO" >&5
+$as_echo "$as_me:  cfitsio                / 'fitsio.h'        found: $HAVE_CFITSIO" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}:  CCfits                 / 'CCfits/CCfits'   found: $HAVE_CCFITS" >&5
+$as_echo "$as_me:  CCfits                 / 'CCfits/CCfits'   found: $HAVE_CCFITS" >&6;}
+if test "$lt_cv_libxp" = "yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}:  Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: yes" >&5
+$as_echo "$as_me:  Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: yes" >&6;}
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}:  Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: no" >&5
+$as_echo "$as_me:  Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: no" >&6;}
+
+fi
+
 if test "$lt_cv_libxp" = "yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}:  Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: yes" >&5
@@ -25145,4 +25205,11 @@
 
 fi
+if test "$HAVE_CFITSIO" = yes -a "$HAVE_CCFITS" = yes; then
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  FITS support disabled. cfitsio/CCfits missing!" >&5
+$as_echo "$as_me: WARNING:  FITS support disabled. cfitsio/CCfits missing!" >&2;}
+
+fi
 if test "$ROOTEXEC" != no; then
   if test "$HAVE_ROOT_QT" = yes; then
Index: trunk/FACT++/configure.ac
===================================================================
--- trunk/FACT++/configure.ac	(revision 10692)
+++ trunk/FACT++/configure.ac	(revision 10693)
@@ -97,6 +97,6 @@
 
 # Needed to compile FACT++
-AC_CHECK_PACKAGE(cfitsio, ffpss, cfitsio, fitsio.h,,
-   AC_MSG_ERROR([cfitsio not properly installed/not found.]))
+AC_CHECK_PACKAGE(cfitsio, ffpss, cfitsio, fitsio.h, 
+		 HAVE_CFITSIO=yes, HAVE_CFITSIO=no)
 
 #AC_CHECK_HEADERS([fitsio.h],,AC_MSG_ERROR([cfitsio headers not found]))
@@ -106,6 +106,6 @@
 
 # Needed to compile FACT++
-AC_CHECK_PACKAGE(ccfits, main, CCfits, CCfits/CCfits,,
-   AC_MSG_ERROR([CCfits not properly installed/not found.]))
+AC_CHECK_PACKAGE(ccfits, main, CCfits, CCfits/CCfits, 
+		 HAVE_CCFITS=yes, HAVE_CCFITS=no)
 
 #AC_CHECK_HEADERS([CCfits/CCfits],,
@@ -269,7 +269,12 @@
 AM_CONDITIONAL(HAS_ROOT_QT,   [test "$HAVE_ROOT_QT" = yes])
 AM_CONDITIONAL(HAS_GUI,       [test "$QT4_VERSION" -a "$HAVE_ROOT_QT" = yes])
+AM_CONDITIONAL(HAS_CFITSIO,   [test "$HAVE_CFITSIO" = yes])
+AM_CONDITIONAL(HAS_CCFITS,    [test "$HAVE_CCFITS" = yes])
+AM_CONDITIONAL(HAS_FITS,      [test "$HAVE_CFITSIO" = yes -a "$HAVE_CCFITS" = yes])
 
 AM_CONDITIONAL(IS_FALSE,      [test "x" = "y"])
 AM_CONDITIONAL(IS_TRUE,       [test "x" = "x"])
+
+AM_COND_IF(HAS_FITS, [AC_DEFINE(HAVE_FITS)], )
 
 ##########################################################################
@@ -319,4 +324,11 @@
 AC_MSG_NOTICE(--------------------------------------------------------------------)
 AC_MSG_NOTICE()
+AC_MSG_NOTICE([ cfitsio                / 'fitsio.h'        found: $HAVE_CFITSIO])
+AC_MSG_NOTICE([ CCfits                 / 'CCfits/CCfits'   found: $HAVE_CCFITS])
+AM_COND_IF(HAS_LIBXP,
+   AC_MSG_NOTICE([ Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: yes]),
+   AC_MSG_NOTICE([ Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: no])
+)
+
 AM_COND_IF(HAS_LIBXP,
    AC_MSG_NOTICE([ Motif/lesstif          / 'Xm/Xm.h' 'libXp' found: yes]),
@@ -396,4 +408,7 @@
       AC_MSG_WARN([ Motif/lesstif not found. The dim gui did will not be built!])
 )
+AM_COND_IF(HAS_FITS,, 
+      AC_MSG_WARN([ FITS support disabled. cfitsio/CCfits missing!])
+)
 AM_COND_IF(HAS_ROOT,  
    [AM_COND_IF(HAS_ROOT_QT,, 
Index: trunk/FACT++/src/dataLogger.cc
===================================================================
--- trunk/FACT++/src/dataLogger.cc	(revision 10692)
+++ trunk/FACT++/src/dataLogger.cc	(revision 10693)
@@ -66,5 +66,4 @@
 #include <sys/stat.h>
 
-#define HAS_FITS
 //#define ONE_RUN_FITS_ONLY
 
@@ -79,5 +78,5 @@
 #include <boost/thread.hpp>
 
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 #include "Fits.h"
 #endif
@@ -177,5 +176,5 @@
 	struct SubscriptionType
 	{ 
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 		///Nightly FITS output file
 		Fits	nightlyFile;
@@ -192,5 +191,5 @@
 		void operator = (const SubscriptionType& other)
 		{
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 			nightlyFile = other.nightlyFile;
 			runFile = other.runFile;
@@ -203,5 +202,5 @@
 		SubscriptionType(const SubscriptionType& other)
 		{
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 			nightlyFile = other.nightlyFile;
 			runFile = other.runFile;
@@ -233,5 +232,5 @@
 				if (dimInfo)
 				delete dimInfo;
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 				if (nightlyFile.IsOpen())
 					nightlyFile.Close();
@@ -277,5 +276,5 @@
 	///from NightlyOpen to waiting transition
 	int NightlyToWaitRunPlease(); 
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 	///Open fits files
 	void OpenFITSFilesPlease(SubscriptionType& sub);
@@ -342,5 +341,5 @@
 void DataLogger::calculateTotalSizeWritten(DataLoggerStats& statVar, bool& shouldWarn, bool isPrinting)
 {
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 	if (isPrinting)
 	{
@@ -473,5 +472,5 @@
 			//update the fits files sizes
 			calculateTotalSizeWritten(statVar, statWarning, false);/*
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 			SubscriptionsListType::iterator x;
 			std::map<std::string, SubscriptionType>::iterator y;
@@ -576,5 +575,5 @@
 		fRunNumber = -1;
 		fPreviousRunNumber = fRunNumber;
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 #ifdef ONE_RUN_FITS_ONLY
 		fRunFitsFile = NULL;
@@ -869,5 +868,5 @@
 	delete fNumSubAndFits;
 //TODO notify that all files were closed
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 #ifdef ONE_RUN_FITS_ONLY
 	if (fRunFitsFile != NULL)
@@ -1127,5 +1126,5 @@
 	}
 
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 	if (isItaReport)
 	{
@@ -1293,5 +1292,5 @@
 	DataLoggerStats statVar;
 	calculateTotalSizeWritten(statVar, statWarning, false);/*
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 	str.str("");
 	str << "There are " << fNumSubAndFitsData.numOpenFits << " FITS files open:";
@@ -1663,5 +1662,5 @@
 }
 
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 // --------------------------------------------------------------------------
 //
@@ -1995,5 +1994,5 @@
 	if (fRunReportFile.is_open())
 		fRunReportFile.close();
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 	for (SubscriptionsListType::iterator i = fServiceSubscriptions.begin(); i != fServiceSubscriptions.end(); i++)
 		for (std::map<std::string, SubscriptionType>::iterator j = i->second.begin(); j != i->second.end(); j++)
@@ -2039,5 +2038,5 @@
 		fRunReportFile.close();
 		
-#ifdef HAS_FITS
+#ifdef HAVE_FITS
 	for (SubscriptionsListType::iterator i = fServiceSubscriptions.begin(); i != fServiceSubscriptions.end(); i++)
 		for (std::map<std::string, SubscriptionType>::iterator j = i->second.begin(); j != i->second.end(); j++)
