Changeset 1987


Ignore:
Timestamp:
Jun 12, 2009, 2:52:33 AM (13 years ago)
Author:
Peter
Message:

refs #548. Turn on generation of docs of different depending on which tools are found during configure. If doxygen 1.5.8 is detected only html is enabled.

Location:
branches/0.5-stable
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/0.5-stable/configure.ac

    r1986 r1987  
    8080[checking whether tools for generating documentation are available])
    8181
    82 have_dox_tools="yes"
     82have_doxygen=no
     83dx_enable_latex=no
     84dx_enable_dvi=no
     85dx_enable_ps=no
     86dx_enable_pdf=no
    8387AC_PATH_PROG([DOXYGEN], [doxygen], [no])
    8488if test "$DOXYGEN" = "no"; then
    8589   AC_MSG_WARN([unable to find doxygen application])
    86    have_dox_tools=no
    8790else
    8891   doxygen_min_version=1.5
    8992   AC_MSG_CHECKING([if doxygen is at least $doxygen_min_version])
    9093   doxygen_version=`$DOXYGEN --version`
    91    AX_COMPARE_VERSION([$doxygen_version], [ge], [$doxygen_min_version], ,
    92                       [have_dox_tools=no])
     94   AX_COMPARE_VERSION([$doxygen_version], [ge], [$doxygen_min_version],
     95                      [have_doxygen=yes])
    9396   AC_MSG_RESULT([$doxygen_version])
    94 fi
    95 AC_CHECK_PROG([have_epstopdf], [epstopdf], [yes], [no])
    96 if test "$have_epstopdf" != "yes"; then
    97    AC_MSG_WARN([unable to find epstopdf application])
    98    have_dox_tools=no
    99 fi
    100 AC_CHECK_PROG([have_latex], [latex], [yes], [no])
    101 if test "$have_latex" != "yes"; then
    102    AC_MSG_WARN([unable to find latex application])
    103 fi
    104 AC_CHECK_PROG([have_makeindex], [makeindex], [yes], [no])
    105 if test "$have_makeindex" != "yes"; then
    106    AC_MSG_WARN([unable to find makeindex application])
    107    have_dox_tools=no
    108 fi
    109 AC_CHECK_PROG([have_pdflatex], [pdflatex], [yes], [no])
    110 if test "$have_pdflatex" != "yes"; then
    111    AC_MSG_WARN([unable to find pdflatex application])
    112    have_dox_tools=no
    113 fi
    114 
    115 AC_SUBST(have_dox_tools)
    116 AM_CONDITIONAL([DX_ENABLE_HTML], [test "$have_dox_tools" = "yes"])
    117 AM_CONDITIONAL([DX_ENABLE_LATEX], [test "$have_dox_tools" = "yes"])
    118 AM_CONDITIONAL([DX_ENABLE_DVI], [test "$have_dox_tools" = "yes"])
    119 AM_CONDITIONAL([DX_ENABLE_PS], [test "$have_dox_tools" = "yes"])
    120 AM_CONDITIONAL([DX_ENABLE_PDF], [test "$have_dox_tools" = "yes"])
     97   dx_enable_latex=yes
     98   # doxygen 1.5.8 has a bug for latex output and enums
     99   AS_IF([test $have_doxygen = yes],
     100         [AX_COMPARE_VERSION([$doxygen_version], [eq], [1.5.8],
     101                             [dx_enable_latex=no])])
     102fi
     103
     104# we need latex output to generate dvi, ps, and pdf
     105AS_IF([test $dx_enable_latex = yes],
     106  [dx_enable_pdf=yes
     107   ACLTX_PROG_PDFLATEX([dx_enable_pdf=no])
     108   ACLTX_PROG_MAKEINDEX([dx_enable_pdf=no])
     109   dx_enable_dvi=yes
     110   ACLTX_PROG_LATEX([dx_enable_dvi=no])
     111   # ps needs dvi
     112   dx_enable_ps=$dx_enable_dvi
     113   ACLTX_PROG_DVIPS([dx_enable_ps=no])
     114  ]
     115)
     116
     117AC_SUBST(have_doxygen)
     118AM_CONDITIONAL([DX_ENABLE_HTML], [test x$have_doxygen = xyes])
     119AM_CONDITIONAL([DX_ENABLE_LATEX], [test x$dx_enable_latex = xyes])
     120AM_CONDITIONAL([DX_ENABLE_DVI], [test x$dx_enable_dvi = xyes])
     121AM_CONDITIONAL([DX_ENABLE_PS], [test x$dx_enable_ps = xyes])
     122AM_CONDITIONAL([DX_ENABLE_PDF], [test x$dx_enable_pdf = xyes])
    121123AC_CONFIG_FILES([test/documentation_test.sh],
    122124                [chmod +x test/documentation_test.sh])
     
    316318AC_CONFIG_HEADER([yat/utility/config_public.h])
    317319
    318 # warning about missing doxygen
    319 if (test "$have_dox_tools" != "yes") ; then
    320   AC_MSG_WARN([
    321   Some pre-requisites for generating documentation were not
    322   fulfilled. The build will not create any documentation.
    323   Please consult the 'README' file for more information about
    324   what is needed to generate documentation and refer to above
    325   warning messages.
    326   ])
    327 fi
    328 
    329320# Print failure status information about selected items, and exit if
    330321# fatal errors were encountered. No output will be created if
     
    416407AC_MSG_NOTICE([])
    417408AC_MSG_NOTICE([ Ready to compile the yat library])
     409AS_IF([test x$have_doxygen = xyes],
     410  [AC_MSG_NOTICE([ Documentation will be generated in the following formats:])
     411   AC_MSG_NOTICE([   html])
     412   AS_IF([test x$dx_enable_pdf = xyes], [AC_MSG_NOTICE([   pdf])])
     413   AS_IF([test x$dx_enable_ps = xyes],  [AC_MSG_NOTICE([   ps])])
     414   AS_IF([test x$dx_enable_dvi = xyes], [AC_MSG_NOTICE([   dvi])])
     415  ],
     416  [AC_MSG_NOTICE([Generation of documentation is disabled])
     417   AC_MSG_NOTICE([doxygen could not be found])
     418  ])
     419AC_MSG_NOTICE()
    418420AC_MSG_NOTICE([ The following flags and libraries will be used:])
    419421AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
  • branches/0.5-stable/doc/Makefile.am

    r1986 r1987  
    8181
    8282$(PACKAGE).dvi: $(DX_LATEX_OUTPUT)/refman.tex
    83   cd $(DX_LATEX_OUTPUT) && latex refman.tex && latex refman.tex
     83  cd $(DX_LATEX_OUTPUT) && $(latex) refman.tex && $(latex) refman.tex
    8484  cp $(DX_LATEX_OUTPUT)/refman.dvi $(PACKAGE).dvi
    8585
    8686$(PACKAGE).ps: $(PACKAGE).dvi
    87   cd $(DX_LATEX_OUTPUT) && dvips -q -o refman.ps refman.dvi;
     87  cd $(DX_LATEX_OUTPUT) && $(dvips) -q -o refman.ps refman.dvi;
    8888  cp $(DX_LATEX_OUTPUT)/refman.ps $(PACKAGE).ps
    8989
  • branches/0.5-stable/test/documentation_test.sh.in

    r1959 r1987  
    2323#
    2424
    25 have_dox_tools="@have_dox_tools@"
     25have_doxygen="@have_doxygen@"
    2626verbose=""
    2727while test $# -gt 0; do
     
    3434done
    3535
    36 if test $have_dox_tools = "no"; then
     36if test $have_doxygen = "no"; then
    3737    if (test $verbose); then
    3838        echo Skipped;
Note: See TracChangeset for help on using the changeset viewer.