Initial release
[adaptation/ap_samsung/gst-plugins-s5pc2xx.git] / common / m4 / gst-plugin-docs.m4
1 dnl AG_GST_PYXML_CHECK([MINIMUM-PYTHON-VERSION])
2
3 AC_DEFUN([AG_GST_PYXML_CHECK],
4 [
5   AC_BEFORE([AS_PATH_PYTHON],[$0])dnl find python first
6
7   have_pyxml=no
8   if test "x$PYTHON" != x; then
9     AC_MSG_CHECKING([pyxml])
10     if $PYTHON -c "from xml.dom.ext.reader import Sax2" 2>/dev/null \
11       && $PYTHON -c "from xml.dom.NodeFilter import NodeFilter" 2>/dev/null; then
12       AC_MSG_RESULT(yes)
13       have_pyxml=yes
14     else
15       AC_MSG_RESULT(no)
16     fi
17   fi
18 ])
19
20 dnl AG_GST_PLUGIN_DOCS([MINIMUM-GTK-DOC-VERSION],[MINIMUM-PYTHON-VERSION])
21 dnl 
22 dnl checks for prerequisites for the common/mangle-tmpl.py script
23 dnl used when building the plugin documentation
24
25 AC_DEFUN([AG_GST_PLUGIN_DOCS],
26 [
27   AC_BEFORE([GTK_DOC_CHECK],[$0])dnl check for gtk-doc first
28
29   if test x$enable_gtk_doc = xyes -a x$have_gtk_doc = xyes; then
30     AG_GST_PYXML_CHECK([$1])
31   fi
32
33   build_plugin_docs=no
34   AC_MSG_CHECKING([whether to build plugin documentation])
35   if test x$enable_gtk_doc = xyes -a x$have_gtk_doc = xyes; then
36     if test "x$have_pyxml" != xyes; then
37       AC_MSG_RESULT([no (pyxml not installed)])
38     else
39       build_plugin_docs=yes
40       AC_MSG_RESULT([yes])
41     fi
42   else
43     AC_MSG_RESULT([no (gtk-doc disabled or not available)])
44   fi
45
46   AM_CONDITIONAL(ENABLE_PLUGIN_DOCS, test x$build_plugin_docs = xyes)
47 ])