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