Remove generated files
[framework/connectivity/libgphoto2.git] / libgphoto2_port / m4 / gp-manual-graphviz.m4
1 dnl ---------------------------------------------------------------------------
2 dnl dot: This program is needed for processing images. If not found,
3 dnl          documentation can still be built, but without figures.
4 dnl ---------------------------------------------------------------------------
5 AC_DEFUN([GP_CHECK_DOT],
6 [
7
8 try_dot=true
9 have_dot=false
10 AC_ARG_WITH(dot, AS_HELP_STRING([--without-dot], [Do not use dot]), [
11         if test "x$withval" = "xno"; then
12                 try_dot=false
13         fi])
14 if $try_dot; then
15         AC_PATH_PROG(DOT,dot)
16         if test -n "${DOT}"; then
17                 have_dot=true
18         fi
19 fi
20 if $have_dot; then
21         AC_SUBST(DOT)
22         AC_MSG_CHECKING([whether ${DOT} works])
23         ${DOT} -Tps -o tesseract.ps 2> /dev/null <<EOF
24 graph tesseract {
25         node [[shape=point]];
26         o -- {a;b;c;d;}
27         a -- {ab;ac;ad;}
28         b -- {ab;bc;bd;}
29         c -- {ac;bc;cd;}
30         d -- {ad;bd;cd;}
31         ab -- {abc;abd;}
32         ac -- {abc;acd;}
33         ad -- {abd;acd;}
34         bc -- {abc;bcd;}
35         bd -- {abd;bcd;}
36         cd -- {acd;bcd;}
37         {abc;abd;acd;bcd;} -- abcd;
38 }
39 EOF
40         if test $? != 0 || test ! -f tesseract.ps; then
41                 have_dot=false
42                 AC_MSG_RESULT([no (see http://www.graphviz.org/ ...)])
43         else
44                 AC_MSG_RESULT(yes)
45         fi
46 fi
47 AM_CONDITIONAL(ENABLE_GRAPHS, $have_dot)
48
49 ])