configure.ac 8.02 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# configure.in - Top-level configure.in for Sympa
# RCS Identication ; $Revision$ ; $Date$ 
#
# Sympa - SYsteme de Multi-Postage Automatique
# Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
# Copyright (c) 1997,1998, 1999 Institut Pasteur & Christophe Wolfhugel
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

22
AC_PREREQ(2.59)
23
AC_INIT(sympa, 6.0a.12, sympa-authors@cru.fr)
24
AM_INIT_AUTOMAKE
salaun's avatar
salaun committed
25

26
27
28
# Setup the VERSION variable
AC_SUBST(VERSION,AC_PACKAGE_VERSION)

salaun's avatar
salaun committed
29
30
31
32
33
AC_PREFIX_DEFAULT(/home/sympa)

## Directories setup
## for main config files

34
35
36
37
## location of main config files
CONFDIR='/etc'
AC_ARG_WITH(confdir, [  --with-confdir=DIR     Sympa main configuration files in DIR  (default /etc)], [CONFDIR="$withval"])
AC_SUBST(CONFDIR)
salaun's avatar
salaun committed
38

39
40
41
42
## location of CGIs
CGIDIR='${prefix}/bin'
AC_ARG_WITH(cgidir, [  --with-cgidir=DIR     CGIs in DIR  (default ${prefix}/bin)], [CGIDIR="$withval"])
AC_SUBST(CGIDIR)
salaun's avatar
salaun committed
43

44
45
46
47
## location of user executables
BINDIR='${prefix}/bin'
AC_ARG_WITH(bindir, [  --with-bindir=DIR     user executables in DIR (default ${prefix}/bin). queue and bouncequeue programs will be installed in this directory. If sendmail is configured to use smrsh (check the mailer prog definition in your sendmail.cf), this should point to /etc/smrsh. This is probably the case if you are using Linux], [BINDIR="$withval"])
AC_SUBST(BINDIR)
salaun's avatar
salaun committed
48

49
50
51
52
## location of system admin executables
SBINDIR='${prefix}/bin'
AC_ARG_WITH(sbindir, [  --with-sbindir=DIR     system admin executables in DIR (default ${prefix}/bin)], [SBINDIR="$withval"])
AC_SUBST(SBINDIR)
salaun's avatar
salaun committed
53

54
55
56
57
## location of program executables
LIBEXECDIR='${prefix}/bin'
AC_ARG_WITH(libexecdir, [  --with-libexecdir=DIR     program executables in DIR (default ${prefix}/bin)], [LIBEXECDIR="$withval"])
AC_SUBST(LIBEXECDIR)
salaun's avatar
salaun committed
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
## location of Perl modules
LIBDIR='${prefix}/bin'
AC_ARG_WITH(libdir, [  --with-libdir=DIR     Perl modules in DIR (default ${prefix}/bin)], [LIBDIR="$withval"])
AC_SUBST(LIBDIR)

## location of default *read-only* data files
DATADIR='${prefix}/bin/etc'
AC_ARG_WITH(datadir, [  --with-datadir=DIR     default *read-only* data files in DIR (default ${prefix}/bin/etc)], [DATADIR="$withval"])
AC_SUBST(DATADIR)

## location of modifiable data files
EXPLDIR='${prefix}/expl'
AC_ARG_WITH(expldir, [  --with-expldir=DIR     modifiable data files in DIR (default ${prefix}/expl)], [EXPLDIR="$withval"])
AC_SUBST(EXPLDIR)

## location of documentation
MANDIR='/usr/local/man'
AC_ARG_WITH(mandir, [  --with-mandir=DIR     documentation in DIR (default /usr/local/man)], [MANDIR="$withval"])
AC_SUBST(MANDIR)
salaun's avatar
salaun committed
78

salaun's avatar
salaun committed
79
80
## SYS V init scripts directory
INITDIR=/etc/rc.d/init.d
salaun's avatar
salaun committed
81
AC_ARG_WITH(initdir, [  --with-initdir=DIR     install System V init script in DIR  (default /etc/rc.d/init.d)], [INITDIR="$withval"])
salaun's avatar
salaun committed
82
83
AC_SUBST(INITDIR)

