pango-gtk-doc.patch 1.7 KB

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