1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_PREREQ(2.52) |
---|
3 | |
---|
4 | dnl Use a simple 2-digit version number for a while, since our old example |
---|
5 | dnl Makefile can only cope with that, i.e. use 1.1, 1.2, 1.3 ... 9.9. |
---|
6 | m4_define(gtk_doc_version, 1.2) |
---|
7 | |
---|
8 | AC_INIT([gtk-doc], [gtk_doc_version], |
---|
9 | [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk-doc]) |
---|
10 | |
---|
11 | AC_CONFIG_SRCDIR([gtk-doc.dsl.in]) |
---|
12 | |
---|
13 | AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION) |
---|
14 | |
---|
15 | AM_MAINTAINER_MODE |
---|
16 | |
---|
17 | AC_ISC_POSIX |
---|
18 | AC_PROG_CC |
---|
19 | |
---|
20 | dnl |
---|
21 | dnl Check for Perl. |
---|
22 | dnl |
---|
23 | AC_PATH_PROG([PERL], [perl]) |
---|
24 | if test -z "$PERL"; then |
---|
25 | AC_MSG_ERROR([perl not found]) |
---|
26 | fi |
---|
27 | |
---|
28 | AC_MSG_CHECKING([if Perl version >= 5.6.0]) |
---|
29 | if "$PERL" -e "require v5.6.0"; then |
---|
30 | AC_MSG_RESULT([yes]) |
---|
31 | else |
---|
32 | AC_MSG_RESULT([no]) |
---|
33 | AC_MSG_ERROR([perl >= 5.6.0 is required for gtk-doc]) |
---|
34 | fi |
---|
35 | |
---|
36 | dnl |
---|
37 | dnl Check for jade or openjade. |
---|
38 | dnl |
---|
39 | dnl We prefer to use openjade with the '-t sgml-raw' option, since '-t sgml' |
---|
40 | dnl adds a newline before the closing '>' of HTML tags. lynx can't parse |
---|
41 | dnl that, which is bad for accessibility. |
---|
42 | dnl |
---|
43 | SGML_FORMAT_TYPE=sgml-raw |
---|
44 | AC_PATH_PROG([JADE], [openjade]) |
---|
45 | if test -z "$JADE"; then |
---|
46 | SGML_FORMAT_TYPE=sgml |
---|
47 | AC_PATH_PROG([JADE], [jade]) |
---|
48 | if test -z "$JADE"; then |
---|
49 | AC_MSG_ERROR([openjade/jade not found]) |
---|
50 | fi |
---|
51 | fi |
---|
52 | AC_SUBST([SGML_FORMAT_TYPE]) |
---|
53 | |
---|
54 | dnl |
---|
55 | dnl Check for xsltproc |
---|
56 | dnl |
---|
57 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
---|
58 | if test -z "$XSLTPROC"; then |
---|
59 | AC_MSG_ERROR([xsltproc not found]) |
---|
60 | fi |
---|
61 | |
---|
62 | dnl check for DocBook DTD and stylesheets in the local catalog. |
---|
63 | JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN], |
---|
64 | [DocBook XML DTD V4.1.2]) |
---|
65 | JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl], |
---|
66 | [DocBook XSL Stylesheets]) |
---|
67 | |
---|
68 | dnl |
---|
69 | dnl Set PACKAGE_DATA_DIR so we can find the script containing common routines. |
---|
70 | dnl |
---|
71 | if test "x${datadir}" = 'x${prefix}/share'; then |
---|
72 | if test "x${prefix}" = "xNONE"; then |
---|
73 | PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}/data" |
---|
74 | else |
---|
75 | PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}/data" |
---|
76 | fi |
---|
77 | else |
---|
78 | PACKAGE_DATA_DIR="${datadir}/${PACKAGE}/data" |
---|
79 | fi |
---|
80 | |
---|
81 | AC_SUBST([PACKAGE_DATA_DIR]) |
---|
82 | |
---|
83 | |
---|
84 | dnl Only use -Wall if we have gcc |
---|
85 | if test "x$GCC" = "xyes"; then |
---|
86 | if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then |
---|
87 | CFLAGS="$CFLAGS -Wall" |
---|
88 | fi |
---|
89 | fi |
---|
90 | |
---|
91 | |
---|
92 | AC_CONFIG_FILES([Makefile |
---|
93 | gtk-doc.pc |
---|
94 | gtk-doc.dsl |
---|
95 | gtk-doc.spec |
---|
96 | gtk-doc.cat |
---|
97 | gtkdoc-common.pl |
---|
98 | ]) |
---|
99 | |
---|
100 | dnl run chmod on these after parsing them. |
---|
101 | AC_CONFIG_FILES([gtkdoc-mkman], [chmod +x gtkdoc-mkman]) |
---|
102 | AC_CONFIG_FILES([gtkdoc-mkhtml], [chmod +x gtkdoc-mkhtml]) |
---|
103 | AC_CONFIG_FILES([gtkdoc-fixxref], [chmod +x gtkdoc-fixxref]) |
---|
104 | AC_CONFIG_FILES([gtkdoc-mkdb], [chmod +x gtkdoc-mkdb]) |
---|
105 | AC_CONFIG_FILES([gtkdoc-mktmpl], [chmod +x gtkdoc-mktmpl]) |
---|
106 | AC_CONFIG_FILES([gtkdoc-scan], [chmod +x gtkdoc-scan]) |
---|
107 | AC_CONFIG_FILES([gtkdoc-scanobj], [chmod +x gtkdoc-scanobj]) |
---|
108 | AC_CONFIG_FILES([gtkdoc-scangobj], [chmod +x gtkdoc-scangobj]) |
---|
109 | AC_CONFIG_FILES([gtkdocize], [chmod +x gtkdocize]) |
---|
110 | |
---|
111 | AC_OUTPUT |
---|