Index: /trunk/FACT++/configure
===================================================================
--- /trunk/FACT++/configure	(revision 10463)
+++ /trunk/FACT++/configure	(revision 10464)
@@ -1022,4 +1022,7 @@
 enable_doxygen_pdf
 with_readline
+with_x
+with_motif_includes
+with_motif_libraries
 with_cfitsio
 with_cfitsio_include
@@ -1028,7 +1031,4 @@
 with_ccfits_include
 with_ccfits_libdir
-with_x
-with_motif_includes
-with_motif_libraries
 with_mysql_include
 with_mysqlpp
@@ -1726,4 +1726,7 @@
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-readline[=dir]   Compile with readline/locate base dir
+  --with-x                use the X Window System
+  --with-motif-includes=DIR    Motif include files are in DIR
+  --with-motif-libraries=DIR   Motif libraries are in DIR
   --with-cfitsio=DIR	root directory of cfitsio installation
   --with-cfitsio-include=DIR        specify exact include dir for cfitsio headers
@@ -1734,7 +1737,4 @@
   --with-ccfits-libdir=DIR        specify exact library dir for ccfits library
   --without-ccfits        disables ccfits usage completely
-  --with-x                use the X Window System
-  --with-motif-includes=DIR    Motif include files are in DIR
-  --with-motif-libraries=DIR   Motif libraries are in DIR
   --with-mysql-include=<path> directory path of MySQL header installation
   --with-mysqlpp=<path>     path containing MySQL++ header and library subdirs
