summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-14 22:59:09 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-14 22:59:09 +0200
commit226b34727f14fafa2bc1564fcd19a66abb99648e (patch)
treef66a9163e436306ac97549173d3d7bbb86a2185c /acinclude.m4
parent975f5d049e2d55a1221830dba6a505d85750e5d7 (diff)
Add infrastructure for gtk-doc support
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 160c9464..2db14efb 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -10,6 +10,34 @@ AC_DEFUN([AC_PROG_CC_PIE], [
])
])
+AC_DEFUN([GTK_DOC_CHECK], [
+ AC_ARG_WITH([html-dir],
+ AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+ [with_html_dir='${datadir}/gtk-doc/html'])
+ HTML_DIR="$with_html_dir"
+ AC_SUBST([HTML_DIR])
+
+ AC_ARG_ENABLE([gtk-doc],
+ AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),,
+ [enable_gtk_doc=no])
+
+ if test x$enable_gtk_doc = xyes; then
+ ifelse([$1],[],
+ [PKG_CHECK_EXISTS([gtk-doc],,
+ AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
+ [PKG_CHECK_EXISTS([gtk-doc >= $1],,
+ AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
+ fi
+
+ AC_MSG_CHECKING([whether to build gtk-doc documentation])
+ AC_MSG_RESULT($enable_gtk_doc)
+
+ AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
+
+ AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
+ AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
+])
+
AC_DEFUN([AC_FUNC_PPOLL], [
AC_CHECK_FUNC(ppoll, dummy=yes, AC_DEFINE(NEED_PPOLL, 1,
[Define to 1 if you need the ppoll() function.]))