summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-10-29 00:46:02 -0700
committerStef Walter <stefw@collabora.co.uk>2011-10-29 09:54:14 +0200
commitc940667c434fe64cf4d01cec0873044c54e7f174 (patch)
tree01c258dc4cae291ca4a79ef2dd3017940ae9e5a7
parent0792fefb2bc9d5db038b48855f0b1bb138653332 (diff)
downloadp11-kit-c940667c434fe64cf4d01cec0873044c54e7f174.tar.gz
Make build not depend on gtk-doc or pkg-config
* If enabled, gtk-doc can be used, but we no longer expect the gtkdoc autoconf/automake macro files to be installed. * pkg-config is no longer used for checks. * We still do install pkg-config files, and this is the preferred way to build against and link to p11-kit.
-rw-r--r--configure.ac53
1 files changed, 51 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 896dc26..2544084 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,8 +35,6 @@ AM_PROG_CC_C_O
LINGUAS=""
AM_GNU_GETTEXT([external], [need-ngettext])
-GTK_DOC_CHECK([1.15])
-
AC_MSG_CHECKING([for win32])
case "$host" in
*-*-mingw*)
@@ -96,6 +94,57 @@ AC_SUBST(p11_user_config_modules)
AC_SUBST(p11_module_path)
# --------------------------------------------------------------------
+# GTK Doc
+
+dnl check for tools
+AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
+AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
+AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
+AC_PATH_PROG([GTKDOC_SCAN],[gtkdoc-scan])
+
+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
+ if test -z "$GTKDOC_SCAN"; then
+ AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested])
+ fi
+fi
+
+AC_MSG_CHECKING([whether to build gtk-doc documentation])
+AC_MSG_RESULT($enable_gtk_doc)
+
+dnl enable/disable output formats
+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])
+
+if test -z "$GTKDOC_MKPDF"; then
+ enable_gtk_doc_pdf=no
+fi
+
+AM_CONDITIONAL(ENABLE_GTK_DOC, [test x$enable_gtk_doc = xyes])
+AM_CONDITIONAL(GTK_DOC_BUILD_HTML, [test x$enable_gtk_doc_html = xyes])
+AM_CONDITIONAL(GTK_DOC_BUILD_PDF, [test x$enable_gtk_doc_pdf = xyes])
+AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, [test -n "$LIBTOOL"])
+AM_CONDITIONAL(GTK_DOC_USE_REBASE, [test -n "$GTKDOC_REBASE"])
+
+# --------------------------------------------------------------------
# Compilation and linking options
AC_MSG_CHECKING([for debug mode])