@@ -17092,252 +17092,5 @@
 
 
-# Needed to compile FACT++
-
-
-
-# Check whether --with-cfitsio was given.
-if test "${with_cfitsio+set}" = set; then :
-  withval=$with_cfitsio; with_cfitsio=$withval
-if test "${with_cfitsio}" != yes; then
-	cfitsio_include="$withval/include"
-	cfitsio_libdir="$withval/lib"
-fi
-
-fi
-
-
-
-# Check whether --with-cfitsio-include was given.
-if test "${with_cfitsio_include+set}" = set; then :
-  withval=$with_cfitsio_include; cfitsio_include="$withval"
-fi
-
-
-
-# Check whether --with-cfitsio-libdir was given.
-if test "${with_cfitsio_libdir+set}" = set; then :
-  withval=$with_cfitsio_libdir; cfitsio_libdir="$withval"
-fi
-
-
-if test "${with_cfitsio}" != no ; then
-	OLD_LIBS=$LIBS
-	OLD_LDFLAGS=$LDFLAGS
-	OLD_CFLAGS=$CFLAGS
-	OLD_CPPFLAGS=$CPPFLAGS
-
-	if test "${cfitsio_libdir}" ; then
-		LDFLAGS="$LDFLAGS -L${cfitsio_libdir}"
-	fi
-	if test "${cfitsio_include}" ; then
-		CPPFLAGS="$CPPFLAGS -I${cfitsio_include}"
-		CFLAGS="$CFLAGS -I${cfitsio_include}"
-	fi
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffpss in -lcfitsio" >&5
-$as_echo_n "checking for ffpss in -lcfitsio... " >&6; }
-if test "${ac_cv_lib_cfitsio_ffpss+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcfitsio  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ffpss ();
-int
-main ()
-{
-return ffpss ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_cfitsio_ffpss=yes
-else
-  ac_cv_lib_cfitsio_ffpss=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfitsio_ffpss" >&5
-$as_echo "$ac_cv_lib_cfitsio_ffpss" >&6; }
-if test "x$ac_cv_lib_cfitsio_ffpss" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCFITSIO 1
-_ACEOF
-
-  LIBS="-lcfitsio $LIBS"
-
-else
-  no_good=yes
-fi
-
-	ac_fn_c_check_header_mongrel "$LINENO" "fitsio.h" "ac_cv_header_fitsio_h" "$ac_includes_default"
-if test "x$ac_cv_header_fitsio_h" = x""yes; then :
-
-else
-  no_good=yes
-fi
-
-
-	if test "$no_good" = yes; then
-		as_fn_error $? "cfitsio not properly installed/not found." "$LINENO" 5
-
-		LIBS=$OLD_LIBS
-		LDFLAGS=$OLD_LDFLAGS
-		CPPFLAGS=$OLD_CPPFLAGS
-		CFLAGS=$OLD_CFLAGS
-	else
-
-
-		$as_echo "#define HAVE_PKG_cfitsio 1" >>confdefs.h
-
-	fi
-
-fi
-
-
-
-#AC_CHECK_HEADERS([fitsio.h],,AC_MSG_ERROR([cfitsio headers not found]))
-#AC_CHECK_LIB([cfitsio], main,,AC_MSG_ERROR([cfitsio library not found]))
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-# Needed to compile FACT++
-
-
-
-
-# Check whether --with-ccfits was given.
-if test "${with_ccfits+set}" = set; then :
-  withval=$with_ccfits; with_ccfits=$withval
-if test "${with_ccfits}" != yes; then
-	ccfits_include="$withval/include"
-	ccfits_libdir="$withval/lib"
-fi
-
-fi
-
-
-
-# Check whether --with-ccfits-include was given.
-if test "${with_ccfits_include+set}" = set; then :
-  withval=$with_ccfits_include; ccfits_include="$withval"
-fi
-
-
-
-# Check whether --with-ccfits-libdir was given.
-if test "${with_ccfits_libdir+set}" = set; then :
-  withval=$with_ccfits_libdir; ccfits_libdir="$withval"
-fi
-
-
-if test "${with_ccfits}" != no ; then
-	OLD_LIBS=$LIBS
-	OLD_LDFLAGS=$LDFLAGS
-	OLD_CFLAGS=$CFLAGS
-	OLD_CPPFLAGS=$CPPFLAGS
-
-	if test "${ccfits_libdir}" ; then
-		LDFLAGS="$LDFLAGS -L${ccfits_libdir}"
-	fi
-	if test "${ccfits_include}" ; then
-		CPPFLAGS="$CPPFLAGS -I${ccfits_include}"
-		CFLAGS="$CFLAGS -I${ccfits_include}"
-	fi
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lCCfits" >&5
-$as_echo_n "checking for main in -lCCfits... " >&6; }
-if test "${ac_cv_lib_CCfits_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lCCfits  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_CCfits_main=yes
-else
-  ac_cv_lib_CCfits_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_CCfits_main" >&5
-$as_echo "$ac_cv_lib_CCfits_main" >&6; }
-if test "x$ac_cv_lib_CCfits_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCCFITS 1
-_ACEOF
-
-  LIBS="-lCCfits $LIBS"
-
-else
-  no_good=yes
-fi
-
-	ac_fn_cxx_check_header_mongrel "$LINENO" "CCfits/CCfits" "ac_cv_header_CCfits_CCfits" "$ac_includes_default"
-if test "x$ac_cv_header_CCfits_CCfits" = x""yes; then :
-
-else
-  no_good=yes
-fi
-
-
-	if test "$no_good" = yes; then
-		as_fn_error $? "CCfits not properly installed/not found." "$LINENO" 5
-
-		LIBS=$OLD_LIBS
-		LDFLAGS=$OLD_LDFLAGS
-		CPPFLAGS=$OLD_CPPFLAGS
-		CFLAGS=$OLD_CFLAGS
-	else
-
-
-		$as_echo "#define HAVE_PKG_ccfits 1" >>confdefs.h
-
-	fi
-
-fi
-
-
-
-#AC_CHECK_HEADERS([CCfits/CCfits],,
-#   AC_MSG_ERROR(CCfits headers not found))
-#AC_CHECK_LIB(CCfits, main,,
-#   AC_MSG_ERROR(CCfits library not found))
-
-
-######################################################################
-# Xm.h (lesstif/motif, needed by did)
-######################################################################
-
-# Needed to compile dim
+# Xm.h (lesstif/motif, needed to compile did)
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
 $as_echo_n "checking for X... " >&6; }
@@ -17448,5 +17201,5 @@
 #include <X11/Xlib.h>
 _ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
   # We can compile using X headers with no special include directory.
 ac_x_includes=
@@ -17479,5 +17232,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   LIBS=$ac_save_LIBS
 # We can link X programs with no special library path.
@@ -17552,6 +17305,6 @@
 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
-    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
-    ac_cxx_werror_flag=yes
+    ac_xsave_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -17565,5 +17318,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -17582,5 +17335,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -17595,5 +17348,5 @@
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
+    ac_c_werror_flag=$ac_xsave_c_werror_flag
     LIBS=$ac_xsave_LIBS
   fi
