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