[gtk-doc] build: allow building without gnome-doc-utils, Fixes #577059
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk-doc] build: allow building without gnome-doc-utils, Fixes #577059
- Date: Sat, 27 Jun 2009 20:09:51 +0000 (UTC)
commit 4335ba988d0258e775f7df657ab3d139d5a97c02
Author: Nicola Fontana <ntd entidi it>
Date: Sat Jun 27 23:09:03 2009 +0300
build: allow building without gnome-doc-utils, Fixes #577059
autogen.sh | 4 +---
configure.in | 7 ++++++-
help/manual/Makefile.am | 7 +++++++
m4/gnome-doc-utils.m4 | 3 ++-
4 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index a8771a8..532324c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,7 +4,6 @@
PROJECT=gtk-doc
TEST_TYPE=-f
FILE=gtk-doc.dsl.in
-CONFIGURE_FLAGS=
# a silly hack that generates autoregen.sh but it's handy
echo "#!/bin/sh" > autoregen.sh
@@ -69,7 +68,6 @@ if gnome-doc-prepare --version < /dev/null > /dev/null 2>&1; then
echo "* Running gnome-doc-prepare"
gnome-doc-prepare --copy --force --automake
else
- CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-scrollkeeper"
touch gnome-doc-utils.make
fi
@@ -92,7 +90,7 @@ $AUTOMAKE --add-missing -Wno-portability $am_opt || exit $?
cd "$THEDIR"
-$srcdir/configure --enable-maintainer-mode "$@" $CONFIGURE_FLAGS || exit $?
+$srcdir/configure --enable-maintainer-mode "$@" || exit $?
echo
echo "Now type 'make install' to install $PROJECT."
diff --git a/configure.in b/configure.in
index dcd073e..002e326 100644
--- a/configure.in
+++ b/configure.in
@@ -14,7 +14,9 @@ AC_CONFIG_SRCDIR([gtkdoc-common.pl.in])
AM_INIT_AUTOMAKE([check-news std-options])
AM_MAINTAINER_MODE
-GNOME_DOC_INIT
+dnl Forcing a non-null ACTION-IF-NOT-FOUND disables scrollkeeper if
+dnl gnome-doc-utils is not found but does not invalidate the build.
+GNOME_DOC_INIT([],[],enable_scrollkeeper=no)
# make sure $ACLOCAL_FLAGS are used during a rebuild.
AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"])
@@ -227,6 +229,9 @@ test -n "$JADE" \
test -n "$FOP" \
&& AC_MSG_NOTICE([** XML PDF support enabled, using $FOP]) \
|| AC_MSG_NOTICE([ XML PDF support disabled, no fop available])
+test "x$gdu_cv_have_gdu" = "xyes" \
+ && AC_MSG_NOTICE([** Gnome-doc-utils support enabled]) \
+ || AC_MSG_NOTICE([ Gnome-doc-utils support disabled])
test "x$enable_scrollkeeper" = "xyes" \
&& AC_MSG_NOTICE([** Scrollkeeper support enabled]) \
|| AC_MSG_NOTICE([ Scrollkeeper support disabled])
diff --git a/help/manual/Makefile.am b/help/manual/Makefile.am
index 82ce76a..b601490 100644
--- a/help/manual/Makefile.am
+++ b/help/manual/Makefile.am
@@ -1,5 +1,12 @@
+if HAVE_GNOME_DOC_UTILS
include $(top_srcdir)/gnome-doc-utils.make
dist-hook: doc-dist-hook
+else
+dist-hook:
+ @echo "*** gnome-doc-utils must be installed and enabled in order to make dist"
+ @false
+endif
+
DOC_MODULE = gtk-doc-manual
DOC_ENTITIES = fdl-appendix.xml
DOC_INCLUDES =
diff --git a/m4/gnome-doc-utils.m4 b/m4/gnome-doc-utils.m4
index 04f79bb..4aef712 100644
--- a/m4/gnome-doc-utils.m4
+++ b/m4/gnome-doc-utils.m4
@@ -36,7 +36,8 @@ AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
#
AC_DEFUN([GNOME_DOC_INIT],
-[
+[AC_REQUIRE([AC_PROG_LN_S])dnl
+
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]