summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-13 10:25:51 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-13 10:25:51 +0200
commit57c5667aad64cb90aa4caf09e4b014deb0ee9805 (patch)
tree969ba238fd2f9a6106ed79cbb50401ec4df7e275 /acinclude.m4
parent4f1f10a796d17381a348631bd282828175252250 (diff)
downloadconnman-57c5667aad64cb90aa4caf09e4b014deb0ee9805.tar.gz
connman-57c5667aad64cb90aa4caf09e4b014deb0ee9805.tar.bz2
connman-57c5667aad64cb90aa4caf09e4b014deb0ee9805.zip
Add checks for gtk-doc availability
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 95486c3d..9c51ddfc 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -9,3 +9,37 @@ AC_DEFUN([AC_PROG_CC_PIE], [
rm -rf conftest*
])
])
+
+AC_DEFUN([GTK_DOC_CHECK],
+[
+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+ dnl for overriding the documentation installation directory
+ 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])
+
+ dnl enable/disable documentation building
+ 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"])
+])