/soc/2013/ankitkv/gobjectification: 3e187ff386d2: Don't require ...

Ankit Vani a at nevitus.org
Sat Feb 8 19:47:26 EST 2014


Changeset: 3e187ff386d26b74d217b0194ee69df3f807bf0d
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-09 06:17 +0530
Branch:	 gtkdoc-conversion
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/3e187ff386d2

Description:

Don't require gtkdocize -- make gtk-doc really optional

diffstat:

 autogen.sh   |  19 +++++++++++++++++--
 configure.ac |   4 ++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diffs (58 lines):

diff --git a/autogen.sh b/autogen.sh
--- a/autogen.sh
+++ b/autogen.sh
@@ -100,6 +100,22 @@ run_or_die () { # beotch
 	fi
 }
 
+check_gtkdoc() {
+	printf "checking for gtkdocize... "
+	GTKDOCIZE=`which gtkdocize 2>/dev/null`
+
+	if [ x"${GTKDOCIZE}" = x"" ] ; then
+		echo "not found."
+		echo "EXTRA_DIST =" > gtk-doc.make
+		echo "You don't have gtk-doc installed, and thus won't be able to
+generate the documentation.
+"
+	else
+		echo "${GTKDOCIZE}"
+		run_or_die ${GTKDOCIZE} ${GTKDOCIZE_FLAGS}
+	fi
+}
+
 cleanup () {
 	rm -f autogen-??????
 	echo
@@ -137,7 +153,6 @@ fi
 ###############################################################################
 check "$libtoolize";		LIBTOOLIZE=${BIN};
 check "glib-gettextize";	GLIB_GETTEXTIZE=${BIN};
-check "gtkdocize";		GTKDOCIZE=${BIN};
 check "intltoolize";		INTLTOOLIZE=${BIN};
 check "sed";				SED=${BIN};
 check "aclocal";		ACLOCAL=${BIN};
@@ -157,8 +172,8 @@ run_or_die ${SED} -i -e "s:'\^\$\$lang\$
 # glib-gettextize doesn't seems to use AM_V_GEN macro
 ${SED} -i -e "s:\\tfile=\`echo:\\t at echo -e \"  GEN\\\\t\$\@\"; file=\`echo:g" po/Makefile.in.in
 run_or_die ${ACLOCAL} ${ACLOCAL_FLAGS:-"-I m4macros"}
-run_or_die ${GTKDOCIZE} ${GTKDOCIZE_FLAGS}
 run_or_die ${AUTOHEADER} ${AUTOHEADER_FLAGS}
+check_gtkdoc
 run_or_die ${AUTOMAKE} ${AUTOMAKE_FLAGS:-"-a -c --gnu"}
 run_or_die ${AUTOCONF} ${AUTOCONF_FLAGS}
 
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2867,6 +2867,10 @@ GTK_DOC_CHECK([1.16],[--flavour no-tmpl]
 AM_CONDITIONAL([ENABLE_GTK_DOC], false)
 ])
 
+if test "x$enable_gtk_doc" = "x" ; then
+	enable_gtk_doc=no
+fi
+
 AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],
 	[compile with debugging support])], , enable_debug=no)
 



More information about the Commits mailing list