configure.ac 8.84 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
24
25
AC_INIT(sympa, 6.0a.13, sympa-authors@cru.fr)
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AM_PO_SUBDIRS
salaun's avatar
salaun committed
26

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

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

32
33
34
35
36
37
38
39
40
41
42
43
# configuration
AC_ARG_WITH(
    confdir,
    AS_HELP_STRING(
	[--with-confdir=DIR],
	[obsolete option, use --sysconfdir instead]
    ),
    [
	AC_MSG_WARN([obsolete --with-confdir option used])
	sysconfdir="$withval"
    ]
)
salaun's avatar
salaun committed
44

45
AC_ARG_WITH(
46
    etcdir,
47
    AS_HELP_STRING(
48
49
	[--with-etcdir=DIR],
	[obsolete option, use --sysconfdir instead]
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
    [AC_MSG_WARN([obsolete --with-etcdir option used])]
)

# binaries
AC_ARG_WITH(
    bindir,
    AS_HELP_STRING(
	[--with-bindir=DIR],
	[obsolete option, those binaries are now installed in libexecdir]
    ),
    [AC_MSG_WARN([obsolete --with-sampledir option used])]
)

AC_ARG_WITH(
    sbindir,
    AS_HELP_STRING(
	[--with-sbindir=DIR],
	[obsolete option, use --sbindir instead]
    ),
    [
	AC_MSG_WARN([obsolete --with-sbindir option used])
	sbindir="$withval"
    ]
)

AC_ARG_WITH(
    libexecdir,
    AS_HELP_STRING(
	[--with-libexecdir=DIR],
	[obsolete option, use --libexecdir instead]
    ),
    [
	AC_MSG_WARN([obsolete --with-libexecdir option used])
	libexecdir="$withval"
    ]
)

# arch-dependant files
execcgidir='${libdir}/sympa/cgi'
AC_ARG_WITH(
    cgidir,
    AS_HELP_STRING(
	[--with-cgidir=DIR],
	[CGIs in DIR (default ${libdir}/sympa/cgi)]
    ),
    [execcgidir="$withval"]
)
AC_SUBST(execcgidir)

# arch-independant files
AC_ARG_WITH(
    datadir,
    AS_HELP_STRING(
	[--with-datadir=DIR]
	[obsolete option, use --datadir instead]
    ),
    [
	AC_MSG_WARN([obsolete --with-datadir option used])
	datadir="$withval"
    ]
)

AC_ARG_WITH(
    libdir,
    AS_HELP_STRING(
	[--with-libdir=DIR]
	[obsolete option, perl modules are now installed with data]
    ),
    [
	AC_MSG_WARN([obsolete --with-libdir option used])
    ]
)

# locales
125
localedir='${prefix}/locale'
126
127
128
129
130
131
132
133
134
135
136
AC_ARG_WITH(
    localedir,
    AS_HELP_STRING(
	[--with-localedir=DIR],
	[obsolete option, use --localedir instead]
    ),
    [
     AC_MSG_WARN([obsolete --with-localedir option used])
     localedir="$withval"
    ]
)
137
AC_SUBST(localedir)
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

# documentation
AC_ARG_WITH(
    mandir,
    AS_HELP_STRING(
	[--with-mandir=DIR],
	[obsolete option, use --mandir instead]
    ),
    [
     AC_MSG_WARN([obsolete --with-mandir option used])
     mandir="$withval"
     ]
)

AC_ARG_WITH(
    docdir,
    AS_HELP_STRING(
	[--with-docdir=DIR],
	[obsolete option, use --docdir instead]
    ),
    [
	AC_MSG_WARN([obsolete --with-docdir option used])
	docdir="$withval"
    ]
)

AC_ARG_WITH(
    sampledir,
    AS_HELP_STRING(
	[--with-sampledir=DIR],
	[obsolete option, samples are now installed with documentation]
    ),
    [
	AC_MSG_WARN([obsolete --with-sampledir option used])
    ]
)

# variable content
expldir='${prefix}/expl'
AC_ARG_WITH(
    expldir,
    AS_HELP_STRING(
	[--with-expldir=DIR],
	[variable state directory is DIR (default ${prefix}/expl)]
    ),
    [expldir="$withval"]
184
)
185
AC_SUBST(expldir)
salaun's avatar
salaun committed
186

187
188
189
190
191
192
193
194
195
196
spooldir='${prefix}/spool'
AC_ARG_WITH(
    spooldir,
    AS_HELP_STRING(
	[--with-spooldir=DIR],
	[application spool directory is DIR (default ${prefix}/spool)]
    ),
    [spooldir="$withval"]
)
AC_SUBST(spooldir)
197

198
199
200
201
202
203
204
205
206
207
initdir='${sysconfdir}/rc.d/init.d'
AC_ARG_WITH(
    initdir,
    AS_HELP_STRING(
	[--with-initdir=DIR],
	[install System V init script in DIR  (default ${sysconfdir}/rc.d/init.d)]
    ),
    [initdir="$withval"]
)
AC_SUBST(initdir)
sympa-authors's avatar
sympa-authors committed
208

209
lockdir='${localstatedir}/lock/subsys'
210
AC_ARG_WITH(
211
    lockdir,
212
    AS_HELP_STRING(
213
214
	[--with-lockdir=DIR],
	[create lock files in DIR  (default ${localstatedir}/lock/subsys)]
215
    ),
216
    [lockdir="$withval"]
217
)
218
AC_SUBST(lockdir)
219

220
piddir='${localstatedir}/run'
221
AC_ARG_WITH(
222
    piddir,
223
    AS_HELP_STRING(
224
225
	[--with-piddir=DIR],
	[create .pid files in DIR (default ${localstatedir}/run)]
226
    ),
227
    [piddir="$withval"]
228
)
229
230
231
232
AC_SUBST(piddir)

# various subdirectories
pkgdatadir=$datadir/sympa
233

234
modulesdir=$pkgdatadir/lib
235
236
237
238
239
240
241
242
243
244
AC_ARG_WITH(
    modulesdir,
    AS_HELP_STRING(
	[--with-modulesdir=DIR],
	[Perl modules file installed with Sympa in DIR (modules $pkgdatadir/etc)]
    ),
    [modulesdir="$withval"]
)
AC_SUBST(modulesdir)

245
defaultdir=$pkgdatadir/etc
246
247
248
249
250
251
252
253
254
255
AC_ARG_WITH(
    defaultdir,
    AS_HELP_STRING(
	[--with-defaultdir=DIR],
	[default configuration files, scenarios and templates in DIR (default $pkgdatadir/etc)]
    ),
    [defaultdir="$withval"]
)
AC_SUBST(defaultdir)

256
257
mailtemplatedir=$defaultdir/mail_tt2
webtemplatedir=$defaultdir/web_tt2
258
259
260
261
262
263
264
265
266
267

scriptdir=$pkgdatadir/bin
AC_ARG_WITH(
    scriptdir,
    AS_HELP_STRING(
	[--with-scriptdir=DIR],
	[application script directory is DIR (default $pkgdatadir/bin)]
    ),
    [scriptdir="$withval"]
)
268
AC_SUBST(scriptdir)
269
270


271
272
273
AC_SUBST(mailtemplatedir)
AC_SUBST(webtemplatedir)

274
CONFIG=$sysconfdir/sympa.conf
275
AC_SUBST(CONFIG)
276
WWSCONFIG=$sysconfdir/wwsympa.conf
277
278
279
280
281
AC_SUBST(WWSCONFIG)

AC_PROG_CC
# needed for using per-target flags
AM_PROG_CC_C_O
salaun's avatar
salaun committed
282

283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
AC_ARG_WITH(
    [perl],
    AS_HELP_STRING(
	[--with-perl=FULLPATH],
        [set full path to Perl interpreter]
    ),
    [PERL="$withval"]
)
if test -n "$PERL"; then
    # user-supplied value
    AC_MSG_CHECKING([user-supplied perl interpreter])
    if test -f "$PERL"; then
	:
    else
	AC_MSG_RESULT([non-existing])
	AC_MSG_ERROR([invalid value $PERL for perl interpreter])
    fi
    if test -x "$PERL"; then
	:
    else
	AC_MSG_RESULT([non-executable])
	AC_MSG_ERROR([invalid value $PERL for perl interpreter])
    fi
    AC_MSG_RESULT([$PERL])
else
    # check in PATH
    AC_PATH_PROG(PERL, perl)
    if test -z "$PERL"; then
	AC_MSG_ERROR([perl required])
    fi
fi
sympa-authors's avatar
sympa-authors committed
314

salaun's avatar
salaun committed
315
USER=sympa
316
317
AC_ARG_WITH(
    [user],
318
    AS_HELP_STRING(
319
320
321
	[--with-user=LOGIN],
	[set sympa user name (default sympa)]
    ),
322
323
    [USER="$withval"]
)
salaun's avatar
salaun committed
324
325
326
AC_SUBST(USER)

GROUP=sympa
327
328
AC_ARG_WITH(
    [group],
329
    AS_HELP_STRING(
330
331
332
	[--with-group=LOGIN],
	[set sympa group name (default sympa)]
    ),
333
334
    [GROUP="$withval"]
)
salaun's avatar
salaun committed
335
336
AC_SUBST(GROUP)

337
SENDMAIL_ALIASES=/etc/mail/sympa_aliases
338
339
AC_ARG_WITH(
    [sendmail_aliases],
340
    AS_HELP_STRING(
341
342
343
	[--with-sendmail_aliases=ALIASFILE],
	[set aliases file to be used by Sympa (default /etc/mail/sympa_aliases)]
    ),
344
345
    [SENDMAIL_ALIASES="$withval"]
)
346
347
AC_SUBST(SENDMAIL_ALIASES)

348
349
350
351
## The postfix virtual file we use. Better use a seperate one for sympa.
## Of course an extra alias file must be generated with proper permissions
## (owner sympa, write access for sympa, no write access for anyone else)
## and declared in main.cf!
352
VIRTUAL_ALIASES=/etc/mail/sympa_virtual
353
354
AC_ARG_WITH(
    [virtual_aliases],
355
    AS_HELP_STRING(
356
357
358
	[--with-virtual_aliases=ALIASFILE],
	[ set postfix virtual file to be used by Sympa (default /etc/mail/sympa_virtual)]
    ),
359
360
    [VIRTUAL_ALIASES="$withval"]
)
361
362
AC_SUBST(VIRTUAL_ALIASES)

363
NEWALIASES=/usr/bin/newaliases
364
365
AC_ARG_WITH(
    [newaliases],
366
    AS_HELP_STRING(
367
368
369
	[--with-newaliases=FULLPATH],
	[set path to newaliases command (default /usr/bin/newaliases)]
    ),
370
371
    [NEWALIASES="$withval"]
)
372
373
374
AC_SUBST(NEWALIASES)

NEWALIASES_ARG=
375
376
AC_ARG_WITH(
    [newaliases_arg],
377
    AS_HELP_STRING(
378
379
380
	[--with-newaliases_arg=ARGS],
	[set arguments to newaliases command (default NONE)]
    ),
381
382
    [NEWALIASES_ARG="$withval"]
)
383
384
AC_SUBST(NEWALIASES_ARG)

385
POSTMAP=/usr/sbin/postmap
386
387
AC_ARG_WITH(
    [postmap],
388
    AS_HELP_STRING(
389
390
391
	[--with-postmap=FULLPATH],
	[set path to postfix postmap command (default /usr/sbin/postmap)]
    ),
392
393
    [POSTMAP="$withval"]
)
394
395
AC_SUBST(POSTMAP)

396
POSTMAP_ARG=${VIRTUAL_ALIASES}
397
398
AC_ARG_WITH(
    [postmap_arg],
399
    AS_HELP_STRING(
400
401
402
	[--with-postmap_arg=ARGS],
	[set arguments to postfix postmap command (default [same as virtual_aliases])]
    ),
403
404
    [POSTMAP_ARG="$withval"]
)
405
406
AC_SUBST(POSTMAP_ARG)

407
408
409
AC_CONFIG_FILES([
    Makefile
    src/Makefile
410
411
    src/etc/Makefile
    src/etc/script/Makefile
412
413
    soap/Makefile
    doc/Makefile
414
415
    doc/man8/Makefile
    doc/sample/Makefile
416
417
418
    web_tt2/Makefile
    wwsympa/Makefile
    mail_tt2/Makefile
419
420
    po/Makefile.in
    po-wwsympa/Makefile.in
421
])
422
AC_OUTPUT