AC_INIT([gnome-doc-utils], [0.12.2],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-doc-utils])
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])

dnl  In the interest of portability, we don't use GNU awk extensions,
dnl  even though they rule.  To prevent accidental use and subsequent
dnl  bug reports after busted tarballs were shipped, we use -W compat
dnl  whenever our awk is gawk.
AC_PROG_AWK
if test x$AWK = xgawk; then
   GDU_AWK='gawk -W compat';
else
   GDU_AWK=$AWK;
fi
AC_SUBST(GDU_AWK)

gdu_cv_have_gdu=yes
GNOME_DOC_DEFINES

AC_ARG_ENABLE([build-utils],
	AC_HELP_STRING([--enable-build-utils],
	[build and install the build utilities [default=yes]]),,
	enable_build_utils=yes)
AM_CONDITIONAL(ENABLE_BUILD_UTILS, test x$enable_build_utils = xyes)

if test x$enable_build_utils = xyes; then
AM_PATH_PYTHON([2.0])
fi

PKG_CHECK_MODULES(GNOME_DOC_UTILS,
[
	libxml-2.0 >= 2.6.12
	libxslt    >= 1.1.8
])

GETTEXT_PACKAGE=gnome-doc-utils
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")

IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT

AC_OUTPUT([
Makefile
data/Makefile
data/icons/Makefile
data/icons/hicolor/Makefile
data/icons/hicolor/48x48/Makefile
data/icons/hicolor/scalable/Makefile
data/templates/Makefile
data/watermarks/Makefile
doc/Makefile
doc/gnome-doc-make/Makefile
doc/xslt/Makefile
po/Makefile.in
tools/Makefile
tools/gnome-doc-tool
tools/gnome-doc-prepare
tools/gnome-doc-utils.pc
xslt/Makefile
xml2po/Makefile
xml2po/xml2po.pc
xml2po/modes/Makefile
xml2po/examples/Makefile
xslt/common/Makefile
xslt/docbook/Makefile
xslt/docbook/common/Makefile
xslt/docbook/html/Makefile
xslt/docbook/omf/Makefile
xslt/docbook/utils/Makefile
xslt/gettext/Makefile
])
