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