File: configure.in

package info (click to toggle)
solid-pop3d 0.15-21
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 884 kB
  • ctags: 448
  • sloc: ansic: 6,085; sh: 4,682; makefile: 527
file content (437 lines) | stat: -rw-r--r-- 10,664 bytes parent folder | download | duplicates (9)
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
dnl $Id: configure.in,v 1.8 2000/05/12 15:40:10 jurekb Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/authenticate.c)

PACKAGE=solid-pop3d
VERSION=0.15

AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_CANONICAL_HOST

dnl Checks for authenticate methods (mostly ripped from SSH)
SPOPLIBS=""
case "$host" in
	*-*-sunos4.1.1*)
		os_sunos=yes
		;;
	*-*-sunos*)
		os_sunos=yes
		;;
	*-sgi-irix5*)
		AC_DEFINE(HAVE_ETC_SHADOW)
		no_shadow_password_checking=yes
		no_libsun=yes
		;;
	*-sgi-irix6*)
		AC_DEFINE(HAVE_ETC_SHADOW)
		no_shadow_password_checking=yes
		no_libsun=yes
		;;
	*-dec-ultrix*)
		AC_DEFINE(HAVE_ULTRIX_SHADOW_PASSWORDS)
		AC_CHECK_LIB(auth, authenticate_user, [
			SPOPLIBS="$SPOPLIBS -lauth"] )
		no_shadow_password_checking=yes
		;;
	*-*-hpux*)
		AC_MSG_CHECKING(for HPUX tcb auth option)
		if test -f /tcb/files/auth/system/pw_id_map; then
			AC_MSG_RESULT(yes)
			AC_DEFINE(HAVE_HPUX_TCB_AUTH)
			SPOPLIBS="$SPOPLIBS -lsec"
			no_shadow_password_checking=yes
		else
			AC_MSG_RESULT(no)
		fi
		;;
	*-*-linux*)
		AC_CHECK_FUNC(getspnam, [
			getspnam_found=yes])
		if test -z "$getspnam_found" ; then
			AC_CHECK_LIB(shadow, getspnam, [
				getspnam_found=yes
				SPOPLIBS="$SPOPLIBS -lshadow"] )
		fi
		no_shadow_password_checking=yes
		AC_DEFINE(HAVE_ETC_SHADOW)
		;;
	i*86-unknown-sco3.2v4*)
		AC_DEFINE(HAVE_SCO_ETC_SHADOW)
		no_shadow_password_checking=yes
		;;
	i*86-unknown-sco3.2v5*)
		AC_DEFINE(HAVE_SCO_ETC_SHADOW)
		no_shadow_password_checking=yes
		;;	
	*-convex-bsd*)
		no_shadow_password_checking=yes
		;;
	*-*-freebsd*)
		no_shadow_password_checking=yes
		;;
	*-*-netbsd*|*-*-openbsd*)
		no_shadow_password_checking=yes
		;;
	*)
		;;
esac

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
AC_C_BIGENDIAN
AC_CHECK_FUNCS(strchr memcpy setgroups flock)
AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h syslog.h unistd.h shadow.h grp.h sys/time.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_CHECK_TYPE(ssize_t, int)
AC_MSG_CHECKING(for socklen_t)
AC_TRY_COMPILE( [
	#include <sys/types.h>
	#include <sys/socket.h>], [
	socklen_t tmp;],[
	AC_MSG_RESULT(yes)], [
	AC_DEFINE_UNQUOTED(socklen_t, int)
	AC_MSG_RESULT(no)])
dnl Simple AC_CHECK_TYPE doesn't work.

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(vsnprintf snprintf)
AC_CHECK_FUNCS(gethostname mkdir rmdir utime strdup strerror strtol setsockopt)
AC_CHECK_FUNC(authenticate)
AC_CHECK_FUNC(inet_aton, [
	inet_aton_found=yes], [
	AC_CHECK_LIB(resolv, inet_aton, SPOPLIBS="$SPOPLIBS -lresolv") ] )

AC_CHECK_LIB(nsl, t_accept, SPOPLIBS="$SPOPLIBS -lnsl")
AC_CHECK_LIB(socket, socket, SPOPLIBS="$SPOPLIBS -lsocket")

