Index: /trunk/FACT++/configure.ac
===================================================================
--- /trunk/FACT++/configure.ac	(revision 10332)
+++ /trunk/FACT++/configure.ac	(revision 10333)
@@ -1,3 +1,5 @@
-# autoreconf --force --install
+######################################################################
+# Autoconf initial setup
+######################################################################
 
 AC_INIT([FACT++],[1.0],[thomas.bretz@epfl.ch],[FACTpp],[http://hello.example.com/])
@@ -14,6 +16,7 @@
 #AC_PATH_XTRA
 
-
-
+######################################################################
+# Automake initial setup
+######################################################################
 
 AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects std-options no-define color-tests parallel-tests silent-rules])
@@ -28,5 +31,5 @@
 DX_ENV_APPEND(EXTRACT_ALL, YES)
 DX_ENV_APPEND(RECURSIVE,   YES)
-DX_ENV_APPEND(ALL_GRAPHS,  NO)  # change to yet to switch on call(er) graphs
+DX_ENV_APPEND(ALL_GRAPHS,  NO)  # change to yes to switch on call(er) graphs
 
 #DX_DOXYGEN_FEATURE(ON)
@@ -50,5 +53,5 @@
 AC_LANG_PUSH(C)
 
-
+# Needed to compile dim
 ACX_PTHREAD
 
@@ -57,4 +60,5 @@
 
 
+# Needed to compile FACT++
 AC_CHECK_READLINE
 
@@ -76,23 +80,36 @@
 #
 
-AC_CHECK_HEADERS(panel.h, [], 
-   [
-      echo "Error! Ncurses panel.h not properly installed in default include paths." 
-      exit -1
-   ]
-)
-AC_CHECK_LIB(panel, update_panels, [], 
-   [
-      echo "Error! Ncurses libpanel not properly installed in the default libarary paths." 
-      exit -1
-   ]
-)
+# Needed to compile FACT++
+AC_CHECK_HEADERS([panel.h],, 
+   AC_MSG_ERROR([ncurses header not found]))
+   
+# Needed to compile FACT++
+AC_CHECK_LIB(panel, update_panels,, 
+   AC_MSG_ERROR([ncurses panel library not found]))
+
+# Needed to compile FACT++
+AC_CHECK_PACKAGE(cfitsio, ffpss, cfitsio, fitsio.h,,
+   AC_MSG_ERROR([cfitsio not properly installed/not found.]))
+
+#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_LANG_POP
 
+# Needed to compile FACT++
+AC_CHECK_PACKAGE(ccfits, main, CCfits, CCfits/CCfits,,
+   AC_MSG_ERROR([CCfits not properly installed/not found.]))
+
+#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
 AC_FIND_MOTIF
 
@@ -111,4 +128,5 @@
 ######################################################################
 
+# Needed to compile FACT++
 MYSQL_DEVEL
 MYSQLPP_DEVEL
@@ -120,4 +138,5 @@
 ######################################################################
 
