Salome HOME
367d672ca4662f6cb21b91a0a8b3185a35e4c33f
[modules/yacs.git] / adm / unix / config_files / check_htmlgen.m4
1 dnl  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
2 dnl
3 dnl  This library is free software; you can redistribute it and/or
4 dnl  modify it under the terms of the GNU Lesser General Public
5 dnl  License as published by the Free Software Foundation; either
6 dnl  version 2.1 of the License.
7 dnl
8 dnl  This library is distributed in the hope that it will be useful,
9 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 dnl  Lesser General Public License for more details.
12 dnl
13 dnl  You should have received a copy of the GNU Lesser General Public
14 dnl  License along with this library; if not, write to the Free Software
15 dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 dnl
17 dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 dnl
19 AC_DEFUN([CHECK_HTML_GENERATORS],[
20
21 AC_CHECKING(for html generators)
22
23 doxygen_ok=yes
24 dnl were is doxygen ?
25 AC_PATH_PROG(DOXYGEN,doxygen) 
26 if test "x$DOXYGEN" = "x"
27 then
28   AC_MSG_WARN(doxygen not found)
29   doxygen_ok=no
30 fi
31 if test "x$doxygen_ok" = "xyes"
32 then
33   version=`$DOXYGEN --version`
34   AC_MSG_RESULT(doxygen version $version)
35   case "$version" in
36         1.4.4*)
37           DOXYGEN_WITH_PYTHON=yes
38           DOXYGEN_WITH_STL=no
39           ;;
40         1.4.5*)
41           DOXYGEN_WITH_PYTHON=yes
42           DOXYGEN_WITH_STL=yes
43           ;;
44         1.4.6*)
45           DOXYGEN_WITH_PYTHON=yes
46           DOXYGEN_WITH_STL=yes
47           ;;
48         1.4.7*)
49           DOXYGEN_WITH_PYTHON=yes
50           DOXYGEN_WITH_STL=yes
51           ;;
52         1.4.8*)
53           DOXYGEN_WITH_PYTHON=yes
54           DOXYGEN_WITH_STL=yes
55           ;;
56         1.4.9*)
57           DOXYGEN_WITH_PYTHON=yes
58           DOXYGEN_WITH_STL=yes
59           ;;
60         [[1-9]].[[5-9]]*)
61           DOXYGEN_WITH_PYTHON=yes
62           DOXYGEN_WITH_STL=yes
63           ;;
64         *)
65           DOXYGEN_WITH_PYTHON=no
66           DOXYGEN_WITH_STL=no
67           ;;
68   esac
69   AC_MSG_RESULT(doxygen with support STL    - $DOXYGEN_WITH_STL)
70   AC_MSG_RESULT(doxygen with support PYTHON - $DOXYGEN_WITH_PYTHON)
71   AC_SUBST(DOXYGEN_WITH_PYTHON)
72   AC_SUBST(DOXYGEN_WITH_STL)
73 fi
74 dnl AC_SUBST(DOXYGEN)
75
76 AC_SUBST(GRAPHVIZHOME)
77 AC_SUBST(GRAPHVIZ_CPPFLAGS)
78 AC_SUBST(GRAPHVIZ_LDFLAGS)
79 AC_SUBST(GRAPHVIZ_LIBADD)
80 GRAPHVIZ_CPPFLAGS=""
81 GRAPHVIZ_LDFLAGS=""
82 GRAPHVIZ_LIBADD=""
83
84 AC_CHECKING([graphviz configuration])
85
86 graphviz_ok=yes
87 dnl were is graphviz ?
88 AC_PATH_PROG(DOT,dot) 
89 if test "x$DOT" = "x" ; then
90   AC_MSG_WARN(graphviz not found)
91   graphviz_ok=no
92 else
93   GRAPHVIZ_PREFIX=`echo $DOT | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
94   GRAPHVIZ_PREFIX=`echo $GRAPHVIZ_PREFIX | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
95   GRAPHVIZHOME=$GRAPHVIZ_PREFIX
96
97   GRAPHVIZ_CPPFLAGS="-I${GRAPHVIZHOME}/include/graphviz"
98   GRAPHVIZ_LDFLAGS="-L${GRAPHVIZHOME}/lib/graphviz"
99 fi
100 dnl AC_SUBST(DOT)
101 CPPFLAGS_old=$CPPFLAGS
102 CPPFLAGS="$CPPFLAGS $GRAPHVIZ_CPPFLAGS"
103 old_graphviz="yes"
104 AC_CHECK_HEADERS(dotneato.h, old_graphviz="yes", old_graphviz="no")
105 if test "x$old_graphviz" = "xyes" ; then
106   GRAPHVIZ_LIBADD="-ldotneato"
107 else
108   GRAPHVIZ_LIBADD="-lgvc"
109 fi
110 CPPFLAGS=$CPPFLAGS_old
111
112 AC_PATH_PROG(LATEX,latex) 
113 if test "x$LATEX" = "x" ; then
114   AC_MSG_WARN(latex not found)
115 fi
116 AC_SUBST(LATEX)
117
118 AC_PATH_PROG(DVIPS,dvips)
119 if test "x$DVIPS" = "x" ; then
120   AC_MSG_WARN(dvips not found)
121 fi
122 AC_SUBST(DVIPS)
123
124 AC_PATH_PROG(PDFLATEX,pdflatex)
125 if test "x$PDFLATEX" = "x" ; then
126   AC_MSG_WARN(pdflatex not found)
127 fi
128 AC_SUBST(PDFLATEX)
129
130 rst2html_ok=yes
131 dnl were is rst2html ?
132 AC_PATH_PROG(RST2HTML,rst2html) 
133 if test "x$RST2HTML" = "x"; then
134   AC_PATH_PROG(RST2HTML,rst2html.py)
135 fi
136
137 if test "x$RST2HTML" = "x"; then
138   AC_MSG_WARN(rst2html not found)
139   rst2html_ok=no
140 fi
141 AC_SUBST(RST2HTML)
142
143 AM_CONDITIONAL(RST2HTML_IS_OK, [test x"$rst2html_ok" = xyes])
144
145 ])dnl
146 dnl