gtk-doc.m4
Upload User: shyika
Upload Date: 2017-11-25
Package Size: 1227k
Code Size: 1k
Category:

Video Capture

Development Platform:

Unix_Linux

  1. dnl -*- mode: autoconf -*-
  2. # serial 1
  3. dnl Usage:
  4. dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
  5. AC_DEFUN([GTK_DOC_CHECK],
  6. [
  7.   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
  8.   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
  9.   dnl for overriding the documentation installation directory
  10.   AC_ARG_WITH(html-dir,
  11.     AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
  12.     [with_html_dir='${datadir}/gtk-doc/html'])
  13.   HTML_DIR="$with_html_dir"
  14.   AC_SUBST(HTML_DIR)
  15.   dnl enable/disable documentation building
  16.   AC_ARG_ENABLE(gtk-doc,
  17.     AC_HELP_STRING([--enable-gtk-doc],
  18.                    [use gtk-doc to build documentation [default=no]]),,
  19.     enable_gtk_doc=no)
  20.   have_gtk_doc=no
  21.   if test x$enable_gtk_doc = xyes; then
  22.     if test -z "$PKG_CONFIG"; then
  23.       AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  24.     fi
  25.     if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
  26.       have_gtk_doc=yes
  27.     fi
  28.   dnl do we want to do a version check?
  29. ifelse([$1],[],,
  30.     [gtk_doc_min_version=$1
  31.     if test "$have_gtk_doc" = yes; then
  32.       AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
  33.       if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
  34.         AC_MSG_RESULT(yes)
  35.       else
  36.         AC_MSG_RESULT(no)
  37.         have_gtk_doc=no
  38.       fi
  39.     fi
  40. ])
  41.     if test "$have_gtk_doc" != yes; then
  42.       enable_gtk_doc=no
  43.     fi
  44.   fi
  45.   AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
  46.   AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
  47. ])