[gtk-doc-stub] gtk-doc.m4: Add more bits from upstream



commit 9fc69268f64896b33bd2f212b1a98285db55e384
Author: Colin Walters <walters verbum org>
Date:   Mon Jan 2 09:37:35 2012 -0500

    gtk-doc.m4: Add more bits from upstream
    
    We need at least the --enable options to ensure we generate compatible
    configure scripts.

 gtk-doc.m4 |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/gtk-doc.m4 b/gtk-doc.m4
index bee6333..1fbc2a8 100644
--- a/gtk-doc.m4
+++ b/gtk-doc.m4
@@ -6,6 +6,25 @@ dnl Usage:
 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
 AC_DEFUN([GTK_DOC_CHECK],
 [
+  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+
+  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
+  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
+  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
+
+  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
      AC_MSG_ERROR([gtk-doc requested but only gtk-doc-stub is installed])
   fi
@@ -13,6 +32,15 @@ AC_DEFUN([GTK_DOC_CHECK],
   AC_MSG_CHECKING([whether to build gtk-doc documentation])
   AC_MSG_RESULT([no])
 
+  AC_ARG_ENABLE([gtk-doc-html],
+    AS_HELP_STRING([--enable-gtk-doc-html],
+                   [build documentation in html format [[default=yes]]]),,
+    [enable_gtk_doc_html=yes])
+    AC_ARG_ENABLE([gtk-doc-pdf],
+      AS_HELP_STRING([--enable-gtk-doc-pdf],
+                     [build documentation in pdf format [[default=no]]]),,
+      [enable_gtk_doc_pdf=no])
+
   AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [false])
   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [false])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]