]> git.ipfire.org Git - thirdparty/squid.git/blame - configure
MODIO_1 commit. This change (including documentation) implements a more
[thirdparty/squid.git] / configure
CommitLineData
090089c4 1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
b7db09a3 4# Generated automatically using autoconf version 2.13
03a0d3b0 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
090089c4 6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
2877b8a9 14ac_default_prefix=/usr/local/squid
e5f4e1b0 15ac_help="$ac_help
94d48591 16 --enable-dlmalloc[=LIB] Compile & use the malloc package by Doug Lea"
5c51415d 17ac_help="$ac_help
18 --enable-gnuregex Compile GNUregex"
5c51415d 19ac_help="$ac_help
109ff6af 20 --enable-xmalloc-debug Do some simple malloc debugging"
21ac_help="$ac_help
027acbaf 22 --enable-xmalloc-debug-trace
109ff6af 23 Detailed trace of memory allocations"
5c51415d 24ac_help="$ac_help
25 --enable-xmalloc-statistics
26 Show malloc statistics in status page"
3f628dde 27ac_help="$ac_help
28 --enable-carp Enable CARP support"
109ff6af 29ac_help="$ac_help
9bc73deb 30 --enable-async-io[=N_THREADS]
cd748f27 31 Shorthand for
32 --with-aio-threads=N_THREADS
33 --with-pthreads
34 --enable-storeio=ufs,aufs"
35ac_help="$ac_help
36 --with-aio-threads=N_THREADS
37 Tune the number of worker threads for the aufs object
38 store."
39ac_help="$ac_help
40 --with-pthreads Use POSIX Threads"
41ac_help="$ac_help
42 --enable-storeio=\"list of modules\"
43 Build support for the list of store I/O modules.
44 The default is only to build the "ufs" module.
45 See src/fs for a list of available modules, or
46 Programmers Guide section <not yet written>
47 for details on how to build your custom store module"
e5f4e1b0 48ac_help="$ac_help
49 --enable-icmp Enable ICMP pinging"
50ac_help="$ac_help
95e36d02 51 --enable-delay-pools Enable delay pools to limit bandwith usage"
9fcb1cd6 52ac_help="$ac_help
53 --enable-mem-gen-trace Do trace of memory stuff"
e5f4e1b0 54ac_help="$ac_help
55 --enable-useragent-log Enable logging of User-Agent header"
320e9f36 56ac_help="$ac_help
eb824054 57 --disable-wccp Disable Web Cache Coordination Protocol"
e5f4e1b0 58ac_help="$ac_help
68d3e4a5 59 --enable-kill-parent-hack
60 Kill parent on shutdown"
e5f4e1b0 61ac_help="$ac_help
62 --enable-snmp Enable SNMP monitoring"
63ac_help="$ac_help
64 --enable-time-hack Update internal timestamp only once per second"
65ac_help="$ac_help
66 --enable-cachemgr-hostname[=hostname]
67 Make cachemgr.cgi default to this host"
68ac_help="$ac_help
69 --enable-arp-acl Enable use of ARP ACL lists (ether address)"
14e8e510 70ac_help="$ac_help
88b7de25 71 --enable-htcp Enable HTCP protocol"
02749868 72ac_help="$ac_help
73 --enable-forw-via-db Enable Forw/Via database"
484f2ebc 74ac_help="$ac_help
22df58ea 75 --enable-cache-digests Use Cache Digests
043e3d78 76 see http://squid.nlanr.net/Squid/FAQ/FAQ-16.html"
933cc58d 77ac_help="$ac_help
78 --enable-err-language=lang
79 Select language for Error pages (see errors dir) "
cd748f27 80ac_help="$ac_help
81 --with-coss-membuf-size COSS membuf size (default 1048576 bytes) "
9bb83c8b 82ac_help="$ac_help
83 --enable-poll Enable poll() instead of select(). Normally poll
84 is preferred over select, but configure knows poll
85 is broken on some platforms. If you think you are
86 smarter than the configure script, you may enable
87 poll with this option.
c68e9c6b 88 --disable-poll Disable the use of poll()."
6eec93b2 89ac_help="$ac_help
90 --disable-http-violations
91 This allows you to remove code which is known to
c68e9c6b 92 violate the HTTP protocol specification."
5cafc1d6 93ac_help="$ac_help
94 --enable-ipf-transparent
95 Enable Transparent Proxy support for systems
c68e9c6b 96 using IP-Filter network address redirection."
5d620373 97ac_help="$ac_help
98 --enable-leakfinder
99 Enable Leak Finding code. Enabling this alone
100 does nothing; you also have to modify the source
101 code to use the leak finding functions. Probably
102 Useful for hackers only."
3898f57f 103ac_help="$ac_help
104 --disable-ident-lookups
105 This allows you to remove code that performs
106 Ident (RFC 931) lookups."
eb824054 107ac_help="$ac_help
7e3ce7b9 108 --disable-internal-dns This prevents Squid from directly sending and
eb824054 109 receiving DNS messages, and instead enables the
110 old external 'dnsserver' processes."
111ac_help="$ac_help
7e3ce7b9 112 --enable-truncate This uses truncate() instead of unlink() when
eb824054 113 removing cache files. Truncate gives a little
114 performance improvement, but may cause problems
115 when used with async I/O. Truncate uses more
116 filesystem inodes than unlink.."
9bc73deb 117ac_help="$ac_help
118 --enable-underscores Squid by default rejects any host names with _
119 in their name to conform with internet standars.
120 If you disagree with this you may allow _ in
121 hostnames by using this switch, provided that
122 the resolver library on the host where Squid runs
123 does not reject _ in hostnames..."
7e3ce7b9 124ac_help="$ac_help
125 --enable-heap-replacement
126 This option allows you to use various cache
127 replacement algorithms, instead of the standard
cd748f27 128 LRU algorithm."
b7db09a3 129ac_help="$ac_help
130 --enable-auth-modules=\"list of modules\"
131 This option selects wich proxy_auth helper modules
132 to build and install as part of the normal build
133 process. For a list of available modules see
134 the auth_modules directory."
090089c4 135
136# Initialize some variables set by options.
137# The variables have the same names as the options, with
138# dashes changed to underlines.
139build=NONE
140cache_file=./config.cache
141exec_prefix=NONE
142host=NONE
143no_create=
144nonopt=NONE
145no_recursion=
146prefix=NONE
147program_prefix=NONE
148program_suffix=NONE
149program_transform_name=s,x,x,
150silent=
151site=
152srcdir=
153target=NONE
154verbose=
155x_includes=NONE
156x_libraries=NONE
157bindir='${exec_prefix}/bin'
158sbindir='${exec_prefix}/sbin'
159libexecdir='${exec_prefix}/libexec'
160datadir='${prefix}/share'
161sysconfdir='${prefix}/etc'
162sharedstatedir='${prefix}/com'
163localstatedir='${prefix}/var'
164libdir='${exec_prefix}/lib'
165includedir='${prefix}/include'
166oldincludedir='/usr/include'
167infodir='${prefix}/info'
168mandir='${prefix}/man'
169
170# Initialize some other variables.
171subdirs=
172MFLAGS= MAKEFLAGS=
b7db09a3 173SHELL=${CONFIG_SHELL-/bin/sh}
b1e77ec1 174# Maximum number of lines to put in a shell here document.
175ac_max_here_lines=12
090089c4 176
177ac_prev=
178for ac_option
179do
180
181 # If the previous option needs an argument, assign it.
182 if test -n "$ac_prev"; then
183 eval "$ac_prev=\$ac_option"
184 ac_prev=
185 continue
186 fi
187
188 case "$ac_option" in
189 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
190 *) ac_optarg= ;;
191 esac
192
193 # Accept the important Cygnus configure options, so we can diagnose typos.
194
195 case "$ac_option" in
196
197 -bindir | --bindir | --bindi | --bind | --bin | --bi)
198 ac_prev=bindir ;;
199 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
200 bindir="$ac_optarg" ;;
201
202 -build | --build | --buil | --bui | --bu)
203 ac_prev=build ;;
204 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
205 build="$ac_optarg" ;;
206
207 -cache-file | --cache-file | --cache-fil | --cache-fi \
208 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
209 ac_prev=cache_file ;;
210 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
211 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
212 cache_file="$ac_optarg" ;;
213
214 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
215 ac_prev=datadir ;;
216 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
217 | --da=*)
218 datadir="$ac_optarg" ;;
219
220 -disable-* | --disable-*)
221 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
222 # Reject names that are not valid shell variable names.
223 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
224 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
225 fi
226 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
227 eval "enable_${ac_feature}=no" ;;
228
229 -enable-* | --enable-*)
230 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
231 # Reject names that are not valid shell variable names.
232 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
233 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
234 fi
235 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
236 case "$ac_option" in
237 *=*) ;;
238 *) ac_optarg=yes ;;
239 esac
240 eval "enable_${ac_feature}='$ac_optarg'" ;;
241
242 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
243 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
244 | --exec | --exe | --ex)
245 ac_prev=exec_prefix ;;
246 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
247 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
248 | --exec=* | --exe=* | --ex=*)
249 exec_prefix="$ac_optarg" ;;
250
251 -gas | --gas | --ga | --g)
252 # Obsolete; use --with-gas.
253 with_gas=yes ;;
254
255 -help | --help | --hel | --he)
256 # Omit some internal or obsolete options to make the list less imposing.
257 # This message is too long to be a string in the A/UX 3.1 sh.
258 cat << EOF
259Usage: configure [options] [host]
260Options: [defaults in brackets after descriptions]
261Configuration:
262 --cache-file=FILE cache test results in FILE
263 --help print this message
264 --no-create do not create output files
265 --quiet, --silent do not print \`checking...' messages
266 --version print the version of autoconf that created configure
267Directory and file names:
268 --prefix=PREFIX install architecture-independent files in PREFIX
269 [$ac_default_prefix]
270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
271 [same as prefix]
272 --bindir=DIR user executables in DIR [EPREFIX/bin]
273 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
274 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
275 --datadir=DIR read-only architecture-independent data in DIR
276 [PREFIX/share]
277 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
278 --sharedstatedir=DIR modifiable architecture-independent data in DIR
279 [PREFIX/com]
280 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
281 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
282 --includedir=DIR C header files in DIR [PREFIX/include]
283 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
284 --infodir=DIR info documentation in DIR [PREFIX/info]
285 --mandir=DIR man documentation in DIR [PREFIX/man]
286 --srcdir=DIR find the sources in DIR [configure dir or ..]
287 --program-prefix=PREFIX prepend PREFIX to installed program names
288 --program-suffix=SUFFIX append SUFFIX to installed program names
289 --program-transform-name=PROGRAM
290 run sed PROGRAM on installed program names
291EOF
292 cat << EOF
293Host type:
294 --build=BUILD configure for building on BUILD [BUILD=HOST]
295 --host=HOST configure for HOST [guessed]
296 --target=TARGET configure for TARGET [TARGET=HOST]
297Features and packages:
298 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
299 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
300 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
301 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
302 --x-includes=DIR X include files are in DIR
303 --x-libraries=DIR X library files are in DIR
304EOF
305 if test -n "$ac_help"; then
306 echo "--enable and --with options recognized:$ac_help"
307 fi
308 exit 0 ;;
309
310 -host | --host | --hos | --ho)
311 ac_prev=host ;;
312 -host=* | --host=* | --hos=* | --ho=*)
313 host="$ac_optarg" ;;
314
315 -includedir | --includedir | --includedi | --included | --include \
316 | --includ | --inclu | --incl | --inc)
317 ac_prev=includedir ;;
318 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
319 | --includ=* | --inclu=* | --incl=* | --inc=*)
320 includedir="$ac_optarg" ;;
321
322 -infodir | --infodir | --infodi | --infod | --info | --inf)
323 ac_prev=infodir ;;
324 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
325 infodir="$ac_optarg" ;;
326
327 -libdir | --libdir | --libdi | --libd)
328 ac_prev=libdir ;;
329 -libdir=* | --libdir=* | --libdi=* | --libd=*)
330 libdir="$ac_optarg" ;;
331
332 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
333 | --libexe | --libex | --libe)
334 ac_prev=libexecdir ;;
335 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
336 | --libexe=* | --libex=* | --libe=*)
337 libexecdir="$ac_optarg" ;;
338
339 -localstatedir | --localstatedir | --localstatedi | --localstated \
340 | --localstate | --localstat | --localsta | --localst \
341 | --locals | --local | --loca | --loc | --lo)
342 ac_prev=localstatedir ;;
343 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
344 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
345 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
346 localstatedir="$ac_optarg" ;;
347
348 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
349 ac_prev=mandir ;;
350 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
351 mandir="$ac_optarg" ;;
352
353 -nfp | --nfp | --nf)
354 # Obsolete; use --without-fp.
355 with_fp=no ;;
356
357 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
358 | --no-cr | --no-c)
359 no_create=yes ;;
360
361 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
362 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
363 no_recursion=yes ;;
364
365 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
366 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
367 | --oldin | --oldi | --old | --ol | --o)
368 ac_prev=oldincludedir ;;
369 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
370 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
371 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
372 oldincludedir="$ac_optarg" ;;
373
374 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
375 ac_prev=prefix ;;
376 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
377 prefix="$ac_optarg" ;;
378
379 -program-prefix | --program-prefix | --program-prefi | --program-pref \
380 | --program-pre | --program-pr | --program-p)
381 ac_prev=program_prefix ;;
382 -program-prefix=* | --program-prefix=* | --program-prefi=* \
383 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
384 program_prefix="$ac_optarg" ;;
385
386 -program-suffix | --program-suffix | --program-suffi | --program-suff \
387 | --program-suf | --program-su | --program-s)
388 ac_prev=program_suffix ;;
389 -program-suffix=* | --program-suffix=* | --program-suffi=* \
390 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
391 program_suffix="$ac_optarg" ;;
392
393 -program-transform-name | --program-transform-name \
394 | --program-transform-nam | --program-transform-na \
395 | --program-transform-n | --program-transform- \
396 | --program-transform | --program-transfor \
397 | --program-transfo | --program-transf \
398 | --program-trans | --program-tran \
399 | --progr-tra | --program-tr | --program-t)
400 ac_prev=program_transform_name ;;
401 -program-transform-name=* | --program-transform-name=* \
402 | --program-transform-nam=* | --program-transform-na=* \
403 | --program-transform-n=* | --program-transform-=* \
404 | --program-transform=* | --program-transfor=* \
405 | --program-transfo=* | --program-transf=* \
406 | --program-trans=* | --program-tran=* \
407 | --progr-tra=* | --program-tr=* | --program-t=*)
408 program_transform_name="$ac_optarg" ;;
409
410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
411 | -silent | --silent | --silen | --sile | --sil)
412 silent=yes ;;
413
414 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
415 ac_prev=sbindir ;;
416 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
417 | --sbi=* | --sb=*)
418 sbindir="$ac_optarg" ;;
419
420 -sharedstatedir | --sharedstatedir | --sharedstatedi \
421 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
422 | --sharedst | --shareds | --shared | --share | --shar \
423 | --sha | --sh)
424 ac_prev=sharedstatedir ;;
425 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
426 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
427 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
428 | --sha=* | --sh=*)
429 sharedstatedir="$ac_optarg" ;;
430
431 -site | --site | --sit)
432 ac_prev=site ;;
433 -site=* | --site=* | --sit=*)
434 site="$ac_optarg" ;;
435
436 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
437 ac_prev=srcdir ;;
438 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
439 srcdir="$ac_optarg" ;;
440
441 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
442 | --syscon | --sysco | --sysc | --sys | --sy)
443 ac_prev=sysconfdir ;;
444 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
445 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
446 sysconfdir="$ac_optarg" ;;
447
448 -target | --target | --targe | --targ | --tar | --ta | --t)
449 ac_prev=target ;;
450 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
451 target="$ac_optarg" ;;
452
453 -v | -verbose | --verbose | --verbos | --verbo | --verb)
454 verbose=yes ;;
455
456 -version | --version | --versio | --versi | --vers)
b7db09a3 457 echo "configure generated by autoconf version 2.13"
090089c4 458 exit 0 ;;
459
460 -with-* | --with-*)
461 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
462 # Reject names that are not valid shell variable names.
463 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
464 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
465 fi
466 ac_package=`echo $ac_package| sed 's/-/_/g'`
467 case "$ac_option" in
468 *=*) ;;
469 *) ac_optarg=yes ;;
470 esac
471 eval "with_${ac_package}='$ac_optarg'" ;;
472
473 -without-* | --without-*)
474 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
475 # Reject names that are not valid shell variable names.
476 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
477 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
478 fi
479 ac_package=`echo $ac_package| sed 's/-/_/g'`
480 eval "with_${ac_package}=no" ;;
481
482 --x)
483 # Obsolete; use --with-x.
484 with_x=yes ;;
485
486 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
487 | --x-incl | --x-inc | --x-in | --x-i)
488 ac_prev=x_includes ;;
489 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
490 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
491 x_includes="$ac_optarg" ;;
492
493 -x-libraries | --x-libraries | --x-librarie | --x-librari \
494 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
495 ac_prev=x_libraries ;;
496 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
497 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
498 x_libraries="$ac_optarg" ;;
499
500 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
501 ;;
502
503 *)
504 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
505 echo "configure: warning: $ac_option: invalid host type" 1>&2
506 fi
507 if test "x$nonopt" != xNONE; then
508 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
509 fi
510 nonopt="$ac_option"
511 ;;
512
513 esac
514done
515
516if test -n "$ac_prev"; then
517 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
518fi
519
520trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
521
522# File descriptor usage:
523# 0 standard input
524# 1 file creation
525# 2 errors and warnings
526# 3 some systems may open it to /dev/tty
527# 4 used on the Kubota Titan
528# 6 checking for... messages and results
529# 5 compiler messages saved in config.log
530if test "$silent" = yes; then
531 exec 6>/dev/null
532else
533 exec 6>&1
534fi
535exec 5>./config.log
536
537echo "\
538This file contains any messages produced by compilers while
539running configure, to aid debugging if configure makes a mistake.
540" 1>&5
541
542# Strip out --no-create and --no-recursion so they do not pile up.
543# Also quote any args containing shell metacharacters.
544ac_configure_args=
545for ac_arg
546do
547 case "$ac_arg" in
548 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
549 | --no-cr | --no-c) ;;
550 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
551 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
552 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
553 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
554 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
555 esac
556done
557
558# NLS nuisances.
133b6d90 559# Only set these to C if already set. These must not be set unconditionally
560# because not all systems understand e.g. LANG=C (notably SCO).
561# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
562# Non-C LC_CTYPE values break the ctype check.
090089c4 563if test "${LANG+set}" = set; then LANG=C; export LANG; fi
133b6d90 564if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
565if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
566if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
090089c4 567
568# confdefs.h avoids OS command line length limits that DEFS can exceed.
569rm -rf conftest* confdefs.h
570# AIX cpp loses on an empty file, so make sure it contains at least a newline.
571echo > confdefs.h
572
573# A filename unique to this package, relative to the directory that
574# configure is in, which we can look for to find out if srcdir is correct.
a26bdc75 575ac_unique_file=src/main.c
090089c4 576
577# Find the source files, if location was not specified.
578if test -z "$srcdir"; then
579 ac_srcdir_defaulted=yes
580 # Try the directory containing this script, then its parent.
581 ac_prog=$0
582 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
583 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
584 srcdir=$ac_confdir
585 if test ! -r $srcdir/$ac_unique_file; then
586 srcdir=..
587 fi
588else
589 ac_srcdir_defaulted=no
590fi
591if test ! -r $srcdir/$ac_unique_file; then
592 if test "$ac_srcdir_defaulted" = yes; then
593 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
594 else
595 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
596 fi
597fi
598srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
599
600# Prefer explicitly selected file to automatically selected ones.
601if test -z "$CONFIG_SITE"; then
602 if test "x$prefix" != xNONE; then
603 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
604 else
605 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
606 fi
607fi
608for ac_site_file in $CONFIG_SITE; do
609 if test -r "$ac_site_file"; then
610 echo "loading site script $ac_site_file"
611 . "$ac_site_file"
612 fi
613done
614
615if test -r "$cache_file"; then
616 echo "loading cache $cache_file"
617 . $cache_file
618else
619 echo "creating cache $cache_file"
620 > $cache_file
621fi
622
623ac_ext=c
624# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
03a0d3b0 625ac_cpp='$CPP $CPPFLAGS'
626ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
b7db09a3 627ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
133b6d90 628cross_compiling=$ac_cv_prog_cc_cross
090089c4 629
b7db09a3 630ac_exeext=
631ac_objext=o
090089c4 632if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
633 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
634 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
635 ac_n= ac_c='
636' ac_t=' '
637 else
638 ac_n=-n ac_c= ac_t=
639 fi
640else
641 ac_n= ac_c='\c' ac_t=
642fi
643
644
645
cd748f27 646# From configure.in Revision: 1.185
da22ac20 647ac_aux_dir=
71b12d7c 648for ac_dir in cfgaux $srcdir/cfgaux; do
da22ac20 649 if test -f $ac_dir/install-sh; then
650 ac_aux_dir=$ac_dir
651 ac_install_sh="$ac_aux_dir/install-sh -c"
652 break
653 elif test -f $ac_dir/install.sh; then
654 ac_aux_dir=$ac_dir
655 ac_install_sh="$ac_aux_dir/install.sh -c"
656 break
657 fi
658done
659if test -z "$ac_aux_dir"; then
71b12d7c 660 { echo "configure: error: can not find install-sh or install.sh in cfgaux $srcdir/cfgaux" 1>&2; exit 1; }
da22ac20 661fi
662ac_config_guess=$ac_aux_dir/config.guess
663ac_config_sub=$ac_aux_dir/config.sub
664ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
665
666
667
668# Make sure we can run config.sub.
b7db09a3 669if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
da22ac20 670else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
671fi
672
673echo $ac_n "checking host system type""... $ac_c" 1>&6
cd748f27 674echo "configure:675: checking host system type" >&5
da22ac20 675
676host_alias=$host
677case "$host_alias" in
678NONE)
679 case $nonopt in
680 NONE)
b7db09a3 681 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
da22ac20 682 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
683 fi ;;
684 *) host_alias=$nonopt ;;
685 esac ;;
686esac
687
b7db09a3 688host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
b1e77ec1 689host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
690host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
691host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
da22ac20 692echo "$ac_t""$host" 1>&6
693
090089c4 694
ac4437b7 695CRYPTLIB=''
2f0eed11 696REGEXLIB='' # -lregex
697LIBREGEX='' # libregex.a
090089c4 698
983061ed 699if test "$libexecdir" = '${exec_prefix}/libexec'; then
700 libexecdir='${bindir}'
701 localstatedir='${prefix}'
702
703fi
704
df087e68 705case "$host_os" in
cd377065 706cygwin32|os2)
df087e68 707 exec_suffix=".exe"
708 cgi_suffix=".exe"
709 ;;
710*)
711 exec_suffix=""
712 cgi_suffix=".cgi"
713 ;;
714esac
715
716
717
a26bdc75 718if test -z "$CACHE_HTTP_PORT"; then
719 CACHE_HTTP_PORT="3128"
720fi
721if test -z "$CACHE_ICP_PORT"; then
722 CACHE_ICP_PORT="3130"
723fi
a26bdc75 724
725
726
727
30a4f2a8 728cat >> confdefs.h <<EOF
729#define CONFIG_HOST_TYPE "$host"
730EOF
731
732
733if test -z "$LDFLAGS"; then
734 LDFLAGS="-g"
735fi
736
38fea766 737PRESET_CFLAGS="$CFLAGS"
090089c4 738
090089c4 739# Extract the first word of "gcc", so it can be a program name with args.
740set dummy gcc; ac_word=$2
741echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 742echo "configure:743: checking for $ac_word" >&5
090089c4 743if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744 echo $ac_n "(cached) $ac_c" 1>&6
745else
746 if test -n "$CC"; then
747 ac_cv_prog_CC="$CC" # Let the user override the test.
748else
b7db09a3 749 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
750 ac_dummy="$PATH"
751 for ac_dir in $ac_dummy; do
090089c4 752 test -z "$ac_dir" && ac_dir=.
753 if test -f $ac_dir/$ac_word; then
754 ac_cv_prog_CC="gcc"
755 break
756 fi
757 done
758 IFS="$ac_save_ifs"
090089c4 759fi
760fi
761CC="$ac_cv_prog_CC"
762if test -n "$CC"; then
763 echo "$ac_t""$CC" 1>&6
764else
765 echo "$ac_t""no" 1>&6
766fi
767
03a0d3b0 768if test -z "$CC"; then
769 # Extract the first word of "cc", so it can be a program name with args.
770set dummy cc; ac_word=$2
771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 772echo "configure:773: checking for $ac_word" >&5
03a0d3b0 773if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775else
776 if test -n "$CC"; then
777 ac_cv_prog_CC="$CC" # Let the user override the test.
778else
b7db09a3 779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
03a0d3b0 780 ac_prog_rejected=no
b7db09a3 781 ac_dummy="$PATH"
782 for ac_dir in $ac_dummy; do
03a0d3b0 783 test -z "$ac_dir" && ac_dir=.
784 if test -f $ac_dir/$ac_word; then
785 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
786 ac_prog_rejected=yes
787 continue
788 fi
789 ac_cv_prog_CC="cc"
790 break
791 fi
792 done
793 IFS="$ac_save_ifs"
794if test $ac_prog_rejected = yes; then
795 # We found a bogon in the path, so make sure we never use it.
796 set dummy $ac_cv_prog_CC
797 shift
798 if test $# -gt 0; then
799 # We chose a different compiler from the bogus one.
800 # However, it has the same basename, so the bogon will be chosen
801 # first if we set CC to just the basename; use the full file name.
802 shift
803 set dummy "$ac_dir/$ac_word" "$@"
804 shift
805 ac_cv_prog_CC="$@"
806 fi
807fi
808fi
809fi
810CC="$ac_cv_prog_CC"
811if test -n "$CC"; then
812 echo "$ac_t""$CC" 1>&6
813else
814 echo "$ac_t""no" 1>&6
815fi
816
b7db09a3 817 if test -z "$CC"; then
818 case "`uname -s`" in
819 *win32* | *WIN32*)
820 # Extract the first word of "cl", so it can be a program name with args.
821set dummy cl; ac_word=$2
822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 823echo "configure:824: checking for $ac_word" >&5
b7db09a3 824if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
826else
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
829else
830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
831 ac_dummy="$PATH"
832 for ac_dir in $ac_dummy; do
833 test -z "$ac_dir" && ac_dir=.
834 if test -f $ac_dir/$ac_word; then
835 ac_cv_prog_CC="cl"
836 break
837 fi
838 done
839 IFS="$ac_save_ifs"
840fi
841fi
842CC="$ac_cv_prog_CC"
843if test -n "$CC"; then
844 echo "$ac_t""$CC" 1>&6
845else
846 echo "$ac_t""no" 1>&6
847fi
848 ;;
849 esac
850 fi
03a0d3b0 851 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
852fi
090089c4 853
b1e77ec1 854echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
cd748f27 855echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
b1e77ec1 856
857ac_ext=c
858# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
859ac_cpp='$CPP $CPPFLAGS'
860ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
b7db09a3 861ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
133b6d90 862cross_compiling=$ac_cv_prog_cc_cross
b1e77ec1 863
b7db09a3 864cat > conftest.$ac_ext << EOF
865
cd748f27 866#line 867 "configure"
b1e77ec1 867#include "confdefs.h"
b7db09a3 868
133b6d90 869main(){return(0);}
b1e77ec1 870EOF
cd748f27 871if { (eval echo configure:872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b1e77ec1 872 ac_cv_prog_cc_works=yes
133b6d90 873 # If we can't run a trivial program, we are probably using a cross compiler.
874 if (./conftest; exit) 2>/dev/null; then
875 ac_cv_prog_cc_cross=no
876 else
877 ac_cv_prog_cc_cross=yes
878 fi
b1e77ec1 879else
880 echo "configure: failed program was:" >&5
881 cat conftest.$ac_ext >&5
b1e77ec1 882 ac_cv_prog_cc_works=no
883fi
133b6d90 884rm -fr conftest*
b7db09a3 885ac_ext=c
886# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
887ac_cpp='$CPP $CPPFLAGS'
888ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
889ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
890cross_compiling=$ac_cv_prog_cc_cross
b1e77ec1 891
892echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
893if test $ac_cv_prog_cc_works = no; then
133b6d90 894 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
b1e77ec1 895fi
133b6d90 896echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
cd748f27 897echo "configure:898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
133b6d90 898echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
899cross_compiling=$ac_cv_prog_cc_cross
b1e77ec1 900
090089c4 901echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
cd748f27 902echo "configure:903: checking whether we are using GNU C" >&5
090089c4 903if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
904 echo $ac_n "(cached) $ac_c" 1>&6
905else
906 cat > conftest.c <<EOF
907#ifdef __GNUC__
908 yes;
909#endif
910EOF
cd748f27 911if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
090089c4 912 ac_cv_prog_gcc=yes
913else
914 ac_cv_prog_gcc=no
915fi
916fi
917
918echo "$ac_t""$ac_cv_prog_gcc" 1>&6
b1e77ec1 919
090089c4 920if test $ac_cv_prog_gcc = yes; then
921 GCC=yes
b7db09a3 922else
923 GCC=
924fi
925
926ac_test_CFLAGS="${CFLAGS+set}"
927ac_save_CFLAGS="$CFLAGS"
928CFLAGS=
929echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
cd748f27 930echo "configure:931: checking whether ${CC-cc} accepts -g" >&5
133b6d90 931if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
090089c4 932 echo $ac_n "(cached) $ac_c" 1>&6
933else
934 echo 'void f(){}' > conftest.c
935if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
133b6d90 936 ac_cv_prog_cc_g=yes
090089c4 937else
133b6d90 938 ac_cv_prog_cc_g=no
090089c4 939fi
940rm -f conftest*
941
942fi
943
133b6d90 944echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
b7db09a3 945if test "$ac_test_CFLAGS" = set; then
946 CFLAGS="$ac_save_CFLAGS"
947elif test $ac_cv_prog_cc_g = yes; then
948 if test "$GCC" = yes; then
b1e77ec1 949 CFLAGS="-g -O2"
950 else
b7db09a3 951 CFLAGS="-g"
090089c4 952 fi
953else
b7db09a3 954 if test "$GCC" = yes; then
955 CFLAGS="-O2"
956 else
957 CFLAGS=
958 fi
090089c4 959fi
960
961
6ad85e8a 962case "$host" in
963 mab-next-nextstep3)
964 CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc"
965 ;;
966esac
967
30a4f2a8 968if test -z "$PRESET_CFLAGS"; then
969 if test "$GCC" = "yes"; then
970 case "$host" in
97b12a5b 971 *-sun-sunos*)
30a4f2a8 972 # sunos has too many warnings for this to be useful
973 # motorola too
974 ;;
97b12a5b 975 *m88k*)
976 # Motorola cc/ld does not like -02 but is ok on -O
977 CFLAGS=`echo $CFLAGS | sed -e 's/-O0-9/-O/'`
978 ;;
30a4f2a8 979 *)
980 CFLAGS="$CFLAGS -Wall"
981 ;;
982 esac
81a820c6 983 else
984 case "$host" in
c415c128 985 *mips-sgi-irix6.*)
81a820c6 986 # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
c415c128 987 CFLAGS="$CFLAGS -n32 -mips3 -O3 -OPT:Olimit=0:space=OFF \
81a820c6 988 -woff 1009,1014,1048,1110,1116,1185,1188,1204,1230,1233 \
989 -Wl,-woff,85,-woff,84,-woff,134 \
990 -nostdinc -I/usr/include -D_BSD_SIGNALS"
991 ;;
e8f5fb18 992 alpha-dec-osf4.*)
553c24ae 993 # Mogul says DEC compilers take both -g and -O2
b6a2f15e 994 CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
553c24ae 995 CFLAGS="$CFLAGS -O2"
996 ;;
81a820c6 997 *)
998 ;;
999 esac
30a4f2a8 1000 fi
30a4f2a8 1001fi
1002
1003if test -z "$PRESET_LDFLAGS"; then
1004 if test "$GCC" = "yes"; then
1005 case "$host" in
1006 *)
1007 # nothing
1008 ;;
1009 esac
81a820c6 1010 else
1011 case "$host" in
c415c128 1012 *mips-sgi-irix6.*)
81a820c6 1013 # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
c415c128 1014 LDFLAGS="-n32 -mips3 -nostdlib -L/usr/lib32"
81a820c6 1015 ;;
1016 esac
30a4f2a8 1017 fi
1018fi
2060fa9a 1019
e5f4e1b0 1020# Check whether --enable-dlmalloc or --disable-dlmalloc was given.
1021if test "${enable_dlmalloc+set}" = set; then
1022 enableval="$enable_dlmalloc"
1023
94d48591 1024 case "$enableval" in
1025 'yes')
029ce4ae 1026 use_dlmalloc="yes"
94d48591 1027 LIBDLMALLOC="libdlmalloc.a"
1028 LIB_MALLOC="-L../lib -ldlmalloc"
029ce4ae 1029 echo "dlmalloc enabled"
94d48591 1030 ;;
1031 'no')
029ce4ae 1032 use_dlmalloc="no"
1033 echo "dlmalloc disabled"
94d48591 1034 ;;
029ce4ae 1035 *) use_dlmalloc="yes"
1036 LIB_MALLOC="$enableval"
1037 echo "dlmalloc enabled with $LIB_MALLOC"
1038 esac
1039
1040fi
1041
1042if test "${use_dlmalloc-unset}" = unset; then
1043 case "$host" in
1044 i386-*-solaris2.*)
1045 echo "Enabling dlmalloc for $host"
1046 use_dlmalloc="yes"
1047 ;;
1048 esac
1049fi
1050if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
1051 # Ok. dlmalloc was enabled before, but state may be changed.
1052 # we have to test these again
1053 unset ac_cv_func_mallinfo
1054 unset ac_cv_func_mallocblksize
1055 unset ac_cv_func_free
1056 unset ac_cv_func_realloc
1057 unset ac_cv_func_memalign
1058 unset ac_cv_func_valloc
1059 unset ac_cv_func_pvalloc
1060 unset ac_cv_func_calloc
1061 unset ac_cv_func_cfree
1062 unset ac_cv_func_malloc_trim
1063 unset ac_cv_func_malloc_usable_size
1064 unset ac_cv_func_malloc_stats
1065 unset ac_cv_func_mallinfo
1066 unset ac_cv_func_mallopt
1067 unset ac_cv_lib_gnumalloc
1068 unset ac_cv_header_gnumalloc_h
1069 unset ac_cv_lib_malloc
1070 unset ac_cv_enabled_dlmalloc
1071fi
1072if test "$use_dlmalloc" = yes; then
94d48591 1073 ac_cv_func_mallinfo="yes"
1074 ac_cv_func_mallocblksize="no"
1075 ac_cv_func_free="yes"
1076 ac_cv_func_realloc="yes"
1077 ac_cv_func_memalign="yes"
1078 ac_cv_func_valloc="yes"
1079 ac_cv_func_pvalloc="yes"
1080 ac_cv_func_calloc="yes"
1081 ac_cv_func_cfree="yes"
1082 ac_cv_func_malloc_trim="yes"
1083 ac_cv_func_malloc_usable_size="yes"
1084 ac_cv_func_malloc_stats="yes"
94d48591 1085 ac_cv_func_mallopt="yes"
1086 ac_cv_lib_gnumalloc="no"
85efe3ec 1087 ac_cv_header_gnumalloc_h="no"
94d48591 1088 ac_cv_lib_malloc="no"
1089 ac_cv_enabled_dlmalloc="yes"
e5f4e1b0 1090fi
1091
1092
1093
1094
1095# Check whether --enable-gnuregex or --disable-gnuregex was given.
1096if test "${enable_gnuregex+set}" = set; then
1097 enableval="$enable_gnuregex"
1098 USE_GNUREGEX=$enableval
1099fi
1100
1101
e5f4e1b0 1102# Check whether --enable-xmalloc_debug or --disable-xmalloc_debug was given.
1103if test "${enable_xmalloc_debug+set}" = set; then
1104 enableval="$enable_xmalloc_debug"
1105 if test "$enableval" = "yes" ; then
1106 echo "Malloc debugging enabled"
1107 cat >> confdefs.h <<\EOF
1108#define XMALLOC_DEBUG 1
1109EOF
1110
1111 fi
1112
1113fi
1114
1115
027acbaf 1116# Check whether --enable-xmalloc_debug_trace or --disable-xmalloc_debug_trace was given.
1117if test "${enable_xmalloc_debug_trace+set}" = set; then
1118 enableval="$enable_xmalloc_debug_trace"
e5f4e1b0 1119 if test "$enableval" = "yes" ; then
027acbaf 1120 echo "Malloc debug trace enabled"
e5f4e1b0 1121 cat >> confdefs.h <<\EOF
027acbaf 1122#define XMALLOC_TRACE 1
1123EOF
1124
1125 cat >> confdefs.h <<\EOF
1126#define XMALLOC_DEBUG 1
e5f4e1b0 1127EOF
1128
1129 fi
1130
1131fi
1132
1133
1134# Check whether --enable-xmalloc_statistics or --disable-xmalloc_statistics was given.
1135if test "${enable_xmalloc_statistics+set}" = set; then
1136 enableval="$enable_xmalloc_statistics"
1137 if test "$enableval" = "yes" ; then
1138 echo "Malloc statistics enabled"
1139 cat >> confdefs.h <<\EOF
1140#define XMALLOC_STATISTICS 1
1141EOF
1142
1143 fi
1144
1145fi
1146
1147
3f628dde 1148# Check whether --enable-carp or --disable-carp was given.
1149if test "${enable_carp+set}" = set; then
1150 enableval="$enable_carp"
1151 if test "$enableval" = "yes" ; then
1152 echo "CARP support enabled"
1153 cat >> confdefs.h <<\EOF
1154#define USE_CARP 1
1155EOF
1156
1157 fi
1158
1159fi
1160
1161
cd748f27 1162# Check whether --enable-async-io or --disable-async-io was given.
e5f4e1b0 1163if test "${enable_async_io+set}" = set; then
1164 enableval="$enable_async_io"
cd748f27 1165 case $enableval in
9bc73deb 1166 yes)
cd748f27 1167 with_pthreads=yes
1168 STORE_MODULES="ufs aufs"
9bc73deb 1169 ;;
1170 no)
9bc73deb 1171 ;;
1172 *)
cd748f27 1173 async_io_threads=$enableval
1174 with_pthreads=yes
1175 STORE_MODULES="ufs aufs"
9bc73deb 1176 ;;
1177 esac
1178
1179fi
1180
1181
cd748f27 1182# Check whether --with-aio-threads or --without-aio-threads was given.
1183if test "${with_aio_threads+set}" = set; then
1184 withval="$with_aio_threads"
1185 async_io_threads=$withval
1186fi
1187
1188if test "$async_io_threads"; then
1189 echo "With $async_io_threads AIO threads"
1190 with_pthreads=yes
1191 cat >> confdefs.h <<EOF
1192#define ASYNC_IO_THREADS $async_io_threads
e5f4e1b0 1193EOF
1194
cd748f27 1195fi
1196
1197# Check whether --with-pthreads or --without-pthreads was given.
1198if test "${with_pthreads+set}" = set; then
1199 withval="$with_pthreads"
1200 if test "$enableval" = "yes"; then
1201 with_pthreads=yes
1202 fi
1203
1204fi
1205
1206if test "$with_pthreads"; then
1207 echo "With pthreads"
68d3e4a5 1208 SQUID_PTHREAD_LIB='$(PTHREADLIB)'
1209 CFLAGS="$CFLAGS -D_REENTRANT"
c68e9c6b 1210 case "$host" in
1211 i386-unknown-freebsd*)
cd748f27 1212 if test "$GCC" = "yes" ; then
1213 if test -z "$PRESET_LDFLAGS"; then
1214 LDFLAGS="$LDFLAGS -pthread"
1215 fi
1216 fi
1217 ;;
1218 esac
1219fi
1220
1221
1222# Check whether --enable-storeio or --disable-storeio was given.
1223if test "${enable_storeio+set}" = set; then
1224 enableval="$enable_storeio"
1225 case $enableval in
1226 yes)
1227 for module in $srcdir/src/fs/*; do
1228 if test -f $module/Makefile.in; then
1229 STORE_MODULES="$STORE_MODULES `basename $module`"
c68e9c6b 1230 fi
cd748f27 1231 done
1232 ;;
1233 no)
1234 ;;
1235 *) STORE_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
c68e9c6b 1236 ;;
cd748f27 1237 esac
1238
1239else
1240 if test -z "$STORE_MODULES"; then
1241 STORE_MODULES="ufs"
1242 fi
1243
e5f4e1b0 1244fi
1245
cd748f27 1246echo "Store moules built: $STORE_MODULES"
1247
1248STORE_OBJS="fs/`echo $STORE_MODULES|sed -e's% %.a fs/%g'`.a"
e5f4e1b0 1249
1250
e5f4e1b0 1251# Check whether --enable-icmp or --disable-icmp was given.
1252if test "${enable_icmp+set}" = set; then
1253 enableval="$enable_icmp"
1254 if test "$enableval" = "yes" ; then
1255 echo "ICMP enabled"
1256 cat >> confdefs.h <<\EOF
1257#define USE_ICMP 1
1258EOF
1259
1260 fi
1261
1262fi
1263
1264
95e36d02 1265# Check whether --enable-delay_pools or --disable-delay_pools was given.
1266if test "${enable_delay_pools+set}" = set; then
1267 enableval="$enable_delay_pools"
e5f4e1b0 1268 if test "$enableval" = "yes" ; then
95e36d02 1269 echo "Delay pools enabled"
1270 DELAY_OBJS='$(DELAY_OBJS)'
e5f4e1b0 1271 cat >> confdefs.h <<\EOF
95e36d02 1272#define DELAY_POOLS 1
e5f4e1b0 1273EOF
1274
1275 fi
1276
1277fi
1278
1279
95e36d02 1280
9fcb1cd6 1281# Check whether --enable-mem-gen-trace or --disable-mem-gen-trace was given.
1282if test "${enable_mem_gen_trace+set}" = set; then
1283 enableval="$enable_mem_gen_trace"
1284 if test "$enableval" = "yes" ; then
1285 echo "Memory trace (to file) enabled"
1286 cat >> confdefs.h <<\EOF
1287#define MEM_GEN_TRACE 1
1288EOF
1289
1290 fi
1291
1292fi
1293
1294
e5f4e1b0 1295# Check whether --enable-useragent_log or --disable-useragent_log was given.
1296if test "${enable_useragent_log+set}" = set; then
1297 enableval="$enable_useragent_log"
1298 if test "$enableval" = "yes" ; then
1299 echo "User-Agent logging enabled"
1300 cat >> confdefs.h <<\EOF
1301#define USE_USERAGENT_LOG 1
1302EOF
1303
1304 fi
1305
1306fi
1307
1308
320e9f36 1309# Check whether --enable-wccp or --disable-wccp was given.
1310if test "${enable_wccp+set}" = set; then
1311 enableval="$enable_wccp"
eb824054 1312 if test "$enableval" = "no" ; then
1313 echo "Web Cache Coordination Protocol disabled"
320e9f36 1314 cat >> confdefs.h <<\EOF
eb824054 1315#define USE_WCCP 0
1316EOF
1317
1318 else
1319 cat >> confdefs.h <<\EOF
1320#define USE_WCCP 1
320e9f36 1321EOF
1322
1323 fi
1324
1325fi
1326
1327
68d3e4a5 1328# Check whether --enable-kill_parent_hack or --disable-kill_parent_hack was given.
1329if test "${enable_kill_parent_hack+set}" = set; then
1330 enableval="$enable_kill_parent_hack"
e5f4e1b0 1331 if test "$enableval" = "yes" ; then
1332 echo "Kill parent on shutdown"
1333 cat >> confdefs.h <<\EOF
1334#define KILL_PARENT_OPT 1
1335EOF
1336
1337 fi
1338
1339fi
1340
1341
1342# Check whether --enable-snmp or --disable-snmp was given.
1343if test "${enable_snmp+set}" = set; then
1344 enableval="$enable_snmp"
1345 if test "$enableval" = "yes" ; then
1346 echo "SNMP monitoring enabled"
1347 cat >> confdefs.h <<\EOF
1348#define SQUID_SNMP 1
1349EOF
1350
1351 SNMPLIB='-L../snmplib -lsnmp'
1352 SNMP_OBJS='$(SNMP_OBJS)'
8a7f0105 1353 SNMP_MAKEFILE=./snmplib/Makefile
e5f4e1b0 1354 makesnmplib=snmplib
1355 fi
1356
1357fi
1358
1359
1360
1361
1362
1363# Check whether --enable-time_hack or --disable-time_hack was given.
1364if test "${enable_time_hack+set}" = set; then
1365 enableval="$enable_time_hack"
1366 if test "$enableval" = "yes" ; then
1367 echo "Update internal timestamp only once per second"
1368 cat >> confdefs.h <<\EOF
1369#define ALARM_UPDATES_TIME 1
1370EOF
1371
1372 fi
1373
1374fi
1375
1376
1377# Check whether --enable-cachemgr_hostname or --disable-cachemgr_hostname was given.
1378if test "${enable_cachemgr_hostname+set}" = set; then
1379 enableval="$enable_cachemgr_hostname"
1380 case $enableval in
1381 yes)
1382 cat >> confdefs.h <<\EOF
1383#define CACHEMGR_HOSTNAME getfullhostname()
1384EOF
1385
1386 echo "Cachemgr default hostname == host where cachemgr runs"
1387 ;;
1388 no)
1389 : # Nothing to do..
1390 ;;
1391 *)
1392 cat >> confdefs.h <<EOF
1393#define CACHEMGR_HOSTNAME "${enableval}"
1394EOF
1395
1396 echo "Cachemgr default hostname set to ${enableval}"
1397 ;;
1398 esac
1399
1400fi
1401
1402
1403# Check whether --enable-arp_acl or --disable-arp_acl was given.
1404if test "${enable_arp_acl+set}" = set; then
1405 enableval="$enable_arp_acl"
1406 if test "$enableval" = "yes" ; then
1407 echo "ARP ACL lists enabled (ether address)"
933cc58d 1408 case "$host" in
a931a29b 1409 *-pc-linux-*)
1410 ;;
933cc58d 1411 *)
bd0c865a 1412 echo "WARNING: ARP ACL support is only currently supported on Linux"
1413 echo " ethernet interfaces, probably won't work on $host."
933cc58d 1414 sleep 10
1415 ;;
1416 esac
e5f4e1b0 1417 cat >> confdefs.h <<\EOF
1418#define USE_ARP_ACL 1
1419EOF
1420
1421 fi
1422
1423fi
1424
1425
14e8e510 1426# Check whether --enable-htcp or --disable-htcp was given.
1427if test "${enable_htcp+set}" = set; then
1428 enableval="$enable_htcp"
b4b8b6da 1429 if test "$enableval" = "yes" ; then
1430 echo "HTCP enabled"
1431 HTCP_OBJS='$(HTCP_OBJS)'
1432 cat >> confdefs.h <<\EOF
14e8e510 1433#define USE_HTCP 1
1434EOF
1435
b4b8b6da 1436 fi
14e8e510 1437
1438fi
1439
1440
b4b8b6da 1441
02749868 1442# Check whether --enable-forw-via-db or --disable-forw-via-db was given.
1443if test "${enable_forw_via_db+set}" = set; then
1444 enableval="$enable_forw_via_db"
1445 if test "$enableval" = "yes" ; then
1446 echo "FORW-VIA enabled"
1447 cat >> confdefs.h <<\EOF
1448#define FORW_VIA_DB 1
1449EOF
1450
1451 fi
1452
1453fi
1454
1455
22df58ea 1456# Check whether --enable-cache-digests or --disable-cache-digests was given.
1457if test "${enable_cache_digests+set}" = set; then
1458 enableval="$enable_cache_digests"
484f2ebc 1459 if test "$enableval" = "yes" ; then
22df58ea 1460 echo "USE_CACHE_DIGESTS enabled"
484f2ebc 1461 cat >> confdefs.h <<\EOF
22df58ea 1462#define USE_CACHE_DIGESTS 1
484f2ebc 1463EOF
1464
1465 fi
1466
1467fi
1468
1469
933cc58d 1470# Check whether --enable-err-language or --disable-err-language was given.
1471if test "${enable_err_language+set}" = set; then
1472 enableval="$enable_err_language"
1473
1474 if test -d errors/$enableval; then
1475 ERR_LANGUAGE=$enableval
1476 else
1477 echo "ERROR! Unknown language $enableval, see errors/"
1478 exit 1
1479 fi
93a8bb45 1480
933cc58d 1481else
bd737203 1482 ERR_LANGUAGE="English"
933cc58d 1483fi
1484
1485
1486
cd748f27 1487# Check whether --with-coss-membuf-size or --without-coss-membuf-size was given.
1488if test "${with_coss_membuf_size+set}" = set; then
1489 withval="$with_coss_membuf_size"
1490 if test "$with_coss_membuf_size"; then
1491 echo "Setting COSS membuf size to $with_coss_membuf_size bytes"
1492 cat >> confdefs.h <<EOF
1493#define COSS_MEMBUF_SZ $with_coss_membuf_size
1494EOF
1495
1496 fi
1497
1498fi
1499
1500
9bb83c8b 1501# Check whether --enable-poll or --disable-poll was given.
1502if test "${enable_poll+set}" = set; then
1503 enableval="$enable_poll"
c68e9c6b 1504
1505 case "$enableval" in
1506 yes)
9bb83c8b 1507 echo "Forcing poll() to be enabled"
1508 ac_cv_func_poll='yes'
c68e9c6b 1509 ;;
1510 no)
1511 echo "Forcing poll() to be disabled"
1512 ac_cv_func_poll='no'
1513 ;;
1514 esac
9bb83c8b 1515
1516fi
1517
1518
6eec93b2 1519# Check whether --enable-http-violations or --disable-http-violations was given.
1520if test "${enable_http_violations+set}" = set; then
1521 enableval="$enable_http_violations"
1522 if test "$enableval" = "no" ; then
1523 echo "Disabling HTTP Violations"
1524 cat >> confdefs.h <<\EOF
1525#define HTTP_VIOLATIONS 0
1526EOF
1527
1528 else
1529 cat >> confdefs.h <<\EOF
1530#define HTTP_VIOLATIONS 1
1531EOF
1532
1533 fi
1534
1535fi
1536
1537
5cafc1d6 1538# Check whether --enable-ipf-transparent or --disable-ipf-transparent was given.
1539if test "${enable_ipf_transparent+set}" = set; then
1540 enableval="$enable_ipf_transparent"
1541 if test "$enableval" = "yes" ; then
1542 echo "IP-Filter Transparent Proxy enabled"
1543 cat >> confdefs.h <<\EOF
1544#define IPF_TRANSPARENT 1
1545EOF
1546
1547 IPF_TRANSPARENT="yes"
1548 fi
1549
1550fi
1551
1552
5d620373 1553# Check whether --enable-leakfinder or --disable-leakfinder was given.
1554if test "${enable_leakfinder+set}" = set; then
1555 enableval="$enable_leakfinder"
1556 if test "$enableval" = "yes" ; then
1557 echo "Leak-Finding enabled"
1558 cat >> confdefs.h <<\EOF
1559#define USE_LEAKFINDER 1
1560EOF
1561
1562 LEAKFINDER_OBJS='$(LEAKFINDER_OBJS)'
1563 USE_LEAKFINDER="yes"
1564 fi
1565
1566fi
1567
1568
1569
3898f57f 1570# Check whether --enable-ident-lookups or --disable-ident-lookups was given.
1571if test "${enable_ident_lookups+set}" = set; then
1572 enableval="$enable_ident_lookups"
1573 if test "$enableval" = "no" ; then
1574 echo "Disabling Ident Lookups"
1575 cat >> confdefs.h <<\EOF
1576#define USE_IDENT 0
1577EOF
1578
1579 else
1580 cat >> confdefs.h <<\EOF
1581#define USE_IDENT 1
1582EOF
1583
1584 fi
1585
1586fi
1587
1588
eb824054 1589# Check whether --enable-internal-dns or --disable-internal-dns was given.
1590if test "${enable_internal_dns+set}" = set; then
1591 enableval="$enable_internal_dns"
1592 if test "$enableval" = "no" ; then
1593 echo "Disabling Internal DNS queries"
1594 cat >> confdefs.h <<\EOF
1595#define USE_DNSSERVERS 1
1596EOF
1597
1598 else
1599 cat >> confdefs.h <<\EOF
1600#define USE_DNSSERVERS 0
1601EOF
1602
1603 fi
1604
1605fi
1606
1607
1608# Check whether --enable-truncate or --disable-truncate was given.
1609if test "${enable_truncate+set}" = set; then
1610 enableval="$enable_truncate"
1611 if test "$enableval" = "yes" ; then
1612 echo "Enabling truncate instead of unlink"
1613 cat >> confdefs.h <<\EOF
1614#define USE_TRUNCATE 1
1615EOF
1616
1617 fi
1618
1619fi
1620
1621
9bc73deb 1622# Check whether --enable-underscores or --disable-underscores was given.
1623if test "${enable_underscores+set}" = set; then
1624 enableval="$enable_underscores"
1625 if test "$enableval" = "yes" ; then
1626 echo "Enabling the use of underscores in host names"
1627 cat >> confdefs.h <<\EOF
1628#define ALLOW_HOSTNAME_UNDERSCORES 1
1629EOF
1630
1631 fi
1632
1633fi
1634
1635
7e3ce7b9 1636# Check whether --enable-heap-replacement or --disable-heap-replacement was given.
1637if test "${enable_heap_replacement+set}" = set; then
1638 enableval="$enable_heap_replacement"
1639 if test "$enableval" = "yes" ; then
1640 echo "Enabling HEAP_REPLACEMENT"
1641 cat >> confdefs.h <<\EOF
1642#define HEAP_REPLACEMENT 1
1643EOF
1644
1645 fi
1646
1647fi
1648
1649
b7db09a3 1650AUTH_MODULES=
1651# Check whether --enable-auth-modules or --disable-auth-modules was given.
1652if test "${enable_auth_modules+set}" = set; then
1653 enableval="$enable_auth_modules"
1654 case "$enableval" in
1655 yes)
1656 for module in $srcdir/auth_modules/*; do
1657 if test -f $module/Makefile.in; then
1658 AUTH_MODULES="$AUTH_MODULES `basename $module`"
1659 fi
1660 done
1661 ;;
1662 no)
1663 ;;
1664 *)
1665 AUTH_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1666 esac
1667
1668fi
1669
1670if test -n "$AUTH_MODULES"; then
1671 echo "Auth moules built: $AUTH_MODULES"
1672fi
1673
1674
fd9aaa3e 1675# Force some compilers to use ANSI features
1676#
1677case "$host" in
1678 alpha-dec-osf*)
1679 if test "$ac_cv_prog_CC" = "cc" ; then
1680 echo "adding '-std1' to cc args for $host"
1681 CC="cc -std1";
1682 ac_cv_prog_CC="$CC"
1683 fi
1684 ;;
c68e9c6b 1685 *-hp-hpux*)
1686 if test "$ac_cv_prog_CC" = "cc" ; then
1687 echo "adding '-Ae' to cc args for $host"
1688 CC="cc -Ae";
1689 ac_cv_prog_CC="$CC"
1690 fi
1691 ;;
fd9aaa3e 1692esac
1693
090089c4 1694echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
cd748f27 1695echo "configure:1696: checking how to run the C preprocessor" >&5
090089c4 1696# On Suns, sometimes $CPP names a directory.
1697if test -n "$CPP" && test -d "$CPP"; then
1698 CPP=
1699fi
1700if test -z "$CPP"; then
1701if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1702 echo $ac_n "(cached) $ac_c" 1>&6
1703else
1704 # This must be in double quotes, not single quotes, because CPP may get
1705 # substituted into the Makefile and "${CC-cc}" will confuse make.
1706 CPP="${CC-cc} -E"
1707 # On the NeXT, cc -E runs the code through the compiler's parser,
1708 # not just through cpp.
1709 cat > conftest.$ac_ext <<EOF
cd748f27 1710#line 1711 "configure"
090089c4 1711#include "confdefs.h"
1712#include <assert.h>
1713Syntax Error
1714EOF
03a0d3b0 1715ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd748f27 1716{ (eval echo configure:1717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7db09a3 1717ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
090089c4 1718if test -z "$ac_err"; then
1719 :
1720else
1721 echo "$ac_err" >&5
b1e77ec1 1722 echo "configure: failed program was:" >&5
1723 cat conftest.$ac_ext >&5
090089c4 1724 rm -rf conftest*
1725 CPP="${CC-cc} -E -traditional-cpp"
1726 cat > conftest.$ac_ext <<EOF
cd748f27 1727#line 1728 "configure"
b7db09a3 1728#include "confdefs.h"
1729#include <assert.h>
1730Syntax Error
1731EOF
1732ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd748f27 1733{ (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7db09a3 1734ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1735if test -z "$ac_err"; then
1736 :
1737else
1738 echo "$ac_err" >&5
1739 echo "configure: failed program was:" >&5
1740 cat conftest.$ac_ext >&5
1741 rm -rf conftest*
1742 CPP="${CC-cc} -nologo -E"
1743 cat > conftest.$ac_ext <<EOF
cd748f27 1744#line 1745 "configure"
090089c4 1745#include "confdefs.h"
1746#include <assert.h>
1747Syntax Error
1748EOF
03a0d3b0 1749ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd748f27 1750{ (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7db09a3 1751ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
090089c4 1752if test -z "$ac_err"; then
1753 :
1754else
1755 echo "$ac_err" >&5
b1e77ec1 1756 echo "configure: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
090089c4 1758 rm -rf conftest*
1759 CPP=/lib/cpp
1760fi
1761rm -f conftest*
1762fi
b7db09a3 1763rm -f conftest*
1764fi
090089c4 1765rm -f conftest*
1766 ac_cv_prog_CPP="$CPP"
1767fi
1768 CPP="$ac_cv_prog_CPP"
1769else
1770 ac_cv_prog_CPP="$CPP"
1771fi
1772echo "$ac_t""$CPP" 1>&6
1773
090089c4 1774# Find a good install program. We prefer a C program (faster),
1775# so one script is as good as another. But avoid the broken or
1776# incompatible versions:
1777# SysV /etc/install, /usr/sbin/install
1778# SunOS /usr/etc/install
1779# IRIX /sbin/install
1780# AIX /bin/install
b7db09a3 1781# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
090089c4 1782# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1783# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1784# ./install, which can be erroneously created by make from ./install.sh.
1785echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
cd748f27 1786echo "configure:1787: checking for a BSD compatible install" >&5
090089c4 1787if test -z "$INSTALL"; then
1788if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1789 echo $ac_n "(cached) $ac_c" 1>&6
1790else
b7db09a3 1791 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
090089c4 1792 for ac_dir in $PATH; do
1793 # Account for people who put trailing slashes in PATH elements.
1794 case "$ac_dir/" in
1795 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1796 *)
1797 # OSF1 and SCO ODT 3.0 have their own names for install.
b7db09a3 1798 # Don't use installbsd from OSF since it installs stuff as root
1799 # by default.
1800 for ac_prog in ginstall scoinst install; do
090089c4 1801 if test -f $ac_dir/$ac_prog; then
1802 if test $ac_prog = install &&
1803 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1804 # AIX install. It has an incompatible calling convention.
090089c4 1805 :
1806 else
1807 ac_cv_path_install="$ac_dir/$ac_prog -c"
1808 break 2
1809 fi
1810 fi
1811 done
1812 ;;
1813 esac
1814 done
133b6d90 1815 IFS="$ac_save_IFS"
090089c4 1816
1817fi
1818 if test "${ac_cv_path_install+set}" = set; then
1819 INSTALL="$ac_cv_path_install"
1820 else
1821 # As a last resort, use the slow shell script. We don't cache a
1822 # path for INSTALL within a source directory, because that will
1823 # break other packages using the cache if that directory is
1824 # removed, or if the path is relative.
1825 INSTALL="$ac_install_sh"
1826 fi
1827fi
1828echo "$ac_t""$INSTALL" 1>&6
1829
1830# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1831# It thinks the first close brace ends the variable substitution.
1832test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1833
b7db09a3 1834test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1835
090089c4 1836test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1837
1838# Extract the first word of "ranlib", so it can be a program name with args.
1839set dummy ranlib; ac_word=$2
1840echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 1841echo "configure:1842: checking for $ac_word" >&5
090089c4 1842if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1843 echo $ac_n "(cached) $ac_c" 1>&6
1844else
1845 if test -n "$RANLIB"; then
1846 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1847else
b7db09a3 1848 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1849 ac_dummy="$PATH"
1850 for ac_dir in $ac_dummy; do
090089c4 1851 test -z "$ac_dir" && ac_dir=.
1852 if test -f $ac_dir/$ac_word; then
1853 ac_cv_prog_RANLIB="ranlib"
1854 break
1855 fi
1856 done
1857 IFS="$ac_save_ifs"
1858 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1859fi
1860fi
1861RANLIB="$ac_cv_prog_RANLIB"
1862if test -n "$RANLIB"; then
1863 echo "$ac_t""$RANLIB" 1>&6
1864else
1865 echo "$ac_t""no" 1>&6
1866fi
1867
1868echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
cd748f27 1869echo "configure:1870: checking whether ln -s works" >&5
090089c4 1870if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1871 echo $ac_n "(cached) $ac_c" 1>&6
1872else
1873 rm -f conftestdata
1874if ln -s X conftestdata 2>/dev/null
1875then
1876 rm -f conftestdata
1877 ac_cv_prog_LN_S="ln -s"
1878else
1879 ac_cv_prog_LN_S=ln
1880fi
1881fi
1882LN_S="$ac_cv_prog_LN_S"
1883if test "$ac_cv_prog_LN_S" = "ln -s"; then
1884 echo "$ac_t""yes" 1>&6
1885else
1886 echo "$ac_t""no" 1>&6
1887fi
1888
81280a96 1889# Extract the first word of "sh", so it can be a program name with args.
1890set dummy sh; ac_word=$2
1891echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 1892echo "configure:1893: checking for $ac_word" >&5
81280a96 1893if eval "test \"`echo '$''{'ac_cv_path_SH'+set}'`\" = set"; then
1894 echo $ac_n "(cached) $ac_c" 1>&6
1895else
1896 case "$SH" in
1897 /*)
1898 ac_cv_path_SH="$SH" # Let the user override the test with a path.
1899 ;;
b7db09a3 1900 ?:/*)
1901 ac_cv_path_SH="$SH" # Let the user override the test with a dos path.
1902 ;;
81280a96 1903 *)
b7db09a3 1904 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1905 ac_dummy="$PATH"
1906 for ac_dir in $ac_dummy; do
81280a96 1907 test -z "$ac_dir" && ac_dir=.
1908 if test -f $ac_dir/$ac_word; then
1909 ac_cv_path_SH="$ac_dir/$ac_word"
1910 break
1911 fi
1912 done
1913 IFS="$ac_save_ifs"
1914 test -z "$ac_cv_path_SH" && ac_cv_path_SH="/bin/sh"
1915 ;;
1916esac
1917fi
1918SH="$ac_cv_path_SH"
1919if test -n "$SH"; then
1920 echo "$ac_t""$SH" 1>&6
1921else
1922 echo "$ac_t""no" 1>&6
1923fi
1924
d9f67e6f 1925# Extract the first word of "false", so it can be a program name with args.
1926set dummy false; ac_word=$2
1927echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 1928echo "configure:1929: checking for $ac_word" >&5
d9f67e6f 1929if eval "test \"`echo '$''{'ac_cv_path_FALSE'+set}'`\" = set"; then
1930 echo $ac_n "(cached) $ac_c" 1>&6
1931else
1932 case "$FALSE" in
1933 /*)
1934 ac_cv_path_FALSE="$FALSE" # Let the user override the test with a path.
1935 ;;
b7db09a3 1936 ?:/*)
1937 ac_cv_path_FALSE="$FALSE" # Let the user override the test with a dos path.
1938 ;;
d9f67e6f 1939 *)
b7db09a3 1940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1941 ac_dummy="$PATH"
1942 for ac_dir in $ac_dummy; do
d9f67e6f 1943 test -z "$ac_dir" && ac_dir=.
1944 if test -f $ac_dir/$ac_word; then
1945 ac_cv_path_FALSE="$ac_dir/$ac_word"
1946 break
1947 fi
1948 done
1949 IFS="$ac_save_ifs"
1950 test -z "$ac_cv_path_FALSE" && ac_cv_path_FALSE="/usr/bin/false"
1951 ;;
1952esac
1953fi
1954FALSE="$ac_cv_path_FALSE"
1955if test -n "$FALSE"; then
1956 echo "$ac_t""$FALSE" 1>&6
1957else
1958 echo "$ac_t""no" 1>&6
1959fi
1960
1961# Extract the first word of "true", so it can be a program name with args.
1962set dummy true; ac_word=$2
1963echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 1964echo "configure:1965: checking for $ac_word" >&5
d9f67e6f 1965if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then
1966 echo $ac_n "(cached) $ac_c" 1>&6
1967else
1968 case "$TRUE" in
1969 /*)
1970 ac_cv_path_TRUE="$TRUE" # Let the user override the test with a path.
1971 ;;
b7db09a3 1972 ?:/*)
1973 ac_cv_path_TRUE="$TRUE" # Let the user override the test with a dos path.
1974 ;;
d9f67e6f 1975 *)
b7db09a3 1976 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1977 ac_dummy="$PATH"
1978 for ac_dir in $ac_dummy; do
d9f67e6f 1979 test -z "$ac_dir" && ac_dir=.
1980 if test -f $ac_dir/$ac_word; then
1981 ac_cv_path_TRUE="$ac_dir/$ac_word"
1982 break
1983 fi
1984 done
1985 IFS="$ac_save_ifs"
1986 test -z "$ac_cv_path_TRUE" && ac_cv_path_TRUE="/usr/bin/true"
1987 ;;
1988esac
1989fi
1990TRUE="$ac_cv_path_TRUE"
1991if test -n "$TRUE"; then
1992 echo "$ac_t""$TRUE" 1>&6
1993else
1994 echo "$ac_t""no" 1>&6
1995fi
1996
090089c4 1997# Extract the first word of "rm", so it can be a program name with args.
1998set dummy rm; ac_word=$2
1999echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2000echo "configure:2001: checking for $ac_word" >&5
090089c4 2001if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2003else
2004 case "$RM" in
2005 /*)
2006 ac_cv_path_RM="$RM" # Let the user override the test with a path.
2007 ;;
b7db09a3 2008 ?:/*)
2009 ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
2010 ;;
090089c4 2011 *)
b7db09a3 2012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2013 ac_dummy="$PATH"
2014 for ac_dir in $ac_dummy; do
090089c4 2015 test -z "$ac_dir" && ac_dir=.
2016 if test -f $ac_dir/$ac_word; then
2017 ac_cv_path_RM="$ac_dir/$ac_word"
2018 break
2019 fi
2020 done
2021 IFS="$ac_save_ifs"
d9f67e6f 2022 test -z "$ac_cv_path_RM" && ac_cv_path_RM="$FALSE"
090089c4 2023 ;;
2024esac
2025fi
2026RM="$ac_cv_path_RM"
2027if test -n "$RM"; then
2028 echo "$ac_t""$RM" 1>&6
2029else
2030 echo "$ac_t""no" 1>&6
2031fi
2032
2033# Extract the first word of "mv", so it can be a program name with args.
2034set dummy mv; ac_word=$2
2035echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2036echo "configure:2037: checking for $ac_word" >&5
090089c4 2037if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
2038 echo $ac_n "(cached) $ac_c" 1>&6
2039else
2040 case "$MV" in
2041 /*)
2042 ac_cv_path_MV="$MV" # Let the user override the test with a path.
2043 ;;
b7db09a3 2044 ?:/*)
2045 ac_cv_path_MV="$MV" # Let the user override the test with a dos path.
2046 ;;
090089c4 2047 *)
b7db09a3 2048 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2049 ac_dummy="$PATH"
2050 for ac_dir in $ac_dummy; do
090089c4 2051 test -z "$ac_dir" && ac_dir=.
2052 if test -f $ac_dir/$ac_word; then
2053 ac_cv_path_MV="$ac_dir/$ac_word"
2054 break
2055 fi
2056 done
2057 IFS="$ac_save_ifs"
d9f67e6f 2058 test -z "$ac_cv_path_MV" && ac_cv_path_MV="$FALSE"
090089c4 2059 ;;
2060esac
2061fi
2062MV="$ac_cv_path_MV"
2063if test -n "$MV"; then
2064 echo "$ac_t""$MV" 1>&6
2065else
2066 echo "$ac_t""no" 1>&6
2067fi
2068
2069# Extract the first word of "mkdir", so it can be a program name with args.
2070set dummy mkdir; ac_word=$2
2071echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2072echo "configure:2073: checking for $ac_word" >&5
090089c4 2073if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
2074 echo $ac_n "(cached) $ac_c" 1>&6
2075else
2076 case "$MKDIR" in
2077 /*)
2078 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
2079 ;;
b7db09a3 2080 ?:/*)
2081 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a dos path.
2082 ;;
090089c4 2083 *)
b7db09a3 2084 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2085 ac_dummy="$PATH"
2086 for ac_dir in $ac_dummy; do
090089c4 2087 test -z "$ac_dir" && ac_dir=.
2088 if test -f $ac_dir/$ac_word; then
2089 ac_cv_path_MKDIR="$ac_dir/$ac_word"
2090 break
2091 fi
2092 done
2093 IFS="$ac_save_ifs"
d9f67e6f 2094 test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="$FALSE"
090089c4 2095 ;;
2096esac
2097fi
2098MKDIR="$ac_cv_path_MKDIR"
2099if test -n "$MKDIR"; then
2100 echo "$ac_t""$MKDIR" 1>&6
2101else
2102 echo "$ac_t""no" 1>&6
2103fi
2104
2105# Extract the first word of "ln", so it can be a program name with args.
2106set dummy ln; ac_word=$2
2107echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2108echo "configure:2109: checking for $ac_word" >&5
090089c4 2109if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
2110 echo $ac_n "(cached) $ac_c" 1>&6
2111else
2112 case "$LN" in
2113 /*)
2114 ac_cv_path_LN="$LN" # Let the user override the test with a path.
2115 ;;
b7db09a3 2116 ?:/*)
2117 ac_cv_path_LN="$LN" # Let the user override the test with a dos path.
2118 ;;
090089c4 2119 *)
b7db09a3 2120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2121 ac_dummy="$PATH"
2122 for ac_dir in $ac_dummy; do
090089c4 2123 test -z "$ac_dir" && ac_dir=.
2124 if test -f $ac_dir/$ac_word; then
2125 ac_cv_path_LN="$ac_dir/$ac_word"
2126 break
2127 fi
2128 done
2129 IFS="$ac_save_ifs"
2130 test -z "$ac_cv_path_LN" && ac_cv_path_LN="cp"
2131 ;;
2132esac
2133fi
2134LN="$ac_cv_path_LN"
2135if test -n "$LN"; then
2136 echo "$ac_t""$LN" 1>&6
2137else
2138 echo "$ac_t""no" 1>&6
2139fi
2140
090089c4 2141# Extract the first word of "perl", so it can be a program name with args.
2142set dummy perl; ac_word=$2
2143echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2144echo "configure:2145: checking for $ac_word" >&5
983061ed 2145if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
090089c4 2146 echo $ac_n "(cached) $ac_c" 1>&6
2147else
983061ed 2148 case "$PERL" in
090089c4 2149 /*)
983061ed 2150 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
090089c4 2151 ;;
b7db09a3 2152 ?:/*)
2153 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2154 ;;
090089c4 2155 *)
b7db09a3 2156 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2157 ac_dummy="$PATH"
2158 for ac_dir in $ac_dummy; do
090089c4 2159 test -z "$ac_dir" && ac_dir=.
2160 if test -f $ac_dir/$ac_word; then
983061ed 2161 ac_cv_path_PERL="$ac_dir/$ac_word"
090089c4 2162 break
2163 fi
2164 done
2165 IFS="$ac_save_ifs"
983061ed 2166 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
090089c4 2167 ;;
2168esac
2169fi
983061ed 2170PERL="$ac_cv_path_PERL"
2171if test -n "$PERL"; then
2172 echo "$ac_t""$PERL" 1>&6
090089c4 2173else
2174 echo "$ac_t""no" 1>&6
2175fi
2176
5abe3056 2177# Extract the first word of "makedepend", so it can be a program name with args.
2178set dummy makedepend; ac_word=$2
2179echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2180echo "configure:2181: checking for $ac_word" >&5
5abe3056 2181if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPEND'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 case "$MAKEDEPEND" in
2185 /*)
2186 ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a path.
2187 ;;
b7db09a3 2188 ?:/*)
2189 ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a dos path.
2190 ;;
5abe3056 2191 *)
b7db09a3 2192 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2193 ac_dummy="$PATH"
2194 for ac_dir in $ac_dummy; do
5abe3056 2195 test -z "$ac_dir" && ac_dir=.
2196 if test -f $ac_dir/$ac_word; then
2197 ac_cv_path_MAKEDEPEND="$ac_dir/$ac_word"
2198 break
2199 fi
2200 done
2201 IFS="$ac_save_ifs"
d9f67e6f 2202 test -z "$ac_cv_path_MAKEDEPEND" && ac_cv_path_MAKEDEPEND="$TRUE"
5abe3056 2203 ;;
2204esac
2205fi
2206MAKEDEPEND="$ac_cv_path_MAKEDEPEND"
2207if test -n "$MAKEDEPEND"; then
2208 echo "$ac_t""$MAKEDEPEND" 1>&6
2209else
2210 echo "$ac_t""no" 1>&6
2211fi
2212
6ad85e8a 2213# Extract the first word of "ar", so it can be a program name with args.
2214set dummy ar; ac_word=$2
2215echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd748f27 2216echo "configure:2217: checking for $ac_word" >&5
6ad85e8a 2217if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2218 echo $ac_n "(cached) $ac_c" 1>&6
2219else
2220 case "$AR" in
2221 /*)
2222 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2223 ;;
b7db09a3 2224 ?:/*)
2225 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2226 ;;
6ad85e8a 2227 *)
b7db09a3 2228 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2229 ac_dummy="$PATH"
2230 for ac_dir in $ac_dummy; do
6ad85e8a 2231 test -z "$ac_dir" && ac_dir=.
2232 if test -f $ac_dir/$ac_word; then
2233 ac_cv_path_AR="$ac_dir/$ac_word"
2234 break
2235 fi
2236 done
2237 IFS="$ac_save_ifs"
2238 test -z "$ac_cv_path_AR" && ac_cv_path_AR="$FALSE"
2239 ;;
2240esac
2241fi
2242AR="$ac_cv_path_AR"
2243if test -n "$AR"; then
2244 echo "$ac_t""$AR" 1>&6
2245else
2246 echo "$ac_t""no" 1>&6
2247fi
2248
2249
2250case "$host" in
2251 *-hp-hpux*)
2252 echo "Disabling 'ranlib' for HP-UX..."
2253 RANLIB=":"
2254 ;;
2255esac
2256
2257AR_R="$AR r"
2258case "$host" in
2259 *-next-nextstep3)
2260 AR="libtool -o"
2261 ;;
2262esac
090089c4 2263
090089c4 2264
2265ac_header_dirent=no
2266for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2267do
b1e77ec1 2268ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
090089c4 2269echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
cd748f27 2270echo "configure:2271: checking for $ac_hdr that defines DIR" >&5
090089c4 2271if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2272 echo $ac_n "(cached) $ac_c" 1>&6
2273else
2274 cat > conftest.$ac_ext <<EOF
cd748f27 2275#line 2276 "configure"
090089c4 2276#include "confdefs.h"
2277#include <sys/types.h>
2278#include <$ac_hdr>
b1e77ec1 2279int main() {
090089c4 2280DIR *dirp = 0;
2281; return 0; }
2282EOF
cd748f27 2283if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
090089c4 2284 rm -rf conftest*
2285 eval "ac_cv_header_dirent_$ac_safe=yes"
2286else
b1e77ec1 2287 echo "configure: failed program was:" >&5
2288 cat conftest.$ac_ext >&5
090089c4 2289 rm -rf conftest*
2290 eval "ac_cv_header_dirent_$ac_safe=no"
2291fi
2292rm -f conftest*
090089c4 2293fi
2294if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2295 echo "$ac_t""yes" 1>&6
b1e77ec1 2296 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
090089c4 2297 cat >> confdefs.h <<EOF
2298#define $ac_tr_hdr 1
2299EOF
2300 ac_header_dirent=$ac_hdr; break
2301else
2302 echo "$ac_t""no" 1>&6
2303fi
2304done
2305# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2306if test $ac_header_dirent = dirent.h; then
b1e77ec1 2307echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
cd748f27 2308echo "configure:2309: checking for opendir in -ldir" >&5
b1e77ec1 2309ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
090089c4 2310if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2311 echo $ac_n "(cached) $ac_c" 1>&6
2312else
2313 ac_save_LIBS="$LIBS"
2314LIBS="-ldir $LIBS"
2315cat > conftest.$ac_ext <<EOF
cd748f27 2316#line 2317 "configure"
090089c4 2317#include "confdefs.h"
03a0d3b0 2318/* Override any gcc2 internal prototype to avoid an error. */
2319/* We use char because int might match the return type of a gcc2
2320 builtin and then its argument prototype would still apply. */
2321char opendir();
090089c4 2322
b1e77ec1 2323int main() {
090089c4 2324opendir()
2325; return 0; }
2326EOF
cd748f27 2327if { (eval echo configure:2328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 2328 rm -rf conftest*
2329 eval "ac_cv_lib_$ac_lib_var=yes"
2330else
b1e77ec1 2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
090089c4 2333 rm -rf conftest*
2334 eval "ac_cv_lib_$ac_lib_var=no"
2335fi
2336rm -f conftest*
2337LIBS="$ac_save_LIBS"
2338
2339fi
2340if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2341 echo "$ac_t""yes" 1>&6
2342 LIBS="$LIBS -ldir"
2343else
2344 echo "$ac_t""no" 1>&6
2345fi
2346
2347else
b1e77ec1 2348echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
cd748f27 2349echo "configure:2350: checking for opendir in -lx" >&5
b1e77ec1 2350ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
090089c4 2351if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2353else
2354 ac_save_LIBS="$LIBS"
2355LIBS="-lx $LIBS"
2356cat > conftest.$ac_ext <<EOF
cd748f27 2357#line 2358 "configure"
090089c4 2358#include "confdefs.h"
03a0d3b0 2359/* Override any gcc2 internal prototype to avoid an error. */
2360/* We use char because int might match the return type of a gcc2
2361 builtin and then its argument prototype would still apply. */
2362char opendir();
090089c4 2363
b1e77ec1 2364int main() {
090089c4 2365opendir()
2366; return 0; }
2367EOF
cd748f27 2368if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 2369 rm -rf conftest*
2370 eval "ac_cv_lib_$ac_lib_var=yes"
2371else
b1e77ec1 2372 echo "configure: failed program was:" >&5
2373 cat conftest.$ac_ext >&5
090089c4 2374 rm -rf conftest*
2375 eval "ac_cv_lib_$ac_lib_var=no"
2376fi
2377rm -f conftest*
2378LIBS="$ac_save_LIBS"
2379
2380fi
2381if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2382 echo "$ac_t""yes" 1>&6
2383 LIBS="$LIBS -lx"
2384else
2385 echo "$ac_t""no" 1>&6
2386fi
2387
2388fi
2389
090089c4 2390echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
cd748f27 2391echo "configure:2392: checking for ANSI C header files" >&5
090089c4 2392if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2393 echo $ac_n "(cached) $ac_c" 1>&6
2394else
2395 cat > conftest.$ac_ext <<EOF
cd748f27 2396#line 2397 "configure"
090089c4 2397#include "confdefs.h"
2398#include <stdlib.h>
2399#include <stdarg.h>
2400#include <string.h>
2401#include <float.h>
2402EOF
03a0d3b0 2403ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd748f27 2404{ (eval echo configure:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7db09a3 2405ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
090089c4 2406if test -z "$ac_err"; then
2407 rm -rf conftest*
2408 ac_cv_header_stdc=yes
2409else
2410 echo "$ac_err" >&5
b1e77ec1 2411 echo "configure: failed program was:" >&5
2412 cat conftest.$ac_ext >&5
090089c4 2413 rm -rf conftest*
2414 ac_cv_header_stdc=no
2415fi
2416rm -f conftest*
2417
2418if test $ac_cv_header_stdc = yes; then
2419 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2420cat > conftest.$ac_ext <<EOF
cd748f27 2421#line 2422 "configure"
090089c4 2422#include "confdefs.h"
2423#include <string.h>
2424EOF
2425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2426 egrep "memchr" >/dev/null 2>&1; then
2427 :
2428else
2429 rm -rf conftest*
2430 ac_cv_header_stdc=no
2431fi
2432rm -f conftest*
2433
2434fi
2435
2436if test $ac_cv_header_stdc = yes; then
2437 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2438cat > conftest.$ac_ext <<EOF
cd748f27 2439#line 2440 "configure"
090089c4 2440#include "confdefs.h"
2441#include <stdlib.h>
2442EOF
2443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2444 egrep "free" >/dev/null 2>&1; then
2445 :
2446else
2447 rm -rf conftest*
2448 ac_cv_header_stdc=no
2449fi
2450rm -f conftest*
2451
2452fi
2453
2454if test $ac_cv_header_stdc = yes; then
2455 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2456if test "$cross_compiling" = yes; then
2457 :
2458else
b1e77ec1 2459 cat > conftest.$ac_ext <<EOF
cd748f27 2460#line 2461 "configure"
090089c4 2461#include "confdefs.h"
2462#include <ctype.h>
2463#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2464#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2465#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2466int main () { int i; for (i = 0; i < 256; i++)
2467if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2468exit (0); }
2469
2470EOF
cd748f27 2471if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 2472then
090089c4 2473 :
2474else
b1e77ec1 2475 echo "configure: failed program was:" >&5
2476 cat conftest.$ac_ext >&5
2477 rm -fr conftest*
090089c4 2478 ac_cv_header_stdc=no
2479fi
090089c4 2480rm -fr conftest*
b1e77ec1 2481fi
2482
090089c4 2483fi
2484fi
2485
2486echo "$ac_t""$ac_cv_header_stdc" 1>&6
2487if test $ac_cv_header_stdc = yes; then
2488 cat >> confdefs.h <<\EOF
2489#define STDC_HEADERS 1
2490EOF
2491
2492fi
2493
db40ae20 2494
2495for ac_hdr in \
db40ae20 2496 arpa/inet.h \
30a4f2a8 2497 arpa/nameser.h \
9441aa34 2498 assert.h \
db40ae20 2499 bstring.h \
2500 config.h \
2501 crypt.h \
30a4f2a8 2502 ctype.h \
2503 errno.h \
db40ae20 2504 fcntl.h \
9c1d8929 2505 getopt.h \
88738790 2506 gnumalloc.h \
30a4f2a8 2507 grp.h \
5cafc1d6 2508 ip_compat.h \
2509 ip_fil.h \
2510 ip_nat.h \
30a4f2a8 2511 libc.h \
6ad85e8a 2512 limits.h \
30a4f2a8 2513 malloc.h \
e0bddc45 2514 math.h \
db40ae20 2515 memory.h \
b075cbb1 2516 mount.h \
5cafc1d6 2517 net/if.h \
30a4f2a8 2518 netdb.h \
c415c128 2519 netinet/if_ether.h \
db40ae20 2520 netinet/in.h \
30a4f2a8 2521 netinet/tcp.h \
eb824054 2522 netinet/ip_compat.h \
2523 netinet/ip_fil.h \
2524 netinet/ip_nat.h \
dcfe6390 2525 poll.h \
30a4f2a8 2526 pwd.h \
2527 regex.h \
2528 resolv.h \
c68e9c6b 2529 sched.h \
30a4f2a8 2530 signal.h \
2531 stdarg.h \
2532 stddef.h \
2533 stdio.h \
db40ae20 2534 stdlib.h \
2535 string.h \
2536 strings.h \
2537 sys/file.h \
5cafc1d6 2538 sys/ioctl.h \
b7db09a3 2539 sys/mount.h \
ebb3c3ba 2540 sys/msg.h \
30a4f2a8 2541 sys/param.h \
2542 sys/resource.h \
db40ae20 2543 sys/select.h\
30a4f2a8 2544 sys/socket.h \
2545 sys/stat.h \
b075cbb1 2546 sys/statvfs.h \
b7db09a3 2547 sys/vfs.h \
30a4f2a8 2548 sys/syscall.h \
db40ae20 2549 sys/time.h \
2550 sys/types.h \
30a4f2a8 2551 sys/un.h \
b075cbb1 2552 sys/vfs.h \
30a4f2a8 2553 sys/wait.h \
db40ae20 2554 syslog.h \
30a4f2a8 2555 time.h \
2556 unistd.h \
2557 varargs.h \
db40ae20 2558
090089c4 2559do
b1e77ec1 2560ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
090089c4 2561echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
cd748f27 2562echo "configure:2563: checking for $ac_hdr" >&5
090089c4 2563if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565else
2566 cat > conftest.$ac_ext <<EOF
cd748f27 2567#line 2568 "configure"
090089c4 2568#include "confdefs.h"
2569#include <$ac_hdr>
2570EOF
03a0d3b0 2571ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd748f27 2572{ (eval echo configure:2573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7db09a3 2573ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
090089c4 2574if test -z "$ac_err"; then
2575 rm -rf conftest*
2576 eval "ac_cv_header_$ac_safe=yes"
2577else
2578 echo "$ac_err" >&5
b1e77ec1 2579 echo "configure: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
090089c4 2581 rm -rf conftest*
2582 eval "ac_cv_header_$ac_safe=no"
2583fi
2584rm -f conftest*
2585fi
2586if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2587 echo "$ac_t""yes" 1>&6
b1e77ec1 2588 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
090089c4 2589 cat >> confdefs.h <<EOF
2590#define $ac_tr_hdr 1
2591EOF
2592
2593else
2594 echo "$ac_t""no" 1>&6
2595fi
2596done
2597
db40ae20 2598
aee0606f 2599echo $ac_n "checking for working const""... $ac_c" 1>&6
cd748f27 2600echo "configure:2601: checking for working const" >&5
aee0606f 2601if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2602 echo $ac_n "(cached) $ac_c" 1>&6
2603else
2604 cat > conftest.$ac_ext <<EOF
cd748f27 2605#line 2606 "configure"
aee0606f 2606#include "confdefs.h"
2607
b1e77ec1 2608int main() {
aee0606f 2609
2610/* Ultrix mips cc rejects this. */
2611typedef int charset[2]; const charset x;
2612/* SunOS 4.1.1 cc rejects this. */
2613char const *const *ccp;
2614char **p;
2615/* NEC SVR4.0.2 mips cc rejects this. */
2616struct point {int x, y;};
2617static struct point const zero = {0,0};
2618/* AIX XL C 1.02.0.0 rejects this.
2619 It does not let you subtract one const X* pointer from another in an arm
2620 of an if-expression whose if-part is not a constant expression */
2621const char *g = "string";
2622ccp = &g + (g ? g-g : 0);
2623/* HPUX 7.0 cc rejects these. */
2624++ccp;
2625p = (char**) ccp;
2626ccp = (char const *const *) p;
2627{ /* SCO 3.2v4 cc rejects this. */
2628 char *t;
2629 char const *s = 0 ? (char *) 0 : (char const *) 0;
2630
2631 *t++ = 0;
2632}
2633{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2634 int x[] = {25, 17};
2635 const int *foo = &x[0];
2636 ++foo;
2637}
2638{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2639 typedef const int *iptr;
2640 iptr p = 0;
2641 ++p;
2642}
2643{ /* AIX XL C 1.02.0.0 rejects this saying
2644 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2645 struct s { int j; const int *ap[3]; };
2646 struct s *b; b->j = 5;
2647}
2648{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2649 const int foo = 10;
2650}
2651
2652; return 0; }
2653EOF
cd748f27 2654if { (eval echo configure:2655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
aee0606f 2655 rm -rf conftest*
2656 ac_cv_c_const=yes
2657else
b1e77ec1 2658 echo "configure: failed program was:" >&5
2659 cat conftest.$ac_ext >&5
aee0606f 2660 rm -rf conftest*
2661 ac_cv_c_const=no
2662fi
2663rm -f conftest*
aee0606f 2664fi
2665
2666echo "$ac_t""$ac_cv_c_const" 1>&6
2667if test $ac_cv_c_const = no; then
2668 cat >> confdefs.h <<\EOF
2669#define const
2670EOF
2671
2672fi
2673
cbc2450f 2674echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
cd748f27 2675echo "configure:2676: checking whether byte ordering is bigendian" >&5
cbc2450f 2676if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 ac_cv_c_bigendian=unknown
2680# See if sys/param.h defines the BYTE_ORDER macro.
2681cat > conftest.$ac_ext <<EOF
cd748f27 2682#line 2683 "configure"
cbc2450f 2683#include "confdefs.h"
2684#include <sys/types.h>
2685#include <sys/param.h>
2686int main() {
2687
2688#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2689 bogus endian macros
2690#endif
2691; return 0; }
2692EOF
cd748f27 2693if { (eval echo configure:2694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cbc2450f 2694 rm -rf conftest*
2695 # It does; now see whether it defined to BIG_ENDIAN or not.
2696cat > conftest.$ac_ext <<EOF
cd748f27 2697#line 2698 "configure"
cbc2450f 2698#include "confdefs.h"
2699#include <sys/types.h>
2700#include <sys/param.h>
2701int main() {
2702
2703#if BYTE_ORDER != BIG_ENDIAN
2704 not big endian
2705#endif
2706; return 0; }
2707EOF
cd748f27 2708if { (eval echo configure:2709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cbc2450f 2709 rm -rf conftest*
2710 ac_cv_c_bigendian=yes
2711else
2712 echo "configure: failed program was:" >&5
2713 cat conftest.$ac_ext >&5
2714 rm -rf conftest*
2715 ac_cv_c_bigendian=no
2716fi
2717rm -f conftest*
2718else
2719 echo "configure: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721fi
2722rm -f conftest*
2723if test $ac_cv_c_bigendian = unknown; then
2724if test "$cross_compiling" = yes; then
2725 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2726else
2727 cat > conftest.$ac_ext <<EOF
cd748f27 2728#line 2729 "configure"
cbc2450f 2729#include "confdefs.h"
2730main () {
2731 /* Are we little or big endian? From Harbison&Steele. */
2732 union
2733 {
2734 long l;
2735 char c[sizeof (long)];
2736 } u;
2737 u.l = 1;
2738 exit (u.c[sizeof (long) - 1] == 1);
2739}
2740EOF
cd748f27 2741if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
cbc2450f 2742then
2743 ac_cv_c_bigendian=no
2744else
2745 echo "configure: failed program was:" >&5
2746 cat conftest.$ac_ext >&5
2747 rm -fr conftest*
2748 ac_cv_c_bigendian=yes
2749fi
2750rm -fr conftest*
2751fi
2752
2753fi
2754fi
2755
2756echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2757if test $ac_cv_c_bigendian = yes; then
2758 cat >> confdefs.h <<\EOF
2759#define WORDS_BIGENDIAN 1
2760EOF
2761
2762fi
2763
aee0606f 2764
20a50bb9 2765echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6
cd748f27 2766echo "configure:2767: checking if ANSI prototypes work" >&5
5c51415d 2767if eval "test \"`echo '$''{'ac_cv_have_ansi_prototypes'+set}'`\" = set"; then
2768 echo $ac_n "(cached) $ac_c" 1>&6
2769else
2770
2771 cat > conftest.$ac_ext <<EOF
cd748f27 2772#line 2773 "configure"
090089c4 2773#include "confdefs.h"
8cca06da 2774int foo(char *); int foo (char *bar) {return 1;}
b1e77ec1 2775int main() {
8cca06da 2776foo("bar")
20a50bb9 2777; return 0; }
2778EOF
cd748f27 2779if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20a50bb9 2780 rm -rf conftest*
5c51415d 2781 ac_cv_have_ansi_prototypes="yes"
20a50bb9 2782else
b1e77ec1 2783 echo "configure: failed program was:" >&5
2784 cat conftest.$ac_ext >&5
20a50bb9 2785 rm -rf conftest*
5c51415d 2786 ac_cv_have_ansi_prototypes="no"
20a50bb9 2787fi
2788rm -f conftest*
2789
5c51415d 2790fi
2791
2792echo "$ac_t""$ac_cv_have_ansi_prototypes" 1>&6
2793if test $ac_cv_have_ansi_prototypes = "yes" ; then
2794 cat >> confdefs.h <<\EOF
2795#define HAVE_ANSI_PROTOTYPES 1
2796EOF
2797
2798fi
2799
20a50bb9 2800echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
cd748f27 2801echo "configure:2802: checking for tm->tm_gmtoff" >&5
5c51415d 2802if eval "test \"`echo '$''{'ac_cv_have_tm_gmoff'+set}'`\" = set"; then
2803 echo $ac_n "(cached) $ac_c" 1>&6
2804else
2805
2806 cat > conftest.$ac_ext <<EOF
cd748f27 2807#line 2808 "configure"
20a50bb9 2808#include "confdefs.h"
46c883ed 2809#include <time.h>
2810#include <sys/time.h>
b1e77ec1 2811int main() {
46c883ed 2812struct tm foo;
5c51415d 2813 foo.tm_gmtoff = 0;
46c883ed 2814; return 0; }
2815EOF
cd748f27 2816if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
46c883ed 2817 rm -rf conftest*
5c51415d 2818 ac_cv_have_tm_gmoff="yes"
46c883ed 2819else
b1e77ec1 2820 echo "configure: failed program was:" >&5
2821 cat conftest.$ac_ext >&5
46c883ed 2822 rm -rf conftest*
5c51415d 2823 ac_cv_have_tm_gmoff="no"
46c883ed 2824fi
2825rm -f conftest*
2826
5c51415d 2827fi
2828
2829echo "$ac_t""$ac_cv_have_tm_gmoff" 1>&6
2830if test $ac_cv_have_tm_gmoff = "yes" ; then
2831 cat >> confdefs.h <<\EOF
2832#define HAVE_TM_GMTOFF 1
2833EOF
2834
2835fi
2836
eb824054 2837echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6
cd748f27 2838echo "configure:2839: checking for struct mallinfo" >&5
eb824054 2839if eval "test \"`echo '$''{'ac_cv_have_struct_mallinfo'+set}'`\" = set"; then
2840 echo $ac_n "(cached) $ac_c" 1>&6
2841else
2842
2843 cat > conftest.$ac_ext <<EOF
cd748f27 2844#line 2845 "configure"
eb824054 2845#include "confdefs.h"
2846#include <sys/types.h>
2847#if HAVE_MALLOC_H
2848#include <malloc.h>
2849#endif
2850int main() {
2851struct mallinfo foo;
2852 foo.arena = 0;
2853 foo.ordblks = 0;
2854 foo.smblks = 0;
2855 foo.hblks = 0;
2856 foo.hblkhd = 0;
2857 foo.uordblks = 0;
2858 foo.fordblks = 0;
2859 foo.keepcost = 0;
2860; return 0; }
2861EOF
cd748f27 2862if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
eb824054 2863 rm -rf conftest*
2864 ac_cv_have_struct_mallinfo="yes"
2865else
2866 echo "configure: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 rm -rf conftest*
2869 ac_cv_have_struct_mallinfo="no"
2870fi
2871rm -f conftest*
2872
2873fi
2874
2875echo "$ac_t""$ac_cv_have_struct_mallinfo" 1>&6
2876if test $ac_cv_have_struct_mallinfo = "yes" ; then
2877 cat >> confdefs.h <<\EOF
2878#define HAVE_STRUCT_MALLINFO 1
2879EOF
2880
2881fi
2882
46c883ed 2883echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
cd748f27 2884echo "configure:2885: checking for extended mallinfo" >&5
5c51415d 2885if eval "test \"`echo '$''{'ac_cv_have_ext_mallinfo'+set}'`\" = set"; then
2886 echo $ac_n "(cached) $ac_c" 1>&6
2887else
2888
2889 cat > conftest.$ac_ext <<EOF
cd748f27 2890#line 2891 "configure"
46c883ed 2891#include "confdefs.h"
2892#include <sys/types.h>
090089c4 2893#include <malloc.h>
b1e77ec1 2894int main() {
46c883ed 2895struct mallinfo foo;
5c51415d 2896 foo.mxfast = 0;
46c883ed 2897; return 0; }
090089c4 2898EOF
cd748f27 2899if { (eval echo configure:2900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
090089c4 2900 rm -rf conftest*
5c51415d 2901 ac_cv_have_ext_mallinfo="yes"
46c883ed 2902else
b1e77ec1 2903 echo "configure: failed program was:" >&5
2904 cat conftest.$ac_ext >&5
46c883ed 2905 rm -rf conftest*
5c51415d 2906 ac_cv_have_ext_mallinfo="no"
090089c4 2907fi
2908rm -f conftest*
2909
5c51415d 2910fi
2911
2912echo "$ac_t""$ac_cv_have_ext_mallinfo" 1>&6
2913if test $ac_cv_have_ext_mallinfo = "yes" ; then
2914 cat >> confdefs.h <<\EOF
2915#define HAVE_EXT_MALLINFO 1
2916EOF
2917
2918fi
2919
b54a6789 2920echo $ac_n "checking for struct rusage""... $ac_c" 1>&6
cd748f27 2921echo "configure:2922: checking for struct rusage" >&5
b54a6789 2922if eval "test \"`echo '$''{'ac_cv_have_struct_rusage'+set}'`\" = set"; then
2923 echo $ac_n "(cached) $ac_c" 1>&6
2924else
2925
2926 cat > conftest.$ac_ext <<EOF
cd748f27 2927#line 2928 "configure"
b54a6789 2928#include "confdefs.h"
2929
8ff51bba 2930#if HAVE_SYS_TIME_H
2931#include <sys/time.h>
2932#endif
b54a6789 2933#if HAVE_SYS_RESOURCE_H
2934#include <sys/resource.h>
2935#endif
2936int main() {
2937struct rusage R;
2938; return 0; }
2939EOF
cd748f27 2940if { (eval echo configure:2941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b54a6789 2941 rm -rf conftest*
2942 ac_cv_have_struct_rusage="yes"
2943else
2944 echo "configure: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
2946 rm -rf conftest*
2947 ac_cv_have_struct_rusage="no"
2948fi
2949rm -f conftest*
2950
2951fi
2952
2953echo "$ac_t""$ac_cv_have_struct_rusage" 1>&6
2954if test $ac_cv_have_struct_rusage = "yes" ; then
2955 cat >> confdefs.h <<\EOF
2956#define HAVE_STRUCT_RUSAGE 1
2957EOF
2958
2959fi
2960
a025a745 2961echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6
cd748f27 2962echo "configure:2963: checking for ip->ip_hl" >&5
5c51415d 2963if eval "test \"`echo '$''{'ac_cv_have_ip_hl'+set}'`\" = set"; then
2964 echo $ac_n "(cached) $ac_c" 1>&6
2965else
2966
2967 cat > conftest.$ac_ext <<EOF
cd748f27 2968#line 2969 "configure"
a025a745 2969#include "confdefs.h"
2970#include <sys/types.h>
2971#include <netinet/in.h>
2972#include <netinet/in_systm.h>
2973#include <netinet/ip.h>
6ad85e8a 2974#ifdef __linux__
2975#define ip_hl ihl
2976#endif
2977#ifndef __linux__
2978#define iphdr ip
2979#endif
b1e77ec1 2980int main() {
6ad85e8a 2981struct iphdr ip;
5c51415d 2982 ip.ip_hl= 0;
a025a745 2983; return 0; }
2984EOF
cd748f27 2985if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a025a745 2986 rm -rf conftest*
5c51415d 2987 ac_cv_have_ip_hl="yes"
a025a745 2988else
b1e77ec1 2989 echo "configure: failed program was:" >&5
2990 cat conftest.$ac_ext >&5
a025a745 2991 rm -rf conftest*
5c51415d 2992 ac_cv_have_ip_hl="no"
a025a745 2993fi
2994rm -f conftest*
2995
5c51415d 2996fi
2997
2998echo "$ac_t""$ac_cv_have_ip_hl" 1>&6
2999if test $ac_cv_have_ip_hl = "yes" ; then
3000 cat >> confdefs.h <<\EOF
3001#define HAVE_IP_HL 1
3002EOF
3003
3004fi
3005
090089c4 3006echo $ac_n "checking size of int""... $ac_c" 1>&6
cd748f27 3007echo "configure:3008: checking size of int" >&5
090089c4 3008if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3009 echo $ac_n "(cached) $ac_c" 1>&6
3010else
3011 if test "$cross_compiling" = yes; then
3012 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3013else
b1e77ec1 3014 cat > conftest.$ac_ext <<EOF
cd748f27 3015#line 3016 "configure"
090089c4 3016#include "confdefs.h"
3017#include <stdio.h>
3018main()
3019{
3020 FILE *f=fopen("conftestval", "w");
3021 if (!f) exit(1);
3022 fprintf(f, "%d\n", sizeof(int));
3023 exit(0);
3024}
3025EOF
cd748f27 3026if { (eval echo configure:3027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 3027then
090089c4 3028 ac_cv_sizeof_int=`cat conftestval`
3029else
b1e77ec1 3030 echo "configure: failed program was:" >&5
3031 cat conftest.$ac_ext >&5
3032 rm -fr conftest*
090089c4 3033 ac_cv_sizeof_int=0
3034fi
090089c4 3035rm -fr conftest*
b1e77ec1 3036fi
3037
090089c4 3038fi
3039echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3040cat >> confdefs.h <<EOF
3041#define SIZEOF_INT $ac_cv_sizeof_int
3042EOF
3043
3044
3045echo $ac_n "checking size of long""... $ac_c" 1>&6
cd748f27 3046echo "configure:3047: checking size of long" >&5
090089c4 3047if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3048 echo $ac_n "(cached) $ac_c" 1>&6
3049else
3050 if test "$cross_compiling" = yes; then
3051 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3052else
b1e77ec1 3053 cat > conftest.$ac_ext <<EOF
cd748f27 3054#line 3055 "configure"
090089c4 3055#include "confdefs.h"
3056#include <stdio.h>
3057main()
3058{
3059 FILE *f=fopen("conftestval", "w");
3060 if (!f) exit(1);
3061 fprintf(f, "%d\n", sizeof(long));
3062 exit(0);
3063}
3064EOF
cd748f27 3065if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 3066then
090089c4 3067 ac_cv_sizeof_long=`cat conftestval`
3068else
b1e77ec1 3069 echo "configure: failed program was:" >&5
3070 cat conftest.$ac_ext >&5
3071 rm -fr conftest*
090089c4 3072 ac_cv_sizeof_long=0
3073fi
090089c4 3074rm -fr conftest*
b1e77ec1 3075fi
3076
090089c4 3077fi
3078echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3079cat >> confdefs.h <<EOF
3080#define SIZEOF_LONG $ac_cv_sizeof_long
3081EOF
3082
3083
b6a2f15e 3084echo $ac_n "checking size of void *""... $ac_c" 1>&6
cd748f27 3085echo "configure:3086: checking size of void *" >&5
b6a2f15e 3086if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
3087 echo $ac_n "(cached) $ac_c" 1>&6
3088else
3089 if test "$cross_compiling" = yes; then
3090 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3091else
3092 cat > conftest.$ac_ext <<EOF
cd748f27 3093#line 3094 "configure"
b6a2f15e 3094#include "confdefs.h"
3095#include <stdio.h>
3096main()
3097{
3098 FILE *f=fopen("conftestval", "w");
3099 if (!f) exit(1);
3100 fprintf(f, "%d\n", sizeof(void *));
3101 exit(0);
3102}
3103EOF
cd748f27 3104if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
b6a2f15e 3105then
3106 ac_cv_sizeof_void_p=`cat conftestval`
3107else
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
3110 rm -fr conftest*
3111 ac_cv_sizeof_void_p=0
3112fi
3113rm -fr conftest*
3114fi
3115
3116fi
3117echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
3118cat >> confdefs.h <<EOF
3119#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3120EOF
3121
3122
090089c4 3123
256cf05b 3124# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3125# for constant arguments. Useless!
3126echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
cd748f27 3127echo "configure:3128: checking for working alloca.h" >&5
256cf05b 3128if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3129 echo $ac_n "(cached) $ac_c" 1>&6
3130else
3131 cat > conftest.$ac_ext <<EOF
cd748f27 3132#line 3133 "configure"
256cf05b 3133#include "confdefs.h"
3134#include <alloca.h>
b1e77ec1 3135int main() {
256cf05b 3136char *p = alloca(2 * sizeof(int));
3137; return 0; }
3138EOF
cd748f27 3139if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
256cf05b 3140 rm -rf conftest*
3141 ac_cv_header_alloca_h=yes
3142else
b1e77ec1 3143 echo "configure: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
256cf05b 3145 rm -rf conftest*
3146 ac_cv_header_alloca_h=no
3147fi
3148rm -f conftest*
256cf05b 3149fi
3150
3151echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3152if test $ac_cv_header_alloca_h = yes; then
3153 cat >> confdefs.h <<\EOF
3154#define HAVE_ALLOCA_H 1
3155EOF
3156
3157fi
3158
3159echo $ac_n "checking for alloca""... $ac_c" 1>&6
cd748f27 3160echo "configure:3161: checking for alloca" >&5
b1e77ec1 3161if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
256cf05b 3162 echo $ac_n "(cached) $ac_c" 1>&6
3163else
3164 cat > conftest.$ac_ext <<EOF
cd748f27 3165#line 3166 "configure"
256cf05b 3166#include "confdefs.h"
3167
3168#ifdef __GNUC__
3169# define alloca __builtin_alloca
3170#else
b7db09a3 3171# ifdef _MSC_VER
3172# include <malloc.h>
3173# define alloca _alloca
256cf05b 3174# else
b7db09a3 3175# if HAVE_ALLOCA_H
3176# include <alloca.h>
256cf05b 3177# else
b7db09a3 3178# ifdef _AIX
3179 #pragma alloca
3180# else
3181# ifndef alloca /* predefined by HP cc +Olibcalls */
256cf05b 3182char *alloca ();
b7db09a3 3183# endif
256cf05b 3184# endif
3185# endif
3186# endif
3187#endif
3188
b1e77ec1 3189int main() {
256cf05b 3190char *p = (char *) alloca(1);
3191; return 0; }
3192EOF
cd748f27 3193if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
256cf05b 3194 rm -rf conftest*
b1e77ec1 3195 ac_cv_func_alloca_works=yes
256cf05b 3196else
b1e77ec1 3197 echo "configure: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
256cf05b 3199 rm -rf conftest*
b1e77ec1 3200 ac_cv_func_alloca_works=no
256cf05b 3201fi
3202rm -f conftest*
256cf05b 3203fi
3204
b1e77ec1 3205echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3206if test $ac_cv_func_alloca_works = yes; then
256cf05b 3207 cat >> confdefs.h <<\EOF
3208#define HAVE_ALLOCA 1
3209EOF
3210
3211fi
3212
b1e77ec1 3213if test $ac_cv_func_alloca_works = no; then
256cf05b 3214 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3215 # that cause trouble. Some versions do not even contain alloca or
3216 # contain a buggy version. If you still want to use their alloca,
3217 # use ar to extract alloca.o from them instead of compiling alloca.c.
b7db09a3 3218 ALLOCA=alloca.${ac_objext}
256cf05b 3219 cat >> confdefs.h <<\EOF
3220#define C_ALLOCA 1
3221EOF
3222
3223
3224echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
cd748f27 3225echo "configure:3226: checking whether alloca needs Cray hooks" >&5
256cf05b 3226if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3227 echo $ac_n "(cached) $ac_c" 1>&6
3228else
3229 cat > conftest.$ac_ext <<EOF
cd748f27 3230#line 3231 "configure"
256cf05b 3231#include "confdefs.h"
3232#if defined(CRAY) && ! defined(CRAY2)
3233webecray
3234#else
3235wenotbecray
3236#endif
3237
3238EOF
3239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3240 egrep "webecray" >/dev/null 2>&1; then
3241 rm -rf conftest*
3242 ac_cv_os_cray=yes
3243else
3244 rm -rf conftest*
3245 ac_cv_os_cray=no
3246fi
3247rm -f conftest*
3248
3249fi
3250
3251echo "$ac_t""$ac_cv_os_cray" 1>&6
3252if test $ac_cv_os_cray = yes; then
3253for ac_func in _getb67 GETB67 getb67; do
3254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd748f27 3255echo "configure:3256: checking for $ac_func" >&5
256cf05b 3256if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3257 echo $ac_n "(cached) $ac_c" 1>&6
3258else
3259 cat > conftest.$ac_ext <<EOF
cd748f27 3260#line 3261 "configure"
256cf05b 3261#include "confdefs.h"
3262/* System header to define __stub macros and hopefully few prototypes,
3263 which can conflict with char $ac_func(); below. */
3264#include <assert.h>
3265/* Override any gcc2 internal prototype to avoid an error. */
03a0d3b0 3266/* We use char because int might match the return type of a gcc2
3267 builtin and then its argument prototype would still apply. */
256cf05b 3268char $ac_func();
3269
b1e77ec1 3270int main() {
256cf05b 3271
3272/* The GNU C library defines this for functions which it implements
3273 to always fail with ENOSYS. Some functions are actually named
3274 something starting with __ and the normal name is an alias. */
3275#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3276choke me
3277#else
3278$ac_func();
3279#endif
3280
3281; return 0; }
3282EOF
cd748f27 3283if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
256cf05b 3284 rm -rf conftest*
3285 eval "ac_cv_func_$ac_func=yes"
3286else
b1e77ec1 3287 echo "configure: failed program was:" >&5
3288 cat conftest.$ac_ext >&5
256cf05b 3289 rm -rf conftest*
3290 eval "ac_cv_func_$ac_func=no"
3291fi
3292rm -f conftest*
256cf05b 3293fi
133b6d90 3294
256cf05b 3295if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3296 echo "$ac_t""yes" 1>&6
3297 cat >> confdefs.h <<EOF
3298#define CRAY_STACKSEG_END $ac_func
3299EOF
3300
3301 break
3302else
3303 echo "$ac_t""no" 1>&6
3304fi
3305
3306done
3307fi
3308
3309echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
cd748f27 3310echo "configure:3311: checking stack direction for C alloca" >&5
256cf05b 3311if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3312 echo $ac_n "(cached) $ac_c" 1>&6
3313else
3314 if test "$cross_compiling" = yes; then
3315 ac_cv_c_stack_direction=0
3316else
b1e77ec1 3317 cat > conftest.$ac_ext <<EOF
cd748f27 3318#line 3319 "configure"
256cf05b 3319#include "confdefs.h"
3320find_stack_direction ()
3321{
3322 static char *addr = 0;
3323 auto char dummy;
3324 if (addr == 0)
3325 {
3326 addr = &dummy;
3327 return find_stack_direction ();
3328 }
3329 else
3330 return (&dummy > addr) ? 1 : -1;
3331}
3332main ()
3333{
3334 exit (find_stack_direction() < 0);
3335}
3336EOF
cd748f27 3337if { (eval echo configure:3338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 3338then
256cf05b 3339 ac_cv_c_stack_direction=1
3340else
b1e77ec1 3341 echo "configure: failed program was:" >&5
3342 cat conftest.$ac_ext >&5
3343 rm -fr conftest*
256cf05b 3344 ac_cv_c_stack_direction=-1
3345fi
256cf05b 3346rm -fr conftest*
3347fi
3348
b1e77ec1 3349fi
3350
256cf05b 3351echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3352cat >> confdefs.h <<EOF
3353#define STACK_DIRECTION $ac_cv_c_stack_direction
3354EOF
3355
3356fi
3357
3358
3f6fcd8a 3359echo $ac_n "checking for pid_t""... $ac_c" 1>&6
cd748f27 3360echo "configure:3361: checking for pid_t" >&5
3f6fcd8a 3361if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3362 echo $ac_n "(cached) $ac_c" 1>&6
3363else
3364 cat > conftest.$ac_ext <<EOF
cd748f27 3365#line 3366 "configure"
3f6fcd8a 3366#include "confdefs.h"
3367#include <sys/types.h>
3368#if STDC_HEADERS
3369#include <stdlib.h>
b1e77ec1 3370#include <stddef.h>
3f6fcd8a 3371#endif
3372EOF
3373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3374 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3f6fcd8a 3375 rm -rf conftest*
3376 ac_cv_type_pid_t=yes
3377else
3378 rm -rf conftest*
3379 ac_cv_type_pid_t=no
3380fi
3381rm -f conftest*
3382
3383fi
3384echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3385if test $ac_cv_type_pid_t = no; then
3386 cat >> confdefs.h <<\EOF
3387#define pid_t int
3388EOF
3389
3390fi
3391
3392echo $ac_n "checking for size_t""... $ac_c" 1>&6
cd748f27 3393echo "configure:3394: checking for size_t" >&5
3f6fcd8a 3394if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3395 echo $ac_n "(cached) $ac_c" 1>&6
3396else
3397 cat > conftest.$ac_ext <<EOF
cd748f27 3398#line 3399 "configure"
3f6fcd8a 3399#include "confdefs.h"
3400#include <sys/types.h>
3401#if STDC_HEADERS
3402#include <stdlib.h>
b1e77ec1 3403#include <stddef.h>
3f6fcd8a 3404#endif
3405EOF
3406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3407 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3f6fcd8a 3408 rm -rf conftest*
3409 ac_cv_type_size_t=yes
3410else
3411 rm -rf conftest*
3412 ac_cv_type_size_t=no
3413fi
3414rm -f conftest*
3415
3416fi
3417echo "$ac_t""$ac_cv_type_size_t" 1>&6
3418if test $ac_cv_type_size_t = no; then
3419 cat >> confdefs.h <<\EOF
0897af2d 3420#define size_t unsigned int
3421EOF
3422
3423fi
3424
3425echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
cd748f27 3426echo "configure:3427: checking for ssize_t" >&5
0897af2d 3427if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3428 echo $ac_n "(cached) $ac_c" 1>&6
3429else
3430 cat > conftest.$ac_ext <<EOF
cd748f27 3431#line 3432 "configure"
0897af2d 3432#include "confdefs.h"
3433#include <sys/types.h>
3434#if STDC_HEADERS
3435#include <stdlib.h>
3436#include <stddef.h>
3437#endif
3438EOF
3439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3440 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
0897af2d 3441 rm -rf conftest*
3442 ac_cv_type_ssize_t=yes
3443else
3444 rm -rf conftest*
3445 ac_cv_type_ssize_t=no
3446fi
3447rm -f conftest*
3448
3449fi
3450echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3451if test $ac_cv_type_ssize_t = no; then
3452 cat >> confdefs.h <<\EOF
3453#define ssize_t int
3f6fcd8a 3454EOF
3455
3456fi
3457
3458echo $ac_n "checking for off_t""... $ac_c" 1>&6
cd748f27 3459echo "configure:3460: checking for off_t" >&5
3f6fcd8a 3460if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3461 echo $ac_n "(cached) $ac_c" 1>&6
3462else
3463 cat > conftest.$ac_ext <<EOF
cd748f27 3464#line 3465 "configure"
3f6fcd8a 3465#include "confdefs.h"
3466#include <sys/types.h>
3467#if STDC_HEADERS
3468#include <stdlib.h>
b1e77ec1 3469#include <stddef.h>
3f6fcd8a 3470#endif
3471EOF
3472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3473 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3f6fcd8a 3474 rm -rf conftest*
3475 ac_cv_type_off_t=yes
3476else
3477 rm -rf conftest*
3478 ac_cv_type_off_t=no
3479fi
3480rm -f conftest*
3481
3482fi
3483echo "$ac_t""$ac_cv_type_off_t" 1>&6
3484if test $ac_cv_type_off_t = no; then
3485 cat >> confdefs.h <<\EOF
3486#define off_t int
3487EOF
3488
3489fi
3490
95cf2361 3491echo $ac_n "checking for mode_t""... $ac_c" 1>&6
cd748f27 3492echo "configure:3493: checking for mode_t" >&5
95cf2361 3493if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3494 echo $ac_n "(cached) $ac_c" 1>&6
3495else
3496 cat > conftest.$ac_ext <<EOF
cd748f27 3497#line 3498 "configure"
95cf2361 3498#include "confdefs.h"
3499#include <sys/types.h>
3500#if STDC_HEADERS
3501#include <stdlib.h>
b1e77ec1 3502#include <stddef.h>
95cf2361 3503#endif
3504EOF
3505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3506 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
95cf2361 3507 rm -rf conftest*
3508 ac_cv_type_mode_t=yes
3509else
3510 rm -rf conftest*
3511 ac_cv_type_mode_t=no
3512fi
3513rm -f conftest*
3514
3515fi
3516echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3517if test $ac_cv_type_mode_t = no; then
3518 cat >> confdefs.h <<\EOF
3519#define mode_t u_short
3520EOF
3521
3522fi
3523
c716a1dd 3524echo $ac_n "checking for fd_mask""... $ac_c" 1>&6
cd748f27 3525echo "configure:3526: checking for fd_mask" >&5
c716a1dd 3526if eval "test \"`echo '$''{'ac_cv_type_fd_mask'+set}'`\" = set"; then
3527 echo $ac_n "(cached) $ac_c" 1>&6
3528else
3529 cat > conftest.$ac_ext <<EOF
cd748f27 3530#line 3531 "configure"
c716a1dd 3531#include "confdefs.h"
3532#include <sys/types.h>
3533#if STDC_HEADERS
3534#include <stdlib.h>
3535#include <stddef.h>
3536#endif
3537EOF
3538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3539 egrep "(^|[^a-zA-Z_0-9])fd_mask[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c716a1dd 3540 rm -rf conftest*
3541 ac_cv_type_fd_mask=yes
3542else
3543 rm -rf conftest*
3544 ac_cv_type_fd_mask=no
3545fi
3546rm -f conftest*
3547
3548fi
3549echo "$ac_t""$ac_cv_type_fd_mask" 1>&6
3550if test $ac_cv_type_fd_mask = no; then
3551 cat >> confdefs.h <<\EOF
3552#define fd_mask int
3553EOF
3554
3555fi
3556
d63ed275 3557echo $ac_n "checking for mtyp_t""... $ac_c" 1>&6
cd748f27 3558echo "configure:3559: checking for mtyp_t" >&5
d63ed275 3559if eval "test \"`echo '$''{'ac_cv_type_mtyp_t'+set}'`\" = set"; then
3560 echo $ac_n "(cached) $ac_c" 1>&6
3561else
3562 cat > conftest.$ac_ext <<EOF
cd748f27 3563#line 3564 "configure"
d63ed275 3564#include "confdefs.h"
3565#include <sys/types.h>
3566#if STDC_HEADERS
3567#include <stdlib.h>
3568#include <stddef.h>
3569#endif
3570EOF
3571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b7db09a3 3572 egrep "(^|[^a-zA-Z_0-9])mtyp_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
d63ed275 3573 rm -rf conftest*
3574 ac_cv_type_mtyp_t=yes
3575else
3576 rm -rf conftest*
3577 ac_cv_type_mtyp_t=no
3578fi
3579rm -f conftest*
3580
3581fi
3582echo "$ac_t""$ac_cv_type_mtyp_t" 1>&6
3583if test $ac_cv_type_mtyp_t = no; then
3584 cat >> confdefs.h <<\EOF
3585#define mtyp_t long
3586EOF
3587
3588fi
3589
3f6fcd8a 3590
6637e3a5 3591echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
cd748f27 3592echo "configure:3593: checking for socklen_t" >&5
6637e3a5 3593if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
3594 echo $ac_n "(cached) $ac_c" 1>&6
3595else
3596
3597 cat > conftest.$ac_ext <<EOF
cd748f27 3598#line 3599 "configure"
6637e3a5 3599#include "confdefs.h"
3600#include <sys/types.h>
3601#include <sys/socket.h>
3602#if STDC_HEADERS
3603#include <stdlib.h>
3604#include <stddef.h>
3605#endif
3606EOF
3607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3608 egrep "socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3609 rm -rf conftest*
3610 ac_cv_type_socklen_t=yes
3611else
3612 rm -rf conftest*
3613 ac_cv_type_socklen_t=no
3614fi
3615rm -f conftest*
3616
3617
3618fi
3619
3620echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
3621if test $ac_cv_type_socklen_t = no; then
3622 cat >> confdefs.h <<\EOF
3623#define socklen_t int
3624EOF
3625
3626fi
3627
b1e77ec1 3628echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
cd748f27 3629echo "configure:3630: checking for main in -lnsl" >&5
b1e77ec1 3630ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
090089c4 3631if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3632 echo $ac_n "(cached) $ac_c" 1>&6
3633else
3634 ac_save_LIBS="$LIBS"
30a4f2a8 3635LIBS="-lnsl $LIBS"
090089c4 3636cat > conftest.$ac_ext <<EOF
cd748f27 3637#line 3638 "configure"
090089c4 3638#include "confdefs.h"
3639
b1e77ec1 3640int main() {
090089c4 3641main()
3642; return 0; }
3643EOF
cd748f27 3644if { (eval echo configure:3645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 3645 rm -rf conftest*
3646 eval "ac_cv_lib_$ac_lib_var=yes"
3647else
b1e77ec1 3648 echo "configure: failed program was:" >&5
3649 cat conftest.$ac_ext >&5
090089c4 3650 rm -rf conftest*
3651 eval "ac_cv_lib_$ac_lib_var=no"
3652fi
3653rm -f conftest*
3654LIBS="$ac_save_LIBS"
3655
3656fi
3657if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3658 echo "$ac_t""yes" 1>&6
b1e77ec1 3659 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3660 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6716b242 3661 cat >> confdefs.h <<EOF
3662#define $ac_tr_lib 1
3663EOF
3664
30a4f2a8 3665 LIBS="-lnsl $LIBS"
6716b242 3666
090089c4 3667else
3668 echo "$ac_t""no" 1>&6
3669fi
3670
b1e77ec1 3671echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
cd748f27 3672echo "configure:3673: checking for main in -lsocket" >&5
b1e77ec1 3673ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
090089c4 3674if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3675 echo $ac_n "(cached) $ac_c" 1>&6
3676else
3677 ac_save_LIBS="$LIBS"
30a4f2a8 3678LIBS="-lsocket $LIBS"
090089c4 3679cat > conftest.$ac_ext <<EOF
cd748f27 3680#line 3681 "configure"
090089c4 3681#include "confdefs.h"
3682
b1e77ec1 3683int main() {
090089c4 3684main()
3685; return 0; }
3686EOF
cd748f27 3687if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 3688 rm -rf conftest*
3689 eval "ac_cv_lib_$ac_lib_var=yes"
3690else
b1e77ec1 3691 echo "configure: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
090089c4 3693 rm -rf conftest*
3694 eval "ac_cv_lib_$ac_lib_var=no"
3695fi
3696rm -f conftest*
3697LIBS="$ac_save_LIBS"
3698
3699fi
3700if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3701 echo "$ac_t""yes" 1>&6
b1e77ec1 3702 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3703 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
30a4f2a8 3704 cat >> confdefs.h <<EOF
3705#define $ac_tr_lib 1
3706EOF
3707
3708 LIBS="-lsocket $LIBS"
3709
090089c4 3710else
3711 echo "$ac_t""no" 1>&6
3712fi
3713
94d48591 3714
3715if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then
3716 echo "skipping libmalloc check (--enable-dlmalloc specified)"
3717else
3718 echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6
cd748f27 3719echo "configure:3720: checking for main in -lgnumalloc" >&5
b1e77ec1 3720ac_lib_var=`echo gnumalloc'_'main | sed 'y%./+-%__p_%'`
090089c4 3721if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3722 echo $ac_n "(cached) $ac_c" 1>&6
3723else
3724 ac_save_LIBS="$LIBS"
8a15e65e 3725LIBS="-lgnumalloc $LIBS"
090089c4 3726cat > conftest.$ac_ext <<EOF
cd748f27 3727#line 3728 "configure"
090089c4 3728#include "confdefs.h"
3729
b1e77ec1 3730int main() {
090089c4 3731main()
3732; return 0; }
3733EOF
cd748f27 3734if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 3735 rm -rf conftest*
3736 eval "ac_cv_lib_$ac_lib_var=yes"
3737else
b1e77ec1 3738 echo "configure: failed program was:" >&5
3739 cat conftest.$ac_ext >&5
090089c4 3740 rm -rf conftest*
3741 eval "ac_cv_lib_$ac_lib_var=no"
3742fi
3743rm -f conftest*
3744LIBS="$ac_save_LIBS"
3745
3746fi
3747if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3748 echo "$ac_t""yes" 1>&6
b1e77ec1 3749 ac_tr_lib=HAVE_LIB`echo gnumalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3750 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8a15e65e 3751 cat >> confdefs.h <<EOF
3752#define $ac_tr_lib 1
3753EOF
3754
3755 LIBS="-lgnumalloc $LIBS"
3756
090089c4 3757else
3758 echo "$ac_t""no" 1>&6
3759fi
3760
94d48591 3761 if test "$ac_cv_lib_gnumalloc_main" = "yes"; then
3762 echo "Disabling extended malloc functions when using gnumalloc"
3763 ac_cv_func_mallinfo=no
3764 ac_cv_func_mallocblksize=no
3765 ac_cv_func_mallopt=no
3766 else
3767 case "$host" in
3768 *-sun-solaris*)
3769 echo "skipping libmalloc check for $host"
3770 ;;
3771 i386-*-freebsd*)
3772 echo "skipping libmalloc check for $host"
3773 ;;
3774 *)
3775
3776 echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6
cd748f27 3777echo "configure:3778: checking for main in -lmalloc" >&5
b1e77ec1 3778ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'`
8a15e65e 3779if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3780 echo $ac_n "(cached) $ac_c" 1>&6
3781else
3782 ac_save_LIBS="$LIBS"
3783LIBS="-lmalloc $LIBS"
3784cat > conftest.$ac_ext <<EOF
cd748f27 3785#line 3786 "configure"
8a15e65e 3786#include "confdefs.h"
3787
b1e77ec1 3788int main() {
8a15e65e 3789main()
3790; return 0; }
3791EOF
cd748f27 3792if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8a15e65e 3793 rm -rf conftest*
3794 eval "ac_cv_lib_$ac_lib_var=yes"
3795else
b1e77ec1 3796 echo "configure: failed program was:" >&5
3797 cat conftest.$ac_ext >&5
8a15e65e 3798 rm -rf conftest*
3799 eval "ac_cv_lib_$ac_lib_var=no"
3800fi
3801rm -f conftest*
3802LIBS="$ac_save_LIBS"
3803
3804fi
3805if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3806 echo "$ac_t""yes" 1>&6
b1e77ec1 3807 ac_tr_lib=HAVE_LIB`echo malloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3808 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8a15e65e 3809 cat >> confdefs.h <<EOF
3810#define $ac_tr_lib 1
3811EOF
3812
3813 LIBS="-lmalloc $LIBS"
3814
3815else
3816 echo "$ac_t""no" 1>&6
3817fi
3818
94d48591 3819 ;;
3820 esac
3821 fi
8a15e65e 3822fi
94d48591 3823
b1e77ec1 3824echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
cd748f27 3825echo "configure:3826: checking for main in -lbsd" >&5
b1e77ec1 3826ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
090089c4 3827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3828 echo $ac_n "(cached) $ac_c" 1>&6
3829else
3830 ac_save_LIBS="$LIBS"
6509a1a0 3831LIBS="-lbsd $LIBS"
090089c4 3832cat > conftest.$ac_ext <<EOF
cd748f27 3833#line 3834 "configure"
090089c4 3834#include "confdefs.h"
3835
b1e77ec1 3836int main() {
090089c4 3837main()
3838; return 0; }
3839EOF
cd748f27 3840if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 3841 rm -rf conftest*
3842 eval "ac_cv_lib_$ac_lib_var=yes"
3843else
b1e77ec1 3844 echo "configure: failed program was:" >&5
3845 cat conftest.$ac_ext >&5
090089c4 3846 rm -rf conftest*
3847 eval "ac_cv_lib_$ac_lib_var=no"
3848fi
3849rm -f conftest*
3850LIBS="$ac_save_LIBS"
3851
3852fi
3853if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3854 echo "$ac_t""yes" 1>&6
b1e77ec1 3855 ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3856 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6716b242 3857 cat >> confdefs.h <<EOF
3858#define $ac_tr_lib 1
3859EOF
3860
6509a1a0 3861 LIBS="-lbsd $LIBS"
6716b242 3862
090089c4 3863else
3864 echo "$ac_t""no" 1>&6
3865fi
3866
b1e77ec1 3867echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6
cd748f27 3868echo "configure:3869: checking for main in -lregex" >&5
b1e77ec1 3869ac_lib_var=`echo regex'_'main | sed 'y%./+-%__p_%'`
090089c4 3870if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3872else
3873 ac_save_LIBS="$LIBS"
6509a1a0 3874LIBS="-lregex $LIBS"
090089c4 3875cat > conftest.$ac_ext <<EOF
cd748f27 3876#line 3877 "configure"
090089c4 3877#include "confdefs.h"
3878
b1e77ec1 3879int main() {
090089c4 3880main()
3881; return 0; }
3882EOF
cd748f27 3883if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 3884 rm -rf conftest*
3885 eval "ac_cv_lib_$ac_lib_var=yes"
3886else
b1e77ec1 3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
090089c4 3889 rm -rf conftest*
3890 eval "ac_cv_lib_$ac_lib_var=no"
3891fi
3892rm -f conftest*
3893LIBS="$ac_save_LIBS"
3894
3895fi
3896if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3897 echo "$ac_t""yes" 1>&6
6509a1a0 3898 REGEXLIB="-lregex"
090089c4 3899else
3900 echo "$ac_t""no" 1>&6
3901fi
3902
04a56fa3 3903echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
cd748f27 3904echo "configure:3905: checking for gethostbyname in -lbind" >&5
04a56fa3 3905ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
3906if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3907 echo $ac_n "(cached) $ac_c" 1>&6
3908else
3909 ac_save_LIBS="$LIBS"
3910LIBS="-lbind $LIBS"
3911cat > conftest.$ac_ext <<EOF
cd748f27 3912#line 3913 "configure"
04a56fa3 3913#include "confdefs.h"
3914/* Override any gcc2 internal prototype to avoid an error. */
3915/* We use char because int might match the return type of a gcc2
3916 builtin and then its argument prototype would still apply. */
3917char gethostbyname();
3918
3919int main() {
3920gethostbyname()
3921; return 0; }
3922EOF
cd748f27 3923if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
04a56fa3 3924 rm -rf conftest*
3925 eval "ac_cv_lib_$ac_lib_var=yes"
3926else
3927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 rm -rf conftest*
3930 eval "ac_cv_lib_$ac_lib_var=no"
3931fi
3932rm -f conftest*
3933LIBS="$ac_save_LIBS"
3934
3935fi
3936if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3937 echo "$ac_t""yes" 1>&6
3938 ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3939 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3940 cat >> confdefs.h <<EOF
3941#define $ac_tr_lib 1
3942EOF
3943
3944 LIBS="-lbind $LIBS"
3945
3946else
3947 echo "$ac_t""no" 1>&6
3948fi
3949
3950if test $ac_cv_lib_bind_gethostbyname = "no" ; then
3951 case "$host" in
78743365 3952 i386-*-freebsd*)
3953 echo "skipping libresolv checks for $host"
3954 ;;
3955 *)
3956 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
cd748f27 3957echo "configure:3958: checking for inet_aton in -lresolv" >&5
b1e77ec1 3958ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
ac4437b7 3959if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3960 echo $ac_n "(cached) $ac_c" 1>&6
3961else
3962 ac_save_LIBS="$LIBS"
6509a1a0 3963LIBS="-lresolv $LIBS"
ac4437b7 3964cat > conftest.$ac_ext <<EOF
cd748f27 3965#line 3966 "configure"
ac4437b7 3966#include "confdefs.h"
6509a1a0 3967/* Override any gcc2 internal prototype to avoid an error. */
3968/* We use char because int might match the return type of a gcc2
3969 builtin and then its argument prototype would still apply. */
3970char inet_aton();
ac4437b7 3971
b1e77ec1 3972int main() {
6509a1a0 3973inet_aton()
ac4437b7 3974; return 0; }
3975EOF
cd748f27 3976if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac4437b7 3977 rm -rf conftest*
3978 eval "ac_cv_lib_$ac_lib_var=yes"
3979else
b1e77ec1 3980 echo "configure: failed program was:" >&5
3981 cat conftest.$ac_ext >&5
ac4437b7 3982 rm -rf conftest*
3983 eval "ac_cv_lib_$ac_lib_var=no"
3984fi
3985rm -f conftest*
3986LIBS="$ac_save_LIBS"
3987
3988fi
3989if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3990 echo "$ac_t""yes" 1>&6
b1e77ec1 3991 echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6
cd748f27 3992echo "configure:3993: checking for inet_aton in -l44bsd" >&5
b1e77ec1 3993ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'`
090089c4 3994if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3995 echo $ac_n "(cached) $ac_c" 1>&6
3996else
3997 ac_save_LIBS="$LIBS"
3998LIBS="-l44bsd $LIBS"
3999cat > conftest.$ac_ext <<EOF
cd748f27 4000#line 4001 "configure"
090089c4 4001#include "confdefs.h"
03a0d3b0 4002/* Override any gcc2 internal prototype to avoid an error. */
4003/* We use char because int might match the return type of a gcc2
4004 builtin and then its argument prototype would still apply. */
4005char inet_aton();
090089c4 4006
b1e77ec1 4007int main() {
090089c4 4008inet_aton()
4009; return 0; }
4010EOF
cd748f27 4011if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 4012 rm -rf conftest*
4013 eval "ac_cv_lib_$ac_lib_var=yes"
4014else
b1e77ec1 4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
090089c4 4017 rm -rf conftest*
4018 eval "ac_cv_lib_$ac_lib_var=no"
4019fi
4020rm -f conftest*
4021LIBS="$ac_save_LIBS"
4022
4023fi
4024if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4025 echo "$ac_t""yes" 1>&6
b1e77ec1 4026 ac_tr_lib=HAVE_LIB`echo 44bsd | sed -e 's/^a-zA-Z0-9_/_/g' \
4027 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8a15e65e 4028 cat >> confdefs.h <<EOF
4029#define $ac_tr_lib 1
4030EOF
4031
4032 LIBS="-l44bsd $LIBS"
4033
090089c4 4034else
4035 echo "$ac_t""no" 1>&6
4036fi
4037
8a15e65e 4038else
6509a1a0 4039 echo "$ac_t""no" 1>&6
8a15e65e 4040fi
8a15e65e 4041
78743365 4042 echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
cd748f27 4043echo "configure:4044: checking for main in -lresolv" >&5
b1e77ec1 4044ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
8a15e65e 4045if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4046 echo $ac_n "(cached) $ac_c" 1>&6
4047else
4048 ac_save_LIBS="$LIBS"
6509a1a0 4049LIBS="-lresolv $LIBS"
8a15e65e 4050cat > conftest.$ac_ext <<EOF
cd748f27 4051#line 4052 "configure"
090089c4 4052#include "confdefs.h"
4053
b1e77ec1 4054int main() {
6509a1a0 4055main()
090089c4 4056; return 0; }
4057EOF
cd748f27 4058if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 4059 rm -rf conftest*
4060 eval "ac_cv_lib_$ac_lib_var=yes"
4061else
b1e77ec1 4062 echo "configure: failed program was:" >&5
4063 cat conftest.$ac_ext >&5
090089c4 4064 rm -rf conftest*
4065 eval "ac_cv_lib_$ac_lib_var=no"
4066fi
4067rm -f conftest*
4068LIBS="$ac_save_LIBS"
4069
4070fi
4071if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4072 echo "$ac_t""yes" 1>&6
b1e77ec1 4073 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4074 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8a15e65e 4075 cat >> confdefs.h <<EOF
4076#define $ac_tr_lib 1
4077EOF
4078
6509a1a0 4079 LIBS="-lresolv $LIBS"
8a15e65e 4080
090089c4 4081else
4082 echo "$ac_t""no" 1>&6
4083fi
4084
78743365 4085 ;;
04a56fa3 4086 esac
4087fi
b1e77ec1 4088echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
cd748f27 4089echo "configure:4090: checking for main in -lm" >&5
b1e77ec1 4090ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
e0bddc45 4091if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4092 echo $ac_n "(cached) $ac_c" 1>&6
4093else
4094 ac_save_LIBS="$LIBS"
4095LIBS="-lm $LIBS"
4096cat > conftest.$ac_ext <<EOF
cd748f27 4097#line 4098 "configure"
e0bddc45 4098#include "confdefs.h"
4099
b1e77ec1 4100int main() {
e0bddc45 4101main()
4102; return 0; }
4103EOF
cd748f27 4104if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
e0bddc45 4105 rm -rf conftest*
4106 eval "ac_cv_lib_$ac_lib_var=yes"
4107else
b1e77ec1 4108 echo "configure: failed program was:" >&5
4109 cat conftest.$ac_ext >&5
e0bddc45 4110 rm -rf conftest*
4111 eval "ac_cv_lib_$ac_lib_var=no"
4112fi
4113rm -f conftest*
4114LIBS="$ac_save_LIBS"
4115
4116fi
4117if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4118 echo "$ac_t""yes" 1>&6
b1e77ec1 4119 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4120 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
e0bddc45 4121 cat >> confdefs.h <<EOF
4122#define $ac_tr_lib 1
4123EOF
4124
4125 LIBS="-lm $LIBS"
4126
4127else
4128 echo "$ac_t""no" 1>&6
4129fi
4130
090089c4 4131
b1e77ec1 4132echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
cd748f27 4133echo "configure:4134: checking for crypt in -lcrypt" >&5
b1e77ec1 4134ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
090089c4 4135if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4136 echo $ac_n "(cached) $ac_c" 1>&6
4137else
4138 ac_save_LIBS="$LIBS"
4139LIBS="-lcrypt $LIBS"
4140cat > conftest.$ac_ext <<EOF
cd748f27 4141#line 4142 "configure"
090089c4 4142#include "confdefs.h"
03a0d3b0 4143/* Override any gcc2 internal prototype to avoid an error. */
4144/* We use char because int might match the return type of a gcc2
4145 builtin and then its argument prototype would still apply. */
4146char crypt();
090089c4 4147
b1e77ec1 4148int main() {
090089c4 4149crypt()
4150; return 0; }
4151EOF
cd748f27 4152if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
090089c4 4153 rm -rf conftest*
4154 eval "ac_cv_lib_$ac_lib_var=yes"
4155else
b1e77ec1 4156 echo "configure: failed program was:" >&5
4157 cat conftest.$ac_ext >&5
090089c4 4158 rm -rf conftest*
4159 eval "ac_cv_lib_$ac_lib_var=no"
4160fi
4161rm -f conftest*
4162LIBS="$ac_save_LIBS"
4163
4164fi
4165if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4166 echo "$ac_t""yes" 1>&6
0f5a16f8 4167 ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4168 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4169 cat >> confdefs.h <<EOF
4170#define $ac_tr_lib 1
4171EOF
4172
4173 LIBS="-lcrypt $LIBS"
4174
090089c4 4175else
4176 echo "$ac_t""no" 1>&6
4177fi
4178
0f5a16f8 4179if test $ac_cv_lib_crypt_crypt = "yes"; then
4180 CRYPTLIB="-lcrypt"
4181fi
090089c4 4182
77f675ad 4183
47619a23 4184echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
cd748f27 4185echo "configure:4186: checking for main in -lpthread" >&5
47619a23 4186ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
4187if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4188 echo $ac_n "(cached) $ac_c" 1>&6
4189else
4190 ac_save_LIBS="$LIBS"
4191LIBS="-lpthread $LIBS"
4192cat > conftest.$ac_ext <<EOF
cd748f27 4193#line 4194 "configure"
47619a23 4194#include "confdefs.h"
4195
4196int main() {
4197main()
4198; return 0; }
4199EOF
cd748f27 4200if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
47619a23 4201 rm -rf conftest*
4202 eval "ac_cv_lib_$ac_lib_var=yes"
4203else
4204 echo "configure: failed program was:" >&5
4205 cat conftest.$ac_ext >&5
4206 rm -rf conftest*
4207 eval "ac_cv_lib_$ac_lib_var=no"
4208fi
4209rm -f conftest*
4210LIBS="$ac_save_LIBS"
4211
4212fi
4213if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4214 echo "$ac_t""yes" 1>&6
0f5a16f8 4215 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4216 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4217 cat >> confdefs.h <<EOF
4218#define $ac_tr_lib 1
4219EOF
4220
4221 LIBS="-lpthread $LIBS"
4222
47619a23 4223else
4224 echo "$ac_t""no" 1>&6
4225fi
4226
0f5a16f8 4227if test $ac_cv_lib_pthread_main = "yes"; then
4228 PTHREADLIB="-lpthread"
4229fi
47619a23 4230
4231
86ec11aa 4232case "$host" in
4233 *-pc-sco3.2*)
4234 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
cd748f27 4235echo "configure:4236: checking for strftime in -lintl" >&5
86ec11aa 4236ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
4237if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4238 echo $ac_n "(cached) $ac_c" 1>&6
4239else
4240 ac_save_LIBS="$LIBS"
4241LIBS="-lintl $LIBS"
4242cat > conftest.$ac_ext <<EOF
cd748f27 4243#line 4244 "configure"
86ec11aa 4244#include "confdefs.h"
4245/* Override any gcc2 internal prototype to avoid an error. */
4246/* We use char because int might match the return type of a gcc2
4247 builtin and then its argument prototype would still apply. */
4248char strftime();
4249
4250int main() {
4251strftime()
4252; return 0; }
4253EOF
cd748f27 4254if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86ec11aa 4255 rm -rf conftest*
4256 eval "ac_cv_lib_$ac_lib_var=yes"
4257else
4258 echo "configure: failed program was:" >&5
4259 cat conftest.$ac_ext >&5
4260 rm -rf conftest*
4261 eval "ac_cv_lib_$ac_lib_var=no"
4262fi
4263rm -f conftest*
4264LIBS="$ac_save_LIBS"
4265
4266fi
4267if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4268 echo "$ac_t""yes" 1>&6
4269 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4270 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4271 cat >> confdefs.h <<EOF
4272#define $ac_tr_lib 1
4273EOF
4274
4275 LIBS="-lintl $LIBS"
4276
4277else
4278 echo "$ac_t""no" 1>&6
4279fi
4280
4281 ;;
4282esac
4283
77f675ad 4284case "$host" in
88738790 4285 i386-*-solaris2.*)
58f24c1d 4286 if test "$GCC" = "yes"; then
4287 echo "Removing -O for gcc on $host"
80e92d6d 4288 CFLAGS="`echo $CFLAGS | sed -e 's/-O[0-9]*//'`"
58f24c1d 4289 fi
4290 ;;
77f675ad 4291 *-sgi-irix*)
4292 echo "Removing -lsocket for IRIX..."
6716b242 4293 LIBS=`echo $LIBS | sed -e s/-lsocket//`
77f675ad 4294 echo "Removing -lnsl for IRIX..."
6716b242 4295 LIBS=`echo $LIBS | sed -e s/-lnsl//`
c415c128 4296 ac_cv_lib_nsl_main=no
b44c0fb4 4297 echo "Removing -lbsd for IRIX..."
4298 LIBS=`echo $LIBS | sed -e s/-lbsd//`
77f675ad 4299 ;;
4ba0bd0e 4300 *-ibm-aix*)
4301 echo "Removing -lbsd for AIX..."
4302 LIBS=`echo $LIBS | sed -e s/-lbsd//`
c68e9c6b 4303 echo "disabling snprintf/vsnprintf for $host"
4304 ac_cv_func_snprintf=no
4305 ac_cv_func_vsnprintf=no
4ba0bd0e 4306 ;;
30a4f2a8 4307 *m88k*)
4308 CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_"
58f24c1d 4309 cat >> confdefs.h <<\EOF
4310#define GETTIMEOFDAY_NO_TZP 1
4311EOF
4312
30a4f2a8 4313 ;;
580ce039 4314 *-*-solaris2.[0-4])
58f24c1d 4315 cat >> confdefs.h <<\EOF
4316#define GETTIMEOFDAY_NO_TZP 1
8a7f0105 4317EOF
4318
4319 ;;
711fa75e 4320 *-sony-newsos[56]*)
8a7f0105 4321 cat >> confdefs.h <<\EOF
4322#define GETTIMEOFDAY_NO_TZP 1
58f24c1d 4323EOF
30a4f2a8 4324
58f24c1d 4325 ;;
77f675ad 4326esac
4327
176d10ee 4328# Recommended by Balint Nagy Endre <bne@CareNet.hu>
4329case "$host" in
4330 *-univel-sysv4.2MP)
4331 if test `uname -v` = "2.03"; then
4332 echo "disabling mallinfo for $host"
4333 ac_cv_func_mallinfo=no
4334 fi
4335 ;;
4336esac
4337
84cecfd2 4338# Disable poll() on certain platforms. Override by setting ac_cv_func_poll
4339# when running configure.
4340if test -z "$ac_cv_func_poll"; then
4341 case "$host" in
4342 alpha-dec-osf3.*)
4343 # John Kay (jkay@nlanr.net) 19970818
4344 echo "disabling poll for $host..."
4345 ac_cv_func_poll='no'
4346 ;;
4347 *-hp-hpux*.*)
4348 # Duane Wessels
4349 echo "disabling poll for $host..."
4350 ac_cv_func_poll='no'
4351 ;;
4352 *-linux-*)
9bb83c8b 4353 # Henrik Nordstrom (hno@hem.passagen.se) 19980817
4354 # poll is problematic on Linux. We disable it
4355 # by default until Linux gets it right.
b6a2f15e 4356 rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'`
4357 if test $rev -lt 002002; then
4358 echo "disabling poll for $host < 2.2..."
4359 ac_cv_func_poll='no'
4360 fi
84cecfd2 4361 ;;
c68e9c6b 4362 powerpc-ibm-aix4.1.*)
4363 # Mike Laster (mlaster@metavillage.com) 19981021
4364 echo "disabling poll for $host..."
4365 ac_cv_func_poll='no'
4366 ;;
86ec11aa 4367 *-pc-sco3.2*)
4368 # Robert Side <rside@aiinc.bc.ca>
4369 # Mon, 18 Jan 1999 17:48:00 GMT
4370 echo "disabling poll for $host..."
4371 ac_cv_func_poll='no'
4372 ;;
84cecfd2 4373 esac
4374fi
176d10ee 4375
6716b242 4376for ac_func in \
30a4f2a8 4377 bcopy \
df087e68 4378 crypt \
4ac29a5b 4379 fchmod \
6716b242 4380 getdtablesize \
8505e57b 4381 getpagesize \
30a4f2a8 4382 getrusage \
9c1d8929 4383 getspnam \
30a4f2a8 4384 lrand48 \
6716b242 4385 mallinfo \
0f5efab0 4386 mallocblksize \
6716b242 4387 mallopt \
2ae6b9b0 4388 memcpy \
30a4f2a8 4389 memmove \
dac27377 4390 memset \
1812b6c7 4391 mktime \
88738790 4392 mstats \
84cecfd2 4393 poll \
cd748f27 4394 pthread_attr_setscope \
4395 pthread_setschedparam \
4396 pthread_attr_setschedparam \
c68e9c6b 4397 putenv \
b1e77ec1 4398 random \
6716b242 4399 regcomp \
4400 regexec \
4401 regfree \
30a4f2a8 4402 res_init \
3f628dde 4403 rint \
234967c9 4404 seteuid \
c415c128 4405 setgroups \
30a4f2a8 4406 setpgrp \
6716b242 4407 setrlimit \
b6a2f15e 4408 getrlimit \
30a4f2a8 4409 setsid \
4410 sigaction \
11430c03 4411 snprintf \
30a4f2a8 4412 srand48 \
b1e77ec1 4413 srandom \
b7db09a3 4414 statfs \
6716b242 4415 sysconf \
4416 syslog \
234967c9 4417 timegm \
28da5e0d 4418 vsnprintf \
6716b242 4419
4420do
4421echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd748f27 4422echo "configure:4423: checking for $ac_func" >&5
c68e9c6b 4423if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4424 echo $ac_n "(cached) $ac_c" 1>&6
4425else
4426 cat > conftest.$ac_ext <<EOF
cd748f27 4427#line 4428 "configure"
c68e9c6b 4428#include "confdefs.h"
4429/* System header to define __stub macros and hopefully few prototypes,
4430 which can conflict with char $ac_func(); below. */
4431#include <assert.h>
4432/* Override any gcc2 internal prototype to avoid an error. */
4433/* We use char because int might match the return type of a gcc2
4434 builtin and then its argument prototype would still apply. */
4435char $ac_func();
4436
4437int main() {
4438
4439/* The GNU C library defines this for functions which it implements
4440 to always fail with ENOSYS. Some functions are actually named
4441 something starting with __ and the normal name is an alias. */
4442#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4443choke me
4444#else
4445$ac_func();
4446#endif
4447
4448; return 0; }
4449EOF
cd748f27 4450if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c68e9c6b 4451 rm -rf conftest*
4452 eval "ac_cv_func_$ac_func=yes"
4453else
4454 echo "configure: failed program was:" >&5
4455 cat conftest.$ac_ext >&5
4456 rm -rf conftest*
4457 eval "ac_cv_func_$ac_func=no"
4458fi
4459rm -f conftest*
4460fi
4461
4462if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4463 echo "$ac_t""yes" 1>&6
4464 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4465 cat >> confdefs.h <<EOF
4466#define $ac_tr_func 1
4467EOF
4468
4469else
4470 echo "$ac_t""no" 1>&6
4471fi
4472done
4473
4474
60939927 4475echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6
cd748f27 4476echo "configure:4477: checking if setresuid is implemented" >&5
60939927 4477if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then
4478 echo $ac_n "(cached) $ac_c" 1>&6
4479else
4480 if test "$cross_compiling" = yes; then
4481 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4482else
4483 cat > conftest.$ac_ext <<EOF
cd748f27 4484#line 4485 "configure"
60939927 4485#include "confdefs.h"
4486
4487#include <stdlib.h>
5c51415d 4488 int main() {
4489 if(setresuid(-1,-1,-1)) {
4490 perror("setresuid:");
4491 exit(1);
60939927 4492 }
4493 exit(0);
5c51415d 4494 }
4495
60939927 4496EOF
cd748f27 4497if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
60939927 4498then
4499 ac_cv_func_setresuid="yes"
4500else
4501 echo "configure: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 rm -fr conftest*
4504 ac_cv_func_setresuid="no"
4505fi
4506rm -fr conftest*
4507fi
4508
4509
4510fi
4511
4512echo "$ac_t""$ac_cv_func_setresuid" 1>&6
5c51415d 4513if test "$ac_cv_func_setresuid" = "yes" ; then
4514 cat >> confdefs.h <<\EOF
4515#define HAVE_SETRESUID 1
4516EOF
4517
4518fi
4519
5cafc1d6 4520if test "$IPF_TRANSPARENT" ; then
4521 echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6
cd748f27 4522echo "configure:4523: checking if IP-Filter header files are installed" >&5
eb824054 4523 if test "$ac_cv_header_ip_compat_h" = "yes" &&
4524 test "$ac_cv_header_ip_fil_h" = "yes" &&
4525 test "$ac_cv_header_ip_nat_h" = "yes" ; then
4526 IPF_TRANSPARENT="yes"
5cafc1d6 4527 cat >> confdefs.h <<\EOF
eb824054 4528#define IPF_TRANSPARENT 1
5cafc1d6 4529EOF
4530
eb824054 4531 elif test "$ac_cv_header_netinet_ip_compat_h" = "yes" &&
4532 test "$ac_cv_header_netinet_ip_fil_h" = "yes" &&
4533 test "$ac_cv_header_netinet_ip_nat_h" = "yes" ; then
5cafc1d6 4534 IPF_TRANSPARENT="yes"
4535 cat >> confdefs.h <<\EOF
4536#define IPF_TRANSPARENT 1
eb824054 4537EOF
4538
4539 else
4540 IPF_TRANSPARENT="no"
4541 cat >> confdefs.h <<\EOF
4542#define IPF_TRANSPARENT 0
5cafc1d6 4543EOF
4544
4545 fi
4546 echo "$ac_t""$IPF_TRANSPARENT" 1>&6
4547fi
4548if test "$IPF_TRANSPARENT" = "no" ; then
4549 echo "WARNING: Cannot find necessary IP-Filter header files"
4550 echo " Transparent Proxy support WILL NOT be enabled"
4551 sleep 10
4552fi
4553
91bc414e 4554if test -z "$USE_GNUREGEX" ; then
4555 case "$host" in
4556 *-sun-solaris2.[0-4])
4557 USE_GNUREGEX="yes"
4558 ;;
4559 *-next-nextstep*)
4560 USE_GNUREGEX="yes"
4561 ;;
4562 esac
4563fi
7a081912 4564echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6
cd748f27 4565echo "configure:4566: checking if GNUregex needs to be compiled" >&5
91bc414e 4566if test -z "$USE_GNUREGEX"; then
55878dfd 4567if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
74946a0f 4568 USE_GNUREGEX="yes"
2f0eed11 4569else
91bc414e 4570 cat > conftest.$ac_ext <<EOF
cd748f27 4571#line 4572 "configure"
91bc414e 4572#include "confdefs.h"
0cccc031 4573#include <sys/types.h>
91bc414e 4574#include <regex.h>
4575int main() {
4576regex_t t; regcomp(&t,"",0);
4577; return 0; }
4578EOF
cd748f27 4579if { (eval echo configure:4580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
91bc414e 4580 rm -rf conftest*
4581 USE_GNUREGEX="no"
4582else
4583 echo "configure: failed program was:" >&5
4584 cat conftest.$ac_ext >&5
4585 rm -rf conftest*
4586 USE_GNUREGEX="yes"
4587fi
4588rm -f conftest*
4589fi
2f0eed11 4590fi
74946a0f 4591echo "$ac_t""$USE_GNUREGEX" 1>&6
4592if test "$USE_GNUREGEX" = "yes"; then
ac4437b7 4593 REGEXLIB="-lregex"
7a081912 4594 LIBREGEX="libregex.a"
74946a0f 4595 cat >> confdefs.h <<\EOF
4596#define USE_GNUREGEX 1
4597EOF
4598
7a081912 4599fi
4600
ac4437b7 4601
2f0eed11 4602
3f6fcd8a 4603for ac_func in \
3d0cf10e 4604 drand48 \
3f6fcd8a 4605 tempnam \
719dbbeb 4606 strerror \
3f6fcd8a 4607
4608do
4609echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd748f27 4610echo "configure:4611: checking for $ac_func" >&5
3f6fcd8a 4611if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4612 echo $ac_n "(cached) $ac_c" 1>&6
4613else
4614 cat > conftest.$ac_ext <<EOF
cd748f27 4615#line 4616 "configure"
3f6fcd8a 4616#include "confdefs.h"
4617/* System header to define __stub macros and hopefully few prototypes,
4618 which can conflict with char $ac_func(); below. */
4619#include <assert.h>
4620/* Override any gcc2 internal prototype to avoid an error. */
03a0d3b0 4621/* We use char because int might match the return type of a gcc2
4622 builtin and then its argument prototype would still apply. */
3f6fcd8a 4623char $ac_func();
4624
b1e77ec1 4625int main() {
3f6fcd8a 4626
4627/* The GNU C library defines this for functions which it implements
4628 to always fail with ENOSYS. Some functions are actually named
4629 something starting with __ and the normal name is an alias. */
4630#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4631choke me
4632#else
4633$ac_func();
4634#endif
4635
4636; return 0; }
4637EOF
cd748f27 4638if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3f6fcd8a 4639 rm -rf conftest*
4640 eval "ac_cv_func_$ac_func=yes"
4641else
b1e77ec1 4642 echo "configure: failed program was:" >&5
4643 cat conftest.$ac_ext >&5
3f6fcd8a 4644 rm -rf conftest*
4645 eval "ac_cv_func_$ac_func=no"
4646fi
4647rm -f conftest*
3f6fcd8a 4648fi
133b6d90 4649
3f6fcd8a 4650if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4651 echo "$ac_t""yes" 1>&6
b1e77ec1 4652 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4653 cat >> confdefs.h <<EOF
4654#define $ac_tr_func 1
4655EOF
4656
3f6fcd8a 4657else
4658 echo "$ac_t""no" 1>&6
b7db09a3 4659LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3f6fcd8a 4660fi
3f6fcd8a 4661done
4662
4663
b1e77ec1 4664
e924600d 4665echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6
cd748f27 4666echo "configure:4667: checking Default FD_SETSIZE value" >&5
e924600d 4667if test "$cross_compiling" = yes; then
4668 DEFAULT_FD_SETSIZE=256
4669else
4670 cat > conftest.$ac_ext <<EOF
cd748f27 4671#line 4672 "configure"
e924600d 4672#include "confdefs.h"
4673
4674#if HAVE_STDIO_H
4675#include <stdio.h>
4676#endif
4677#if HAVE_UNISTD_H
4678#include <unistd.h>
4679#endif
4680#if HAVE_SYS_TIME_H
4681#include <sys/time.h>
4682#endif
4683#if HAVE_SYS_SELECT_H
4684#include <sys/select.h>
4685#endif
4686#if HAVE_SYS_TYPES_H
4687#include <sys/types.h>
4688#endif
4689main() {
635e6242 4690 FILE *fp = fopen("conftestval", "w");
4691 fprintf (fp, "%d\n", FD_SETSIZE);
e924600d 4692 exit(0);
4693}
4694
4695EOF
cd748f27 4696if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
e924600d 4697then
4698 DEFAULT_FD_SETSIZE=`cat conftestval`
4699else
4700 echo "configure: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 rm -fr conftest*
4703 DEFAULT_FD_SETSIZE=256
4704fi
4705rm -fr conftest*
4706fi
4707
4708echo "$ac_t""$DEFAULT_FD_SETSIZE" 1>&6
4709cat >> confdefs.h <<EOF
4710#define DEFAULT_FD_SETSIZE $DEFAULT_FD_SETSIZE
4711EOF
4712
4713
234967c9 4714echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6
cd748f27 4715echo "configure:4716: checking Maximum number of filedescriptors we can open" >&5
c76d8acc 4716TLDFLAGS="$LDFLAGS"
4717case $host in
4718i386-unknown-freebsd*)
4719 if echo "$LDFLAGS" | grep -q pthread; then
4720 LDFLAGS=`echo $LDFLAGS | sed -e "s/-pthread//"`
4721 fi
4722esac
234967c9 4723if test "$cross_compiling" = yes; then
431d84c5 4724 SQUID_MAXFD=256
234967c9 4725else
b1e77ec1 4726 cat > conftest.$ac_ext <<EOF
cd748f27 4727#line 4728 "configure"
234967c9 4728#include "confdefs.h"
4729
8cca06da 4730#include <stdio.h>
234967c9 4731#include <unistd.h>
30a4f2a8 4732#include <sys/time.h> /* needed on FreeBSD */
234967c9 4733#include <sys/param.h>
4734#include <sys/resource.h>
4735main() {
635e6242 4736 FILE *fp;
234967c9 4737 int i,j;
df087e68 4738#if __CYGWIN32__
4739 /* getrlimit and sysconf returns bogous values on cygwin32.
4740 * Number of fds is virtually unlimited in cygwin (sys/param.h)
4741 */
4742 i = NOFILE;
d9399075 4743#elif HAVE_SETRLIMIT
234967c9 4744 struct rlimit rl;
4745#if defined(RLIMIT_NOFILE)
4746 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
4747 perror("getrlimit: RLIMIT_NOFILE");
4748 } else {
4749 rl.rlim_cur = rl.rlim_max; /* set it to the max */
4750 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
4751 perror("setrlimit: RLIMIT_NOFILE");
4752 }
4753 }
4754#elif defined(RLIMIT_OFILE)
4755 if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
4756 perror("getrlimit: RLIMIT_OFILE");
4757 } else {
4758 rl.rlim_cur = rl.rlim_max; /* set it to the max */
4759 if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
4760 perror("setrlimit: RLIMIT_OFILE");
4761 }
4762 }
4763#endif /* RLIMIT_NOFILE */
4764#endif /* HAVE_SETRLIMIT */
d9399075 4765 /* by starting at 2^14, we will never get higher
4766 than 2^15 for SQUID_MAXFD */
4767 i = j = 1<<14;
4768 while (j) {
4769 j >>= 1;
4770 if (dup2(0, i) < 0) {
4771 i -= j;
4772 } else {
4773 close(i);
4774 i += j;
4775 }
4776 }
4777 i++;
635e6242 4778 fp = fopen("conftestval", "w");
4779 fprintf (fp, "%d\n", i);
234967c9 4780 exit(0);
4781}
4782
4783EOF
cd748f27 4784if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 4785then
431d84c5 4786 SQUID_MAXFD=`cat conftestval`
234967c9 4787else
b1e77ec1 4788 echo "configure: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4790 rm -fr conftest*
431d84c5 4791 SQUID_MAXFD=256
234967c9 4792fi
234967c9 4793rm -fr conftest*
b1e77ec1 4794fi
4795
431d84c5 4796echo "$ac_t""$SQUID_MAXFD" 1>&6
234967c9 4797cat >> confdefs.h <<EOF
431d84c5 4798#define SQUID_MAXFD $SQUID_MAXFD
234967c9 4799EOF
4800
b9cc811d 4801if test "$SQUID_MAXFD" -lt 512 ; then
80ab193b 4802 echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
4803 echo " cache will be very busy. Please see the FAQ page"
043e3d78 4804 echo " http://squid.nlanr.net/Squid/FAQ/FAQ-11.html#filedescriptors"
22df58ea 4805 echo " on how to increase your filedescriptor limit"
933cc58d 4806 sleep 10
80ab193b 4807fi
c76d8acc 4808LDFLAGS="$TLDFLAGS"
234967c9 4809
30a4f2a8 4810echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6
cd748f27 4811echo "configure:4812: checking Default UDP send buffer size" >&5
30a4f2a8 4812if test "$cross_compiling" = yes; then
1c481e00 4813 SQUID_UDP_SO_SNDBUF=16384
30a4f2a8 4814else
b1e77ec1 4815 cat > conftest.$ac_ext <<EOF
cd748f27 4816#line 4817 "configure"
30a4f2a8 4817#include "confdefs.h"
4818
8cca06da 4819#include <stdlib.h>
4820#include <stdio.h>
30a4f2a8 4821#include <sys/types.h>
4822#include <sys/socket.h>
4823#include <netinet/in.h>
4824main ()
4825{
635e6242 4826 FILE *fp;
30a4f2a8 4827 int fd,val=0,len=sizeof(int);
4828 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
4829 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
4830 if (val<=0) exit(1);
635e6242 4831 fp = fopen("conftestval", "w");
4832 fprintf (fp, "%d\n", val);
30a4f2a8 4833 exit(0);
4834}
4835
4836EOF
cd748f27 4837if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 4838then
30a4f2a8 4839 SQUID_UDP_SO_SNDBUF=`cat conftestval`
4840else
b1e77ec1 4841 echo "configure: failed program was:" >&5
4842 cat conftest.$ac_ext >&5
4843 rm -fr conftest*
1c481e00 4844 SQUID_UDP_SO_SNDBUF=16384
30a4f2a8 4845fi
30a4f2a8 4846rm -fr conftest*
b1e77ec1 4847fi
4848
30a4f2a8 4849echo "$ac_t""$SQUID_UDP_SO_SNDBUF" 1>&6
4850cat >> confdefs.h <<EOF
4851#define SQUID_UDP_SO_SNDBUF $SQUID_UDP_SO_SNDBUF
4852EOF
4853
4854
4855echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6
cd748f27 4856echo "configure:4857: checking Default UDP receive buffer size" >&5
30a4f2a8 4857if test "$cross_compiling" = yes; then
1c481e00 4858 SQUID_UDP_SO_RCVBUF=16384
30a4f2a8 4859else
b1e77ec1 4860 cat > conftest.$ac_ext <<EOF
cd748f27 4861#line 4862 "configure"
30a4f2a8 4862#include "confdefs.h"
4863
8cca06da 4864#include <stdlib.h>
4865#include <stdio.h>
30a4f2a8 4866#include <sys/types.h>
4867#include <sys/socket.h>
4868#include <netinet/in.h>
4869main ()
4870{
635e6242 4871 FILE *fp;
30a4f2a8 4872 int fd,val=0,len=sizeof(int);
4873 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
4874 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
4875 if (val <= 0) exit(1);
635e6242 4876 fp = fopen("conftestval", "w");
4877 fprintf (fp, "%d\n", val);
30a4f2a8 4878 exit(0);
4879}
4880
4881EOF
cd748f27 4882if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 4883then
30a4f2a8 4884 SQUID_UDP_SO_RCVBUF=`cat conftestval`
4885else
b1e77ec1 4886 echo "configure: failed program was:" >&5
4887 cat conftest.$ac_ext >&5
4888 rm -fr conftest*
1c481e00 4889 SQUID_UDP_SO_RCVBUF=16384
30a4f2a8 4890fi
30a4f2a8 4891rm -fr conftest*
b1e77ec1 4892fi
4893
30a4f2a8 4894echo "$ac_t""$SQUID_UDP_SO_RCVBUF" 1>&6
4895cat >> confdefs.h <<EOF
4896#define SQUID_UDP_SO_RCVBUF $SQUID_UDP_SO_RCVBUF
4897EOF
4898
4899
4900echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6
cd748f27 4901echo "configure:4902: checking Default TCP send buffer size" >&5
30a4f2a8 4902if test "$cross_compiling" = yes; then
1c481e00 4903 SQUID_TCP_SO_SNDBUF=16384
30a4f2a8 4904else
b1e77ec1 4905 cat > conftest.$ac_ext <<EOF
cd748f27 4906#line 4907 "configure"
30a4f2a8 4907#include "confdefs.h"
4908
8cca06da 4909#include <stdlib.h>
4910#include <stdio.h>
30a4f2a8 4911#include <sys/types.h>
4912#include <sys/socket.h>
4913#include <netinet/in.h>
4914main ()
4915{
635e6242 4916 FILE *fp;
30a4f2a8 4917 int fd,val=0,len=sizeof(int);
4918 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
4919 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
4920 if (val <= 0) exit(1);
635e6242 4921 fp = fopen("conftestval", "w");
4922 fprintf (fp, "%d\n", val);
30a4f2a8 4923 exit(0);
4924}
4925
4926EOF
cd748f27 4927if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 4928then
30a4f2a8 4929 SQUID_TCP_SO_SNDBUF=`cat conftestval`
4930else
b1e77ec1 4931 echo "configure: failed program was:" >&5
4932 cat conftest.$ac_ext >&5
4933 rm -fr conftest*
1c481e00 4934 SQUID_TCP_SO_SNDBUF=16384
30a4f2a8 4935fi
30a4f2a8 4936rm -fr conftest*
b1e77ec1 4937fi
4938
30a4f2a8 4939echo "$ac_t""$SQUID_TCP_SO_SNDBUF" 1>&6
4940cat >> confdefs.h <<EOF
4941#define SQUID_TCP_SO_SNDBUF $SQUID_TCP_SO_SNDBUF
4942EOF
4943
4944
4945echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6
cd748f27 4946echo "configure:4947: checking Default TCP receive buffer size" >&5
30a4f2a8 4947if test "$cross_compiling" = yes; then
1c481e00 4948 SQUID_TCP_SO_RCVBUF=16384
30a4f2a8 4949else
b1e77ec1 4950 cat > conftest.$ac_ext <<EOF
cd748f27 4951#line 4952 "configure"
30a4f2a8 4952#include "confdefs.h"
4953
8cca06da 4954#include <stdlib.h>
4955#include <stdio.h>
30a4f2a8 4956#include <sys/types.h>
4957#include <sys/socket.h>
4958#include <netinet/in.h>
4959main ()
4960{
635e6242 4961 FILE *fp;
30a4f2a8 4962 int fd,val=0,len=sizeof(int);
4963 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
4964 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
4965 if (val <= 0) exit(1);
635e6242 4966 fp = fopen("conftestval", "w");
4967 fprintf (fp, "%d\n", val);
30a4f2a8 4968 exit(0);
4969}
4970
4971EOF
cd748f27 4972if { (eval echo configure:4973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
133b6d90 4973then
30a4f2a8 4974 SQUID_TCP_SO_RCVBUF=`cat conftestval`
4975else
b1e77ec1 4976 echo "configure: failed program was:" >&5
4977 cat conftest.$ac_ext >&5
4978 rm -fr conftest*
1c481e00 4979 SQUID_TCP_SO_RCVBUF=16384
30a4f2a8 4980fi
30a4f2a8 4981rm -fr conftest*
b1e77ec1 4982fi
4983
30a4f2a8 4984echo "$ac_t""$SQUID_TCP_SO_RCVBUF" 1>&6
4985cat >> confdefs.h <<EOF
4986#define SQUID_TCP_SO_RCVBUF $SQUID_TCP_SO_RCVBUF
4987EOF
4988
4989
4990echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
cd748f27 4991echo "configure:4992: checking if sys_errlist is already defined" >&5
5c51415d 4992if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then
4993 echo $ac_n "(cached) $ac_c" 1>&6
4994else
4995 cat > conftest.$ac_ext <<EOF
cd748f27 4996#line 4997 "configure"
30a4f2a8 4997#include "confdefs.h"
4998#include <stdio.h>
b1e77ec1 4999int main() {
9bc73deb 5000char *s = sys_errlist;
30a4f2a8 5001; return 0; }
5002EOF
cd748f27 5003if { (eval echo configure:5004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
30a4f2a8 5004 rm -rf conftest*
5c51415d 5005 ac_cv_needs_sys_errlist="no"
30a4f2a8 5006else
b1e77ec1 5007 echo "configure: failed program was:" >&5
5008 cat conftest.$ac_ext >&5
30a4f2a8 5009 rm -rf conftest*
5c51415d 5010 ac_cv_needs_sys_errlist="yes"
5011fi
5012rm -f conftest*
5013
5014fi
5015
5016echo "$ac_t""$ac_cv_needs_sys_errlist" 1>&6
5017if test "$ac_cv_needs_sys_errlist" = "yes" ; then
5018 cat >> confdefs.h <<\EOF
30a4f2a8 5019#define NEED_SYS_ERRLIST 1
5020EOF
5021
5022fi
30a4f2a8 5023
6bf65235 5024echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
cd748f27 5025echo "configure:5026: checking for libresolv _dns_ttl_ hack" >&5
6bf65235 5026cat > conftest.$ac_ext <<EOF
cd748f27 5027#line 5028 "configure"
6bf65235 5028#include "confdefs.h"
5029extern int _dns_ttl_;
b1e77ec1 5030int main() {
6bf65235 5031return _dns_ttl_;
5032; return 0; }
5033EOF
cd748f27 5034if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6bf65235 5035 rm -rf conftest*
5036 echo "$ac_t""yes" 1>&6
5037cat >> confdefs.h <<\EOF
5038#define LIBRESOLV_DNS_TTL_HACK 1
5039EOF
5040
5041else
b1e77ec1 5042 echo "configure: failed program was:" >&5
5043 cat conftest.$ac_ext >&5
6bf65235 5044 rm -rf conftest*
5045 echo "$ac_t""no" 1>&6
5046fi
5047rm -f conftest*
5048
a937d5e3 5049echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6
cd748f27 5050echo "configure:5051: checking if inet_ntoa() actually works" >&5
a937d5e3 5051if test "$cross_compiling" = yes; then
5052 INET_NTOA_RESULT="broken"
5053else
5054 cat > conftest.$ac_ext <<EOF
cd748f27 5055#line 5056 "configure"
a937d5e3 5056#include "confdefs.h"
5057
5058#include <stdlib.h>
5059#include <stdio.h>
5060#include <sys/types.h>
5061#include <netinet/in.h>
5062#include <arpa/inet.h>
5063main ()
5064{
635e6242 5065 FILE *fp;
a937d5e3 5066 struct in_addr in;
5067 in.s_addr = inet_addr("1.2.3.4");
635e6242 5068 fp = fopen("conftestval", "w");
5069 fprintf (fp, "%s\n", inet_ntoa(in));
a937d5e3 5070 exit(0);
5071}
5072
5073EOF
cd748f27 5074if { (eval echo configure:5075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
a937d5e3 5075then
5076 INET_NTOA_RESULT=`cat conftestval`
5077else
5078 echo "configure: failed program was:" >&5
5079 cat conftest.$ac_ext >&5
5080 rm -fr conftest*
5081 INET_NTOA_RESULT="broken"
5082fi
5083rm -fr conftest*
5084fi
5085
5086if test "$INET_NTOA_RESULT" = "1.2.3.4" ; then
5087 echo "$ac_t"""yes"" 1>&6
5088else
5089 echo "$ac_t"""no"" 1>&6
b6a2f15e 5090 echo "Will use our own inet_ntoa()."
5091 LIBOBJS="$LIBOBJS inet_ntoa.o"
5092# echo "WARNING: This looks bad, and probably prevents Squid from working."
5093# echo " If you're on IRIX and using GCC 2.8, you probably need"
5094# echo " to use the IRIX C compiler instead."
5095# sleep 10
a937d5e3 5096fi
5097
b6a2f15e 5098if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
c68e9c6b 5099echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6
cd748f27 5100echo "configure:5101: checking for working statvfs() interface" >&5
c68e9c6b 5101cat > conftest.$ac_ext <<EOF
cd748f27 5102#line 5103 "configure"
c68e9c6b 5103#include "confdefs.h"
5104
5105#include <stdlib.h>
5106#include <stdio.h>
5107#include <sys/types.h>
5108#include <sys/statvfs.h>
5109
5110int main() {
5111
5112struct statvfs sfs;
5113sfs.f_blocks = sfs.f_bfree = sfs.f_frsize =
5114sfs.f_files = sfs.f_ffree = 0;
5115statvfs("/tmp", &sfs);
5116
5117; return 0; }
5118EOF
cd748f27 5119if { (eval echo configure:5120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c68e9c6b 5120 rm -rf conftest*
5121 ac_cv_func_statvfs=yes
5122else
5123 echo "configure: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5125 rm -rf conftest*
5126 ac_cv_func_statvfs=no
5127fi
5128rm -f conftest*
5129echo "$ac_t""$ac_cv_func_statvfs" 1>&6
6b8e7481 5130if test "$ac_cv_func_statvfs" = "yes" ; then
b6a2f15e 5131 cat >> confdefs.h <<\EOF
5132#define HAVE_STATVFS 1
5133EOF
5134
6b8e7481 5135fi
c68e9c6b 5136fi
5137
5138echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6
cd748f27 5139echo "configure:5140: checking for _res.nsaddr_list" >&5
c68e9c6b 5140if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then
5141 echo $ac_n "(cached) $ac_c" 1>&6
5142else
5143 cat > conftest.$ac_ext <<EOF
cd748f27 5144#line 5145 "configure"
c68e9c6b 5145#include "confdefs.h"
5146
5147#if HAVE_SYS_TYPES_H
5148#include <sys/types.h>
5149#endif
5150#if HAVE_NETINET_IN_H
5151#include <netinet/in.h>
5152#endif
5153#if HAVE_ARPA_INET_H
5154#include <arpa/inet.h>
5155#endif
5156#if HAVE_ARPA_NAMESER_H
5157#include <arpa/nameser.h>
5158#endif
5159#if HAVE_RESOLV_H
5160#include <resolv.h>
5161#endif
5162
5163int main() {
5164_res.nsaddr_list[0];
5165; return 0; }
5166EOF
cd748f27 5167if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c68e9c6b 5168 rm -rf conftest*
5169 ac_cv_have_res_nsaddr_list="yes"
5170else
5171 echo "configure: failed program was:" >&5
5172 cat conftest.$ac_ext >&5
5173 rm -rf conftest*
5174 ac_cv_have_res_nsaddr_list="no"
5175fi
5176rm -f conftest*
5177fi
5178
5179echo "$ac_t""$ac_cv_have_res_nsaddr_list" 1>&6
5180if test $ac_cv_have_res_nsaddr_list = "yes" ; then
5181 cat >> confdefs.h <<\EOF
5182#define HAVE_RES_NSADDR_LIST 1
5183EOF
5184
5185fi
5186
5187if test $ac_cv_have_res_nsaddr_list = "no" ; then
5188echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6
cd748f27 5189echo "configure:5190: checking for _res.ns_list" >&5
c68e9c6b 5190if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then
5191 echo $ac_n "(cached) $ac_c" 1>&6
5192else
5193 cat > conftest.$ac_ext <<EOF
cd748f27 5194#line 5195 "configure"
c68e9c6b 5195#include "confdefs.h"
5196
5197#if HAVE_SYS_TYPES_H
5198#include <sys/types.h>
5199#endif
5200#if HAVE_NETINET_IN_H
5201#include <netinet/in.h>
5202#endif
5203#if HAVE_ARPA_INET_H
5204#include <arpa/inet.h>
5205#endif
5206#if HAVE_ARPA_NAMESER_H
5207#include <arpa/nameser.h>
5208#endif
5209#if HAVE_RESOLV_H
5210#include <resolv.h>
5211#endif
5212
5213int main() {
5214_res.ns_list[0].addr;
5215; return 0; }
5216EOF
cd748f27 5217if { (eval echo configure:5218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c68e9c6b 5218 rm -rf conftest*
5219 ac_cv_have_res_ns_list="yes"
5220else
5221 echo "configure: failed program was:" >&5
5222 cat conftest.$ac_ext >&5
5223 rm -rf conftest*
5224 ac_cv_have_res_ns_list="no"
5225fi
5226rm -f conftest*
5227fi
5228
5229echo "$ac_t""$ac_cv_have_res_ns_list" 1>&6
5230if test $ac_cv_have_res_ns_list = "yes" ; then
5231 cat >> confdefs.h <<\EOF
5232#define HAVE_RES_NS_LIST 1
5233EOF
5234
5235fi
5236fi
5237
090089c4 5238XTRA_OBJS=''
6509a1a0 5239if test "$ac_cv_lib_malloc_main" = "yes" ; then
090089c4 5240 if test -r /usr/lib/debug/malloc.o ; then
5241 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"
5242 fi
5243 if test -r /usr/lib/debug/mallocmap.o ; then
5244 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
5245 fi
5246fi
c6af3af4 5247
090089c4 5248
5249
38fea766 5250if test -z "$XTRA_LIBS"; then
5251 XTRA_LIBS="$LIBS"
0f5a16f8 5252 XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/-lcrypt//"`
5253 XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/-lpthread//"`
5254 XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/ */ /g"`
38fea766 5255 LIBS=''
5256fi
090089c4 5257
090089c4 5258
5259rm -f core
5260
5261trap '' 1 2 15
5262cat > confcache <<\EOF
5263# This file is a shell script that caches the results of configure
5264# tests run on this system so they can be shared between configure
5265# scripts and configure runs. It is not useful on other systems.
5266# If it contains results you don't want to keep, you may remove or edit it.
5267#
5268# By default, configure uses ./config.cache as the cache file,
5269# creating it if it does not exist already. You can give configure
5270# the --cache-file=FILE option to use a different cache file; that is
5271# what configure does when it calls configure scripts in
5272# subdirectories, so they share the cache.
5273# Giving --cache-file=/dev/null disables caching, for debugging configure.
5274# config.status only pays attention to the cache file if you give it the
5275# --recheck option to rerun configure.
5276#
5277EOF
133b6d90 5278# The following way of writing the cache mishandles newlines in values,
5279# but we know of no workaround that is simple, portable, and efficient.
5280# So, don't put newlines in cache variables' values.
090089c4 5281# Ultrix sh set writes to stderr and can't be redirected directly,
5282# and sets the high bit in the cache file unless we assign to the vars.
5283(set) 2>&1 |
b7db09a3 5284 case `(ac_space=' '; set | grep ac_space) 2>&1` in
133b6d90 5285 *ac_space=\ *)
5286 # `set' does not quote correctly, so add quotes (double-quote substitution
5287 # turns \\\\ into \\, and sed turns \\ into \).
5288 sed -n \
5289 -e "s/'/'\\\\''/g" \
5290 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5291 ;;
5292 *)
5293 # `set' quotes correctly as required by POSIX, so do not add quotes.
5294 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5295 ;;
5296 esac >> confcache
090089c4 5297if cmp -s $cache_file confcache; then
5298 :
5299else
5300 if test -w $cache_file; then
5301 echo "updating cache $cache_file"
5302 cat confcache > $cache_file
5303 else
5304 echo "not updating unwritable cache $cache_file"
5305 fi
5306fi
5307rm -f confcache
5308
5309trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5310
5311test "x$prefix" = xNONE && prefix=$ac_default_prefix
5312# Let make expand exec_prefix.
5313test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5314
5315# Any assignment to VPATH causes Sun make to only execute
5316# the first set of double-colon rules, so remove it if not needed.
5317# If there is a colon in the path, we need to keep it.
5318if test "x$srcdir" = x.; then
5319 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5320fi
5321
5322trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5323
5324DEFS=-DHAVE_CONFIG_H
5325
5326# Without the "./", some shells look in PATH for config.status.
5327: ${CONFIG_STATUS=./config.status}
5328
5329echo creating $CONFIG_STATUS
5330rm -f $CONFIG_STATUS
5331cat > $CONFIG_STATUS <<EOF
5332#! /bin/sh
5333# Generated automatically by configure.
5334# Run this file to recreate the current configuration.
5335# This directory was configured as follows,
5336# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5337#
5338# $0 $ac_configure_args
5339#
5340# Compiler output produced by configure, useful for debugging
5341# configure, is in ./config.log if it exists.
5342
5343ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5344for ac_option
5345do
5346 case "\$ac_option" in
5347 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5348 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5349 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5350 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b7db09a3 5351 echo "$CONFIG_STATUS generated by autoconf version 2.13"
090089c4 5352 exit 0 ;;
5353 -help | --help | --hel | --he | --h)
5354 echo "\$ac_cs_usage"; exit 0 ;;
5355 *) echo "\$ac_cs_usage"; exit 1 ;;
5356 esac
5357done
5358
5359ac_given_srcdir=$srcdir
5360ac_given_INSTALL="$INSTALL"
5361
5362trap 'rm -fr `echo "\
0992a350 5363 ./makefile \
090089c4 5364 ./lib/Makefile \
a26bdc75 5365 ./include/config.h \
090089c4 5366 ./scripts/Makefile \
5367 ./scripts/RunCache \
5368 ./scripts/RunAccel \
a26bdc75 5369 ./src/Makefile \
cd748f27 5370 ./src/fs/Makefile \
5371 ./src/fs/ufs/Makefile \
5372 ./src/fs/aufs/Makefile \
5373 ./src/fs/coss/Makefile \
5374 ./src/fs/diskd/Makefile \
fee8e653 5375 ./contrib/Makefile \
8a7f0105 5376 $SNMP_MAKEFILE \
81280a96 5377 ./icons/Makefile \
d4fb069d 5378 ./errors/Makefile \
b7db09a3 5379 ./auth_modules/Makefile \
dbfa0154 5380 ./auth_modules/NCSA/Makefile \
bf10b227 5381 ./auth_modules/PAM/Makefile \
b7db09a3 5382 ./auth_modules/SMB/Makefile \
5383 ./auth_modules/MSNT/Makefile \
b6a2f15e 5384 ./auth_modules/getpwnam/Makefile \
9bc73deb 5385 ./auth_modules/LDAP/Makefile \
090089c4 5386 include/autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5387EOF
5388cat >> $CONFIG_STATUS <<EOF
5389
5390# Protect against being on the right side of a sed subst in config.status.
5391sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5392 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5393$ac_vpsub
5394$extrasub
b7db09a3 5395s%@SHELL@%$SHELL%g
090089c4 5396s%@CFLAGS@%$CFLAGS%g
5397s%@CPPFLAGS@%$CPPFLAGS%g
5398s%@CXXFLAGS@%$CXXFLAGS%g
b7db09a3 5399s%@FFLAGS@%$FFLAGS%g
090089c4 5400s%@DEFS@%$DEFS%g
5401s%@LDFLAGS@%$LDFLAGS%g
5402s%@LIBS@%$LIBS%g
5403s%@exec_prefix@%$exec_prefix%g
5404s%@prefix@%$prefix%g
5405s%@program_transform_name@%$program_transform_name%g
5406s%@bindir@%$bindir%g
5407s%@sbindir@%$sbindir%g
5408s%@libexecdir@%$libexecdir%g
5409s%@datadir@%$datadir%g
5410s%@sysconfdir@%$sysconfdir%g
5411s%@sharedstatedir@%$sharedstatedir%g
5412s%@localstatedir@%$localstatedir%g
5413s%@libdir@%$libdir%g
5414s%@includedir@%$includedir%g
5415s%@oldincludedir@%$oldincludedir%g
5416s%@infodir@%$infodir%g
5417s%@mandir@%$mandir%g
da22ac20 5418s%@host@%$host%g
5419s%@host_alias@%$host_alias%g
5420s%@host_cpu@%$host_cpu%g
5421s%@host_vendor@%$host_vendor%g
5422s%@host_os@%$host_os%g
df087e68 5423s%@exec_suffix@%$exec_suffix%g
5424s%@cgi_suffix@%$cgi_suffix%g
a26bdc75 5425s%@CACHE_HTTP_PORT@%$CACHE_HTTP_PORT%g
5426s%@CACHE_ICP_PORT@%$CACHE_ICP_PORT%g
090089c4 5427s%@CC@%$CC%g
e5f4e1b0 5428s%@LIBDLMALLOC@%$LIBDLMALLOC%g
5429s%@LIB_MALLOC@%$LIB_MALLOC%g
e5f4e1b0 5430s%@SQUID_PTHREAD_LIB@%$SQUID_PTHREAD_LIB%g
cd748f27 5431s%@STORE_MODULES@%$STORE_MODULES%g
5432s%@STORE_OBJS@%$STORE_OBJS%g
95e36d02 5433s%@DELAY_OBJS@%$DELAY_OBJS%g
e5f4e1b0 5434s%@SNMPLIB@%$SNMPLIB%g
5435s%@SNMP_OBJS@%$SNMP_OBJS%g
5436s%@makesnmplib@%$makesnmplib%g
b4b8b6da 5437s%@HTCP_OBJS@%$HTCP_OBJS%g
933cc58d 5438s%@ERR_LANGUAGE@%$ERR_LANGUAGE%g
5d620373 5439s%@LEAKFINDER_OBJS@%$LEAKFINDER_OBJS%g
b7db09a3 5440s%@AUTH_MODULES@%$AUTH_MODULES%g
090089c4 5441s%@CPP@%$CPP%g
5442s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
b7db09a3 5443s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
090089c4 5444s%@INSTALL_DATA@%$INSTALL_DATA%g
5445s%@RANLIB@%$RANLIB%g
5446s%@LN_S@%$LN_S%g
81280a96 5447s%@SH@%$SH%g
d9f67e6f 5448s%@FALSE@%$FALSE%g
5449s%@TRUE@%$TRUE%g
090089c4 5450s%@RM@%$RM%g
5451s%@MV@%$MV%g
5452s%@MKDIR@%$MKDIR%g
5453s%@LN@%$LN%g
090089c4 5454s%@PERL@%$PERL%g
5abe3056 5455s%@MAKEDEPEND@%$MAKEDEPEND%g
6ad85e8a 5456s%@AR@%$AR%g
5457s%@AR_R@%$AR_R%g
256cf05b 5458s%@ALLOCA@%$ALLOCA%g
ac4437b7 5459s%@CRYPTLIB@%$CRYPTLIB%g
47619a23 5460s%@PTHREADLIB@%$PTHREADLIB%g
ac4437b7 5461s%@REGEXLIB@%$REGEXLIB%g
2f0eed11 5462s%@LIBREGEX@%$LIBREGEX%g
3f6fcd8a 5463s%@LIBOBJS@%$LIBOBJS%g
77f675ad 5464s%@XTRA_OBJS@%$XTRA_OBJS%g
090089c4 5465s%@XTRA_LIBS@%$XTRA_LIBS%g
090089c4 5466
5467CEOF
5468EOF
b1e77ec1 5469
5470cat >> $CONFIG_STATUS <<\EOF
5471
5472# Split the substitutions into bite-sized pieces for seds with
5473# small command number limits, like on Digital OSF/1 and HP-UX.
5474ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5475ac_file=1 # Number of current file.
5476ac_beg=1 # First line for current file.
5477ac_end=$ac_max_sed_cmds # Line after last line for current file.
5478ac_more_lines=:
5479ac_sed_cmds=""
5480while $ac_more_lines; do
5481 if test $ac_beg -gt 1; then
5482 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5483 else
5484 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5485 fi
5486 if test ! -s conftest.s$ac_file; then
5487 ac_more_lines=false
5488 rm -f conftest.s$ac_file
5489 else
5490 if test -z "$ac_sed_cmds"; then
5491 ac_sed_cmds="sed -f conftest.s$ac_file"
5492 else
5493 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5494 fi
5495 ac_file=`expr $ac_file + 1`
5496 ac_beg=$ac_end
5497 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5498 fi
5499done
5500if test -z "$ac_sed_cmds"; then
5501 ac_sed_cmds=cat
5502fi
5503EOF
5504
090089c4 5505cat >> $CONFIG_STATUS <<EOF
5506
5507CONFIG_FILES=\${CONFIG_FILES-"\
0992a350 5508 ./makefile \
090089c4 5509 ./lib/Makefile \
a26bdc75 5510 ./include/config.h \
090089c4 5511 ./scripts/Makefile \
5512 ./scripts/RunCache \
5513 ./scripts/RunAccel \
a26bdc75 5514 ./src/Makefile \
cd748f27 5515 ./src/fs/Makefile \
5516 ./src/fs/ufs/Makefile \
5517 ./src/fs/aufs/Makefile \
5518 ./src/fs/coss/Makefile \
5519 ./src/fs/diskd/Makefile \
fee8e653 5520 ./contrib/Makefile \
8a7f0105 5521 $SNMP_MAKEFILE \
81280a96 5522 ./icons/Makefile \
d4fb069d 5523 ./errors/Makefile \
b7db09a3 5524 ./auth_modules/Makefile \
dbfa0154 5525 ./auth_modules/NCSA/Makefile \
bf10b227 5526 ./auth_modules/PAM/Makefile \
b7db09a3 5527 ./auth_modules/SMB/Makefile \
5528 ./auth_modules/MSNT/Makefile \
b6a2f15e 5529 ./auth_modules/getpwnam/Makefile \
9bc73deb 5530 ./auth_modules/LDAP/Makefile \
090089c4 5531"}
5532EOF
5533cat >> $CONFIG_STATUS <<\EOF
5534for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
133b6d90 5535 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
090089c4 5536 case "$ac_file" in
133b6d90 5537 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
090089c4 5538 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5539 *) ac_file_in="${ac_file}.in" ;;
5540 esac
5541
b1e77ec1 5542 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
090089c4 5543
5544 # Remove last slash and all that follows it. Not all systems have dirname.
5545 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5546 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5547 # The file is in a subdirectory.
5548 test ! -d "$ac_dir" && mkdir "$ac_dir"
5549 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5550 # A "../" for each directory in $ac_dir_suffix.
5551 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5552 else
5553 ac_dir_suffix= ac_dots=
5554 fi
5555
5556 case "$ac_given_srcdir" in
5557 .) srcdir=.
5558 if test -z "$ac_dots"; then top_srcdir=.
5559 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5560 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5561 *) # Relative path.
5562 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5563 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5564 esac
5565
5566 case "$ac_given_INSTALL" in
5567 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5568 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5569 esac
b1e77ec1 5570
090089c4 5571 echo creating "$ac_file"
5572 rm -f "$ac_file"
5573 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5574 case "$ac_file" in
5575 *Makefile*) ac_comsub="1i\\
5576# $configure_input" ;;
5577 *) ac_comsub= ;;
5578 esac
133b6d90 5579
5580 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
090089c4 5581 sed -e "$ac_comsub
5582s%@configure_input@%$configure_input%g
5583s%@srcdir@%$srcdir%g
5584s%@top_srcdir@%$top_srcdir%g
5585s%@INSTALL@%$INSTALL%g
133b6d90 5586" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
090089c4 5587fi; done
b1e77ec1 5588rm -f conftest.s*
090089c4 5589
5590# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5591# NAME is the cpp macro being defined and VALUE is the value it is being given.
5592#
5593# ac_d sets the value in "#define NAME VALUE" lines.
5594ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5595ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5596ac_dC='\3'
5597ac_dD='%g'
5598# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5599ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5600ac_uB='\([ ]\)%\1#\2define\3'
5601ac_uC=' '
5602ac_uD='\4%g'
5603# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5604ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5605ac_eB='$%\1#\2define\3'
5606ac_eC=' '
5607ac_eD='%g'
5608
133b6d90 5609if test "${CONFIG_HEADERS+set}" != set; then
b1e77ec1 5610EOF
5611cat >> $CONFIG_STATUS <<EOF
5612 CONFIG_HEADERS="include/autoconf.h"
5613EOF
5614cat >> $CONFIG_STATUS <<\EOF
5615fi
090089c4 5616for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
133b6d90 5617 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
090089c4 5618 case "$ac_file" in
133b6d90 5619 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
090089c4 5620 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5621 *) ac_file_in="${ac_file}.in" ;;
5622 esac
5623
5624 echo creating $ac_file
5625
5626 rm -f conftest.frag conftest.in conftest.out
133b6d90 5627 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5628 cat $ac_file_inputs > conftest.in
090089c4 5629
5630EOF
5631
5632# Transform confdefs.h into a sed script conftest.vals that substitutes
5633# the proper values into config.h.in to produce config.h. And first:
5634# Protect against being on the right side of a sed subst in config.status.
5635# Protect against being in an unquoted here document in config.status.
5636rm -f conftest.vals
5637cat > conftest.hdr <<\EOF
5638s/[\\&%]/\\&/g
5639s%[\\$`]%\\&%g
03a0d3b0 5640s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
090089c4 5641s%ac_d%ac_u%gp
5642s%ac_u%ac_e%gp
5643EOF
5644sed -n -f conftest.hdr confdefs.h > conftest.vals
5645rm -f conftest.hdr
5646
5647# This sed command replaces #undef with comments. This is necessary, for
5648# example, in the case of _POSIX_SOURCE, which is predefined and required
5649# on some systems where configure will not decide to define it.
5650cat >> conftest.vals <<\EOF
5651s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5652EOF
5653
5654# Break up conftest.vals because some shells have a limit on
5655# the size of here documents, and old seds have small limits too.
090089c4 5656
5657rm -f conftest.tail
5658while :
5659do
5660 ac_lines=`grep -c . conftest.vals`
5661 # grep -c gives empty output for an empty file on some AIX systems.
5662 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5663 # Write a limited-size here document to conftest.frag.
5664 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5665 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5666 echo 'CEOF
5667 sed -f conftest.frag conftest.in > conftest.out
5668 rm -f conftest.in
5669 mv conftest.out conftest.in
5670' >> $CONFIG_STATUS
5671 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5672 rm -f conftest.vals
5673 mv conftest.tail conftest.vals
5674done
5675rm -f conftest.vals
5676
5677cat >> $CONFIG_STATUS <<\EOF
5678 rm -f conftest.frag conftest.h
5679 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5680 cat conftest.in >> conftest.h
5681 rm -f conftest.in
5682 if cmp -s $ac_file conftest.h 2>/dev/null; then
5683 echo "$ac_file is unchanged"
5684 rm -f conftest.h
5685 else
03a0d3b0 5686 # Remove last slash and all that follows it. Not all systems have dirname.
5687 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5688 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5689 # The file is in a subdirectory.
5690 test ! -d "$ac_dir" && mkdir "$ac_dir"
5691 fi
090089c4 5692 rm -f $ac_file
5693 mv conftest.h $ac_file
5694 fi
5695fi; done
5696
133b6d90 5697EOF
5698cat >> $CONFIG_STATUS <<EOF
090089c4 5699
133b6d90 5700EOF
5701cat >> $CONFIG_STATUS <<\EOF
090089c4 5702
5703exit 0
5704EOF
5705chmod +x $CONFIG_STATUS
5706rm -fr confdefs* $ac_clean_files
5707test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5708