84
85
## Lock directory
LOCKDIR=/var/lock/subsys
86
AC_ARG_WITH(lockdir, [  --with-lockdir=DIR     create lock files in DIR  (default /var/lock/subsys)], [LOCKDIR="$withval"])
87
88
AC_SUBST(LOCKDIR)

salaun's avatar
salaun committed
89
90
91
92
93
## directory for storing .pid files
PIDDIR='${prefix}'
AC_ARG_WITH(piddir, [  --with-piddir=DIR     create .pid files in DIR  (default ${prefix})], [PIDDIR="$withval"])
AC_SUBST(PIDDIR)

94
95
96
97
98
99
## directory for Config directories populated by the user
ETCDIR='${prefix}/etc'
AC_ARG_WITH(etcdir, [  --with-etcdir=DIR     Config directories populated by the user are in DIR  (default ${prefix}/etc)], [ETCDIR="$withval"])
AC_SUBST(ETCDIR)

## directory for language files
100
101
102
LOCALEDIR='${prefix}/locale'
AC_ARG_WITH(localedir, [  --with-localedir=DIR     create language files in DIR  (default ${prefix}/locale)], [LOCALEDIR="$withval"])
AC_SUBST(LOCALEDIR)
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

## directory for Documentation files
DOCDIR='${prefix}/doc'
AC_ARG_WITH(docdir, [  --with-docdir=DIR     create documentation files in DIR  (default ${prefix}/doc)], [DOCDIR="$withval"])
AC_SUBST(DOCDIR)

## directory for script files
SCRIPTDIR='${prefix}/bin'
AC_ARG_WITH(scriptdir, [  --with-scriptdir=DIR     create script files in DIR  (default ${prefix}/bin)], [SCRIPTDIR="$withval"])
AC_SUBST(SCRIPTDIR)

## directory for sample files
SAMPLEDIR='${prefix}/sample'
AC_ARG_WITH(sampledir, [  --with-sampledir=DIR     create sample files in DIR  (default ${prefix}/sample)], [SAMPLEDIR="$withval"])
AC_SUBST(SAMPLEDIR)

## directory for sample files
SPOOLDIR='${prefix}/spool'
AC_ARG_WITH(spooldir, [  --with-spooldir=DIR     spool directory is DIR  (default ${prefix}/spool)], [SPOOLDIR="$withval"])
AC_SUBST(SPOOLDIR)

salaun's avatar
salaun committed
124
125
126
127
128
129
dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_AIX

AC_PATH_PROG(PERL, perl, /usr/bin/perl)
130
131
AC_ARG_WITH(
    [perl],
132
    AS_HELP_STRING(
133
134
135
	[--with-perl=FULLPATH],
	[set full path to Perl interpreter (default /usr/bin/perl)]
    ),
136
137
    [PERL="$withval"]
)
salaun's avatar
salaun committed
138
139
AC_SUBST(PERL)

140
141
142
AC_PATH_PROG(SUIDPERL, suidperl, /usr/bin/suidperl)
AC_SUBST(SUIDPERL)

sympa-authors's avatar
sympa-authors committed
143
144
145
AC_PATH_PROG(SUDO, sudo, /usr/bin/sudo)
AC_SUBST(SUDO)

146
AC_PATH_PROG(MHONARC, mhonarc, /usr/bin/mhonarc)
147
148
AC_ARG_WITH(
    [mhonarc],
149
    AS_HELP_STRING(
150
151
152
	[--with-mhonarc=FULLPATH],
	[set full path to MhOnArc mail archiving system (default /usr/bin/mhonarc)]
    ),
153
154
    [MHONARC="$withval"]
)
155
156
AC_SUBST(MHONARC)

salaun's avatar
salaun committed
157
AC_PATH_PROG(OPENSSL, openssl, /usr/local/ssl/bin)
158
159
AC_ARG_WITH(
    [openssl],
160
    AS_HELP_STRING(
161
162
163
	[--with-openssl=FULLPATH],
	[set path to OpenSSL (default /usr/local/ssl/bin/openssl)]
    ),
164
165
    [OPENSSL="$withval"]
)
salaun's avatar
salaun committed
166
167
168
169
170
AC_SUBST(OPENSSL)

