Fix some warnings
[Samba.git] / docs / configure.in
blobe4f79fbc182d7c2b68788b883b7dee7eb97f834b
1 AC_INIT(settings.xsl.in)
3 PAPERSIZE=""
4 DUPLICATE_ULINKS=""
6 DOCROP="0"
8 AC_ARG_WITH(samba-sources,
9 [ --with-samba-sources=DIR Specify path to Samba sources],
10 [ test "$withval" && SPECIFIED_SOURCEDIR="$withval" ])
12 AC_ARG_ENABLE(crop,
13 [ --enable-crop            Whether to use a crop template],
14 [ test "$withval" && DOCROP="1" ])
16 PAPERSIZE="a4paper"
18 AC_ARG_WITH(papersize,
19 [ --with-papersize         Specify papersize (a4paper,letter) ],
20 [ test "$withval" && PAPERSIZE="$withval" ])
22 FONTSIZE="10.5"
24 AC_ARG_WITH(fontsize,
25 [ --with-fontsize          Specify the fontsize in points (default: 10.5) ],
26 [ test "$withval" && FONTSIZE="$withval" ])
28 AC_ARG_ENABLE(printable,
29 [ --enable-printable       Printable output (expand ulinks, etc)],
30 [ test "$withval" && DUPLICATE_ULINKS="footnote" ])
33 DOC_BUILD_DATE=`date '+%d-%m-%Y'`
34 AC_SUBST(DOC_BUILD_DATE)
35 AC_SUBST(PAPERSIZE)
36 AC_SUBST(DUPLICATE_ULINKS)
37 AC_SUBST(FONTSIZE)
38 AC_SUBST(DOCROP)
39 AC_SUBST(SAMBASOURCEDIR)
41 DOCS_TARGET_REQUIRE_PROGRAM(XSLTPROC, xsltproc, ALL)
42 DOCS_TARGET_REQUIRE_PROGRAM(RM, rm, ALL)
43 DOCS_TARGET_REQUIRE_PROGRAM(DIA, dia, ALL)
45 # Check dia version number
46 [ DIA_VERSION=`$DIA -v | egrep -o '([0-9]+)\.([0-9]+)'`]
47 DIA_MAJ_VERSION=`echo $DIA_VERSION | cut -d . -f 1`
48 DIA_MIN_VERSION=`echo $DIA_VERSION | cut -d . -f 2`
50 if test "$DIA_MAJ_VERSION" -le "0"
51 then
52         if test "$DIA_MIN_VERSION" -le "92" && test -z "$DISPLAY" 
53         then
54                 AC_MSG_ERROR([Dia below 0.93 requires an X environment. Set \$DISPLAY or install Dia 0.93 or higher])
55         fi
58 DOCS_TARGET_REQUIRE_PROGRAM(MAKEINDEX, makeindex, LATEX)
59 DOCS_TARGET_REQUIRE_PROGRAM(PDFLATEX, pdflatex, PDF)
60 DOCS_TARGET_REQUIRE_PROGRAM(EPSTOPDF, epstopdf, PDF)
61 DOCS_TARGET_REQUIRE_PROGRAM(THUMBPDF, thumbpdf, PDF)
62 DOCS_TARGET_REQUIRE_PROGRAM(PNGTOPNM, pngtopnm, PS)
63 DOCS_TARGET_REQUIRE_PROGRAM(PNMTOPS, pnmtops, PS)
64 DOCS_TARGET_REQUIRE_PROGRAM(LATEX, latex, PS)
65 DOCS_TARGET_REQUIRE_PROGRAM(DVIPS, dvips, PS)
66 DOCS_TARGET_REQUIRE_PROGRAM(PLUCKERBUILD, plucker-build, PLUCKER)
67 DOCS_TARGET_REQUIRE_PROGRAM(HTML2TEXT, html2text, TXT)
68 DOCS_TARGET_REQUIRE_PROGRAM(PERL, perl, UNDOCUMENTED)
69 DOCS_TARGET_REQUIRE_PROGRAM(XMLLINT, xmllint, VERIFY)
70 DOCS_TARGET_REQUIRE_PROGRAM(FOP, fop, FOPDF)
71 DOCS_TARGET_REQUIRE_DIR([$SPECIFIED_SOURCEDIR ..], [source/configure.in], SAMBASOURCEDIR, UNDOCUMENTED)
73 AC_MSG_RESULT([])
74 AC_MSG_RESULT([Summary:])
75 AC_MSG_RESULT([--------------])
77 DOCS_DEFINE_TARGET(ALL, [], [base requirements], [])
78 DOCS_DEFINE_TARGET(LATEX, ALL, [LaTeX versions], [tex])
79 DOCS_DEFINE_TARGET(PDF, LATEX, [PDF versions], [pdf])
80 DOCS_DEFINE_TARGET(PS, LATEX, [PostScript versions], [ps])
81 DOCS_DEFINE_TARGET(HTML, ALL, [HTML versions], [html])
82 DOCS_DEFINE_TARGET(HTMLHELP, ALL, [HTML Help versions], [htmlhelp])
83 DOCS_DEFINE_TARGET(HTMLMAN, ALL, [HTML versions of the manpages], [htmlman])
84 DOCS_DEFINE_TARGET(MANPAGES, ALL, [manpages], [manpages])
85 DOCS_DEFINE_TARGET(PEARSON, ALL, [pearson-compatible XML], [pearson])
86 DOCS_DEFINE_TARGET(PLUCKER, HTML, [plucker versions], [plucker])
87 DOCS_DEFINE_TARGET(VERIFY, ALL, [verifying docbook output], [verify])
88 DOCS_DEFINE_TARGET(FOPDF, ALL, [PDF versions thru FO], [fopdf])
89 DOCS_DEFINE_TARGET(UNDOCUMENTED, MANPAGES, [list of undocumented options], [undocumented])
90 DOCS_DEFINE_TARGET(TXT, HTML, [text versions], [txt])
92 if test x"$TARGETS" = x; then 
93         AC_MSG_ERROR([You won't be able to build any of the docs])
94 else 
95         AC_MSG_RESULT([You will be able to build: $TARGETS])
98 AC_SUBST(TARGETS)
100 AC_OUTPUT( Makefile.settings settings.xsl )