dnl Check for maillock() - ripped from qpopper
AC_CHECK_LIB(mail, maillock, SPOPLIBS="$SPOPLIBS -lmail"; AC_DEFINE(MAILOCK))

dnl Checks for authentication methods (mostly ripped from SSH)
AC_CHECK_FUNC(crypt, [
	crypt_found=yes] )
if test -z "$crypt_found"; then
	AC_CHECK_LIB(crypt, crypt, [
		SPOPLIBS="$SPOPLIBS -lcrypt"
		crypt_found=yes] )
fi

if test -z "$getspnam_found"; then
	AC_CHECK_FUNC(getspnam, [
		getspnam_found=yes] )
	if test -z "$getspnam_found"; then
		AC_CHECK_LIB(sec, getspnam, [
			SPOPLIBS="$SPOPLIBS -lsec"
			getspnam_found=yes] )
	fi
fi
AC_CHECK_FUNC(getpwnam, [
	getpwnam_found=yes] )

if test -z "$no_libsun"; then
	if test -z "$getpwnam_found"; then
		AC_CHECK_LIB(sun, getpwnam, [
			getpwnam_found=yes
			LIBS="$LIBS -lsun"] )
	fi
fi
if test -z "$no_shadow_password_checking"; then
	AC_MSG_CHECKING(for shadow passwords)
	if test -f /etc/shadow; then
		if test "$ac_cv_header_shadow_h" = "yes"; then
			AC_DEFINE(HAVE_ETC_SHADOW)
			AC_MSG_RESULT(/etc/shadow)
			if test -z "$getspnam_found"; then	
				AC_CHECK_LIB(shadow, getspnam, SPOPLIBS="$SPOPLIBS -lshadow")
			fi
		else
			AC_MSG_RESULT(no)
		fi
	elif test -n "$os_sunos"; then
		AC_DEFINE(HAVE_ETC_SECURITY_PASSWD_ADJUNCT)
		AC_MSG_RESULT(/etc/security/passwd.adjunct)
	else
		AC_MSG_RESULT(no)
	fi
fi

AC_MSG_CHECKING(whether to use PAM)
AC_ARG_ENABLE(pam,
	[  --enable-pam            use PAM to authenticate user],
	[	if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			if test -f /usr/include/security/pam_appl.h; then
				AC_DEFINE(HAVE_PAM)
				SPOPLIBS="$SPOPLIBS -lpam -ldl"
				AC_MSG_RESULT(yes)
			else
				AC_MSG_RESULT(no)
			fi
		fi
	],
	AC_MSG_RESULT(no) )
AC_SUBST(SPOPLIBS)

POP_AUTH=""
APOP_O=""
POP_AUTH_1=""
AC_MSG_CHECKING(whether to support APOP)
AC_ARG_ENABLE(apop,
	[  --enable-apop           compile server with APOP support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			POP_AUTH="pop_auth"
			POP_AUTH_1="pop_auth.1"
			APOP_O="apop.o"
			AC_DEFINE(APOP)			
		fi
	],
	AC_MSG_RESULT(no) )
AC_SUBST(POP_AUTH)
AC_SUBST(APOP_O)
AC_SUBST(POP_AUTH_1)

MAILBOX_O="mailbox.o"
AC_MSG_CHECKING(whether to support mailbox)
AC_ARG_ENABLE(mailbox,
	[  --enable-mailbox        compile server with mailbox support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
			MAILBOX_O=""
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(MDMAILBOX)
		fi
	],
	[	AC_MSG_RESULT(yes)
		AC_DEFINE(MDMAILBOX)
	] )
AC_SUBST(MAILBOX_O)

MAILDIR_O="maildir.o"
AC_MSG_CHECKING(whether to support maildir)
AC_ARG_ENABLE(maildir,
	[  --enable-maildir        compile server with maildir support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
			MAILDIR_O=""
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(MDMAILDIR)
		fi
	],
	[	AC_MSG_RESULT(yes)
		AC_DEFINE(MDMAILDIR)
	] )
AC_SUBST(MAILDIR_O)

