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