gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
dnl -*- mode: autoconf -*-
|
|
|
|
|
2014-10-10 12:28:16 +02:00
|
|
|
# serial 2
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
|
|
|
|
dnl Usage:
|
|
|
|
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
|
|
|
|
AC_DEFUN([GTK_DOC_CHECK],
|
|
|
|
[
|
2014-10-10 12:28:16 +02:00
|
|
|
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
|
|
|
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
|
|
|
|
|
2014-10-10 12:28:16 +02:00
|
|
|
ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
|
|
|
|
AC_MSG_CHECKING([for gtk-doc])
|
|
|
|
PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
|
|
|
|
AC_MSG_RESULT($have_gtk_doc)
|
|
|
|
|
|
|
|
if test "$have_gtk_doc" = "no"; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
You will not be able to create source packages with 'make dist'
|
|
|
|
because $gtk_doc_requires is not found.])
|
|
|
|
fi
|
|
|
|
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
dnl check for tools we added during development
|
2014-10-10 12:28:16 +02:00
|
|
|
dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
|
|
|
|
dnl may not be writable by the user. Currently, automake requires that the
|
|
|
|
dnl test name must end in '.test'.
|
|
|
|
dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
|
|
|
|
AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
|
|
|
|
AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
|
|
|
|
AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
|
|
|
|
|
|
|
|
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])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build gtk-doc documentation])
|
|
|
|
AC_MSG_RESULT($enable_gtk_doc)
|
|
|
|
|
2014-10-10 12:28:16 +02:00
|
|
|
if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
You must have $gtk_doc_requires installed to build documentation for
|
|
|
|
$PACKAGE_NAME. Please install gtk-doc or disable building the
|
|
|
|
documentation by adding '--disable-gtk-doc' to '[$]0'.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl don't check for glib if we build glib
|
|
|
|
if test "x$PACKAGE_NAME" != "xglib"; then
|
|
|
|
dnl don't fail if someone does not have glib
|
|
|
|
PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
|
|
|
|
fi
|
|
|
|
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
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
|
|
|
|
|
2014-10-10 12:28:16 +02:00
|
|
|
if test -z "$AM_DEFAULT_VERBOSITY"; then
|
|
|
|
AM_DEFAULT_VERBOSITY=1
|
|
|
|
fi
|
|
|
|
AC_SUBST([AM_DEFAULT_VERBOSITY])
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
|
2014-10-10 12:28:16 +02:00
|
|
|
AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
|
gtk-doc: add gtk-doc.m4 to satisfy aclocal
When packages using gtk-doc are autoreconfigured, aclocal complains
because it cannot find the macros defined in gtk-doc.m4. We could
compile the gtk-doc package for the host, but it depends on
gnome-doc-utils, which depends on libxml2, libxslt, and other packages
as well.
Since we don't care about the documentation, all is needed is in fact
the gtk-doc.m4, so that the configure script can be generated, and we
can use the --disable-gtk-doc to not generate the documentation.
To solve this, we include a gtk-doc.m4 file in package/automake/, and
it gets installed in $(STAGING_DIR)/usr/share/aclocal/ during the
installation of the host automake (used for autoreconfiguration of
packages).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-09 00:46:46 +02:00
|
|
|
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"])
|
|
|
|
])
|