1# Do not split AC_INIT across multiple lines without making localbuild.sh smarter 2AC_INIT([yelp-xsl],[40.2],[https://gitlab.gnome.org/gnome/yelp-xsl/issues]) 3 4AC_CONFIG_MACRO_DIR([m4]) 5 6AM_INIT_AUTOMAKE([1.11.2 no-dist-gzip dist-bzip2]) 7 8# Check for programs 9dnl In the interest of portability, we don't use GNU awk extensions, 10dnl even though they rule. To prevent accidental use and subsequent 11dnl bug reports after busted tarballs were shipped, we use -W compat 12dnl whenever our awk is gawk. 13AC_PROG_AWK 14if test x$AWK = xgawk; then 15 YELP_XSL_AWK='gawk --traditional'; 16else 17 YELP_XSL_AWK=$AWK; 18fi 19AC_SUBST(YELP_XSL_AWK) 20 21AC_CHECK_PROG([ITSTOOL], [itstool], [itstool]) 22if test x"$ITSTOOL" = x; then 23 AC_MSG_ERROR([itstool is required to build the translation XML files]) 24fi 25ITSTOOL_VERSION=`itstool --version | cut -d' ' -f2 | awk -F. '{print $ 1 * 10000 + $ 2 * 100 + $ 3; }'` 26if test "$ITSTOOL_VERSION" -lt 10200; then 27 AC_MSG_ERROR([itstool >= 1.2.0 is required to build the translation XML files]) 28fi 29 30# i18n stuff 31AM_GNU_GETTEXT_VERSION([0.19.4]) 32AM_GNU_GETTEXT([external]) 33 34GETTEXT_PACKAGE=yelp-xsl 35AC_SUBST(GETTEXT_PACKAGE) 36AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE") 37 38ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`" 39AC_SUBST(ALL_LINGUAS) 40 41AC_ARG_ENABLE(doc, 42 [AS_HELP_STRING([--enable-doc],[build and install developer documentation [default=no]])],, 43 enable_doc=no) 44AM_CONDITIONAL(ENABLE_DOC, test "x$enable_doc" != "xno") 45 46AS_IF([test "x$enable_doc" != "xno"],[ 47AC_CHECK_PROG(XMLLINT, xmllint, xmllint) 48if test x"$XMLLINT" = x; then 49 AC_MSG_ERROR([xmllint not found]) 50fi 51AC_CHECK_PROG(XSLTPROC, xsltproc, xsltproc) 52if test x"$XSLTPROC" = x; then 53 AC_MSG_ERROR([xsltproc not found]) 54fi 55]) 56 57AC_CONFIG_FILES([ 58Makefile 59yelp-xsl.pc 60js/Makefile 61doc/Makefile 62doc/yelp-xsl/Makefile 63po/Makefile.in 64xslt/Makefile 65xslt/common/Makefile 66xslt/common/css/Makefile 67xslt/common/domains/Makefile 68xslt/common/icons/Makefile 69xslt/docbook/Makefile 70xslt/docbook/common/Makefile 71xslt/docbook/html/Makefile 72xslt/mallard/Makefile 73xslt/mallard/cache/Makefile 74xslt/mallard/common/Makefile 75xslt/mallard/html/Makefile 76]) 77 78AC_OUTPUT 79 80dnl ========================================================================== 81echo " 82yelp-xsl-$VERSION: 83 84 prefix: ${prefix} 85 86 Documentation: ${enable_doc} 87" 88