summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/packages/gtk-doc/gtk-doc.bb2
-rw-r--r--meta/packages/gtk-doc/gtk-doc.m474
2 files changed, 42 insertions, 34 deletions
diff --git a/meta/packages/gtk-doc/gtk-doc.bb b/meta/packages/gtk-doc/gtk-doc.bb
index 0391b388f4..b60bc85ed3 100644
--- a/meta/packages/gtk-doc/gtk-doc.bb
+++ b/meta/packages/gtk-doc/gtk-doc.bb
@@ -1,7 +1,7 @@
1SECTION = "x11/base" 1SECTION = "x11/base"
2SRC_URI = "file://gtk-doc.m4" 2SRC_URI = "file://gtk-doc.m4"
3LICENSE = "LGPL" 3LICENSE = "LGPL"
4PR = "r3" 4PR = "r4"
5 5
6ALLOW_EMPTY_${PN} = "1" 6ALLOW_EMPTY_${PN} = "1"
7 7
diff --git a/meta/packages/gtk-doc/gtk-doc.m4 b/meta/packages/gtk-doc/gtk-doc.m4
index af73800bf2..2cfa1e7178 100644
--- a/meta/packages/gtk-doc/gtk-doc.m4
+++ b/meta/packages/gtk-doc/gtk-doc.m4
@@ -8,46 +8,54 @@ AC_DEFUN([GTK_DOC_CHECK],
8[ 8[
9 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first 9 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
10 AC_BEFORE([AM_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
11 dnl for overriding the documentation installation directory 17 dnl for overriding the documentation installation directory
12 AC_ARG_WITH(html-dir, 18 AC_ARG_WITH([html-dir],
13 AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, 19 AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
14 [with_html_dir='${datadir}/gtk-doc/html']) 20 [with_html_dir='${datadir}/gtk-doc/html'])
15 HTML_DIR="$with_html_dir" 21 HTML_DIR="$with_html_dir"
16 AC_SUBST(HTML_DIR) 22 AC_SUBST([HTML_DIR])
17 23
18 dnl enable/disable documentation building 24 dnl enable/disable documentation building
19 AC_ARG_ENABLE(gtk-doc, 25 AC_ARG_ENABLE([gtk-doc],
20 AC_HELP_STRING([--enable-gtk-doc], 26 AS_HELP_STRING([--enable-gtk-doc],
21 [use gtk-doc to build documentation [default=no]]),, 27 [use gtk-doc to build documentation [[default=no]]]),,
22 enable_gtk_doc=no) 28 [enable_gtk_doc=no])
23 29
24 have_gtk_doc=no
25 if test x$enable_gtk_doc = xyes; then 30 if test x$enable_gtk_doc = xyes; then
26 if test -z "$PKG_CONFIG"; then 31 ifelse([$1],[],
27 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 32 [PKG_CHECK_EXISTS([gtk-doc],,
28 fi 33 AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
29 if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then 34 [PKG_CHECK_EXISTS([gtk-doc >= $1],,
30 have_gtk_doc=yes 35 AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
31 fi 36 fi
32 37
33 dnl do we want to do a version check? 38 AC_MSG_CHECKING([whether to build gtk-doc documentation])
34ifelse([$1],[],, 39 AC_MSG_RESULT($enable_gtk_doc)
35 [gtk_doc_min_version=$1 40
36 if test "$have_gtk_doc" = yes; then 41 dnl enable/disable output formats
37 AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) 42 AC_ARG_ENABLE([gtk-doc-html],
38 if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then 43 AS_HELP_STRING([--enable-gtk-doc-html],
39 AC_MSG_RESULT(yes) 44 [build documentation in html format [[default=yes]]]),,
40 else 45 [enable_gtk_doc_html=yes])
41 AC_MSG_RESULT(no) 46 AC_ARG_ENABLE([gtk-doc-pdf],
42 have_gtk_doc=no 47 AS_HELP_STRING([--enable-gtk-doc-pdf],
43 fi 48 [build documentation in pdf format [[default=no]]]),,
44 fi 49 [enable_gtk_doc_pdf=no])
45]) 50
46 if test "$have_gtk_doc" != yes; then 51 if test -z "$GTKDOC_MKPDF"; then
47 enable_gtk_doc=no 52 enable_gtk_doc_pdf=no
48 fi
49 fi 53 fi
50 54
51 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) 55
52 AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL") 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"])
53]) 61])