CONFIGFILE_O="configfile.o"
CONFIGSCAN_O="configscan.o"
AC_MSG_CHECKING(whether to support configuration file)
AC_ARG_ENABLE(configfile,
	[  --enable-configfile     compile server with configuration file support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
			CONFIGFILE_O=""
			CONFIGSCAN_O=""
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(CONFIGFILE)
		fi
	],
	[	AC_MSG_RESULT(yes)
		AC_DEFINE(CONFIGFILE)
	] )
AC_SUBST(CONFIGFILE_O)
AC_SUBST(CONFIGSCAN_O)

AC_MSG_CHECKING(whether to support message expiration)
AC_ARG_ENABLE(expire,
	[  --enable-expire         compile server with message expiration support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(EXPIRATION)
		fi
	],
	[	AC_MSG_RESULT(yes)
		AC_DEFINE(EXPIRATION)
	] )

USERCONFIG_O="userconfig.o"
AC_MSG_CHECKING(whether to support user configuration)
AC_ARG_ENABLE(userconfig,
	[  --enable-userconfig     compile server with user configuration support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
			USERCONFIG_O=""
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(USERCONFIG)
		fi
	],
	[	AC_MSG_RESULT(yes)
		AC_DEFINE(USERCONFIG)
	] )
AC_SUBST(USERCONFIG_O)
AC_MSG_CHECKING(whether to support bulletins)
AC_ARG_ENABLE(bulletins,
	[  --enable-bulletins      compile server with bulletins support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(BULLETINS)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to build standalone version)
STANDALONE_O=""
AC_ARG_ENABLE(standalone,
	[  --enable-standalone     compile standalone server], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			STANDALONE_O="standalone.o"
			AC_MSG_RESULT(yes)
			AC_DEFINE(STANDALONE)
		fi
	],
	AC_MSG_RESULT(no) )
AC_SUBST(STANDALONE_O)
AC_MSG_CHECKING(whether to add support for LAST command)
AC_ARG_ENABLE(last,
	[  --enable-last           compile server with LAST command support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(LASTCMD)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to add support for user names mapping)
MAPPING_O=""
AC_ARG_ENABLE(mapping,
	[  --enable-mapping        compile server with user names mapping support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)			
		else
			MAPPING_O="mapping.o"
			AC_MSG_RESULT(yes)
			AC_DEFINE(MAPPING)
		fi
	],
	AC_MSG_RESULT(no) )
AC_SUBST(MAPPING_O)
AC_MSG_CHECKING(whether to add support for non-IP based virtual hosting)
AC_ARG_ENABLE(nonip,
	[  --enable-nonip          compile server with non-IP based virtual hosting support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)			
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(NONIPVIRTUALS)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to add support for AllowRootLogin option)
AC_ARG_ENABLE(allowroot,
	[  --enable-allowroot      compile server with \"AllowRootLogin\" option support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)			
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(ALLOWROOTLOGIN)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to add support for CreateMailDrop option)
AC_ARG_ENABLE(createmail,
	[  --enable-createmail     compile server with \"CreateMailDrop\" option support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)			
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(CREATEMAILDROP)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to add support for IPv6 protocol)
AC_ARG_ENABLE(ipv6,
	[  --enable-ipv6           compile server with IPv6 support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)			
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(SPIPV6)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to log resolved host name)
AC_ARG_ENABLE(resolve,
	[  --enable-resolve        log resolved host name], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)			
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(RESOLVE_HOSTNAME)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to log "connect from x" message)
AC_ARG_ENABLE(connect,
	[  --enable-connect        log \"connect from x\" message], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(LOG_CONNECT)
		fi
	],
	AC_MSG_RESULT(no) )
AC_MSG_CHECKING(whether to add extended logging)
AC_ARG_ENABLE(logextend,
	[  --enable-logextend      compile server with extended logging support], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(LOG_EXTEND)
		fi
	], [
	AC_MSG_RESULT(no)
	] )
AC_MSG_CHECKING(whether to add support for statistics)
AC_ARG_ENABLE(statistics,
	[  --enable-statistics     compile server with support for statistics], [
		if test "$enableval" = "no"; then
			AC_MSG_RESULT(no)
		else
			AC_MSG_RESULT(yes)
			AC_DEFINE(STATISTICS)
		fi
	], [
	AC_MSG_RESULT(no)
	] )
	

AC_OUTPUT(Makefile doc/Makefile man/Makefile src/Makefile)