AC_PATH_PROG(CVS2CL, cvs2cl.pl, /usr/local/bin)
AC_SUBST(CVS2CL)

sympa-authors's avatar
sympa-authors committed
171
AC_PATH_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt)
sympa-authors's avatar
sympa-authors committed
172
AC_SUBST(MSGFMT)
sympa-authors's avatar
sympa-authors committed
173

salaun's avatar
salaun committed
174
USER=sympa
175
176
AC_ARG_WITH(
    [user],
177
    AS_HELP_STRING(
178
179
180
	[--with-user=LOGIN],
	[set sympa user name (default sympa)]
    ),
181
182
    [USER="$withval"]
)
salaun's avatar
salaun committed
183
184
185
AC_SUBST(USER)

GROUP=sympa
186
187
AC_ARG_WITH(
    [group],
188
    AS_HELP_STRING(
189
190
191
	[--with-group=LOGIN],
	[set sympa group name (default sympa)]
    ),
192
193
    [GROUP="$withval"]
)
salaun's avatar
salaun committed
194
195
AC_SUBST(GROUP)

196
SENDMAIL_ALIASES=/etc/mail/sympa_aliases
197
198
AC_ARG_WITH(
    [sendmail_aliases],
199
    AS_HELP_STRING(
200
201
202
	[--with-sendmail_aliases=ALIASFILE],
	[set aliases file to be used by Sympa (default /etc/mail/sympa_aliases)]
    ),
203
204
    [SENDMAIL_ALIASES="$withval"]
)
205
206
AC_SUBST(SENDMAIL_ALIASES)

207
VIRTUAL_ALIASES=/etc/mail/sympa_virtual
208
209
AC_ARG_WITH(
    [virtual_aliases],
210
    AS_HELP_STRING(
211
212
213
	[--with-virtual_aliases=ALIASFILE],
	[ set postfix virtual file to be used by Sympa (default /etc/mail/sympa_virtual)]
    ),
214
215
    [VIRTUAL_ALIASES="$withval"]
)
216
217
AC_SUBST(VIRTUAL_ALIASES)

218
NEWALIASES=/usr/bin/newaliases
219
220
AC_ARG_WITH(
    [newaliases],
221
    AS_HELP_STRING(
222
223
224
	[--with-newaliases=FULLPATH],
	[set path to newaliases command (default /usr/bin/newaliases)]
    ),
225
226
    [NEWALIASES="$withval"]
)
227
228
229
AC_SUBST(NEWALIASES)

NEWALIASES_ARG=
230
231
AC_ARG_WITH(
    [newaliases_arg],
232
    AS_HELP_STRING(
233
234
235
	[--with-newaliases_arg=ARGS],
	[set arguments to newaliases command (default NONE)]
    ),
236
237
    [NEWALIASES_ARG="$withval"]
)
238
239
AC_SUBST(NEWALIASES_ARG)

240
POSTMAP=/usr/sbin/postmap
241
242
AC_ARG_WITH(
    [postmap],
243
    AS_HELP_STRING(
244
245
246
	[--with-postmap=FULLPATH],
	[set path to postfix postmap command (default /usr/sbin/postmap)]
    ),
247
248
    [POSTMAP="$withval"]
)
249
250
AC_SUBST(POSTMAP)

251
POSTMAP_ARG=${VIRTUAL_ALIASES}
252
253
AC_ARG_WITH(
    [postmap_arg],
254
    AS_HELP_STRING(
255
256
257
	[--with-postmap_arg=ARGS],
	[set arguments to postfix postmap command (default [same as virtual_aliases])]
    ),
258
259
    [POSTMAP_ARG="$withval"]
)
260
261
AC_SUBST(POSTMAP_ARG)

262
263
264
265
266
267
268
269
270
271
272
273
AC_CONFIG_FILES([
    Makefile
    src/etc/sample/Makefile
    src/etc/script/Makefile
    src/Makefile
    soap/Makefile
    doc/man8/Makefile
    doc/Makefile
    web_tt2/Makefile
    wwsympa/Makefile
    mail_tt2/Makefile
])
274
AC_OUTPUT