9971
9971
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
9972
9972
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
9974
ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
9975
AC_MSG_CHECKING([for gtk-doc])
9976
PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
9977
AC_MSG_RESULT($have_gtk_doc)
9979
if test "$have_gtk_doc" = "no"; then
9981
You will not be able to create source packages with 'make dist'
9982
because $gtk_doc_requires is not found.])
9974
9985
dnl check for tools we added during development
9975
9986
dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
9976
9987
dnl may not be writable by the user. Currently, automake requires that the
9994
10005
[use gtk-doc to build documentation [[default=no]]]),,
9995
10006
[enable_gtk_doc=no])
9997
if test x$enable_gtk_doc = xyes; then
9999
[PKG_CHECK_EXISTS([gtk-doc],,
10000
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
10001
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
10002
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
10003
dnl don't check for glib if we build glib
10004
if test "x$PACKAGE_NAME" != "xglib"; then
10005
dnl don't fail if someone does not have glib
10006
PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
10010
10008
AC_MSG_CHECKING([whether to build gtk-doc documentation])
10011
10009
AC_MSG_RESULT($enable_gtk_doc)
10011
if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
10013
You must have $gtk_doc_requires installed to build documentation for
10014
$PACKAGE_NAME. Please install gtk-doc or disable building the
10015
documentation by adding '--disable-gtk-doc' to '[$]0'.])
10018
dnl don't check for glib if we build glib
10019
if test "x$PACKAGE_NAME" != "xglib"; then
10020
dnl don't fail if someone does not have glib
10021
PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
10013
10024
dnl enable/disable output formats
10014
10025
AC_ARG_ENABLE([gtk-doc-html],
10015
10026
AS_HELP_STRING([--enable-gtk-doc-html],
10030
10041
AC_SUBST([AM_DEFAULT_VERBOSITY])
10043
AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
10032
10044
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
10033
10045
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
10034
10046
AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])