1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(gtk-doc.dsl.in)
5 dnl Use a simple 2-digit version number for a while, since our old example
6 dnl Makefile can only cope with that, i.e. use 1.1, 1.2, 1.3 ... 9.9.
7 AM_INIT_AUTOMAKE(gtk-doc, 1.0)
15 AC_PATH_PROG(PERL, perl)
16 if test -z "$PERL"; then
17 AC_MSG_ERROR([perl not found])
20 AC_MSG_CHECKING([if Perl version >= 5.6.0])
21 if "$PERL" -e "require v5.6.0"; then
25 AC_MSG_ERROR([perl >= 5.6.0 is required for gtk-doc])
29 dnl Check for jade or openjade.
31 dnl We prefer to use openjade with the '-t sgml-raw' option, since '-t sgml'
32 dnl adds a newline before the closing '>' of HTML tags. lynx can't parse
33 dnl that, which is bad for accessibility.
35 SGML_FORMAT_TYPE=sgml-raw
36 AC_PATH_PROG(JADE, openjade)
37 if test -z "$JADE"; then
39 AC_PATH_PROG(JADE, jade)
40 if test -z "$JADE"; then
41 AC_MSG_ERROR([openjade/jade not found])
44 AC_SUBST(SGML_FORMAT_TYPE)
47 dnl Check for xsltproc
49 AC_PATH_PROG(XSLTPROC, xsltproc)
50 if test -z "$XSLTPROC"; then
51 AC_MSG_ERROR([xsltproc not found])
54 dnl check for DocBook DTD and stylesheets in the local catalog.
55 JH_CHECK_XML_CATALOG([http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd])
56 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl])
59 dnl Set PACKAGE_DATA_DIR so we can find the script containing common routines.
61 if test "x${datadir}" = 'x${prefix}/share'; then
62 if test "x${prefix}" = "xNONE"; then
63 PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}/data"
65 PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}/data"
68 PACKAGE_DATA_DIR="${datadir}/${PACKAGE}/data"
71 AC_SUBST(PACKAGE_DATA_DIR)
74 dnl Only use -Wall if we have gcc
75 if test "x$GCC" = "xyes"; then
76 if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
77 CFLAGS="$CFLAGS -Wall"
97 [chmod +x gtkdoc-mkman gtkdoc-mkhtml gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-scan gtkdoc-scanobj gtkdocize])