annotate configure.in @ 17:76d91e545ea8 default tip

addrsbr and dtimep fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 24 Nov 2014 14:49:25 +0900
parents bce86c4163a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
2 dnl Process this file with autoconf to produce a configure script.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
3 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
4 AC_INIT(h/mh.h)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
6 dnl default values
bce86c4163a3 Initial revision
kono
parents:
diff changeset
7 etcdir='${exec_prefix}/lib/mh'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
8 slibdir=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
9 manuals=standard
bce86c4163a3 Initial revision
kono
parents:
diff changeset
10 pagerpath=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
11 SUN40=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
12 SOLARIS=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
13 SYS5=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
14 SVR4=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
15 BSD41A=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
16 BSD42=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
17 BSD43=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
18 BSD44=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
19 sharedlib=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
20 slflags=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
21 ranlib=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
22 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
23 popdir=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
24 popserver=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
25 bboards=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
26 bbdelivery=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
27 bbhome=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
28 APOP=APOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
29 DPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
30 MPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
31 POP2=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
32 RPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
33 POPSERVICE=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
34 NNTP=NNTP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
35 smtp='/smtp'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
36 ATTVIBUG=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
37 curses=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
38 NCURSES=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
39 READLINE=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
40 SYS5DIR=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
41 NDIR=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
42 NOIOCTLH=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
43 UNISTD=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
44 SHADOW=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
45 CONTENT_LENGTH=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
46 ZONEINFO=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
47 TZNAME=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
48 V7=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
49 ALTOS=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
50 SIGEMT=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
51 RENAME=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
52 VSPRINTF=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
53 SETEUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
54 SETREUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
55 NFS=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
56 NORUSERPASS=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
57 FILBUF_ADJ=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
58 FILE__PTR=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
59 FCNTL=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
60 FLOCK=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
61 LOCKF=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
62 LIBLOCKFILE=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
63 MAILLOCK=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
64 WAITINT=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
65 SOCKETS=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
66 BIND=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
67 POSIX=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
68 NTOHLSWAP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
69 mailspool=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
70 mailgroup=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
71 DBMPWD=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
72 SETMG=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
73 make_mhconfig=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
74 debug=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
75 JAPAN=JAPAN
bce86c4163a3 Initial revision
kono
parents:
diff changeset
76
bce86c4163a3 Initial revision
kono
parents:
diff changeset
77 dnl (tricky) autoconf cannot change a default value of "$libexecdir". :-<
bce86c4163a3 Initial revision
kono
parents:
diff changeset
78 for ac_arg
bce86c4163a3 Initial revision
kono
parents:
diff changeset
79 do
bce86c4163a3 Initial revision
kono
parents:
diff changeset
80 case "$ac_arg" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
81 -libexecdir | --libexecdir | --libexecdi | --libexecd \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
82 | --libexec | --libexe | --libex | --libe \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
83 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
84 | --libexec=* | --libexe=* | --libex=* | --libe=*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
85 etcdir=$libexecdir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
86 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
87 esac
bce86c4163a3 Initial revision
kono
parents:
diff changeset
88 done
bce86c4163a3 Initial revision
kono
parents:
diff changeset
89
bce86c4163a3 Initial revision
kono
parents:
diff changeset
90 dnl (tricky) patch command cannot chmod. :-<
bce86c4163a3 Initial revision
kono
parents:
diff changeset
91 for ac_dir in $srcdir $srcdir/.. $srcdir/../..
bce86c4163a3 Initial revision
kono
parents:
diff changeset
92 do
bce86c4163a3 Initial revision
kono
parents:
diff changeset
93 if test -f $ac_dir/install-sh
bce86c4163a3 Initial revision
kono
parents:
diff changeset
94 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
95 chmod +x $ac_dir/install-sh
bce86c4163a3 Initial revision
kono
parents:
diff changeset
96 chmod +x $ac_dir/configure
bce86c4163a3 Initial revision
kono
parents:
diff changeset
97 chmod +x $ac_dir/config.guess
bce86c4163a3 Initial revision
kono
parents:
diff changeset
98 chmod +x $ac_dir/config.sub
bce86c4163a3 Initial revision
kono
parents:
diff changeset
99 break
bce86c4163a3 Initial revision
kono
parents:
diff changeset
100 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
101 done
bce86c4163a3 Initial revision
kono
parents:
diff changeset
102
bce86c4163a3 Initial revision
kono
parents:
diff changeset
103 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
104 dnl Check optional features
bce86c4163a3 Initial revision
kono
parents:
diff changeset
105 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
106 AC_ARG_ENABLE(batchmode,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
107 [ --enable-batchmode run conf/mhconfig automatically],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
108 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
109 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
110 batchmode=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
111 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
112 batchmode=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
113 fi], [batchmode=no])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
114
bce86c4163a3 Initial revision
kono
parents:
diff changeset
115 AC_ARG_ENABLE(sharedlib,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
116 [ --enable-sharedlib make shared library (DEFAULT on some OS)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
117 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
118 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
119 use_sharedlib=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
120 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
121 use_sharedlib=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
122 fi], [use_sharedlib=default])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
123
bce86c4163a3 Initial revision
kono
parents:
diff changeset
124 AC_ARG_ENABLE(smtp,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
125 [ --enable-smtp use SMTP (DEFAULT)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
126 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
127 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
128 smtp='/smtp'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
129 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
130 smtp=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
131 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
132
bce86c4163a3 Initial revision
kono
parents:
diff changeset
133 AC_ARG_ENABLE(pop,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
134 [ --enable-pop POP support (DEFAULT)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
135 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
136 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
137 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
138 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
139 pop=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
140 popserver=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
141 bboards=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
142 bbhome=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
143 MPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
144 APOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
145 RPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
146 DPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
147 POP2=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
148 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
149
bce86c4163a3 Initial revision
kono
parents:
diff changeset
150 AC_ARG_ENABLE(apop,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
151 [ --enable-apop=AUTHFILE APOP support (DEFAULT)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
152 [case "$enableval" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
153 no)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
154 APOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
155 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
156 /*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
157 APOP=APOP=\'\"$enableval\"\'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
158 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
159 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
160 *)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
161 APOP=APOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
162 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
163 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
164 esac])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
165
bce86c4163a3 Initial revision
kono
parents:
diff changeset
166 AC_ARG_ENABLE(rpop,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
167 [ --enable-rpop RPOP support],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
168 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
169 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
170 RPOP=RPOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
171 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
172 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
173 RPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
174 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
175
bce86c4163a3 Initial revision
kono
parents:
diff changeset
176 AC_ARG_ENABLE(dpop,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
177 [ --enable-dpop use DPOP],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
178 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
179 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
180 pophome=`csh -c 'echo ~pop' 2> /dev/null`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
181 if test x"$pophome" != x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
182 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
183 DPOP=DPOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
184 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
185 popserver=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
186 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
187 AC_MSG_ERROR([At first, you must register a new user \"pop\".])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
188 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
189 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
190 DPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
191 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
192
bce86c4163a3 Initial revision
kono
parents:
diff changeset
193 AC_ARG_ENABLE(nntp,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
194 [ --enable-nntp NNTP support (DEFAULT)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
195 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
196 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
197 NNTP=NNTP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
198 bboards=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
199 bbhome=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
200 MPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
201 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
202 NNTP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
203 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
204
bce86c4163a3 Initial revision
kono
parents:
diff changeset
205 AC_ARG_ENABLE(bboards,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
206 [ --enable-bboards BBoards support],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
207 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
208 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
209 bbhome=`csh -c 'echo ~bboards' 2> /dev/null`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
210 if test x"$bbhome" != x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
211 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
212 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
213 bboards=pop
bce86c4163a3 Initial revision
kono
parents:
diff changeset
214 MPOP=MPOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
215 NNTP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
216 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
217 AC_MSG_ERROR([At first, you must register a new user \"bboards\".])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
218 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
219 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
220 bboards=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
221 bbhome=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
222 MPOP=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
223 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
224
bce86c4163a3 Initial revision
kono
parents:
diff changeset
225 AC_ARG_ENABLE(popserver,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
226 [ --enable-popserver install POP server],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
227 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
228 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
229 pop=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
230 popserver=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
231 POP2=POP2
bce86c4163a3 Initial revision
kono
parents:
diff changeset
232 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
233 popserver=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
234 POP2=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
235 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
236
bce86c4163a3 Initial revision
kono
parents:
diff changeset
237 AC_ARG_ENABLE(jmandir,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
238 [ --enable-jmandir=DIR set a directory for Japanese manual],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
239 [case "$enableval" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
240 no)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
241 jmandir=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
242 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
243 /*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
244 jmandir="$enableval"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
245 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
246 *)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
247 AC_MSG_ERROR(You must set DIR with --enable-jmandir=DIR option.)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
248 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
249 esac], [jmandir=default])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
250
bce86c4163a3 Initial revision
kono
parents:
diff changeset
251 AC_ARG_WITH(pager,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
252 [ --with-pager=DIR set default pager (DEFAULT: auto detect)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
253 [pagerpath="$withval"])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
254
bce86c4163a3 Initial revision
kono
parents:
diff changeset
255 if test "$pop" = on -a "$popserver" = off -a x"$APOP" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
256 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
257 APOP=APOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
258 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
259
bce86c4163a3 Initial revision
kono
parents:
diff changeset
260 if test "$popserver" = on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
261 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
262 if test "$bboards" != off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
263 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
264 bbdelivery=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
265 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
266 if test x"$APOP" = xAPOP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
267 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
268 AC_MSG_ERROR(You must set AUTHFILE with --enable-apop=AUTHFILE option.)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
269 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
270 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
271
bce86c4163a3 Initial revision
kono
parents:
diff changeset
272 AC_ARG_ENABLE(debug,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
273 [ --enable-debug debug mode (for maintainer)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
274 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
275 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
276 debug=on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
277 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
278
bce86c4163a3 Initial revision
kono
parents:
diff changeset
279 AC_ARG_ENABLE(japan,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
280 [ --enable-japan Japanese support (DEFAULT)],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
281 [if test "$enableval" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
282 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
283 JAPAN=JAPAN
bce86c4163a3 Initial revision
kono
parents:
diff changeset
284 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
285 JAPAN=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
286 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
287
bce86c4163a3 Initial revision
kono
parents:
diff changeset
288 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
289 dnl Check OS type.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
290 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
291 AC_CANONICAL_HOST
bce86c4163a3 Initial revision
kono
parents:
diff changeset
292
bce86c4163a3 Initial revision
kono
parents:
diff changeset
293 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
294 dnl Checks for programs.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
295 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
296 CC_bak="$CC"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
297 CFLAGS_bak="$CFLAGS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
298 LDFLAGS_bak="$LDFLAGS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
299
bce86c4163a3 Initial revision
kono
parents:
diff changeset
300 AC_PROG_CC
bce86c4163a3 Initial revision
kono
parents:
diff changeset
301 AC_PROG_GCC_TRADITIONAL
bce86c4163a3 Initial revision
kono
parents:
diff changeset
302 AC_PROG_AWK
bce86c4163a3 Initial revision
kono
parents:
diff changeset
303 AC_PROG_RANLIB
bce86c4163a3 Initial revision
kono
parents:
diff changeset
304
bce86c4163a3 Initial revision
kono
parents:
diff changeset
305 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
306 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
307 if test "$debug" = on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
308 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
309 CFLAGS="-g"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
310 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
311 CFLAGS=`echo "$CFLAGS" | sed 's/-g *//'`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
312 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
313 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
314
bce86c4163a3 Initial revision
kono
parents:
diff changeset
315 if test x"$LDFLAGS_bak" = x -a "$debug" != on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
316 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
317 LDFLAGS="-s $LDFLAGS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
318 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
319
bce86c4163a3 Initial revision
kono
parents:
diff changeset
320 case "$host_os" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
321 sunos4*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
322 if test "$use_sharedlib" != no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
323 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
324 sharedlib=sun4
bce86c4163a3 Initial revision
kono
parents:
diff changeset
325 if test $ac_cv_prog_gcc = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
326 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
327 slflags="-fpic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
328 if test x"$LDFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
329 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
330 LDFLAGS="$LDFLAGS -B/usr/bin/"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
331 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
332 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
333 slflags="-pic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
334 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
335 slibdir=$libdir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
336 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
337 SUN40=SUN40
bce86c4163a3 Initial revision
kono
parents:
diff changeset
338 SETEUID=SETEUID
bce86c4163a3 Initial revision
kono
parents:
diff changeset
339 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
340 solaris2*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
341 if test "$use_sharedlib" != no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
342 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
343 sharedlib=sys5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
344 if test $ac_cv_prog_gcc = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
345 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
346 slflags="-fpic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
347 if test x"$LDFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
348 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
349 LDFLAGS="$LDFLAGS -B/usr/ccs/bin/"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
350 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
351 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
352 slflags="-K pic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
353 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
354 slibdir=$libdir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
355 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
356 SOLARIS=`echo "$host_os" | $AWK -F. '{printf "SOLARIS=2%02d%02d",$2,$3}'`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
357 SETEUID=`echo "$host_os" | $AWK -F. '$2>=3{printf "SETEUID"}'`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
358 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
359 freebsd* | netbsd*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
360 if test "$use_sharedlib" != no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
361 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
362 sharedlib=fbsd
bce86c4163a3 Initial revision
kono
parents:
diff changeset
363 if test -x /usr/bin/objformat
bce86c4163a3 Initial revision
kono
parents:
diff changeset
364 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
365 if test x`/usr/bin/objformat` = xelf
bce86c4163a3 Initial revision
kono
parents:
diff changeset
366 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
367 sharedlib=gnuelf
bce86c4163a3 Initial revision
kono
parents:
diff changeset
368 make_mhconfig='CFLAGS="-O -DMHSLIB_NOMINVER"'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
369 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
370 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
371 echo __ELF__ | $CC -E - | grep -q __ELF__ || sharedlib=gnuelf
bce86c4163a3 Initial revision
kono
parents:
diff changeset
372 slflags="-fpic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
373 slibdir=$libdir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
374 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
375 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
376 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
377 CFLAGS="$CFLAGS -pipe"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
378 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
379 manuals=standard/gzip
bce86c4163a3 Initial revision
kono
parents:
diff changeset
380 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
381 bsdi*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
382 if test x"$CC_bak" = x -a "$use_sharedlib" != no \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
383 -a x`echo "$host_os" | $AWK -F. '$1=="bsdi3"{printf "bsdi3"}'` = xbsdi3
bce86c4163a3 Initial revision
kono
parents:
diff changeset
384 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
385 CC=shlicc2
bce86c4163a3 Initial revision
kono
parents:
diff changeset
386 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
387 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
388 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
389 CFLAGS="$CFLAGS -pipe"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
390 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
391 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
392 next*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
393 if test x"$LDFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
394 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
395 LDFLAGS=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
396 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
397 # OPENSTEP's lockf is broken
bce86c4163a3 Initial revision
kono
parents:
diff changeset
398 ac_cv_func_lockf=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
399 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
400 hpux*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
401 if test $ac_cv_prog_gcc != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
402 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
403 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
404 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
405 CFLAGS="+O2"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
406 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
407 if test x"$LDFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
408 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
409 LDFLAGS="-nqs"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
410 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
411 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
412 # HP-UX's ruserpass is incompatible with MH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
413 ac_cv_func_ruserpass=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
414 # HP-UX's _ruserpass is incompatible with MH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
415 ac_cv_func__ruserpass=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
416 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
417 irix*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
418 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
419 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
420 if test $ac_cv_prog_gcc = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
421 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
422 CFLAGS="$CFLAGS -fsigned-char"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
423 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
424 CFLAGS="$CFLAGS -signed"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
425 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
426 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
427 SETREUID=SETREUID
bce86c4163a3 Initial revision
kono
parents:
diff changeset
428 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
429 osf*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
430 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
431 SETEUID=SETEUID
bce86c4163a3 Initial revision
kono
parents:
diff changeset
432 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
433 sysv5uw*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
434 FILE__PTR=FILE__PTR
bce86c4163a3 Initial revision
kono
parents:
diff changeset
435 FILBUF_ADJ=FILBUF_ADJ
bce86c4163a3 Initial revision
kono
parents:
diff changeset
436 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
437 darwin*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
438 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
439 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
440 CFLAGS="-traditional $CFLAGS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
441 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
442 if test x"$LDFLAGS_bak" = x -a "$debug" != on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
443 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
444 LDFLAGS="-Wl,-S"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
445 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
446 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
447 linux*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
448 if test "$use_sharedlib" != no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
449 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
450 sharedlib=gnuelf
bce86c4163a3 Initial revision
kono
parents:
diff changeset
451 slflags="-fpic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
452 slibdir=$libdir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
453 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
454 if test x"$CFLAGS_bak" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
455 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
456 CFLAGS="$CFLAGS -pipe"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
457 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
458 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
459 SETREUID=SETREUID
bce86c4163a3 Initial revision
kono
parents:
diff changeset
460 # Linux's ruserpass is incompatible with MH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
461 ac_cv_func_ruserpass=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
462 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
463 esac
bce86c4163a3 Initial revision
kono
parents:
diff changeset
464
bce86c4163a3 Initial revision
kono
parents:
diff changeset
465 if test "$ac_cv_prog_RANLIB" = ":"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
466 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
467 ranlib=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
468 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
469
bce86c4163a3 Initial revision
kono
parents:
diff changeset
470 dnl Look for `write'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
471 tmppath=/usr/bin:/bin:$PATH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
472 AC_PATH_PROG(write, write, no, [$tmppath])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
473
bce86c4163a3 Initial revision
kono
parents:
diff changeset
474 dnl Look for UCB mail
bce86c4163a3 Initial revision
kono
parents:
diff changeset
475 tmppath=/usr/bin:/bin:/usr/ucb:/usr/bsd:$PATH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
476 AC_PATH_PROGS(ucbmail, Mail mailx mail, no, [$tmppath])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
477
bce86c4163a3 Initial revision
kono
parents:
diff changeset
478 dnl Look for ps
bce86c4163a3 Initial revision
kono
parents:
diff changeset
479 tmppath=/usr/bin:/bin:/usr/sbin:/sbin:/usr/etc:/etc:$PATH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
480 AC_PATH_PROG(ps, ps, no, [$tmppath])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
481
bce86c4163a3 Initial revision
kono
parents:
diff changeset
482 dnl Look for `chown'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
483 tmppath=/usr/bin:/bin:/usr/sbin:/sbin:/usr/etc:/etc:$PATH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
484 AC_PATH_PROG(chown, chown, /etc/chown, [$tmppath])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
485 chownpath="$ac_cv_path_chown"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
486
bce86c4163a3 Initial revision
kono
parents:
diff changeset
487 dnl Look for `sendmail'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
488 tmppath=/usr/lib:/usr/sbin:/usr/etc:/usr/ucblib:/usr/bin
bce86c4163a3 Initial revision
kono
parents:
diff changeset
489 AC_PATH_PROG(sendmail, sendmail, /usr/lib/sendmail, [$tmppath])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
490 sendmailpath="$ac_cv_path_sendmail"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
491
bce86c4163a3 Initial revision
kono
parents:
diff changeset
492 dnl Look for pager
bce86c4163a3 Initial revision
kono
parents:
diff changeset
493 if test x"$pagerpath" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
494 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
495 tmppath=$PATH:/usr/bin:/bin:/usr/ucb:/usr/bsd
bce86c4163a3 Initial revision
kono
parents:
diff changeset
496 AC_PATH_PROGS(pager, jless less more, /usr/ucb/more, [$tmppath])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
497 pagerpath="$ac_cv_path_pager"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
498 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
499
bce86c4163a3 Initial revision
kono
parents:
diff changeset
500 dnl Check for broken vi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
501 AC_CACHE_CHECK(for broken vi, ac_cv_prog_vi_bug,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
502 [ac_cv_prog_vi_bug=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
503 echo 'r /nonexist-file
bce86c4163a3 Initial revision
kono
parents:
diff changeset
504 r /nonexist-file
bce86c4163a3 Initial revision
kono
parents:
diff changeset
505 q' | ex > /dev/null 2>&1
bce86c4163a3 Initial revision
kono
parents:
diff changeset
506 if test $? = 2
bce86c4163a3 Initial revision
kono
parents:
diff changeset
507 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
508 echo 'r /nonexist-file
bce86c4163a3 Initial revision
kono
parents:
diff changeset
509 r /nonexist-file
bce86c4163a3 Initial revision
kono
parents:
diff changeset
510 r /nonexist-file
bce86c4163a3 Initial revision
kono
parents:
diff changeset
511 q' | ex > /dev/null 2>&1
bce86c4163a3 Initial revision
kono
parents:
diff changeset
512 if test $? = 3
bce86c4163a3 Initial revision
kono
parents:
diff changeset
513 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
514 ac_cv_prog_vi_bug=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
515 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
516 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
517 if test "$ac_cv_prog_vi_bug" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
518 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
519 ATTVIBUG=ATTVIBUG
bce86c4163a3 Initial revision
kono
parents:
diff changeset
520 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
521
bce86c4163a3 Initial revision
kono
parents:
diff changeset
522 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
523 dnl Checks for libraries.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
524 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
525 dnl Checks for network libraries (nsl, socket)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
526 AC_CHECK_FUNC(gethostbyname, ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
527 AC_CHECK_LIB(nsl, gethostbyname, ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
528 AC_CHECK_LIB(resolv, gethostbyname)))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
529 AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
530
bce86c4163a3 Initial revision
kono
parents:
diff changeset
531 dnl Checks for crypt & dbm libraries
bce86c4163a3 Initial revision
kono
parents:
diff changeset
532 if test "$popserver" = on
bce86c4163a3 Initial revision
kono
parents:
diff changeset
533 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
534 AC_CHECK_FUNC(crypt, , AC_CHECK_LIB(crypt, crypt))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
535 if test x"$APOP" != x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
536 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
537 AC_CHECK_FUNC(dbm_open, ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
538 AC_CHECK_LIB(gdbm, dbm_open, ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
539 AC_CHECK_LIB(ndbm, dbm_open, ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
540 AC_CHECK_LIB(dbm, dbm_open))))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
541 AC_TRY_LINK([#include <ndbm.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
542 #ifdef DBM_SUFFIX
bce86c4163a3 Initial revision
kono
parents:
diff changeset
543 #undef dbm_pagfno
bce86c4163a3 Initial revision
kono
parents:
diff changeset
544 #define dbm_pagfno dbm_dirfno
bce86c4163a3 Initial revision
kono
parents:
diff changeset
545 #endif], [dbm_pagfno((DBM *)0)], ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
546 LIBS="-lgdbm $LIBS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
547 AC_TRY_LINK([#include <ndbm.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
548 #ifdef DBM_SUFFIX
bce86c4163a3 Initial revision
kono
parents:
diff changeset
549 #undef dbm_pagfno
bce86c4163a3 Initial revision
kono
parents:
diff changeset
550 #define dbm_pagfno dbm_dirfno
bce86c4163a3 Initial revision
kono
parents:
diff changeset
551 #endif], [dbm_pagfno((DBM *)0)], ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
552 [echo ""
bce86c4163a3 Initial revision
kono
parents:
diff changeset
553 echo "You have no DBM library. Give up APOP server."
bce86c4163a3 Initial revision
kono
parents:
diff changeset
554 echo " Use --disable-apop or --disable-popserver option."
bce86c4163a3 Initial revision
kono
parents:
diff changeset
555 exit 0]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
556 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
557 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
558
bce86c4163a3 Initial revision
kono
parents:
diff changeset
559 dnl Checks for maillock
bce86c4163a3 Initial revision
kono
parents:
diff changeset
560 LIBS_bak="$LIBS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
561 AC_CHECK_LIB(mail, maillock,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
562 LIBS="$LIBS -lmail"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
563 AC_TRY_LINK([#include <maillock.h>],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
564 [if (maillock("root", 5) == L_SUCCESS) mailunlock();],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
565 [MAILLOCK=MAILLOCK]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
566 if test x"$MAILLOCK" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
567 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
568 LIBS="$LIBS_bak"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
569 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
570
bce86c4163a3 Initial revision
kono
parents:
diff changeset
571 dnl Checks for library lockfile
bce86c4163a3 Initial revision
kono
parents:
diff changeset
572 LIBS_bak="$LIBS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
573 AC_CHECK_LIB(lockfile, lockfile_create,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
574 LIBS="$LIBS -llockfile"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
575 AC_TRY_LINK([#include <lockfile.h>],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
576 [if (lockfile_create("root.lock", 5, 0) == 0) lockfile_remove("root.lock");],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
577 [LIBLOCKFILE=LIBLOCKFILE]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
578 if test x"$LIBLOCKFILE" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
579 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
580 LIBS="$LIBS_bak"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
581 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
582
bce86c4163a3 Initial revision
kono
parents:
diff changeset
583 dnl Checks for terminal libraries
bce86c4163a3 Initial revision
kono
parents:
diff changeset
584 LIBS_bak="$LIBS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
585 CFLAGS_tmp="$CFLAGS"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
586 test -d /usr/include/ncurses && CFLAGS="$CFLAGS -I/usr/include/ncurses"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
587 AC_CHECK_HEADERS(ncurses.h)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
588 if test "$ac_cv_header_ncurses_h" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
589 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
590 cursesheader="ncurses.h"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
591 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
592 cursesheader="curses.h"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
593 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
594 AC_CACHE_CHECK(whether curses.h is ncurses, ac_cv_lib_ncurses,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
595 AC_TRY_COMPILE([#include <$cursesheader>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
596 #ifndef NCURSES_VERSION
bce86c4163a3 Initial revision
kono
parents:
diff changeset
597 This line will cause a parse error: "curses.h is not ncurses"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
598 #endif], [WINDOW *w; w->_line->text;],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
599 [ac_cv_lib_ncurses=yes], [ac_cv_lib_ncurses=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
600 if test "$ac_cv_lib_ncurses" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
601 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
602 if test "$cursesheader" = ncurses.h
bce86c4163a3 Initial revision
kono
parents:
diff changeset
603 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
604 NCURSES=NCURSES
bce86c4163a3 Initial revision
kono
parents:
diff changeset
605 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
606 curseslib="-lncurses"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
607 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
608 curseslib="-lcurses"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
609 CFLAGS="$CFLAGS_tmp"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
610 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
611
bce86c4163a3 Initial revision
kono
parents:
diff changeset
612 AC_CACHE_CHECK(for tgetnum in $curseslib, ac_cv_lib_curses_tgetnum,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
613 LIBS="$LIBS_bak $curseslib"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
614 AC_TRY_LINK( , tgetnum(), [ac_cv_lib_curses_tgetnum=yes],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
615 [ac_cv_lib_curses_tgetnum=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
616 if test "$ac_cv_lib_curses_tgetnum" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
617 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
618 curses="$curseslib"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
619 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
620 AC_CACHE_CHECK(for tgetnum in $curseslib -ltermlib,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
621 ac_cv_lib_curses_termlib_tgetnum,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
622 LIBS="$LIBS_bak $curseslib -ltermlib"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
623 AC_TRY_LINK( , tgetnum(), [ac_cv_lib_curses_termlib_tgetnum=yes],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
624 [ac_cv_lib_curses_termlib_tgetnum=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
625 if test "$ac_cv_lib_curses_termlib_tgetnum" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
626 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
627 curses="$curseslib -ltermlib"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
628 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
629 AC_CACHE_CHECK(for tgetnum in $curseslib -ltermcap,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
630 ac_cv_lib_curses_termcap_tgetnum,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
631 LIBS="$LIBS_bak $curseslib -ltermcap"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
632 AC_TRY_LINK( , tgetnum(), [ac_cv_lib_curses_termcap_tgetnum=yes],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
633 [ac_cv_lib_curses_termcap_tgetnum=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
634 if test "$ac_cv_lib_curses_termcap_tgetnum" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
635 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
636 curses="$curseslib -ltermcap";
bce86c4163a3 Initial revision
kono
parents:
diff changeset
637 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
638 AC_CHECK_LIB(termlib, tgetnum, [curses="-ltermlib"],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
639 AC_CHECK_LIB(termcap, tgetnum, [curses="-ltermcap"]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
640 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
641 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
642 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
643
bce86c4163a3 Initial revision
kono
parents:
diff changeset
644 dnl Check for readline library
bce86c4163a3 Initial revision
kono
parents:
diff changeset
645 LIBS="$LIBS_bak -lreadline $curses"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
646 AC_CACHE_CHECK(for readline, ac_cv_lib_readline,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
647 AC_TRY_LINK([#include <stdio.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
648 #include <readline/readline.h>], [CPPFunction x; readline("");],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
649 [ac_cv_lib_readline=yes], [ac_cv_lib_readline=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
650 if test "$ac_cv_lib_readline" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
651 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
652 READLINE=READLINE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
653 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
654 LIBS="$LIBS_bak"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
655
bce86c4163a3 Initial revision
kono
parents:
diff changeset
656 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
657 dnl Checks for header files.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
658 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
659 AC_HEADER_DIRENT
bce86c4163a3 Initial revision
kono
parents:
diff changeset
660 AC_HEADER_STDC
bce86c4163a3 Initial revision
kono
parents:
diff changeset
661 AC_HEADER_SYS_WAIT
bce86c4163a3 Initial revision
kono
parents:
diff changeset
662 AC_CHECK_HEADERS(fcntl.h ndbm.h shadow.h strings.h \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
663 sys/ioctl.h sys/param.h unistd.h)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
664
bce86c4163a3 Initial revision
kono
parents:
diff changeset
665 if test "$ac_header_dirent" = dirent.h
bce86c4163a3 Initial revision
kono
parents:
diff changeset
666 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
667 SYS5DIR=SYS5DIR
bce86c4163a3 Initial revision
kono
parents:
diff changeset
668 elif test "$ac_header_dirent" = ndir.h
bce86c4163a3 Initial revision
kono
parents:
diff changeset
669 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
670 NDIR=NDIR
bce86c4163a3 Initial revision
kono
parents:
diff changeset
671 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
672
bce86c4163a3 Initial revision
kono
parents:
diff changeset
673 if test "$ac_cv_header_sys_ioctl_h" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
674 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
675 NOIOCTLH=NOIOCTLH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
676 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
677
bce86c4163a3 Initial revision
kono
parents:
diff changeset
678 if test "$ac_cv_header_unistd_h" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
679 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
680 UNISTD=UNISTD
bce86c4163a3 Initial revision
kono
parents:
diff changeset
681 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
682
bce86c4163a3 Initial revision
kono
parents:
diff changeset
683 if test "$ac_cv_header_shadow_h" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
684 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
685 SHADOW=SHADOW
bce86c4163a3 Initial revision
kono
parents:
diff changeset
686 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
687
bce86c4163a3 Initial revision
kono
parents:
diff changeset
688 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
689 dnl Checks for typedefs, structures, and compiler characteristics.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
690 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
691 AC_C_CONST
bce86c4163a3 Initial revision
kono
parents:
diff changeset
692 AC_STRUCT_ST_BLKSIZE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
693 AC_DECL_SYS_SIGLIST
bce86c4163a3 Initial revision
kono
parents:
diff changeset
694 AC_HEADER_TIME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
695 AC_STRUCT_TM
bce86c4163a3 Initial revision
kono
parents:
diff changeset
696
bce86c4163a3 Initial revision
kono
parents:
diff changeset
697 AC_TRY_COMPILE([#include <$ac_cv_struct_tm>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
698 struct tm *localtime();],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
699 [struct tm *tm;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
700 tm->tm_gmtoff;], [ZONEINFO=ZONEINFO])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
701
bce86c4163a3 Initial revision
kono
parents:
diff changeset
702 AC_TRY_LINK([#include <$ac_cv_struct_tm>],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
703 [extern char *tzname[];
bce86c4163a3 Initial revision
kono
parents:
diff changeset
704 tzset();
bce86c4163a3 Initial revision
kono
parents:
diff changeset
705 tzname[0];], [TZNAME=TZNAME])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
706
bce86c4163a3 Initial revision
kono
parents:
diff changeset
707 ac_compile_bak="$ac_compile"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
708 ac_compile="$ac_compile ; ld -x -r conftest.o"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
709 rm -f a.out
bce86c4163a3 Initial revision
kono
parents:
diff changeset
710 AC_CACHE_CHECK(for old load, ac_cv_sys_oldload,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
711 ac_cv_sys_oldload=none
bce86c4163a3 Initial revision
kono
parents:
diff changeset
712 AC_TRY_COMPILE([#include <stdio.h>], [printf("Hello\n");],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
713 [if test -f a.out
bce86c4163a3 Initial revision
kono
parents:
diff changeset
714 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
715 rm -f a.out
bce86c4163a3 Initial revision
kono
parents:
diff changeset
716 ac_cv_sys_oldload=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
717 fi],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
718 [if test "$CC" = cc
bce86c4163a3 Initial revision
kono
parents:
diff changeset
719 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
720 ac_compile="$ac_compile_bak ; cc -s -o conftest.o"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
721 AC_TRY_COMPILE([#include <stdio.h>], [printf("Hello\n");],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
722 [ac_cv_sys_oldload=on])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
723 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
724 [case "$host_os" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
725 hpux10.* | osf3.*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
726 ac_cv_sys_oldload=none
bce86c4163a3 Initial revision
kono
parents:
diff changeset
727 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
728 esac])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
729 oldload="$ac_cv_sys_oldload"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
730 ac_compile="$ac_compile_bak"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
731
bce86c4163a3 Initial revision
kono
parents:
diff changeset
732 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
733 dnl Checks for library functions.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
734 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
735 AC_TYPE_SIGNAL
bce86c4163a3 Initial revision
kono
parents:
diff changeset
736 AC_CHECK_FUNCS(bcopy fcntl flock getdtablesize lockf rename rindex \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
737 ruserpass _ruserpass seteuid setreuid sigblock vsprintf)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
738
bce86c4163a3 Initial revision
kono
parents:
diff changeset
739 AC_CACHE_CHECK(for 4.4BSD, ac_cv_sys_bsd44,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
740 ac_cv_sys_bsd44=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
741 AC_TRY_COMPILE(
bce86c4163a3 Initial revision
kono
parents:
diff changeset
742 [#include <sys/param.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
743 #if !defined(BSD) || (BSD < 199306)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
744 This line will cause a parse error: "not BSD44"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
745 #endif], ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
746 [ac_cv_sys_bsd44=yes]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
747 if test "$ac_cv_sys_bsd44" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
748 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
749 BSD44=BSD44
bce86c4163a3 Initial revision
kono
parents:
diff changeset
750 BSD43=BSD43
bce86c4163a3 Initial revision
kono
parents:
diff changeset
751 BSD42=BSD42
bce86c4163a3 Initial revision
kono
parents:
diff changeset
752 SETEUID=SETEUID
bce86c4163a3 Initial revision
kono
parents:
diff changeset
753 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
754
bce86c4163a3 Initial revision
kono
parents:
diff changeset
755 if test "$ac_cv_func_seteuid" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
756 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
757 SETEUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
758 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
759 if test "$ac_cv_func_setreuid" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
760 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
761 SETREUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
762 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
763 if test x"$SETEUID" = xSETEUID -a x"$SETREUID" = xSETREUID
bce86c4163a3 Initial revision
kono
parents:
diff changeset
764 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
765 SETREUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
766 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
767 if test x"$RPOP" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
768 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
769 SETEUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
770 SETREUID=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
771 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
772
bce86c4163a3 Initial revision
kono
parents:
diff changeset
773 AC_CACHE_CHECK(for SVR4, ac_cv_sys_svr4,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
774 ac_cv_sys_svr4=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
775 AC_TRY_COMPILE(
bce86c4163a3 Initial revision
kono
parents:
diff changeset
776 [#if !defined(__svr4__) && !defined(__svr4) && !defined(SVR4)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
777 This line will cause a parse error: "not SVR4"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
778 #endif], ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
779 [ac_cv_sys_svr4=yes],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
780 [if test -f /etc/saf/_sactab
bce86c4163a3 Initial revision
kono
parents:
diff changeset
781 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
782 ac_cv_sys_svr4=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
783 fi]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
784 if test "$ac_cv_sys_svr4" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
785 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
786 SVR4=SVR4
bce86c4163a3 Initial revision
kono
parents:
diff changeset
787 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
788 CONTENT_LENGTH=CONTENT_LENGTH
bce86c4163a3 Initial revision
kono
parents:
diff changeset
789 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
790
bce86c4163a3 Initial revision
kono
parents:
diff changeset
791 dnl The idea from perl Configure script.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
792 AC_MSG_CHECKING([either SYS5, BSD or V7])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
793 ac_sys5_bsd_v7=unknown
bce86c4163a3 Initial revision
kono
parents:
diff changeset
794 if test `echo abc | tr a-z A-Z` = Abc
bce86c4163a3 Initial revision
kono
parents:
diff changeset
795 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
796 if test "$ac_cv_header_strings_h" != yes \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
797 -o "$ac_cv_func_bcopy" != yes -o "$ac_cv_func_rindex" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
798 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
799 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
800 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
801 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
802 AC_TRY_COMPILE([#include <signal.h>],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
803 [kill(0, SIGTSTP);],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
804 [if test x"$SYS5" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
805 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
806 AC_TRY_COMPILE([#include <syslog.h>],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
807 [openlog("MH", LOG_PID, LOG_DAEMON);],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
808 [if test -g "$ac_cv_path_write"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
809 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
810 BSD42=BSD42
bce86c4163a3 Initial revision
kono
parents:
diff changeset
811 BSD43=BSD43
bce86c4163a3 Initial revision
kono
parents:
diff changeset
812 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
813 fi],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
814 [ac_sys5_bsd_v7=V7
bce86c4163a3 Initial revision
kono
parents:
diff changeset
815 V7="V7 void=int"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
816 case "$host_os" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
817 xenix*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
818 ALTOS=ALTOS
bce86c4163a3 Initial revision
kono
parents:
diff changeset
819 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
820 esac])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
821 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
822
bce86c4163a3 Initial revision
kono
parents:
diff changeset
823 AC_TRY_COMPILE(
bce86c4163a3 Initial revision
kono
parents:
diff changeset
824 [#if !defined(__svr3__) && !defined(__svr3) && !defined(SVR3)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
825 This line will cause a parse error: "not SVR3"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
826 #endif], ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
827 [SYS5=SYS5])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
828
bce86c4163a3 Initial revision
kono
parents:
diff changeset
829 if $ac_cv_path_ps -eaf > /dev/null 2>&1
bce86c4163a3 Initial revision
kono
parents:
diff changeset
830 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
831 sys5_ps=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
832 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
833 sys5_ps=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
834 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
835 if $ac_cv_path_ps -axu > /dev/null 2>&1
bce86c4163a3 Initial revision
kono
parents:
diff changeset
836 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
837 bsd_ps=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
838 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
839 bsd_ps=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
840 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
841
bce86c4163a3 Initial revision
kono
parents:
diff changeset
842 if test x"$BSD42" = x -a x"$V7" = x -a "$sys5_ps" = yes -a "$bsd_ps" = no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
843 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
844 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
845 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
846 if test x"$SYS5" = x -a x"$V7" = x -a "$sys5_ps" = no -a "$bsd_ps" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
847 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
848 if test "$ac_cv_func_getdtablesize" = yes -a "$ac_cv_func_sigblock" = yes \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
849 -a "$ac_cv_func_flock" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
850 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
851 BSD42=BSD42
bce86c4163a3 Initial revision
kono
parents:
diff changeset
852 elif test "$ac_cv_func_bcopy" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
853 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
854 BSD41A=BSD41A
bce86c4163a3 Initial revision
kono
parents:
diff changeset
855 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
856 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
857
bce86c4163a3 Initial revision
kono
parents:
diff changeset
858 if test x"$BSD42" = x -a x"$BSD41A" = x -a x"$V7" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
859 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
860 if test x"$ZONEINFO" = x -a x"$TZNAME" = xTZNAME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
861 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
862 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
863 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
864 if test -d /usr/lib/terminfo -o -d /usr/share/lib/terminfo
bce86c4163a3 Initial revision
kono
parents:
diff changeset
865 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
866 SYS5=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
867 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
868 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
869
bce86c4163a3 Initial revision
kono
parents:
diff changeset
870 if test x"$BSD41A" = xBSD41A -o x"$BSD42" = xBSD42
bce86c4163a3 Initial revision
kono
parents:
diff changeset
871 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
872 ac_sys5_bsd_v7=BSD
bce86c4163a3 Initial revision
kono
parents:
diff changeset
873 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
874 if test x"$SYS5" = xSYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
875 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
876 ac_sys5_bsd_v7=SYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
877 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
878 AC_MSG_RESULT($ac_sys5_bsd_v7)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
879
bce86c4163a3 Initial revision
kono
parents:
diff changeset
880 AC_TRY_COMPILE([#include <signal.h>], [kill(0, SIGEMT);], ,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
881 AC_TRY_COMPILE([#include <signal.h>], [kill(0, SIGUSR1);],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
882 [SIGEMT="SIGEMT=SIGUSR1"]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
883
bce86c4163a3 Initial revision
kono
parents:
diff changeset
884 typesignal="$ac_cv_type_signal"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
885
bce86c4163a3 Initial revision
kono
parents:
diff changeset
886 if test "$ac_cv_func_vsprintf" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
887 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
888 VSPRINTF=VSPRINTF
bce86c4163a3 Initial revision
kono
parents:
diff changeset
889 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
890
bce86c4163a3 Initial revision
kono
parents:
diff changeset
891 if test "$ac_cv_func_ruserpass" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
892 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
893 if test "$ac_cv_func__ruserpass" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
894 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
895 NFS=NFS
bce86c4163a3 Initial revision
kono
parents:
diff changeset
896 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
897 NORUSERPASS=NORUSERPASS
bce86c4163a3 Initial revision
kono
parents:
diff changeset
898 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
899 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
900
bce86c4163a3 Initial revision
kono
parents:
diff changeset
901 if test "$ac_cv_func_lockf" = yes -a x"$BSD44" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
902 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
903 LOCKF=LOCKF
bce86c4163a3 Initial revision
kono
parents:
diff changeset
904 elif test "$ac_cv_func_flock" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
905 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
906 if test x"$BSD42" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
907 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
908 FLOCK=FLOCK
bce86c4163a3 Initial revision
kono
parents:
diff changeset
909 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
910 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
911 FCNTL=FCNTL
bce86c4163a3 Initial revision
kono
parents:
diff changeset
912 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
913
bce86c4163a3 Initial revision
kono
parents:
diff changeset
914 AC_CACHE_CHECK(for return type of sprintf, ac_cv_type_sprintf,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
915 AC_TRY_COMPILE([#include <sys/types.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
916 #include <stdio.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
917 int sprintf();], , [ac_cv_type_sprintf="int"], [ac_cv_type_sprintf="char *"]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
918 typesprintf="$ac_cv_type_sprintf"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
919
bce86c4163a3 Initial revision
kono
parents:
diff changeset
920 if test x"$BSD42" = xBSD42 -a x"$TZNAME" = xTZNAME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
921 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
922 TZNAME=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
923 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
924
bce86c4163a3 Initial revision
kono
parents:
diff changeset
925 if test x"$BSD42" = xBSD42
bce86c4163a3 Initial revision
kono
parents:
diff changeset
926 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
927 AC_TRY_COMPILE([#include <sys/types.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
928 #ifdef HAVE_SYS_WAIT_H
bce86c4163a3 Initial revision
kono
parents:
diff changeset
929 This line will cause a parse error: "not used union wait"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
930 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
931 #include <sys/wait.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
932 wait(union wait *);], , , [WAITINT=WAITINT])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
933 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
934 test "$ac_cv_func_rename" = yes && RENAME=RENAME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
935 AC_CACHE_CHECK(for BSD socket support, ac_cv_sys_socket,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
936 AC_TRY_COMPILE([#include <sys/types.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
937 #include <sys/socket.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
938 #include <netinet/in.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
939 #include <netdb.h>], [struct sockaddr_in in_socket;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
940 socket(AF_INET, SOCK_STREAM, 0);],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
941 [ac_cv_sys_socket=yes], [ac_cv_sys_socket=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
942 if test "$ac_cv_sys_socket" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
943 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
944 SOCKETS=SOCKETS
bce86c4163a3 Initial revision
kono
parents:
diff changeset
945 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
946 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
947
bce86c4163a3 Initial revision
kono
parents:
diff changeset
948 AC_CACHE_CHECK(for BIND support, ac_cv_sys_bind,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
949 AC_EGREP_CPP(yes,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
950 [#include <resolv.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
951 #if defined(__RES) || defined(_PATH_RESCONF) || defined(RES_DEFAULT)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
952 yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
953 #endif],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
954 [ac_cv_sys_bind=yes], [ac_cv_sys_bind=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
955 if test "$ac_cv_sys_bind" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
956 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
957 BIND=BIND
bce86c4163a3 Initial revision
kono
parents:
diff changeset
958 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
959
bce86c4163a3 Initial revision
kono
parents:
diff changeset
960 AC_TRY_COMPILE([#include <termios.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
961 #ifndef HAVE_SYS_WAIT_H
bce86c4163a3 Initial revision
kono
parents:
diff changeset
962 This line will cause a parse error: "not POSIX"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
963 #endif], [tcflush(0, TCOFLUSH);],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
964 [POSIX=POSIX])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
965
bce86c4163a3 Initial revision
kono
parents:
diff changeset
966 AC_CACHE_CHECK(for need ntohl macro, ac_cv_func_ntohl,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
967 AC_TRY_COMPILE([#include <sys/types.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
968 #include <sys/param.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
969 #include <netinet/in.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
970 #ifdef _BIG_ENDIAN
bce86c4163a3 Initial revision
kono
parents:
diff changeset
971 This line will cause a parse error: "no need ntohl() for BIG_ENDIAN"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
972 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
973 #if BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN && BYTE_ORDER == BIG_ENDIAN
bce86c4163a3 Initial revision
kono
parents:
diff changeset
974 This line will cause a parse error: "no need ntohl() for BIG_ENDIAN"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
975 #endif],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
976 [long x;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
977 ntohl(x);],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
978 [ac_cv_func_ntohl=yes], [ac_cv_func_ntohl=no]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
979 if test "$ac_cv_func_ntohl" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
980 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
981 NTOHLSWAP=NTOHLSWAP
bce86c4163a3 Initial revision
kono
parents:
diff changeset
982 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
983
bce86c4163a3 Initial revision
kono
parents:
diff changeset
984 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
985 dnl Checks for system services.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
986 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
987 dnl Check for support network password database (YP/NIS).
bce86c4163a3 Initial revision
kono
parents:
diff changeset
988 AC_CACHE_CHECK(for support network password database, ac_cv_sys_dbmpwd,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
989 [ac_cv_sys_dbmpwd=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
990 if test -d /var/yp -o -d /usr/etc/yp -o -d /var/nis \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
991 -o -x /usr/sbin/ypbind -o -x /usr/etc/ypbind
bce86c4163a3 Initial revision
kono
parents:
diff changeset
992 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
993 ac_cv_sys_dbmpwd=yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
994 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
995 if test "$ac_cv_sys_dbmpwd" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
996 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
997 DBMPWD=DBMPWD
bce86c4163a3 Initial revision
kono
parents:
diff changeset
998 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
999
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1000 dnl Find mail spool.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1001 AC_CACHE_CHECK(where mail spool is located, ac_cv_path_mailspool,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1002 [ac_cv_path_mailspool=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1003 for spool in /var/mail /var/spool/mail /usr/mail /usr/spool/mail
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1004 do
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1005 if test -d $spool
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1006 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1007 ac_cv_path_mailspool=$spool
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1008 break
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1009 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1010 done])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1011 mailspool="$ac_cv_path_mailspool"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1012
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1013 dnl Check for mailgroup
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1014 AC_CACHE_CHECK(whether mail spool is opened for special group,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1015 ac_cv_group_mail,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1016 [ls_opt="-lLd"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1017 if test `ls $ls_opt $mailspool | $AWK '{print NF}'` -lt 9
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1018 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1019 ls_opt="-lLgd"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1020 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1021 ac_cv_group_mail=`ls $ls_opt $mailspool | \
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1022 $AWK 'BEGIN{group="no"}
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1023 /drwxrwxr-x/ || /drwxrwxr-t/{group=$4}
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1024 END{print group}'`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1025 if test ! -g $ac_cv_path_ucbmail -a x"$MAILLOCK" = x -a x"$LIBLOCKFILE" = x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1026 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1027 ac_cv_group_mail=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1028 fi])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1029 if test "$ac_cv_group_mail" = no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1030 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1031 mailgroup=off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1032 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1033 mailgroup="$ac_cv_group_mail"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1034 SETMG=SETMG
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1035 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1036
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1037 if test "$pop" != off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1038 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1039 if test "$popserver" = off
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1040 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1041 pop=client
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1042 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1043 popdir=$sbindir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1044 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1045 POPSERVICE=`grep 110/tcp /etc/services 2> /dev/null | $AWK 'NR==1{print $1}'`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1046 if test x"$POPSERVICE" != x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1047 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1048 POPSERVICE=POPSERVICE=\'\"$POPSERVICE\"\'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1049 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1050 POPSERVICE=POPSERVICE=\'\"pop\"\'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1051 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1052 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1053
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1054 if test "$use_sharedlib" = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1055 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1056 if test x"$SVR4" = xSVR4 -a $ac_cv_prog_gcc = yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1057 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1058 sharedlib=sys5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1059 slflags="-fpic"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1060 slibdir=$libdir
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1061 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1062 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1063
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1064 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1065 dnl Now output file.
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1066 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1067 dnl expand variable
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1068 if test x"$prefix" = xNONE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1069 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1070 prefix=$ac_default_prefix
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1071 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1072
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1073 if test x"$exec_prefix" = xNONE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1074 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1075 exec_prefix='${prefix}'
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1076 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1077
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1078 bindir=`eval echo $bindir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1079 bindir=`eval echo $bindir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1080 popdir=`eval echo $popdir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1081 popdir=`eval echo $popdir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1082 etcdir=`eval echo $etcdir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1083 etcdir=`eval echo $etcdir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1084 mandir=`eval echo $mandir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1085 mandir=`eval echo $mandir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1086 slibdir=`eval echo $slibdir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1087 slibdir=`eval echo $slibdir`
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1088
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1089 dnl Find Japanese manual directory
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1090 dnl We must do it after expanding "$mandir"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1091 if test x"$jmandir" = xdefault
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1092 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1093 AC_CACHE_CHECK(where Japanese manual directory is located, ac_cv_path_jman,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1094 [ac_cv_path_jman=no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1095 for manlang in ja ja_JP ja_JP.EUC ja_JP.eucJP ja_JP.ujis japan japanese
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1096 do
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1097 if test -d $mandir/$manlang
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1098 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1099 ac_cv_path_jman="$mandir/$manlang"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1100 break
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1101 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1102 done])
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1103 if test "$ac_cv_path_jman" = no
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1104 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1105 jmandir=
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1106 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1107 jmandir="$ac_cv_path_jman"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1108 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1109 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1110
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1111 dnl We must do it after expanding "$slibdir"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1112 if test "$sharedlib" != off -a "$sharedlib" != fbsd
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1113 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1114 if test "$sharedlib" = gnuelf
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1115 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1116 LDFLAGS="$LDFLAGS -Xlinker -rpath -Xlinker $slibdir"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1117 elif test x"$SOLARIS" != x
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1118 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1119 LDFLAGS="$LDFLAGS -R$slibdir"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1120 elif test x"$SUN40" = xSUN40
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1121 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1122 if test "$slibdir" != "/usr/lib" -a "$slibdir" != "/usr/local/lib"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1123 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1124 LDFLAGS="$LDFLAGS -L$slibdir"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1125 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1126 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1127 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1128
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1129 AC_SUBST(SUN40) AC_SUBST(SOLARIS) AC_SUBST(sharedlib) AC_SUBST(slflags)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1130 AC_SUBST(ranlib) AC_SUBST(ATTVIBUG) AC_SUBST(jmandir) AC_SUBST(manuals)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1131 AC_SUBST(chownpath) AC_SUBST(sendmailpath) AC_SUBST(pagerpath)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1132 AC_SUBST(pop) AC_SUBST(popdir) AC_SUBST(APOP) AC_SUBST(DPOP) AC_SUBST(MPOP)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1133 AC_SUBST(POP2) AC_SUBST(RPOP) AC_SUBST(POPSERVICE) AC_SUBST(smtp)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1134 AC_SUBST(NNTP) AC_SUBST(bboards) AC_SUBST(bbdelivery) AC_SUBST(bbhome)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1135 AC_SUBST(oldload) AC_SUBST(etcdir) AC_SUBST(slibdir) AC_SUBST(READLINE)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1136 AC_SUBST(curses) AC_SUBST(NCURSES) AC_SUBST(SYS5DIR) AC_SUBST(NDIR)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1137 AC_SUBST(NOIOCTLH) AC_SUBST(UNISTD) AC_SUBST(SHADOW)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1138 AC_SUBST(BSD41A) AC_SUBST(BSD42) AC_SUBST(BSD43) AC_SUBST(BSD44)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1139 AC_SUBST(SYS5) AC_SUBST(SVR4) AC_SUBST(CONTENT_LENGTH)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1140 AC_SUBST(V7) AC_SUBST(ALTOS) AC_SUBST(ZONEINFO) AC_SUBST(TZNAME)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1141 AC_SUBST(typesignal) AC_SUBST(typesprintf) AC_SUBST(NFS) AC_SUBST(NORUSERPASS)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1142 AC_SUBST(SIGEMT) AC_SUBST(RENAME) AC_SUBST(VSPRINTF) AC_SUBST(WAITINT)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1143 AC_SUBST(FCNTL) AC_SUBST(FLOCK) AC_SUBST(LOCKF)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1144 AC_SUBST(MAILLOCK) AC_SUBST(LIBLOCKFILE)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1145 AC_SUBST(FILBUF_ADJ) AC_SUBST(FILE__PTR)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1146 AC_SUBST(SETEUID) AC_SUBST(SETREUID) AC_SUBST(debug)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1147 AC_SUBST(SOCKETS) AC_SUBST(BIND) AC_SUBST(POSIX) AC_SUBST(NTOHLSWAP)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1148 AC_SUBST(mailspool) AC_SUBST(mailgroup) AC_SUBST(DBMPWD) AC_SUBST(SETMG)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1149 AC_SUBST(JAPAN)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1150
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1151 AC_OUTPUT(conf/MH)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1152
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1153 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1154 dnl auto make mhconfig
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1155 dnl ====================================================================
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1156 echo ""
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1157
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1158 [if test "$batchmode" != yes
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1159 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1160 echo "Use a shell escape to check conf/MH now, if you want."
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1161 echo ""
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1162 echo $ac_n "Continue make mhconfig (y/n)? [Y]$ac_c"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1163 read ans
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1164 test x"$ans" = x && ans=y
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1165 case "$ans" in
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1166 y* | Y*)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1167 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1168 *)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1169 exit 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1170 ;;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1171 esac
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1172 fi]
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1173
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1174 cd $ac_aux_dir/conf
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1175 make_mhconfig="make CC=\"$CC\" $make_mhconfig"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1176 if test x"$SYS5" = xSYS5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1177 then
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1178 make_mhconfig="$make_mhconfig MFLAGS='CC=\"$CC\"' sys5"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1179 fi
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1180 eval $make_mhconfig || AC_MSG_ERROR(some errors occured at making mhconfig)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1181 echo ""
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1182 ./mhconfig MH || AC_MSG_ERROR(some errors occured at running mhconfig)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1183 cd ..
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1184 make clean
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1185 exit 0