@@ -17628,5 +17381,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
 
 else
@@ -17656,5 +17409,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_dnet_dnet_ntoa=yes
 else
@@ -17697,5 +17450,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_dnet_stub_dnet_ntoa=yes
 else
@@ -17726,5 +17479,5 @@
     # The functions gethostbyname, getservbyname, and inet_addr are
     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
-    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
 if test "x$ac_cv_func_gethostbyname" = x""yes; then :
 
@@ -17757,5 +17510,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_nsl_gethostbyname=yes
 else
@@ -17798,5 +17551,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_bsd_gethostbyname=yes
 else
@@ -17823,5 +17576,5 @@
     # must be given before -lnsl if both are needed.  We assume that
     # if connect needs -lnsl, so does gethostbyname.
-    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
+    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
 if test "x$ac_cv_func_connect" = x""yes; then :
 
@@ -17854,5 +17607,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_socket_connect=yes
 else
@@ -17872,5 +17625,5 @@
 
     # Guillermo Gomez says -lposix is necessary on A/UX.
-    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
+    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
 if test "x$ac_cv_func_remove" = x""yes; then :
 
@@ -17903,5 +17656,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_posix_remove=yes
 else
@@ -17921,5 +17674,5 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
 if test "x$ac_cv_func_shmat" = x""yes; then :
 
@@ -17952,5 +17705,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_ipc_shmat=yes
 else
@@ -18004,5 +17757,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_ICE_IceConnectionNumber=yes
 else
@@ -18057,5 +17810,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   lt_cv_libxp=yes
 else
@@ -18145,5 +17898,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
 
 # Xm/Xm.h is in the standard search path.
@@ -18219,5 +17972,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
 
 # libXm.a is in the standard search path.
@@ -18309,5 +18062,5 @@
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   lt_cv_libxp=yes
 else
@@ -18393,4 +18146,246 @@
 
 fi
