]> git.sesse.net Git - vlc/blob - doc/developer/configure.ac
Don't attempt to create ChangeLogs if not in a git-tree.
[vlc] / doc / developer / configure.ac
1 dnl $Id$
2 dnl Process this file with autoconf to produce a configure script.
3
4 AC_INIT(manual.xml.in,0.0.1)
5
6 AC_CHECK_PROGS(JADE, openjade jade, [nogood])
7
8 if test "$JADE" = nogood ; then
9   AC_MSG_ERROR(You need jade to build the documentation. 
10   Get it from http://openjade.sourceforge.net/)
11 else
12   DOCS="manual.html"
13 fi
14
15 AC_PATH_PROG(LYNX, lynx, [nope])
16
17 if test "$LYNX" = nope ; then
18   AC_MSG_WARN(Can not create text version of manual)
19 else 
20   DOCS="$DOCS manual.txt"
21 fi
22
23 AC_PATH_PROG(DVIPS, dvips, [nodvips])
24 AC_PATH_PROG(JADETEX, jadetex, [nojadetex])
25
26 if test "$DVIPS" = nodvips -o "$JADETEX" = nojadetex ; then
27   AC_MSG_WARN(Can not create PostScript version of manual)
28 else 
29   DOCS="$DOCS manual.ps"
30 fi
31
32 AC_CANONICAL_SYSTEM
33 dnl ========================================================================
34 case "$host_os" in
35   linux* ) 
36     if test -f /etc/redhat-release ; then
37       XML_DECL=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/dtds/decls/xml.dcl
38       HTML_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/html/docbook.dsl
39       PRINT_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/print/docbook.dsl
40       DOCBOOKX_DTD=/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd
41     else 
42       # Assume Debian
43       XML_DECL=/usr/lib/sgml/declaration/xml.decl
44       HTML_SS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
45       PRINT_SS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl
46       DOCBOOKX_DTS=/usr/share/sgml/docbook/dtd/xml/4.1/docbookx.dtd
47     fi
48     ;;  
49   darwin5* | darwin6* )
50     XML_DECL=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/dtds/decls/xml.dcl
51     HTML_SS=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/html/docbook.dsl
52     PRINT_SS=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/print/docbook.dsl
53     DOCBOOKX_DTD=/sw/share/xml/dtd/docbookx/4.1.2/docbookx.dtd
54     ;;  
55   * ) 
56     echo "Don't know $host_os. Picking up from environment."
57     XML_DECL=$XML_DECL
58     HTML_SS=$HTML_SS
59     PRINT_SS=$PRINT_SS
60 esac
61
62 AC_ARG_WITH(xml_decl,
63 [  --with-xml-dcl=PATH    place to find xml.dcl file])
64 if test -n "${xml_decl}"; then
65    XML_DECL=$xml_decl
66 fi
67
68 if test ! -f $XML_DECL ; then
69   AC_MSG_ERROR(Can't find xml.dcl file. Set with --with-xml-dcl.)
70 fi
71
72
73 AC_ARG_WITH(html_ss,
74 [  --with-html-ss=PATH    place to find html/docbook.dsl file])
75 if test -n "${html_ss}"; then
76    HTML_SS=$html_ss
77 fi
78
79 if test ! -f $HTML_SS ; then
80   AC_MSG_ERROR(Can't find html/docbook.dsl file. Set with --with-html-ss.)
81 fi
82
83 AC_ARG_WITH(print_ss,
84 [  --with-print-ss=PATH    place to find print/docbook.dsl file])
85 if test -n "${print_ss}"; then
86    PRINT_SS=$print_ss
87 fi
88
89 if test ! -f $PRINT_SS ; then
90   AC_MSG_ERROR(Can't find print/docbook.dsl file. Set with --with-print-ss.)
91 fi
92
93 AC_ARG_WITH(docbook_dtd,
94 [  --with-dockbook-dtd=PATH    place to find docbookx.dtd file])
95 if test -n "${docbook_dtd}"; then
96    DOCBOOKX_DTD=$docbook_dtd
97 fi
98
99 if test ! -f $DOCBOOKX_DTD ; then
100   AC_MSG_ERROR(Can't find docbook.dsl file. Set with --with-docbook_dtd.)
101 fi
102
103 AC_SUBST(XML_DECL)
104 AC_SUBST(HTML_SS)
105 AC_SUBST(PRINT_SS)
106 AC_SUBST(DOCBOOKX_DTD)
107 AC_SUBST(JADE)
108 AC_SUBST(LYNX)
109 AC_SUBST(DOCS)
110
111 AC_CONFIG_FILES([manual.xml Makefile])
112 AC_OUTPUT