Imported Upstream version 3.0
[debian/gnuradio] / config / gr_doxygen.m4
1 dnl
2 dnl Copyright 2003,2005 Free Software Foundation, Inc.
3 dnl 
4 dnl This file is part of GNU Radio
5 dnl 
6 dnl GNU Radio is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2, or (at your option)
9 dnl any later version.
10 dnl 
11 dnl GNU Radio is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 dnl GNU General Public License for more details.
15 dnl 
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with GNU Radio; see the file COPYING.  If not, write to
18 dnl the Free Software Foundation, Inc., 51 Franklin Street,
19 dnl Boston, MA 02110-1301, USA.
20 dnl 
21
22 AC_DEFUN([GR_CHECK_DOXYGEN],[
23   AC_ARG_ENABLE(doxygen, [  --enable-doxygen        enable documentation generation with doxygen (no)])
24   AC_ARG_ENABLE(dot, [  --enable-dot            use 'dot' to generate graphs in doxygen (auto)])
25   AC_ARG_ENABLE(html-docs, [  --enable-html-docs      enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
26   AC_ARG_ENABLE(latex-docs, [  --enable-latex-docs     enable LaTeX doc generation with doxygen (no)], [], [ enable_latex_docs=no])
27
28   if test "x$enable_doxygen" = xyes; then
29         AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
30         if test x$DOXYGEN = x; then
31                 if test "x$enable_doxygen" = xyes; then
32                         AC_MSG_ERROR([could not find doxygen])
33                 fi
34                 enable_doc=no
35                 generate_docs=
36         else
37                 enable_doc=yes
38                 generate_docs=docs
39                 AC_PATH_PROG(DOT, dot, , $PATH)
40         fi
41   else 
42         enable_doc=no
43   fi
44
45   AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
46
47   if test x$DOT = x; then
48         if test "x$enable_dot" = xyes; then
49                 AC_MSG_ERROR([could not find dot])
50         fi
51         enable_dot=no
52   else
53         enable_dot=yes
54   fi
55   AC_SUBST(enable_dot)
56   AC_SUBST(enable_html_docs)
57   AC_SUBST(enable_latex_docs)
58   AC_SUBST(generate_docs)
59 ])