+
+# Needed to compile FACT++
+
+
+
+# Check whether --with-cfitsio was given.
+if test "${with_cfitsio+set}" = set; then :
+  withval=$with_cfitsio; with_cfitsio=$withval
+if test "${with_cfitsio}" != yes; then
+	cfitsio_include="$withval/include"
+	cfitsio_libdir="$withval/lib"
+fi
+
+fi
+
+
+
+# Check whether --with-cfitsio-include was given.
+if test "${with_cfitsio_include+set}" = set; then :
+  withval=$with_cfitsio_include; cfitsio_include="$withval"
+fi
+
+
+
+# Check whether --with-cfitsio-libdir was given.
+if test "${with_cfitsio_libdir+set}" = set; then :
+  withval=$with_cfitsio_libdir; cfitsio_libdir="$withval"
+fi
+
+
+if test "${with_cfitsio}" != no ; then
+	OLD_LIBS=$LIBS
+	OLD_LDFLAGS=$LDFLAGS
+	OLD_CFLAGS=$CFLAGS
+	OLD_CPPFLAGS=$CPPFLAGS
+
+	if test "${cfitsio_libdir}" ; then
+		LDFLAGS="$LDFLAGS -L${cfitsio_libdir}"
+	fi
+	if test "${cfitsio_include}" ; then
+		CPPFLAGS="$CPPFLAGS -I${cfitsio_include}"
+		CFLAGS="$CFLAGS -I${cfitsio_include}"
+	fi
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffpss in -lcfitsio" >&5
+$as_echo_n "checking for ffpss in -lcfitsio... " >&6; }
+if test "${ac_cv_lib_cfitsio_ffpss+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcfitsio  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ffpss ();
+int
+main ()
+{
+return ffpss ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_cfitsio_ffpss=yes
+else
+  ac_cv_lib_cfitsio_ffpss=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfitsio_ffpss" >&5
+$as_echo "$ac_cv_lib_cfitsio_ffpss" >&6; }
+if test "x$ac_cv_lib_cfitsio_ffpss" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCFITSIO 1
+_ACEOF
+
+  LIBS="-lcfitsio $LIBS"
+
+else
+  no_good=yes
+fi
+
+	ac_fn_c_check_header_mongrel "$LINENO" "fitsio.h" "ac_cv_header_fitsio_h" "$ac_includes_default"
+if test "x$ac_cv_header_fitsio_h" = x""yes; then :
+
+else
+  no_good=yes
+fi
+
+
+	if test "$no_good" = yes; then
+		as_fn_error $? "cfitsio not properly installed/not found." "$LINENO" 5
+
+		LIBS=$OLD_LIBS
+		LDFLAGS=$OLD_LDFLAGS
+		CPPFLAGS=$OLD_CPPFLAGS
+		CFLAGS=$OLD_CFLAGS
+	else
+
+
+		$as_echo "#define HAVE_PKG_cfitsio 1" >>confdefs.h
+
+	fi
+
+fi
+
+
+
+#AC_CHECK_HEADERS([fitsio.h],,AC_MSG_ERROR([cfitsio headers not found]))
+#AC_CHECK_LIB([cfitsio], main,,AC_MSG_ERROR([cfitsio library not found]))
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+# Needed to compile FACT++
+
+
+
+
+# Check whether --with-ccfits was given.
+if test "${with_ccfits+set}" = set; then :
+  withval=$with_ccfits; with_ccfits=$withval
+if test "${with_ccfits}" != yes; then
+	ccfits_include="$withval/include"
+	ccfits_libdir="$withval/lib"
+fi
+
+fi
+
+
+
+# Check whether --with-ccfits-include was given.
+if test "${with_ccfits_include+set}" = set; then :
+  withval=$with_ccfits_include; ccfits_include="$withval"
+fi
+
+
+
+# Check whether --with-ccfits-libdir was given.
+if test "${with_ccfits_libdir+set}" = set; then :
+  withval=$with_ccfits_libdir; ccfits_libdir="$withval"
+fi
+
+
+if test "${with_ccfits}" != no ; then
+	OLD_LIBS=$LIBS
+	OLD_LDFLAGS=$LDFLAGS
+	OLD_CFLAGS=$CFLAGS
+	OLD_CPPFLAGS=$CPPFLAGS
+
+	if test "${ccfits_libdir}" ; then
+		LDFLAGS="$LDFLAGS -L${ccfits_libdir}"
+	fi
+	if test "${ccfits_include}" ; then
+		CPPFLAGS="$CPPFLAGS -I${ccfits_include}"
+		CFLAGS="$CFLAGS -I${ccfits_include}"
+	fi
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lCCfits" >&5
+$as_echo_n "checking for main in -lCCfits... " >&6; }
+if test "${ac_cv_lib_CCfits_main+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lCCfits  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_CCfits_main=yes
+else
+  ac_cv_lib_CCfits_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_CCfits_main" >&5
+$as_echo "$ac_cv_lib_CCfits_main" >&6; }
+if test "x$ac_cv_lib_CCfits_main" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCCFITS 1
+_ACEOF
+
+  LIBS="-lCCfits $LIBS"
+
+else
+  no_good=yes
+fi
+
+	ac_fn_cxx_check_header_mongrel "$LINENO" "CCfits/CCfits" "ac_cv_header_CCfits_CCfits" "$ac_includes_default"
+if test "x$ac_cv_header_CCfits_CCfits" = x""yes; then :
+
+else
+  no_good=yes
+fi
+
+
+	if test "$no_good" = yes; then
+		as_fn_error $? "CCfits not properly installed/not found." "$LINENO" 5
+
+		LIBS=$OLD_LIBS
+		LDFLAGS=$OLD_LDFLAGS
+		CPPFLAGS=$OLD_CPPFLAGS
+		CFLAGS=$OLD_CFLAGS
+	else
+
+
+		$as_echo "#define HAVE_PKG_ccfits 1" >>confdefs.h
+
+	fi
+
+fi
+
+
+
+#AC_CHECK_HEADERS([CCfits/CCfits],,
+#   AC_MSG_ERROR(CCfits headers not found))
+#AC_CHECK_LIB(CCfits, main,,
+#   AC_MSG_ERROR(CCfits library not found))
 
 ######################################################################
@@ -21612,5 +21607,5 @@
 
 		cat > conftest.$ac_ext <<EOF
-#line 21614 "configure"
+#line 21609 "configure"
 #include "confdefs.h"
 #include <qglobal.h>
@@ -25056,8 +25051,8 @@
 
 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;}
+{ $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;}
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
 $as_echo "$as_me: " >&6;}
