diff options
Diffstat (limited to 'meta/recipes-gnome/gtk-doc/gtk-doc.m4')
-rw-r--r-- | meta/recipes-gnome/gtk-doc/gtk-doc.m4 | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gtk-doc/gtk-doc.m4 b/meta/recipes-gnome/gtk-doc/gtk-doc.m4 new file mode 100644 index 0000000000..2cfa1e7178 --- /dev/null +++ b/meta/recipes-gnome/gtk-doc/gtk-doc.m4 | |||
@@ -0,0 +1,61 @@ | |||
1 | dnl -*- mode: autoconf -*- | ||
2 | |||
3 | # serial 1 | ||
4 | |||
5 | dnl Usage: | ||
6 | dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) | ||
7 | AC_DEFUN([GTK_DOC_CHECK], | ||
8 | [ | ||
9 | AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first | ||
10 | AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first | ||
11 | |||
12 | dnl check for tools we added during development | ||
13 | AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) | ||
14 | AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) | ||
15 | AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) | ||
16 | |||
17 | dnl for overriding the documentation installation directory | ||
18 | AC_ARG_WITH([html-dir], | ||
19 | AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, | ||
20 | [with_html_dir='${datadir}/gtk-doc/html']) | ||
21 | HTML_DIR="$with_html_dir" | ||
22 | AC_SUBST([HTML_DIR]) | ||
23 | |||
24 | dnl enable/disable documentation building | ||
25 | AC_ARG_ENABLE([gtk-doc], | ||
26 | AS_HELP_STRING([--enable-gtk-doc], | ||
27 | [use gtk-doc to build documentation [[default=no]]]),, | ||
28 | [enable_gtk_doc=no]) | ||
29 | |||
30 | if test x$enable_gtk_doc = xyes; then | ||
31 | ifelse([$1],[], | ||
32 | [PKG_CHECK_EXISTS([gtk-doc],, | ||
33 | AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], | ||
34 | [PKG_CHECK_EXISTS([gtk-doc >= $1],, | ||
35 | AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) | ||
36 | fi | ||
37 | |||
38 | AC_MSG_CHECKING([whether to build gtk-doc documentation]) | ||
39 | AC_MSG_RESULT($enable_gtk_doc) | ||
40 | |||
41 | dnl enable/disable output formats | ||
42 | AC_ARG_ENABLE([gtk-doc-html], | ||
43 | AS_HELP_STRING([--enable-gtk-doc-html], | ||
44 | [build documentation in html format [[default=yes]]]),, | ||
45 | [enable_gtk_doc_html=yes]) | ||
46 | AC_ARG_ENABLE([gtk-doc-pdf], | ||
47 | AS_HELP_STRING([--enable-gtk-doc-pdf], | ||
48 | [build documentation in pdf format [[default=no]]]),, | ||
49 | [enable_gtk_doc_pdf=no]) | ||
50 | |||
51 | if test -z "$GTKDOC_MKPDF"; then | ||
52 | enable_gtk_doc_pdf=no | ||
53 | fi | ||
54 | |||
55 | |||
56 | AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) | ||
57 | AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) | ||
58 | AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) | ||
59 | AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) | ||
60 | AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) | ||
61 | ]) | ||