changeset 10925:993db24dae16

[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 <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Mon, 16 May 2005 21:48:05 +0000
parents 7a82d86ab44a
children 79f0562b8442
files Doxyfile.in Makefile.am configure.ac
diffstat 3 files changed, 47 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 
--- 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
--- 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