+# Needed to compile FACT++
 AX_BOOST_BASE([1.40], [],
    [
@@ -134,12 +153,12 @@
 AX_BOOST_SYSTEM
 AX_BOOST_THREAD
-#ax_boost_iostreams
-#ax_boost_python
-#ax_boost_serialization
-#ax_boost_signals
-#ax_boost_test_exec_monitor
-#ax_boost_unit_test_framework
-#ax_boost_wave
-#ax_boost_wserialization
+#AX_BOOST_IOSTREAMS
+#AX_BOOST_PYTHON
+#AX_BOOST_SERIALIZATION
+#AX_BOOST_SIGNALS
+#AX_BOOST_TEST_EXEC_MONITOR
+#AX_BOOST_UNIT_TEST_FRAMEWORK
+#AX_BOOST_WAVE
+#AX_BOOST_WSERIALIZATION
 
 LDFLAGS+=" -lboost_date_time"
@@ -198,11 +217,9 @@
 ######################################################################
 
-AC_CHECK_PROG(COLORDIFF, colordiff, colordiff, cat)
-
-###########################################################################
-
-#AC_C_CONST
-#AC_TYPE_PID_T
-#AC_HEADER_STDC
+# Nice to have to support colored diff
+AC_CHECK_PROG(COLORDIFF, colordiff,    colordiff, cat)
+AC_CHECK_PROG(GROFF,     groff,        yes, no)
+AC_CHECK_PROG(PS2PDF,    ps2pdf,       yes, no)
+AC_CHECK_PROG(HELP2MAN,  help2man,     yes, no)
 
 ##########################################################################
@@ -226,10 +243,81 @@
 #fi
 #
-###########################################################################
-#To get the changed compiler flags distributed among your final Makefiles you have to add the following line somewhere afterwards:
-#
-#AC_SUBST([AM_CXXFLAGS])
-
-
+
+##########################################################################
+# produce conditionals for Makefile.am and for summary
+##########################################################################
+
+AM_CONDITIONAL(HAS_COLORDIFF, [test "$COLORDIFF" = colordiff])
+AM_CONDITIONAL(HAS_GROFF,     [test "$GROFF" = yes])
+AM_CONDITIONAL(HAS_PS2PDF,    [test "$PS2PDF" = yes])
+AM_CONDITIONAL(HAS_HELP2MAN,  [test "$HELP2MAN" = yes])
+AM_CONDITIONAL(HAS_DOXYGEN,   [test -n "$DX_DOXYGEN"])
+AM_CONDITIONAL(HAS_DOT,       [test -n "$DX_DOT"])
+AM_CONDITIONAL(HAS_COLORGCC,  [test "$GCC" = colorgcc])
+
+##########################################################################
+# print summary
+##########################################################################
 
 AC_OUTPUT
+
+AC_MSG_NOTICE()
+AC_MSG_NOTICE(============================== summary =============================)
+AC_MSG_NOTICE()
+
+AM_COND_IF(HAS_COLORDIFF,
+   AC_MSG_NOTICE([ colored svn diff       / 'colordiff'      found: yes]),
+   AC_MSG_NOTICE([ colored svn diff       / 'colordiff'      found: no])
+)
+AM_COND_IF(HAS_HELP2MAN,[
+   AC_MSG_NOTICE([ man-pages enabled      / 'help2man'       found: $HELP2MAN])
+   AM_COND_IF(HAS_GROFF,
+      AC_MSG_NOTICE([ build of html enabled  / 'groff'          found: yes])
+      AC_MSG_NOTICE([ build of pdf  enabled  / 'ps2pdf'         found: $PS2PDF]),
+      AC_MSG_NOTICE([ build of html and pdf  / 'groff'          found: no])
+   )
+],[
+   AC_MSG_NOTICE([ man, html, pdf enabled / 'help2man'       found: no])
+])   
+
+AM_COND_IF(HAS_DOXYGEN,
+   AC_MSG_NOTICE([ doxygen docu enabled   / 'doxygen'        found: $DX_DOXYGEN]),
+   AC_MSG_NOTICE([ doxygen docu enabled   / 'doxygen'        found: no])
+)
+AM_COND_IF(HAS_DOT,
+   AC_MSG_NOTICE([ doxygen graphs enabled / 'dot' (graphviz) found: $DX_DOT]),
+   AC_MSG_NOTICE([ doxagen graphs enabled / 'dot' (graphviz) found: no])
+)
+AC_MSG_NOTICE()
+AC_MSG_NOTICE(--------------------------------------------------------------------)
+AC_MSG_NOTICE()
+AC_MSG_NOTICE([Suggestions and hits:])
+AC_MSG_NOTICE()
+AC_MSG_NOTICE([  - Add 'V=1' to you make-call to switch on verbose output.])
+AC_MSG_NOTICE([  - Do not try to create man-pages with doxygen,])
+AC_MSG_NOTICE([    it does most probably not work.])
+AM_COND_IF(HAS_COLORGCC,,
+   AC_MSG_NOTICE([  - Install colorgcc to get colored compiler output.])
+)
+AC_MSG_NOTICE()
+AC_MSG_NOTICE(--------------------------------------------------------------------)
+AC_MSG_NOTICE()
+AC_MSG_NOTICE([Some interesting build targets:])
+AC_MSG_NOTICE()
+AC_MSG_NOTICE([ diff:          colored 'svn diff' if colordiff is installed])
+AM_COND_IF(HAS_HELP2MAN,[
+   AC_MSG_NOTICE([ program.man:   build man-page from 'program --help'])
+   AC_MSG_NOTICE([                (display with 'man ./program.man')])
+   AM_COND_IF(HAS_GROFF,[
+      AC_MSG_NOTICE([ program.html:  build html page from man-page])
+      AM_COND_IF(HAS_PS2PDF,
+         AC_MSG_NOTICE([ program.pdf:   build pdf documentation from man page])
+      )
+   ])
+])
+AM_COND_IF(HAS_DOXYGEN,
+   AC_MSG_NOTICE([ doxygen-run:   build html documentation with doxygen])
+   AC_MSG_NOTICE([ doxygen-doc:   build html and pdf documentation with doxygen])
+)
+AC_MSG_NOTICE([ man:           build all buildable documentation])
+AC_MSG_NOTICE()
