# HG changeset patch # User Gary Kramlich # Date 1116280085 0 # Node ID 993db24dae16e2ca140787c56fd22bff508649fa # Parent 7a82d86ab44a13c71b5653b19f7378d890ffd1e2 [gaim-migrate @ 12696] Added some checks to configure.ac to check if doxygen and dot are available and act accordingly rather than spewing errors. committer: Tailor Script diff -r 7a82d86ab44a -r 993db24dae16 Doxyfile.in --- a/Doxyfile.in Mon May 16 18:24:30 2005 +0000 +++ b/Doxyfile.in Mon May 16 21:48:05 2005 +0000 @@ -969,7 +969,7 @@ # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = YES +HAVE_DOT = @enable_dot@ # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and diff -r 7a82d86ab44a -r 993db24dae16 Makefile.am --- a/Makefile.am Mon May 16 18:24:30 2005 +0000 +++ b/Makefile.am Mon May 16 21:48:05 2005 +0000 @@ -43,4 +43,10 @@ SUBDIRS = doc intl pixmaps plugins po sounds src docs: Doxyfile +if HAVE_DOXYGEN + @echo "Running doxygen..." @doxygen +else + @echo "doxygen was not found during configure. Aborting." + @echo; +endif diff -r 7a82d86ab44a -r 993db24dae16 configure.ac --- a/configure.ac Mon May 16 18:24:30 2005 +0000 +++ b/configure.ac Mon May 16 21:48:05 2005 +0000 @@ -1153,6 +1153,46 @@ AC_CHECK_HEADERS(termios.h) AC_VAR_TIMEZONE_EXTERNALS +dnl ####################################################################### +dnl # Doxygen Stuff +dnl ####################################################################### +AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation with doxygen],,enable_doxygen=yes) +AC_ARG_ENABLE(dot, [ --enable-dot enable graphs in doxygen via 'dot'],,enable_dot=yes) + +if test "x$enable_doxygen" = xyes; then + AC_CHECK_PROG(DOXYGEN, doxygen, true, false) + if test $DOXYGEN = false; then + AC_MSG_WARN([*** doxygen not found, docs will not be available]) + enable_doxygen=no + else + AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen]) + + if test "x$enable_dot" = xyes; then + AC_CHECK_PROG(DOT, dot, true, false) + + if test $DOT = false; then + enable_dot = no; + AC_MSG_WARN([*** dot not found, graphs will not be available]) + else + AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot]) + fi + else + AC_MSG_WARN([*** dot not found, graphs will not be available]) + fi + fi +else + enable_dot="no" +fi + +if test "x$enable_doxygen" = xyes; then + AM_CONDITIONAL(HAVE_DOXYGEN, true) +else + AM_CONDITIONAL(HAVE_DOXYGEN, false) +fi + +AC_SUBST(enable_doxygen) +AC_SUBST(enable_dot) + AC_CONFIG_COMMANDS_PRE([ if test -e VERSION; then cp -p VERSION VERSION.ac-save