remove refsect1's and refsect2's from book tree, as suggested by Hallski.
[gtk-doc.git] / configure.in
blob220744240afce5b582af0793059fa5da78d877c4
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)
9 AC_ISC_POSIX
10 AC_PROG_CC
12 dnl
13 dnl Check for Perl.
14 dnl
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
22   AC_MSG_RESULT(yes)
23 else
24   AC_MSG_RESULT(no)
25   AC_MSG_ERROR([perl >= 5.6.0 is required for gtk-doc])
28 dnl
29 dnl Check for jade or openjade.
30 dnl
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.
34 dnl
35 SGML_FORMAT_TYPE=sgml-raw
36 AC_PATH_PROG(JADE, openjade)
37 if test -z "$JADE"; then
38   SGML_FORMAT_TYPE=sgml
39   AC_PATH_PROG(JADE, jade)
40   if test -z "$JADE"; then
41     AC_MSG_ERROR([openjade/jade not found])
42   fi
44 AC_SUBST(SGML_FORMAT_TYPE)
46 dnl
47 dnl Check for xsltproc
48 dnl
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])
58 dnl
59 dnl Set PACKAGE_DATA_DIR so we can find the script containing common routines.
60 dnl
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"
64   else
65     PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}/data"
66   fi
67 else
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"
78   fi
82 AC_OUTPUT([Makefile 
83 gtk-doc.pc
84 gtk-doc.dsl 
85 gtk-doc.spec
86 gtkdoc-common.pl
87 gtkdoc-mkman 
88 gtkdoc-mkhtml
89 gtkdoc-fixxref
90 gtkdoc-mkdb
91 gtkdoc-mktmpl
92 gtkdoc-scan
93 gtkdoc-scanobj
94 gtkdoc-scangobj
95 gtkdocize
97 [chmod +x gtkdoc-mkman gtkdoc-mkhtml gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-scan gtkdoc-scanobj gtkdocize])