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