File: configure.ac

package info (click to toggle)
systraq 0.0.20081217-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,456 kB
  • ctags: 13
  • sloc: sh: 785; makefile: 124
file content (250 lines) | stat: -rw-r--r-- 8,077 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
dnl
dnl $Id: configure.ac 355 2008-11-19 01:03:45Z joostvb $
dnl $URL$
dnl
dnl The DocBook build stuff is inspired by LogReport's Lire
dnl ( http://www.logreport.org/ ) documentation build system which is
dnl Copyright (C) 2000, 2001, 2002, 2003, 2004 Stichting LogReport Foundation
dnl
dnl Copyright (C) 2001, 2002, 2003, 2004, 2005 Joost van Baal
dnl
dnl     This program is free software; you can redistribute it and/or modify
dnl     it under the terms of the GNU General Public License as published by
dnl     the Free Software Foundation; either version 2 of the License, or
dnl     (at your option) any later version.
dnl 
dnl     This program is distributed in the hope that it will be useful,
dnl     but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl     GNU General Public License for more details.
dnl 
dnl     You should have received a copy of the GNU General Public License
dnl     along with this program (see COPYING); if not, check with
dnl     http://www.gnu.org/copyleft/gpl.html or write to the Free Software 
dnl     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
dnl
dnl Run autoscan to regenerate this file.
dnl After editing this file, run automake to regenerate Makefile.in's.
dnl Process this file with autoconf to produce a configure script.

m4_include([VERSION.m4])dnl

AC_INIT([systraq],[ST_VERSION],[joostvb-systraq-20041015@mdcc.cx])

AC_PREREQ(2.61)

AC_COPYRIGHT([
Copyright (C) Copyright 2001, 2002, 2003, 2004, 2005  Joost van Baal
])

AM_INIT_AUTOMAKE()

AC_PROG_INSTALL
AC_PROG_LN_S

# AC_DEFINE_DIR is defined in acinclude.m4
AC_DEFINE_DIR([SYSCONF_PATH], [sysconfdir/$PACKAGE])
AC_DEFINE_DIR(BIN_PATH, bindir)
AC_DEFINE_DIR(SBIN_PATH, sbindir)
AC_DEFINE_DIR(LIBEXEC_PATH, [libexecdir/$PACKAGE])
AC_DEFINE_DIR(LOCALSTATE_PATH, [localstatedir/lib/$PACKAGE])
dnl AC_DEFINE_DIR(SCRIPT_PATH, datadir/systraq)
AC_DEFINE_DIR(DOC_PATH, [datadir/doc/$PACKAGE])
AC_DEFINE_DIR(CRON_PATH, [sysconfdir/cron.d])

dnl homedirectory of systraq user ( /usr/local/var/lib/systraq )
AC_DEFINE_DIR(HOME_PATH, LOCALSTATE_PATH)


dnl local hacks
YEAR=`cat $srcdir/stamp.year`
AC_SUBST(YEAR)
MONTH=`cat $srcdir/stamp.month`
AC_SUBST(MONTH)
DAY=`cat $srcdir/stamp.day`
AC_SUBST(DAY)


dnl lots of stuff used to build the DocBook documentation.
AC_MSG_CHECKING(for SGML Declaration for XML 1.0)
if test -z "$XMLDCL"
then
    if test -f /usr/share/sgml/declaration/xml.dcl
    then
        XMLDCL=/usr/share/sgml/declaration/xml.dcl
        AC_MSG_RESULT($XMLDCL)
    else
        AC_MSG_ERROR([
            The SGML Declaration for XML 1.0 is required for building.
            No file /usr/share/sgml/declaration/xml.dcl is present on your
            system; I don't know where to find this declaration elsewhere.
            If it is installed in some location on your system, set the
            XMLDCL environment variable to this files full pathname before
            running ./configure.  If you really lack this file:
            It is shipped with the sgml-data Debian package, available from
            http://packages.debian.org/sgml-data.  It can be found elsewhere
            too.])
    fi
else
    AC_MSG_RESULT($XMLDCL)
    if test -f "$XMLDCL"
    then
        :
    else
        AC_MSG_WARN($XMLDCL isn't present on the system)
    fi
fi
AC_SUBST(XMLDCL)

AC_MSG_CHECKING(for DocBook XSL stylesheet for manpages)
if test -z "$MANXSL"
then
    if test -f /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
    then
        MANXSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
        AC_MSG_RESULT($MANXSL)
    else
        AC_MSG_ERROR([
            A DocBook XSL stylesheet for manpages is required for building.
            No file /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
            is present on your system; I don't know where to find this
            stylesheet elsewhere.  If it is installed in some location on your
            system, set the MANXSL environment variable to this files full
            pathname before running ./configure.  If you really lack this file:
            It is shipped with the docbook-xsl tarball as published via the
            Sourceforge DocBook Open Repository by Norman Walsh e.a., on
            http://docbook.sourceforge.net/projects/xsl/ .  It comes with many
            GNU/Linux and BSD distributions too.])
    fi
else
    AC_MSG_RESULT($MANXSL)
    if test -f "$MANXSL"
    then
        :
    else
        AC_MSG_WARN($MANXSL isn't present on the system)
    fi
fi
AC_SUBST(MANXSL)

AC_PATH_PROGS(XP, xsltproc)
if test -z "$XP"
then
    AC_MSG_ERROR([
        xsltproc by Daniel Veillard is required for building.
        It can be downloaded from http://xmlsoft.org/XSLT/ and is
        shipped with many GNU/Linux and BSD distributions.])
fi

AC_PATH_PROGS(W3M, w3m)
AC_PATH_PROGS(LYNX, lynx)
if test -z "$W3M"
then
    if test -z "$LYNX"
    then
        AC_MSG_ERROR([
            Either w3m or Lynx is required for building.  W3m can be
            downloaded from http://sourceforge.net/projects/w3m.  Lynx can be
            downloaded from http://lynx.isc.org/release/.  Both w3m and Lynx
            are shipped with many GNU/Linux and BSD distributions.])
    else
        HTML2TXT="$LYNX -dump -nolist"
    fi
else
    HTML2TXT="$W3M -dump"
fi
AC_SUBST(HTML2TXT)
dnl html2text from http://userpage.fu-berlin.de/~mbayer/tools/ might give
dnl nice results too

AC_PATH_PROGS(JADE, openjade jade)
if test -z "$JADE"
then
    AC_MSG_ERROR([
        OpenJade or Jade is required for building.
        OpenJade can be downloaded from http://openjade.sourceforge.net/ and is
        shipped with many GNU/Linux and BSD distributions.])
fi

AC_PATH_PROGS(JADETEX, jadetex)
if test -z "$JADETEX"
then
    AC_MSG_ERROR([
        JadeTeX is required for building.
        It can be downloaded from http://jadetex.sourceforge.net/ and is
        shipped with many GNU/Linux and BSD distributions.])
fi

AC_PATH_PROGS(PDFJADETEX, pdfjadetex)
if test -z "$PDFJADETEX"
then
    AC_MSG_ERROR([
        JadeTeX's pdfjadetex is required for building.
        It can be downloaded from http://jadetex.sourceforge.net/ and is
        shipped with many GNU/Linux and BSD distributions.])
fi

AC_PATH_PROGS(DVIPS, dvips)
if test -z "$DVIPS"
then
    AC_MSG_ERROR([
        teTeX's dvips is required for building.
        It can be downloaded from
        ftp://ftp.dante.de:/pub/tex/systems/unix/teTeX and is shipped with
        many GNU/Linux and BSD distributions.])
fi

## AC_PATH_PROGS(PS2PDF, ps2pdf)
## if test -z "$PS2PDF"
## then
##     AC_MSG_ERROR([
##         Ghostscripts's ps2pdf is required for building.
##         Is can be downloaded from
##         ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/
##         and is shipped with many GNU/Linux and BSD distributions.])
## fi

dnl end of docbook build stuff

dnl end of build-time dependencies

dnl run-time dependencies

AC_PATH_PROGS(RUN_PARTS, run-parts)
if test -z "$RUN_PARTS"
then
    AC_MSG_WARN([
        run-parts is required for running systraq.  run-parts is shipped with
        the debianutils Debian package, which can be downloaded (in both source
        and binary form) from http://packages.debian.org/debianutils .  If you'd
        rather not want to install that on your system you might want to
        reimplement run-parts in a quick and dirty way:

         cat <<EOT > ~/bin/run-parts
         #!/bin/sh
         for f in $1/*; do ./$f; done
         EOT

        (A somewhat less ugly implementation is in the contrib/ directory in
        the systraq source distribution.) Rerun ./configure afterwards.])
fi

dnl list of to be expanded .in files
AC_CONFIG_FILES([
   Makefile
   doc/Makefile
   doc/man.ent
   etc/Makefile
   etc/filetraq.conf
   etc/snapshot_pub.list
   etc/systraq
   lib/Makefile
   man/Makefile
   man/man.ent
   script/st_snapshot.hourly
   script/systraq
   script/Makefile
   contrib/Makefile
])
AC_OUTPUT