summaryrefslogtreecommitdiff
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
parent4f1f10a796d17381a348631bd282828175252250 (diff)
downloadconnman-57c5667aad64cb90aa4caf09e4b014deb0ee9805.tar.gz
connman-57c5667aad64cb90aa4caf09e4b014deb0ee9805.tar.bz2
connman-57c5667aad64cb90aa4caf09e4b014deb0ee9805.zip
Add checks for gtk-doc availability
-rw-r--r--acinclude.m434
-rwxr-xr-xbootstrap-configure5
-rw-r--r--configure.ac2
3 files changed, 41 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"])
+])
diff --git a/bootstrap-configure b/bootstrap-configure
index 2b8dc78e..ea6d525d 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -4,8 +4,13 @@ if [ -f config.status ]; then
make maintainer-clean
fi
+if [ ! -f doc/gtk-doc.make ]; then
+ gtkdocize --copy --docdir doc
+fi
+
./bootstrap && \
./configure --enable-maintainer-mode \
+ --enable-gtk-doc \
--enable-debug \
--prefix=/usr \
--mandir=/usr/share/man \
diff --git a/configure.ac b/configure.ac
index fdb290b8..fe70d73e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,8 @@ m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
+GTK_DOC_CHECK
+
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
[enable compiling with debugging information]), [
if (test "${enableval}" = "yes" &&