Changeset 10333 for trunk


Ignore:
Timestamp:
04/10/11 09:58:15 (14 years ago)
Author:
tbretz
Message:
Added support for cfitsio, CCfitsio and several kind of help pages; some small simplifications; added a summary output at the end.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/configure.ac

    r10254 r10333  
    1 # autoreconf --force --install
     1######################################################################
     2# Autoconf initial setup
     3######################################################################
    24
    35AC_INIT([FACT++],[1.0],[thomas.bretz@epfl.ch],[FACTpp],[http://hello.example.com/])
     
    1416#AC_PATH_XTRA
    1517
    16 
    17 
     18######################################################################
     19# Automake initial setup
     20######################################################################
    1821
    1922AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects std-options no-define color-tests parallel-tests silent-rules])
     
    2831DX_ENV_APPEND(EXTRACT_ALL, YES)
    2932DX_ENV_APPEND(RECURSIVE,   YES)
    30 DX_ENV_APPEND(ALL_GRAPHS,  NO)  # change to yet to switch on call(er) graphs
     33DX_ENV_APPEND(ALL_GRAPHS,  NO)  # change to yes to switch on call(er) graphs
    3134
    3235#DX_DOXYGEN_FEATURE(ON)
     
    5053AC_LANG_PUSH(C)
    5154
    52 
     55# Needed to compile dim
    5356ACX_PTHREAD
    5457
     
    5760
    5861
     62# Needed to compile FACT++
    5963AC_CHECK_READLINE
    6064
     
    7680#
    7781
    78 AC_CHECK_HEADERS(panel.h, [],
    79    [
    80       echo "Error! Ncurses panel.h not properly installed in default include paths."
    81       exit -1
    82    ]
    83 )
    84 AC_CHECK_LIB(panel, update_panels, [],
    85    [
    86       echo "Error! Ncurses libpanel not properly installed in the default libarary paths."
    87       exit -1
    88    ]
    89 )
     82# Needed to compile FACT++
     83AC_CHECK_HEADERS([panel.h],,
     84   AC_MSG_ERROR([ncurses header not found]))
     85   
     86# Needed to compile FACT++
     87AC_CHECK_LIB(panel, update_panels,,
     88   AC_MSG_ERROR([ncurses panel library not found]))
     89
     90# Needed to compile FACT++
     91AC_CHECK_PACKAGE(cfitsio, ffpss, cfitsio, fitsio.h,,
     92   AC_MSG_ERROR([cfitsio not properly installed/not found.]))
     93
     94#AC_CHECK_HEADERS([fitsio.h],,AC_MSG_ERROR([cfitsio headers not found]))
     95#AC_CHECK_LIB([cfitsio], main,,AC_MSG_ERROR([cfitsio library not found]))
    9096
    9197AC_LANG_POP
    9298
     99# Needed to compile FACT++
     100AC_CHECK_PACKAGE(ccfits, main, CCfits, CCfits/CCfits,,
     101   AC_MSG_ERROR([CCfits not properly installed/not found.]))
     102
     103#AC_CHECK_HEADERS([CCfits/CCfits],,
     104#   AC_MSG_ERROR(CCfits headers not found))
     105#AC_CHECK_LIB(CCfits, main,,
     106#   AC_MSG_ERROR(CCfits library not found))
     107
     108
    93109######################################################################
    94110# Xm.h (lesstif/motif, needed by did)
    95111######################################################################
    96112
     113# Needed to compile dim
    97114AC_FIND_MOTIF
    98115
     
    111128######################################################################
    112129
     130# Needed to compile FACT++
    113131MYSQL_DEVEL
    114132MYSQLPP_DEVEL
     
    120138######################################################################
    121139
     140# Needed to compile FACT++
    122141AX_BOOST_BASE([1.40], [],
    123142   [
     
    134153AX_BOOST_SYSTEM
    135154AX_BOOST_THREAD
    136 #ax_boost_iostreams
    137 #ax_boost_python
    138 #ax_boost_serialization
    139 #ax_boost_signals
    140 #ax_boost_test_exec_monitor
    141 #ax_boost_unit_test_framework
    142 #ax_boost_wave
    143 #ax_boost_wserialization
     155#AX_BOOST_IOSTREAMS
     156#AX_BOOST_PYTHON
     157#AX_BOOST_SERIALIZATION
     158#AX_BOOST_SIGNALS
     159#AX_BOOST_TEST_EXEC_MONITOR
     160#AX_BOOST_UNIT_TEST_FRAMEWORK
     161#AX_BOOST_WAVE
     162#AX_BOOST_WSERIALIZATION
    144163
    145164LDFLAGS+=" -lboost_date_time"
     
    198217######################################################################
    199218
    200 AC_CHECK_PROG(COLORDIFF, colordiff, colordiff, cat)
    201 
    202 ###########################################################################
    203 
    204 #AC_C_CONST
    205 #AC_TYPE_PID_T
    206 #AC_HEADER_STDC
     219# Nice to have to support colored diff
     220AC_CHECK_PROG(COLORDIFF, colordiff,    colordiff, cat)
     221AC_CHECK_PROG(GROFF,     groff,        yes, no)
     222AC_CHECK_PROG(PS2PDF,    ps2pdf,       yes, no)
     223AC_CHECK_PROG(HELP2MAN,  help2man,     yes, no)
    207224
    208225##########################################################################
     
    226243#fi
    227244#
    228 ###########################################################################
    229 #To get the changed compiler flags distributed among your final Makefiles you have to add the following line somewhere afterwards:
    230 #
    231 #AC_SUBST([AM_CXXFLAGS])
    232 
    233 
     245
     246##########################################################################
     247# produce conditionals for Makefile.am and for summary
     248##########################################################################
     249
     250AM_CONDITIONAL(HAS_COLORDIFF, [test "$COLORDIFF" = colordiff])
     251AM_CONDITIONAL(HAS_GROFF,     [test "$GROFF" = yes])
     252AM_CONDITIONAL(HAS_PS2PDF,    [test "$PS2PDF" = yes])
     253AM_CONDITIONAL(HAS_HELP2MAN,  [test "$HELP2MAN" = yes])
     254AM_CONDITIONAL(HAS_DOXYGEN,   [test -n "$DX_DOXYGEN"])
     255AM_CONDITIONAL(HAS_DOT,       [test -n "$DX_DOT"])
     256AM_CONDITIONAL(HAS_COLORGCC,  [test "$GCC" = colorgcc])
     257
     258##########################################################################
     259# print summary
     260##########################################################################
    234261
    235262AC_OUTPUT
     263
     264AC_MSG_NOTICE()
     265AC_MSG_NOTICE(============================== summary =============================)
     266AC_MSG_NOTICE()
     267
     268AM_COND_IF(HAS_COLORDIFF,
     269   AC_MSG_NOTICE([ colored svn diff       / 'colordiff'      found: yes]),
     270   AC_MSG_NOTICE([ colored svn diff       / 'colordiff'      found: no])
     271)
     272AM_COND_IF(HAS_HELP2MAN,[
     273   AC_MSG_NOTICE([ man-pages enabled      / 'help2man'       found: $HELP2MAN])
     274   AM_COND_IF(HAS_GROFF,
     275      AC_MSG_NOTICE([ build of html enabled  / 'groff'          found: yes])
     276      AC_MSG_NOTICE([ build of pdf  enabled  / 'ps2pdf'         found: $PS2PDF]),
     277      AC_MSG_NOTICE([ build of html and pdf  / 'groff'          found: no])
     278   )
     279],[
     280   AC_MSG_NOTICE([ man, html, pdf enabled / 'help2man'       found: no])
     281])   
     282
     283AM_COND_IF(HAS_DOXYGEN,
     284   AC_MSG_NOTICE([ doxygen docu enabled   / 'doxygen'        found: $DX_DOXYGEN]),
     285   AC_MSG_NOTICE([ doxygen docu enabled   / 'doxygen'        found: no])
     286)
     287AM_COND_IF(HAS_DOT,
     288   AC_MSG_NOTICE([ doxygen graphs enabled / 'dot' (graphviz) found: $DX_DOT]),
     289   AC_MSG_NOTICE([ doxagen graphs enabled / 'dot' (graphviz) found: no])
     290)
     291AC_MSG_NOTICE()
     292AC_MSG_NOTICE(--------------------------------------------------------------------)
     293AC_MSG_NOTICE()
     294AC_MSG_NOTICE([Suggestions and hits:])
     295AC_MSG_NOTICE()
     296AC_MSG_NOTICE([  - Add 'V=1' to you make-call to switch on verbose output.])
     297AC_MSG_NOTICE([  - Do not try to create man-pages with doxygen,])
     298AC_MSG_NOTICE([    it does most probably not work.])
     299AM_COND_IF(HAS_COLORGCC,,
     300   AC_MSG_NOTICE([  - Install colorgcc to get colored compiler output.])
     301)
     302AC_MSG_NOTICE()
     303AC_MSG_NOTICE(--------------------------------------------------------------------)
     304AC_MSG_NOTICE()
     305AC_MSG_NOTICE([Some interesting build targets:])
     306AC_MSG_NOTICE()
     307AC_MSG_NOTICE([ diff:          colored 'svn diff' if colordiff is installed])
     308AM_COND_IF(HAS_HELP2MAN,[
     309   AC_MSG_NOTICE([ program.man:   build man-page from 'program --help'])
     310   AC_MSG_NOTICE([                (display with 'man ./program.man')])
     311   AM_COND_IF(HAS_GROFF,[
     312      AC_MSG_NOTICE([ program.html:  build html page from man-page])
     313      AM_COND_IF(HAS_PS2PDF,
     314         AC_MSG_NOTICE([ program.pdf:   build pdf documentation from man page])
     315      )
     316   ])
     317])
     318AM_COND_IF(HAS_DOXYGEN,
     319   AC_MSG_NOTICE([ doxygen-run:   build html documentation with doxygen])
     320   AC_MSG_NOTICE([ doxygen-doc:   build html and pdf documentation with doxygen])
     321)
     322AC_MSG_NOTICE([ man:           build all buildable documentation])
     323AC_MSG_NOTICE()
Note: See TracChangeset for help on using the changeset viewer.