Changeset 3249


Ignore:
Timestamp:
Jun 29, 2014 7:19:36 PM (6 years ago)
Author:
stefan
Message:

add back AC_COIN_DOXYGEN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r3247 r3249  
    406406
    407407# initialize automake, don't define PACKAGE or VERSION
     408# TODO should we enable warnings by passing an option like -Wall
    408409AM_INIT_AUTOMAKE([no-define])
    409410
     
    12731274fi
    12741275])
     1276
     1277
     1278###########################################################################
     1279#                           COIN_DOXYGEN                                  #
     1280###########################################################################
     1281#
     1282# This macro determines the configuration information for doxygen, the tool
     1283# used to generate online documentation of COIN code. It takes one parameter,
     1284# a list of projects (mixed-case, to match the directory names) that should
     1285# be processed as external tag files. E.g., COIN_DOXYGEN([Clp Osi]).
     1286#
     1287# This macro will define the following variables:
     1288#  coin_have_doxygen    "yes", if doxygen is found, "no" otherwise
     1289#  coin_doxy_usedot     Defaults to 'YES'; --with-dot will still check to see if dot is available
     1290#  coin_doxy_tagname    Name of doxygen tag file (placed in doxydoc directory)
     1291#  coin_doxy_logname    Name of doxygen log file (placed in doxydoc directory)
     1292#  coin_doxy_tagfiles   List of doxygen tag files used to reference other doxygen documentation
     1293#  coin_doxy_excludes   Directories to exclude from doxygen processing
     1294
     1295AC_DEFUN([AC_COIN_DOXYGEN],
     1296[
     1297AC_MSG_NOTICE([configuring doxygen documentation options])
     1298
     1299# Check to see if doxygen is available.
     1300AC_CHECK_PROG([coin_have_doxygen],[doxygen],[yes],[no])
     1301
     1302# Look for the dot tool from the graphviz package, unless the user has
     1303# disabled it.
     1304AC_ARG_WITH([dot],
     1305  AS_HELP_STRING([--with-dot],[use dot (from graphviz) when creating documentation with doxygen if available; --without-dot to disable]),
     1306  [],[withval=yes])
     1307if test x"$withval" = xno ; then
     1308  coin_doxy_usedot=NO
     1309  AC_MSG_CHECKING([for dot])
     1310  AC_MSG_RESULT([disabled])
     1311else
     1312  AC_CHECK_PROG([coin_doxy_usedot],[dot],[YES],[NO])
     1313fi
     1314
     1315# Generate a tag file name and a log file name
     1316AC_SUBST([coin_doxy_tagname],[doxydoc/${PACKAGE}_doxy.tag])
     1317AC_SUBST([coin_doxy_logname],[doxydoc/${PACKAGE}_doxy.log])
     1318
     1319# Process the list of project names and massage them into possible doxygen
     1320# doc'n directories. Prefer 1) classic external, source processed using
     1321# a project-specific doxygen.conf, we use the tag file; 2) classic
     1322# external, source processed using package doxygen.conf; 3) installed
     1323# doxydoc. Alternatives 1) and 2) are only possible if the directory will be
     1324# configured, which we can't know unless this is the package base configure,
     1325# since coin_subdirs is only set there. Hence it's sufficient to check for
     1326# membership. If we use a tag file from a classic external, exclude the
     1327# source from doxygen processing when doxygen runs in the base directory.
     1328coin_doxy_tagfiles=
     1329coin_doxy_excludes=
     1330m4_foreach_w([proj],[$1],[
     1331  AC_MSG_CHECKING([for doxygen documentation for proj])
     1332  doxytag=m4_tolower(proj)_doxy.tag
     1333  doxyfound=no
     1334  for chkProj in $coin_subdirs ; do
     1335    if test "$chkProj" = proj ; then
     1336      # proj will be configured, hence doxydoc present in build tree
     1337      doxysrcdir="${srcdir}/proj"
     1338      if test -d "$doxysrcdir" ; then
     1339        # with a doxydoc directory?
     1340        doxydir="$doxysrcdir/doxydoc"
     1341        if test -d "$doxydir" ; then
     1342          # use tag file; don't process source
     1343          doxydir="`pwd`/proj/doxydoc"
     1344          coin_doxy_tagfiles="$coin_doxy_tagfiles $doxydir/$doxytag=$doxydir/html"
     1345          AC_MSG_RESULT([$doxydir (tag)])
     1346          coin_doxy_excludes="$coin_doxy_excludes */proj"
     1347        else
     1348          # will process the source -- nothing further to be done here
     1349          AC_MSG_RESULT([$doxysrcdir (src)])
     1350        fi
     1351      doxyfound=yes
     1352      fi
     1353    fi
     1354  done
     1355  # Not built, fall back to installed tag file
     1356  if test $doxyfound = no ; then
     1357    doxydir="${datadir}/coin/doc/proj/doxydoc"
     1358    coin_doxy_tagfiles="$coin_doxy_tagfiles $doxydir/$doxytag=$doxydir/html"
     1359    AC_MSG_RESULT([$doxydir (tag)])
     1360  fi
     1361])
     1362AC_SUBST([coin_doxy_tagfiles])
     1363AC_SUBST([coin_doxy_excludes])
     1364
     1365]) # AC_COIN_DOXYGEN
Note: See TracChangeset for help on using the changeset viewer.