typo fix
[gnutls.git] / m4 / gtk-doc.m4
blob2cfa1e71786cc01eed3f88021035941fc5c6017b
1 dnl -*- mode: autoconf -*-
3 # serial 1
5 dnl Usage:
6 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
7 AC_DEFUN([GTK_DOC_CHECK],
9   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
10   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
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])
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])
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])
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
38   AC_MSG_CHECKING([whether to build gtk-doc documentation])
39   AC_MSG_RESULT($enable_gtk_doc)
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])
51   if test -z "$GTKDOC_MKPDF"; then
52     enable_gtk_doc_pdf=no
53   fi
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"])