]> The Tcpdump Group git mirrors - tcpdump/blob - configure
KNF
[tcpdump] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.166
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 fi
1188 echo "$ac_t""$ac_cv___attribute__" 1>&6
1189
1190
1191 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1192 echo "configure:1193: checking how to run the C preprocessor" >&5
1193 # On Suns, sometimes $CPP names a directory.
1194 if test -n "$CPP" && test -d "$CPP"; then
1195 CPP=
1196 fi
1197 if test -z "$CPP"; then
1198 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201 # This must be in double quotes, not single quotes, because CPP may get
1202 # substituted into the Makefile and "${CC-cc}" will confuse make.
1203 CPP="${CC-cc} -E"
1204 # On the NeXT, cc -E runs the code through the compiler's parser,
1205 # not just through cpp.
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1209 #include <assert.h>
1210 Syntax Error
1211 EOF
1212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1213 { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1215 if test -z "$ac_err"; then
1216 :
1217 else
1218 echo "$ac_err" >&5
1219 echo "configure: failed program was:" >&5
1220 cat conftest.$ac_ext >&5
1221 rm -rf conftest*
1222 CPP="${CC-cc} -E -traditional-cpp"
1223 cat > conftest.$ac_ext <<EOF
1224 #line 1225 "configure"
1225 #include "confdefs.h"
1226 #include <assert.h>
1227 Syntax Error
1228 EOF
1229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1230 { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1232 if test -z "$ac_err"; then
1233 :
1234 else
1235 echo "$ac_err" >&5
1236 echo "configure: failed program was:" >&5
1237 cat conftest.$ac_ext >&5
1238 rm -rf conftest*
1239 CPP="${CC-cc} -nologo -E"
1240 cat > conftest.$ac_ext <<EOF
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243 #include <assert.h>
1244 Syntax Error
1245 EOF
1246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1247 { (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1249 if test -z "$ac_err"; then
1250 :
1251 else
1252 echo "$ac_err" >&5
1253 echo "configure: failed program was:" >&5
1254 cat conftest.$ac_ext >&5
1255 rm -rf conftest*
1256 CPP=/lib/cpp
1257 fi
1258 rm -f conftest*
1259 fi
1260 rm -f conftest*
1261 fi
1262 rm -f conftest*
1263 ac_cv_prog_CPP="$CPP"
1264 fi
1265 CPP="$ac_cv_prog_CPP"
1266 else
1267 ac_cv_prog_CPP="$CPP"
1268 fi
1269 echo "$ac_t""$CPP" 1>&6
1270
1271 for ac_hdr in fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h netinet/ether.h
1272 do
1273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1275 echo "configure:1276: checking for $ac_hdr" >&5
1276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1277 echo $ac_n "(cached) $ac_c" 1>&6
1278 else
1279 cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282 #include <$ac_hdr>
1283 EOF
1284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1285 { (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1287 if test -z "$ac_err"; then
1288 rm -rf conftest*
1289 eval "ac_cv_header_$ac_safe=yes"
1290 else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
1295 eval "ac_cv_header_$ac_safe=no"
1296 fi
1297 rm -f conftest*
1298 fi
1299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1300 echo "$ac_t""yes" 1>&6
1301 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1302 cat >> confdefs.h <<EOF
1303 #define $ac_tr_hdr 1
1304 EOF
1305
1306 else
1307 echo "$ac_t""no" 1>&6
1308 fi
1309 done
1310
1311 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1312 echo "configure:1313: checking whether time.h and sys/time.h may both be included" >&5
1313 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315 else
1316 cat > conftest.$ac_ext <<EOF
1317 #line 1318 "configure"
1318 #include "confdefs.h"
1319 #include <sys/types.h>
1320 #include <sys/time.h>
1321 #include <time.h>
1322 int main() {
1323 struct tm *tp;
1324 ; return 0; }
1325 EOF
1326 if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1327 rm -rf conftest*
1328 ac_cv_header_time=yes
1329 else
1330 echo "configure: failed program was:" >&5
1331 cat conftest.$ac_ext >&5
1332 rm -rf conftest*
1333 ac_cv_header_time=no
1334 fi
1335 rm -f conftest*
1336 fi
1337
1338 echo "$ac_t""$ac_cv_header_time" 1>&6
1339 if test $ac_cv_header_time = yes; then
1340 cat >> confdefs.h <<\EOF
1341 #define TIME_WITH_SYS_TIME 1
1342 EOF
1343
1344 fi
1345
1346
1347 case "$host_os" in
1348
1349 linux*)
1350 echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1351 echo "configure:1352: checking Linux kernel version" >&5
1352 if test "$cross_compiling" = yes; then
1353 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1354 echo $ac_n "(cached) $ac_c" 1>&6
1355 else
1356 ac_cv_linux_vers=unknown
1357 fi
1358
1359 else
1360 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
1362 else
1363 ac_cv_linux_vers=`uname -r 2>&1 | \
1364 sed -n -e '$s/.* //' -e '$s/\..*//p'`
1365 fi
1366
1367 fi
1368 echo "$ac_t""$ac_cv_linux_vers" 1>&6
1369 if test $ac_cv_linux_vers = unknown ; then
1370 { echo "configure: error: cannot determine linux version when cross-compiling" 1>&2; exit 1; }
1371 fi
1372 if test $ac_cv_linux_vers -lt 2 ; then
1373 { echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
1374 fi
1375 ;;
1376
1377 *)
1378 ;;
1379 esac
1380
1381
1382 for ac_hdr in smi.h
1383 do
1384 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1385 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1386 echo "configure:1387: checking for $ac_hdr" >&5
1387 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390 cat > conftest.$ac_ext <<EOF
1391 #line 1392 "configure"
1392 #include "confdefs.h"
1393 #include <$ac_hdr>
1394 EOF
1395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1396 { (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1398 if test -z "$ac_err"; then
1399 rm -rf conftest*
1400 eval "ac_cv_header_$ac_safe=yes"
1401 else
1402 echo "$ac_err" >&5
1403 echo "configure: failed program was:" >&5
1404 cat conftest.$ac_ext >&5
1405 rm -rf conftest*
1406 eval "ac_cv_header_$ac_safe=no"
1407 fi
1408 rm -f conftest*
1409 fi
1410 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1411 echo "$ac_t""yes" 1>&6
1412 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1413 cat >> confdefs.h <<EOF
1414 #define $ac_tr_hdr 1
1415 EOF
1416
1417 else
1418 echo "$ac_t""no" 1>&6
1419 fi
1420 done
1421
1422 echo $ac_n "checking for smiInit in -lsmi""... $ac_c" 1>&6
1423 echo "configure:1424: checking for smiInit in -lsmi" >&5
1424 ac_lib_var=`echo smi'_'smiInit | sed 'y%./+-%__p_%'`
1425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1426 echo $ac_n "(cached) $ac_c" 1>&6
1427 else
1428 ac_save_LIBS="$LIBS"
1429 LIBS="-lsmi $LIBS"
1430 cat > conftest.$ac_ext <<EOF
1431 #line 1432 "configure"
1432 #include "confdefs.h"
1433 /* Override any gcc2 internal prototype to avoid an error. */
1434 /* We use char because int might match the return type of a gcc2
1435 builtin and then its argument prototype would still apply. */
1436 char smiInit();
1437
1438 int main() {
1439 smiInit()
1440 ; return 0; }
1441 EOF
1442 if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1443 rm -rf conftest*
1444 eval "ac_cv_lib_$ac_lib_var=yes"
1445 else
1446 echo "configure: failed program was:" >&5
1447 cat conftest.$ac_ext >&5
1448 rm -rf conftest*
1449 eval "ac_cv_lib_$ac_lib_var=no"
1450 fi
1451 rm -f conftest*
1452 LIBS="$ac_save_LIBS"
1453
1454 fi
1455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1456 echo "$ac_t""yes" 1>&6
1457 ac_tr_lib=HAVE_LIB`echo smi | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1458 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1459 cat >> confdefs.h <<EOF
1460 #define $ac_tr_lib 1
1461 EOF
1462
1463 LIBS="-lsmi $LIBS"
1464
1465 else
1466 echo "$ac_t""no" 1>&6
1467 fi
1468
1469 if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
1470 then
1471 echo $ac_n "checking whether to enable libsmi""... $ac_c" 1>&6
1472 echo "configure:1473: checking whether to enable libsmi" >&5
1473 if test "$cross_compiling" = yes; then
1474 echo "$ac_t""not when cross-compiling" 1>&6
1475 libsmi=no
1476
1477 else
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1481 /* libsmi available check */
1482 #include <smi.h>
1483 main()
1484 {
1485 int current, revision, age, n;
1486 const int required = 2;
1487 if (smiInit(""))
1488 exit(1);
1489 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
1490 exit(2);
1491 n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
1492 if (n != 3)
1493 exit(3);
1494 if (required < current - age || required > current)
1495 exit(4);
1496 exit(0);
1497 }
1498
1499 EOF
1500 if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1501 then
1502 echo "$ac_t""yes" 1>&6
1503 cat >> confdefs.h <<\EOF
1504 #define LIBSMI 1
1505 EOF
1506
1507 libsmi=yes
1508 else
1509 echo "configure: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1511 rm -fr conftest*
1512 case $? in
1513 1) echo "$ac_t""no - smiInit failed" 1>&6 ;;
1514 2) echo "$ac_t""no - header/library version mismatch" 1>&6 ;;
1515 3) echo "$ac_t""no - can't determine library version" 1>&6 ;;
1516 4) echo "$ac_t""no - too old" 1>&6 ;;
1517 *) echo "$ac_t""no" 1>&6 ;;
1518 esac
1519 libsmi=no
1520 fi
1521 rm -fr conftest*
1522 fi
1523
1524 fi
1525
1526 echo $ac_n "checking whether to enable the possibly-buggy SMB printer""... $ac_c" 1>&6
1527 echo "configure:1528: checking whether to enable the possibly-buggy SMB printer" >&5
1528 # Check whether --enable-smb or --disable-smb was given.
1529 if test "${enable_smb+set}" = set; then
1530 enableval="$enable_smb"
1531 :
1532 else
1533 enableval=yes
1534 fi
1535
1536 case "$enableval" in
1537 yes) echo "$ac_t""yes" 1>&6
1538 echo "configure: warning: The SMB printer may have exploitable buffer overflows!!!" 1>&2
1539 cat >> confdefs.h <<\EOF
1540 #define TCPDUMP_DO_SMB 1
1541 EOF
1542
1543 LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
1544 ;;
1545 *) echo "$ac_t""no" 1>&6
1546 ;;
1547 esac
1548
1549 echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
1550 echo "configure:1551: checking whether to enable ipv6" >&5
1551 # Check whether --enable-ipv6 or --disable-ipv6 was given.
1552 if test "${enable_ipv6+set}" = set; then
1553 enableval="$enable_ipv6"
1554 case "$enableval" in
1555 yes) echo "$ac_t""yes" 1>&6
1556 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"
1557 cat >> confdefs.h <<\EOF
1558 #define INET6 1
1559 EOF
1560
1561 ipv6=yes
1562 ;;
1563 *)
1564 echo "$ac_t""no" 1>&6
1565 ipv6=no
1566 ;;
1567 esac
1568 else
1569 if test "$cross_compiling" = yes; then
1570 echo "$ac_t""no" 1>&6
1571 ipv6=no
1572
1573 else
1574 cat > conftest.$ac_ext <<EOF
1575 #line 1576 "configure"
1576 #include "confdefs.h"
1577 /* AF_INET6 available check */
1578 #include <sys/types.h>
1579 #include <sys/socket.h>
1580 main()
1581 {
1582 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1583 exit(1);
1584 else
1585 exit(0);
1586 }
1587
1588 EOF
1589 if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1590 then
1591 echo "$ac_t""yes" 1>&6
1592 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"
1593 cat >> confdefs.h <<\EOF
1594 #define INET6 1
1595 EOF
1596
1597 ipv6=yes
1598 else
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1601 rm -fr conftest*
1602 echo "$ac_t""no" 1>&6
1603 ipv6=no
1604 fi
1605 rm -fr conftest*
1606 fi
1607
1608 fi
1609
1610
1611 ipv6type=unknown
1612 ipv6lib=none
1613 ipv6trylibc=no
1614
1615 if test "$ipv6" = "yes"; then
1616 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
1617 echo "configure:1618: checking ipv6 stack type" >&5
1618 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
1619 case $i in
1620 inria)
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1624 dnl
1625 #include <netinet/in.h>
1626 #ifdef IPV6_INRIA_VERSION
1627 yes
1628 #endif
1629 EOF
1630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1631 egrep "yes" >/dev/null 2>&1; then
1632 rm -rf conftest*
1633 ipv6type=$i;
1634 CFLAGS="-DINET6 $CFLAGS"
1635 fi
1636 rm -f conftest*
1637
1638 ;;
1639 kame)
1640 cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 dnl
1644 #include <netinet/in.h>
1645 #ifdef __KAME__
1646 yes
1647 #endif
1648 EOF
1649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1650 egrep "yes" >/dev/null 2>&1; then
1651 rm -rf conftest*
1652 ipv6type=$i;
1653 ipv6lib=inet6;
1654 ipv6libdir=/usr/local/v6/lib;
1655 ipv6trylibc=yes;
1656 CFLAGS="-DINET6 $CFLAGS"
1657 fi
1658 rm -f conftest*
1659
1660 ;;
1661 linux-glibc)
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 dnl
1666 #include <features.h>
1667 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
1668 yes
1669 #endif
1670 EOF
1671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1672 egrep "yes" >/dev/null 2>&1; then
1673 rm -rf conftest*
1674 ipv6type=$i;
1675 CFLAGS="-DINET6 $CFLAGS"
1676 fi
1677 rm -f conftest*
1678
1679 ;;
1680 linux-libinet6)
1681 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
1682 ipv6type=$i
1683 ipv6lib=inet6
1684 ipv6libdir=/usr/inet6/lib
1685 ipv6trylibc=yes;
1686 CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
1687 fi
1688 ;;
1689 toshiba)
1690 cat > conftest.$ac_ext <<EOF
1691 #line 1692 "configure"
1692 #include "confdefs.h"
1693 dnl
1694 #include <sys/param.h>
1695 #ifdef _TOSHIBA_INET6
1696 yes
1697 #endif
1698 EOF
1699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1700 egrep "yes" >/dev/null 2>&1; then
1701 rm -rf conftest*
1702 ipv6type=$i;
1703 ipv6lib=inet6;
1704 ipv6libdir=/usr/local/v6/lib;
1705 CFLAGS="-DINET6 $CFLAGS"
1706 fi
1707 rm -f conftest*
1708
1709 ;;
1710 v6d)
1711 cat > conftest.$ac_ext <<EOF
1712 #line 1713 "configure"
1713 #include "confdefs.h"
1714 dnl
1715 #include </usr/local/v6/include/sys/v6config.h>
1716 #ifdef __V6D__
1717 yes
1718 #endif
1719 EOF
1720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1721 egrep "yes" >/dev/null 2>&1; then
1722 rm -rf conftest*
1723 ipv6type=$i;
1724 ipv6lib=v6;
1725 ipv6libdir=/usr/local/v6/lib;
1726 CFLAGS="-I/usr/local/v6/include $CFLAGS"
1727 fi
1728 rm -f conftest*
1729
1730 ;;
1731 zeta)
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1734 "configure"
1734 #include "confdefs.h"
1735 dnl
1736 #include <sys/param.h>
1737 #ifdef _ZETA_MINAMI_INET6
1738 yes
1739 #endif
1740 EOF
1741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1742 egrep "yes" >/dev/null 2>&1; then
1743 rm -rf conftest*
1744 ipv6type=$i;
1745 ipv6lib=inet6;
1746 ipv6libdir=/usr/local/v6/lib;
1747 CFLAGS="-DINET6 $CFLAGS"
1748 fi
1749 rm -f conftest*
1750
1751 ;;
1752 esac
1753 if test "$ipv6type" != "unknown"; then
1754 break
1755 fi
1756 done
1757 echo "$ac_t""$ipv6type" 1>&6
1758 fi
1759
1760 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1761 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1762 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1763 echo "You have $ipv6lib library, using it"
1764 else
1765 if test "$ipv6trylibc" = "yes"; then
1766 echo "You do not have $ipv6lib library, using libc"
1767 else
1768 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1769 echo "You need to fetch lib$ipv6lib.a from appropriate"
1770 echo 'ipv6 kit and compile beforehand.'
1771 exit 1
1772 fi
1773 fi
1774 fi
1775
1776
1777 if test "$ipv6" = "yes"; then
1778 #
1779 # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
1780 # function in libc; there are "ngetaddrinfo()" and
1781 # "ogetaddrinfo()" functions, and <netdb.h> #defines
1782 # "getaddrinfo" to be either "ngetaddrinfo" or
1783 # "ogetaddrinfo", depending on whether _SOCKADDR_LEN
1784 # or _XOPEN_SOURCE_EXTENDED are defined or not.
1785 #
1786 # So this test doesn't work on Tru64 5.1, and possibly
1787 # on other 5.x releases. This causes the configure
1788 # script to become confused, and results in libpcap
1789 # being unbuildable.
1790 #
1791
1792 echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
1793 echo "configure:1794: checking for library containing getaddrinfo" >&5
1794 if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
1795 echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797 ac_func_search_save_LIBS="$LIBS"
1798 ac_cv_search_getaddrinfo="no"
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 /* Override any gcc2 internal prototype to avoid an error. */
1803 /* We use char because int might match the return type of a gcc2
1804 builtin and then its argument prototype would still apply. */
1805 char getaddrinfo();
1806
1807 int main() {
1808 getaddrinfo()
1809 ; return 0; }
1810 EOF
1811 if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1812 rm -rf conftest*
1813 ac_cv_search_getaddrinfo="none required"
1814 else
1815 echo "configure: failed program was:" >&5
1816 cat conftest.$ac_ext >&5
1817 fi
1818 rm -f conftest*
1819 test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do
1820 LIBS="-l$i $ac_func_search_save_LIBS"
1821 cat > conftest.$ac_ext <<EOF
1822 #line 1823 "configure"
1823 #include "confdefs.h"
1824 /* Override any gcc2 internal prototype to avoid an error. */
1825 /* We use char because int might match the return type of a gcc2
1826 builtin and then its argument prototype would still apply. */
1827 char getaddrinfo();
1828
1829 int main() {
1830 getaddrinfo()
1831 ; return 0; }
1832 EOF
1833 if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1834 rm -rf conftest*
1835 ac_cv_search_getaddrinfo="-l$i"
1836 break
1837 else
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1840 fi
1841 rm -f conftest*
1842 done
1843 LIBS="$ac_func_search_save_LIBS"
1844 fi
1845
1846 echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
1847 if test "$ac_cv_search_getaddrinfo" != "no"; then
1848 test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
1849 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
1850 echo "configure:1851: checking getaddrinfo bug" >&5
1851 if eval "test \"`echo '$''{'td_cv_buggygetaddrinfo'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1853 else
1854 if test "$cross_compiling" = yes; then
1855 td_cv_buggygetaddrinfo=yes
1856 else
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860
1861 #include <sys/types.h>
1862 #include <netdb.h>
1863 #include <string.h>
1864 #include <sys/socket.h>
1865 #include <netinet/in.h>
1866
1867 main()
1868 {
1869 int passive, gaierr, inet4 = 0, inet6 = 0;
1870 struct addrinfo hints, *ai, *aitop;
1871 char straddr[INET6_ADDRSTRLEN], strport[16];
1872
1873 for (passive = 0; passive <= 1; passive++) {
1874 memset(&hints, 0, sizeof(hints));
1875 hints.ai_family = AF_UNSPEC;
1876 hints.ai_flags = passive ? AI_PASSIVE : 0;
1877 hints.ai_socktype = SOCK_STREAM;
1878 hints.ai_protocol = IPPROTO_TCP;
1879 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
1880 (void)gai_strerror(gaierr);
1881 goto bad;
1882 }
1883 for (ai = aitop; ai; ai = ai->ai_next) {
1884 if (ai->ai_addr == NULL ||
1885 ai->ai_addrlen == 0 ||
1886 getnameinfo(ai->ai_addr, ai->ai_addrlen,
1887 straddr, sizeof(straddr), strport, sizeof(strport),
1888 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
1889 goto bad;
1890 }
1891 switch (ai->ai_family) {
1892 case AF_INET:
1893 if (strcmp(strport, "54321") != 0) {
1894 goto bad;
1895 }
1896 if (passive) {
1897 if (strcmp(straddr, "0.0.0.0") != 0) {
1898 goto bad;
1899 }
1900 } else {
1901 if (strcmp(straddr, "127.0.0.1") != 0) {
1902 goto bad;
1903 }
1904 }
1905 inet4++;
1906 break;
1907 case AF_INET6:
1908 if (strcmp(strport, "54321") != 0) {
1909 goto bad;
1910 }
1911 if (passive) {
1912 if (strcmp(straddr, "::") != 0) {
1913 goto bad;
1914 }
1915 } else {
1916 if (strcmp(straddr, "::1") != 0) {
1917 goto bad;
1918 }
1919 }
1920 inet6++;
1921 break;
1922 case AF_UNSPEC:
1923 goto bad;
1924 break;
1925 #ifdef AF_UNIX
1926 case AF_UNIX:
1927 #else
1928 #ifdef AF_LOCAL
1929 case AF_LOCAL:
1930 #endif
1931 #endif
1932 default:
1933 /* another family support? */
1934 break;
1935 }
1936 }
1937 }
1938
1939 /* supported family should be 2, unsupported family should be 0 */
1940 if (!(inet4 == 0 || inet4 == 2))
1941 goto bad;
1942 if (!(inet6 == 0 || inet6 == 2))
1943 goto bad;
1944
1945 if (aitop)
1946 freeaddrinfo(aitop);
1947 exit(0);
1948
1949 bad:
1950 if (aitop)
1951 freeaddrinfo(aitop);
1952 exit(1);
1953 }
1954
1955 EOF
1956 if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1957 then
1958 td_cv_buggygetaddrinfo=no
1959 else
1960 echo "configure: failed program was:" >&5
1961 cat conftest.$ac_ext >&5
1962 rm -fr conftest*
1963 td_cv_buggygetaddrinfo=yes
1964 fi
1965 rm -fr conftest*
1966 fi
1967
1968 fi
1969
1970 if test "$td_cv_buggygetaddrinfo" = no; then
1971 echo "$ac_t""good" 1>&6
1972 else
1973 echo "$ac_t""buggy" 1>&6
1974 fi
1975
1976 if test "$td_cv_buggygetaddrinfo" = "yes"; then
1977 #
1978 # XXX - it doesn't appear that "ipv6type" can ever be
1979 # set to "linux". Should this be testing for
1980 # "linux-glibc", or for that *or* "linux-libinet6"?
1981 # If the latter, note that "linux-libinet6" is also
1982 # the type given to some non-Linux OSes.
1983 #
1984 if test "$ipv6type" != "linux"; then
1985 echo 'Fatal: You must get working getaddrinfo() function.'
1986 echo ' or you can specify "--disable-ipv6"'.
1987 exit 1
1988 else
1989 echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
1990 echo ' Better upgrade your system library to newest version'
1991 echo ' of GNU C library (aka glibc).'
1992 fi
1993 fi
1994
1995 else :
1996
1997 fi
1998 for ac_func in getaddrinfo getnameinfo
1999 do
2000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2001 echo "configure:2002: checking for $ac_func" >&5
2002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2003 echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005 cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 /* System header to define __stub macros and hopefully few prototypes,
2009 which can conflict with char $ac_func(); below. */
2010 #include <assert.h>
2011 /* Override any gcc2 internal prototype to avoid an error. */
2012 /* We use char because int might match the return type of a gcc2
2013 builtin and then its argument prototype would still apply. */
2014 char $ac_func();
2015
2016 int main() {
2017
2018 /* The GNU C library defines this for functions which it implements
2019 to always fail with ENOSYS. Some functions are actually named
2020 something starting with __ and the normal name is an alias. */
2021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2022 choke me
2023 #else
2024 $ac_func();
2025 #endif
2026
2027 ; return 0; }
2028 EOF
2029 if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2030 rm -rf conftest*
2031 eval "ac_cv_func_$ac_func=yes"
2032 else
2033 echo "configure: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 rm -rf conftest*
2036 eval "ac_cv_func_$ac_func=no"
2037 fi
2038 rm -f conftest*
2039 fi
2040
2041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2042 echo "$ac_t""yes" 1>&6
2043 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2044 cat >> confdefs.h <<EOF
2045 #define $ac_tr_func 1
2046 EOF
2047
2048 else
2049 echo "$ac_t""no" 1>&6
2050 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2051 fi
2052 done
2053
2054
2055 fi
2056
2057 echo $ac_n "checking for dnet_htoa declaration in netdnet/dnetdb.h""... $ac_c" 1>&6
2058 echo "configure:2059: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
2059 if eval "test \"`echo '$''{'td_cv_decl_netdnet_dnetdb_h_dnet_htoa'+set}'`\" = set"; then
2060 echo $ac_n "(cached) $ac_c" 1>&6
2061 else
2062 cat > conftest.$ac_ext <<EOF
2063 #line 2064 "configure"
2064 #include "confdefs.h"
2065 #include <netdnet/dnetdb.h>
2066 EOF
2067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2068 egrep "dnet_htoa" >/dev/null 2>&1; then
2069 rm -rf conftest*
2070 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
2071 else
2072 rm -rf conftest*
2073 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
2074 fi
2075 rm -f conftest*
2076
2077 fi
2078
2079 echo "$ac_t""$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" 1>&6
2080 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
2081 cat >> confdefs.h <<\EOF
2082 #define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1
2083 EOF
2084
2085 fi
2086
2087 echo $ac_n "checking size of char""... $ac_c" 1>&6
2088 echo "configure:2089: checking size of char" >&5
2089 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2090 echo $ac_n "(cached) $ac_c" 1>&6
2091 else
2092 if test "$cross_compiling" = yes; then
2093 ac_cv_sizeof_char=1
2094 else
2095 cat > conftest.$ac_ext <<EOF
2096 #line 2097 "configure"
2097 #include "confdefs.h"
2098 #include <stdio.h>
2099 main()
2100 {
2101 FILE *f=fopen("conftestval", "w");
2102 if (!f) exit(1);
2103 fprintf(f, "%d\n", sizeof(char));
2104 exit(0);
2105 }
2106 EOF
2107 if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2108 then
2109 ac_cv_sizeof_char=`cat conftestval`
2110 else
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2113 rm -fr conftest*
2114 ac_cv_sizeof_char=0
2115 fi
2116 rm -fr conftest*
2117 fi
2118
2119 fi
2120 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2121 cat >> confdefs.h <<EOF
2122 #define SIZEOF_CHAR $ac_cv_sizeof_char
2123 EOF
2124
2125
2126 echo $ac_n "checking size of short""... $ac_c" 1>&6
2127 echo "configure:2128: checking size of short" >&5
2128 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131 if test "$cross_compiling" = yes; then
2132 ac_cv_sizeof_short=2
2133 else
2134 cat > conftest.$ac_ext <<EOF
2135 #line 2136 "configure"
2136 #include "confdefs.h"
2137 #include <stdio.h>
2138 main()
2139 {
2140 FILE *f=fopen("conftestval", "w");
2141 if (!f) exit(1);
2142 fprintf(f, "%d\n", sizeof(short));
2143 exit(0);
2144 }
2145 EOF
2146 if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2147 then
2148 ac_cv_sizeof_short=`cat conftestval`
2149 else
2150 echo "configure: failed program was:" >&5
2151 cat conftest.$ac_ext >&5
2152 rm -fr conftest*
2153 ac_cv_sizeof_short=0
2154 fi
2155 rm -fr conftest*
2156 fi
2157
2158 fi
2159 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2160 cat >> confdefs.h <<EOF
2161 #define SIZEOF_SHORT $ac_cv_sizeof_short
2162 EOF
2163
2164
2165 echo $ac_n "checking size of int""... $ac_c" 1>&6
2166 echo "configure:2167: checking size of int" >&5
2167 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2168 echo $ac_n "(cached) $ac_c" 1>&6
2169 else
2170 if test "$cross_compiling" = yes; then
2171 ac_cv_sizeof_int=4
2172 else
2173 cat > conftest.$ac_ext <<EOF
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176 #include <stdio.h>
2177 main()
2178 {
2179 FILE *f=fopen("conftestval", "w");
2180 if (!f) exit(1);
2181 fprintf(f, "%d\n", sizeof(int));
2182 exit(0);
2183 }
2184 EOF
2185 if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2186 then
2187 ac_cv_sizeof_int=`cat conftestval`
2188 else
2189 echo "configure: failed program was:" >&5
2190 cat conftest.$ac_ext >&5
2191 rm -fr conftest*
2192 ac_cv_sizeof_int=0
2193 fi
2194 rm -fr conftest*
2195 fi
2196
2197 fi
2198 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2199 cat >> confdefs.h <<EOF
2200 #define SIZEOF_INT $ac_cv_sizeof_int
2201 EOF
2202
2203
2204 echo $ac_n "checking size of long""... $ac_c" 1>&6
2205 echo "configure:2206: checking size of long" >&5
2206 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2207 echo $ac_n "(cached) $ac_c" 1>&6
2208 else
2209 if test "$cross_compiling" = yes; then
2210 ac_cv_sizeof_long=4
2211 else
2212 cat > conftest.$ac_ext <<EOF
2213 #line 2214 "configure"
2214 #include "confdefs.h"
2215 #include <stdio.h>
2216 main()
2217 {
2218 FILE *f=fopen("conftestval", "w");
2219 if (!f) exit(1);
2220 fprintf(f, "%d\n", sizeof(long));
2221 exit(0);
2222 }
2223 EOF
2224 if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2225 then
2226 ac_cv_sizeof_long=`cat conftestval`
2227 else
2228 echo "configure: failed program was:" >&5
2229 cat conftest.$ac_ext >&5
2230 rm -fr conftest*
2231 ac_cv_sizeof_long=0
2232 fi
2233 rm -fr conftest*
2234 fi
2235
2236 fi
2237 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2238 cat >> confdefs.h <<EOF
2239 #define SIZEOF_LONG $ac_cv_sizeof_long
2240 EOF
2241
2242
2243
2244
2245
2246 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
2247 echo "configure:2248: checking for addrinfo" >&5
2248 if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
2249 echo $ac_n "(cached) $ac_c" 1>&6
2250 else
2251 cat > conftest.$ac_ext <<EOF
2252 #line 2253 "configure"
2253 #include "confdefs.h"
2254
2255 # include <netdb.h>
2256 int main() {
2257 struct addrinfo a
2258 ; return 0; }
2259 EOF
2260 if { (eval echo configure:2261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2261 rm -rf conftest*
2262 ac_cv_addrinfo=yes
2263 else
2264 echo "configure: failed program was:" >&5
2265 cat conftest.$ac_ext >&5
2266 rm -rf conftest*
2267 ac_cv_addrinfo=no
2268 fi
2269 rm -f conftest*
2270 fi
2271
2272 echo "$ac_t""$ac_cv_addrinfo" 1>&6
2273 if test $ac_cv_addrinfo = yes; then
2274 cat >> confdefs.h <<\EOF
2275 #define HAVE_ADDRINFO 1
2276 EOF
2277
2278 else
2279 cat >> confdefs.h <<\EOF
2280 #define NEED_ADDRINFO_H 1
2281 EOF
2282
2283 fi
2284
2285 if test "$ac_cv_addrinfo" = no; then
2286 missing_includes=yes
2287 fi
2288
2289
2290 echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
2291 echo "configure:2292: checking for NI_MAXSERV" >&5
2292 if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
2293 echo $ac_n "(cached) $ac_c" 1>&6
2294 else
2295 cat > conftest.$ac_ext <<EOF
2296 #line 2297 "configure"
2297 #include "confdefs.h"
2298 #include <netdb.h>
2299 #ifdef NI_MAXSERV
2300 yes
2301 #endif
2302 EOF
2303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2304 egrep "yes" >/dev/null 2>&1; then
2305 rm -rf conftest*
2306 ac_cv_maxserv=yes
2307 else
2308 rm -rf conftest*
2309 ac_cv_maxserv=no
2310 fi
2311 rm -f conftest*
2312
2313 fi
2314
2315 echo "$ac_t""$ac_cv_maxserv" 1>&6
2316 if test $ac_cv_maxserv != yes; then
2317 cat >> confdefs.h <<\EOF
2318 #define NEED_ADDRINFO_H 1
2319 EOF
2320
2321 fi
2322
2323 if test "$ac_cv_maxserv" = no; then
2324 missing_includes=yes
2325 fi
2326
2327
2328 echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
2329 echo "configure:2330: checking for NI_NAMEREQD" >&5
2330 if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
2331 echo $ac_n "(cached) $ac_c" 1>&6
2332 else
2333 cat > conftest.$ac_ext <<EOF
2334 #line 2335 "configure"
2335 #include "confdefs.h"
2336 #include <netdb.h>
2337 #ifdef NI_NOFQDN
2338 yes
2339 #endif
2340 EOF
2341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2342 egrep "yes" >/dev/null 2>&1; then
2343 rm -rf conftest*
2344 ac_cv_namereqd=yes
2345 else
2346 rm -rf conftest*
2347 ac_cv_namereqd=no
2348 fi
2349 rm -f conftest*
2350
2351 fi
2352
2353 echo "$ac_t""$ac_cv_namereqd" 1>&6
2354 if test $ac_cv_namereqd != yes; then
2355 cat >> confdefs.h <<\EOF
2356 #define NEED_ADDRINFO_H 1
2357 EOF
2358
2359 fi
2360
2361 if test "$ac_cv_namereqd" = no; then
2362 missing_includes=yes
2363 fi
2364
2365
2366 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
2367 echo "configure:2368: checking for sockaddr_storage" >&5
2368 if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
2369 echo $ac_n "(cached) $ac_c" 1>&6
2370 else
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2373 "configure"
2373 #include "confdefs.h"
2374
2375 # include <sys/types.h>
2376 # include <sys/socket.h>
2377 int main() {
2378 struct sockaddr_storage s
2379 ; return 0; }
2380 EOF
2381 if { (eval echo configure:2382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2382 rm -rf conftest*
2383 ac_cv_sa_storage=yes
2384 else
2385 echo "configure: failed program was:" >&5
2386 cat conftest.$ac_ext >&5
2387 rm -rf conftest*
2388 ac_cv_sa_storage=no
2389 fi
2390 rm -f conftest*
2391 fi
2392
2393 echo "$ac_t""$ac_cv_sa_storage" 1>&6
2394 if test $ac_cv_sa_storage = yes; then
2395 cat >> confdefs.h <<\EOF
2396 #define HAVE_SOCKADDR_STORAGE 1
2397 EOF
2398
2399 fi
2400
2401 if test "$ac_cv_sa_storage" = no; then
2402 missing_includes=yes
2403 fi
2404
2405
2406 ac_cv_addrsz=yes
2407 echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
2408 echo "configure:2409: checking for INADDRSZ" >&5
2409 if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
2410 echo $ac_n "(cached) $ac_c" 1>&6
2411 else
2412 cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.h"
2415
2416 # include <arpa/nameser.h>
2417 int main() {
2418 int a = INADDRSZ
2419 ; return 0; }
2420 EOF
2421 if { (eval echo configure:2422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2422 rm -rf conftest*
2423 ac_cv_inaddrsz=yes
2424 else
2425 echo "configure: failed program was:" >&5
2426 cat conftest.$ac_ext >&5
2427 rm -rf conftest*
2428 ac_cv_inaddrsz=no
2429 fi
2430 rm -f conftest*
2431 fi
2432
2433 echo "$ac_t""$ac_cv_inaddrsz" 1>&6
2434 if test $ac_cv_inaddrsz = yes; then
2435 cat >> confdefs.h <<\EOF
2436 #define HAVE_INADDRSZ 1
2437 EOF
2438
2439 else
2440 ac_cv_addrsz=no
2441 fi
2442 echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
2443 echo "configure:2444: checking for IN6ADDRSZ" >&5
2444 if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
2445 echo $ac_n "(cached) $ac_c" 1>&6
2446 else
2447 cat > conftest.$ac_ext <<EOF
2448 #line 2449 "configure"
2449 #include "confdefs.h"
2450
2451 # include <arpa/nameser.h>
2452 int main() {
2453 int a = IN6ADDRSZ
2454 ; return 0; }
2455 EOF
2456 if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2457 rm -rf conftest*
2458 ac_cv_in6addrsz=yes
2459 else
2460 echo "configure: failed program was:" >&5
2461 cat conftest.$ac_ext >&5
2462 rm -rf conftest*
2463 ac_cv_in6addrsz=no
2464 fi
2465 rm -f conftest*
2466 fi
2467
2468 echo "$ac_t""$ac_cv_in6addrsz" 1>&6
2469 if test $ac_cv_in6addrsz = yes; then
2470 cat >> confdefs.h <<\EOF
2471 #define HAVE_IN6ADDRSZ 1
2472 EOF
2473
2474 else
2475 ac_cv_addrsz=no
2476 fi
2477
2478 if test "$ac_cv_addrsz" = no; then
2479 missing_includes=yes
2480 fi
2481
2482
2483 echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
2484 echo "configure:2485: checking for RES_USE_INET6" >&5
2485 if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
2486 echo $ac_n "(cached) $ac_c" 1>&6
2487 else
2488 cat > conftest.$ac_ext <<EOF
2489 #line 2490 "configure"
2490 #include "confdefs.h"
2491
2492 # include <sys/types.h>
2493 # include <netinet/in.h>
2494 # include <resolv.h>
2495 int main() {
2496 int a = RES_USE_INET6
2497 ; return 0; }
2498 EOF
2499 if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2500 rm -rf conftest*
2501 ac_cv_res_inet6=yes
2502 else
2503 echo "configure: failed program was:" >&5
2504 cat conftest.$ac_ext >&5
2505 rm -rf conftest*
2506 ac_cv_res_inet6=no
2507 fi
2508 rm -f conftest*
2509 fi
2510
2511 echo "$ac_t""$ac_cv_res_inet6" 1>&6
2512 if test $ac_cv_res_inet6 = yes; then
2513 cat >> confdefs.h <<\EOF
2514 #define HAVE_RES_USE_INET6 1
2515 EOF
2516
2517 fi
2518
2519 if test "$ac_cv_res_inet6" = no; then
2520 missing_includes=yes
2521 fi
2522
2523
2524 echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
2525 echo "configure:2526: checking for res_state_ext" >&5
2526 if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
2527 echo $ac_n "(cached) $ac_c" 1>&6
2528 else
2529 cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532
2533 # include <sys/types.h>
2534 # include <netinet/in.h>
2535 # include <netinet6/in6.h>
2536 # include <resolv.h>
2537 int main() {
2538 struct __res_state_ext e
2539 ; return 0; }
2540 EOF
2541 if { (eval echo configure:2542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2542 rm -rf conftest*
2543 ac_cv_res_state_ext=yes
2544 else
2545 echo "configure: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2547 rm -rf conftest*
2548 ac_cv_res_state_ext=no
2549 fi
2550 rm -f conftest*
2551 fi
2552
2553 echo "$ac_t""$ac_cv_res_state_ext" 1>&6
2554 if test $ac_cv_res_state_ext = yes; then
2555 cat >> confdefs.h <<\EOF
2556 #define HAVE_RES_STATE_EXT 1
2557 EOF
2558
2559 fi
2560
2561 if test "$ac_cv_res_state_ext" = no; then
2562 missing_includes=yes
2563 fi
2564
2565
2566 echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
2567 echo "configure:2568: checking for nsort in res_state" >&5
2568 if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
2569 echo $ac_n "(cached) $ac_c" 1>&6
2570 else
2571 cat > conftest.$ac_ext <<EOF
2572 #line 2573 "configure"
2573 #include "confdefs.h"
2574
2575 # include <sys/types.h>
2576 # include <netinet/in.h>
2577 # include <netinet6/in6.h>
2578 # include <resolv.h>
2579 int main() {
2580 struct __res_state e; e.nsort = 0
2581 ; return 0; }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2584 rm -rf conftest*
2585 ac_cv_res_state=yes
2586 else
2587 echo "configure: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 rm -rf conftest*
2590 ac_cv_res_state=no
2591 fi
2592 rm -f conftest*
2593 fi
2594
2595 echo "$ac_t""$ac_cv_res_state" 1>&6
2596 if test $ac_cv_res_state = yes; then
2597 cat >> confdefs.h <<\EOF
2598 #define HAVE_NEW_RES_STATE 1
2599 EOF
2600
2601 fi
2602
2603
2604 if test "$missing_includes" = "yes"; then
2605 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
2606 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
2607 fi
2608
2609
2610 for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep
2611 do
2612 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2613 echo "configure:2614: checking for $ac_func" >&5
2614 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2615 echo $ac_n "(cached) $ac_c" 1>&6
2616 else
2617 cat > conftest.$ac_ext <<EOF
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620 /* System header to define __stub macros and hopefully few prototypes,
2621 which can conflict with char $ac_func(); below. */
2622 #include <assert.h>
2623 /* Override any gcc2 internal prototype to avoid an error. */
2624 /* We use char because int might match the return type of a gcc2
2625 builtin and then its argument prototype would still apply. */
2626 char $ac_func();
2627
2628 int main() {
2629
2630 /* The GNU C library defines this for functions which it implements
2631 to always fail with ENOSYS. Some functions are actually named
2632 something starting with __ and the normal name is an alias. */
2633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2634 choke me
2635 #else
2636 $ac_func();
2637 #endif
2638
2639 ; return 0; }
2640 EOF
2641 if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2642 rm -rf conftest*
2643 eval "ac_cv_func_$ac_func=yes"
2644 else
2645 echo "configure: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 rm -rf conftest*
2648 eval "ac_cv_func_$ac_func=no"
2649 fi
2650 rm -f conftest*
2651 fi
2652
2653 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2654 echo "$ac_t""yes" 1>&6
2655 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2656 cat >> confdefs.h <<EOF
2657 #define $ac_tr_func 1
2658 EOF
2659
2660 else
2661 echo "$ac_t""no" 1>&6
2662 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2663 fi
2664 done
2665
2666
2667 for ac_func in ether_ntohost
2668 do
2669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2670 echo "configure:2671: checking for $ac_func" >&5
2671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2672 echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674 cat > conftest.$ac_ext <<EOF
2675 #line 2676 "configure"
2676 #include "confdefs.h"
2677 /* System header to define __stub macros and hopefully few prototypes,
2678 which can conflict with char $ac_func(); below. */
2679 #include <assert.h>
2680 /* Override any gcc2 internal prototype to avoid an error. */
2681 /* We use char because int might match the return type of a gcc2
2682 builtin and then its argument prototype would still apply. */
2683 char $ac_func();
2684
2685 int main() {
2686
2687 /* The GNU C library defines this for functions which it implements
2688 to always fail with ENOSYS. Some functions are actually named
2689 something starting with __ and the normal name is an alias. */
2690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2691 choke me
2692 #else
2693 $ac_func();
2694 #endif
2695
2696 ; return 0; }
2697 EOF
2698 if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2699 rm -rf conftest*
2700 eval "ac_cv_func_$ac_func=yes"
2701 else
2702 echo "configure: failed program was:" >&5
2703 cat conftest.$ac_ext >&5
2704 rm -rf conftest*
2705 eval "ac_cv_func_$ac_func=no"
2706 fi
2707 rm -f conftest*
2708 fi
2709
2710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2711 echo "$ac_t""yes" 1>&6
2712 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2713 cat >> confdefs.h <<EOF
2714 #define $ac_tr_func 1
2715 EOF
2716
2717 echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
2718 echo "configure:2719: checking for buggy ether_ntohost" >&5
2719 if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
2720 echo $ac_n "(cached) $ac_c" 1>&6
2721 else
2722
2723 if test "$cross_compiling" = yes; then
2724 ac_cv_buggy_ether_ntohost="not while cross-compiling"
2725 else
2726 cat > conftest.$ac_ext <<EOF
2727 #line 2728 "configure"
2728 #include "confdefs.h"
2729
2730 #include <netdb.h>
2731 #include <sys/types.h>
2732 #include <sys/param.h>
2733 #include <sys/socket.h>
2734
2735 int
2736 main(int argc, char **argv)
2737 {
2738 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
2739 char name[MAXHOSTNAMELEN];
2740
2741 ether_ntohost(name, (struct ether_addr *)ea);
2742 exit(0);
2743 }
2744
2745 EOF
2746 if { (eval echo configure:2747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2747 then
2748 ac_cv_buggy_ether_ntohost=no
2749 else
2750 echo "configure: failed program was:" >&5
2751 cat conftest.$ac_ext >&5
2752 rm -fr conftest*
2753 ac_cv_buggy_ether_ntohost=yes
2754 fi
2755 rm -fr conftest*
2756 fi
2757
2758 fi
2759
2760 echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6
2761 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
2762 cat >> confdefs.h <<\EOF
2763 #define USE_ETHER_NTOHOST 1
2764 EOF
2765
2766 fi
2767
2768 else
2769 echo "$ac_t""no" 1>&6
2770 fi
2771 done
2772
2773 for ac_func in setlinebuf
2774 do
2775 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2776 echo "configure:2777: checking for $ac_func" >&5
2777 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2778 echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 /* System header to define __stub macros and hopefully few prototypes,
2784 which can conflict with char $ac_func(); below. */
2785 #include <assert.h>
2786 /* Override any gcc2 internal prototype to avoid an error. */
2787 /* We use char because int might match the return type of a gcc2
2788 builtin and then its argument prototype would still apply. */
2789 char $ac_func();
2790
2791 int main() {
2792
2793 /* The GNU C library defines this for functions which it implements
2794 to always fail with ENOSYS. Some functions are actually named
2795 something starting with __ and the normal name is an alias. */
2796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2797 choke me
2798 #else
2799 $ac_func();
2800 #endif
2801
2802 ; return 0; }
2803 EOF
2804 if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2805 rm -rf conftest*
2806 eval "ac_cv_func_$ac_func=yes"
2807 else
2808 echo "configure: failed program was:" >&5
2809 cat conftest.$ac_ext >&5
2810 rm -rf conftest*
2811 eval "ac_cv_func_$ac_func=no"
2812 fi
2813 rm -f conftest*
2814 fi
2815
2816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2817 echo "$ac_t""yes" 1>&6
2818 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2819 cat >> confdefs.h <<EOF
2820 #define $ac_tr_func 1
2821 EOF
2822
2823 else
2824 echo "$ac_t""no" 1>&6
2825 fi
2826 done
2827
2828
2829 needsnprintf=no
2830 for ac_func in vsnprintf snprintf
2831 do
2832 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2833 echo "configure:2834: checking for $ac_func" >&5
2834 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2835 echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837 cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840 /* System header to define __stub macros and hopefully few prototypes,
2841 which can conflict with char $ac_func(); below. */
2842 #include <assert.h>
2843 /* Override any gcc2 internal prototype to avoid an error. */
2844 /* We use char because int might match the return type of a gcc2
2845 builtin and then its argument prototype would still apply. */
2846 char $ac_func();
2847
2848 int main() {
2849
2850 /* The GNU C library defines this for functions which it implements
2851 to always fail with ENOSYS. Some functions are actually named
2852 something starting with __ and the normal name is an alias. */
2853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2854 choke me
2855 #else
2856 $ac_func();
2857 #endif
2858
2859 ; return 0; }
2860 EOF
2861 if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2862 rm -rf conftest*
2863 eval "ac_cv_func_$ac_func=yes"
2864 else
2865 echo "configure: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2867 rm -rf conftest*
2868 eval "ac_cv_func_$ac_func=no"
2869 fi
2870 rm -f conftest*
2871 fi
2872
2873 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2874 echo "$ac_t""yes" 1>&6
2875 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2876 cat >> confdefs.h <<EOF
2877 #define $ac_tr_func 1
2878 EOF
2879
2880 else
2881 echo "$ac_t""no" 1>&6
2882 needsnprintf=yes
2883 fi
2884 done
2885
2886 if test $needsnprintf = yes; then
2887 LIBOBJS="$LIBOBJS snprintf.o"
2888 fi
2889
2890
2891 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2892 echo "configure:2893: checking return type of signal handlers" >&5
2893 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2894 echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896 cat > conftest.$ac_ext <<EOF
2897 #line 2898 "configure"
2898 #include "confdefs.h"
2899 #include <sys/types.h>
2900 #include <signal.h>
2901 #ifdef signal
2902 #undef signal
2903 #endif
2904 #ifdef __cplusplus
2905 extern "C" void (*signal (int, void (*)(int)))(int);
2906 #else
2907 void (*signal ()) ();
2908 #endif
2909
2910 int main() {
2911 int i;
2912 ; return 0; }
2913 EOF
2914 if { (eval echo configure:2915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2915 rm -rf conftest*
2916 ac_cv_type_signal=void
2917 else
2918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
2920 rm -rf conftest*
2921 ac_cv_type_signal=int
2922 fi
2923 rm -f conftest*
2924 fi
2925
2926 echo "$ac_t""$ac_cv_type_signal" 1>&6
2927 cat >> confdefs.h <<EOF
2928 #define RETSIGTYPE $ac_cv_type_signal
2929 EOF
2930
2931
2932 if test "$ac_cv_type_signal" = void ; then
2933 cat >> confdefs.h <<\EOF
2934 #define RETSIGVAL
2935 EOF
2936
2937 else
2938 cat >> confdefs.h <<\EOF
2939 #define RETSIGVAL (0)
2940 EOF
2941
2942 fi
2943 case "$host_os" in
2944
2945 irix*)
2946 cat >> confdefs.h <<\EOF
2947 #define _BSD_SIGNALS 1
2948 EOF
2949
2950 ;;
2951
2952 *)
2953 for ac_func in sigaction
2954 do
2955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2956 echo "configure:2957: checking for $ac_func" >&5
2957 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2958 echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960 cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 /* System header to define __stub macros and hopefully few prototypes,
2964 which can conflict with char $ac_func(); below. */
2965 #include <assert.h>
2966 /* Override any gcc2 internal prototype to avoid an error. */
2967 /* We use char because int might match the return type of a gcc2
2968 builtin and then its argument prototype would still apply. */
2969 char $ac_func();
2970
2971 int main() {
2972
2973 /* The GNU C library defines this for functions which it implements
2974 to always fail with ENOSYS. Some functions are actually named
2975 something starting with __ and the normal name is an alias. */
2976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2977 choke me
2978 #else
2979 $ac_func();
2980 #endif
2981
2982 ; return 0; }
2983 EOF
2984 if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2985 rm -rf conftest*
2986 eval "ac_cv_func_$ac_func=yes"
2987 else
2988 echo "configure: failed program was:" >&5
2989 cat conftest.$ac_ext >&5
2990 rm -rf conftest*
2991 eval "ac_cv_func_$ac_func=no"
2992 fi
2993 rm -f conftest*
2994 fi
2995
2996 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2997 echo "$ac_t""yes" 1>&6
2998 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2999 cat >> confdefs.h <<EOF
3000 #define $ac_tr_func 1
3001 EOF
3002
3003 else
3004 echo "$ac_t""no" 1>&6
3005 fi
3006 done
3007
3008 if test $ac_cv_func_sigaction = no ; then
3009 for ac_func in sigset
3010 do
3011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3012 echo "configure:3013: checking for $ac_func" >&5
3013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3014 echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016 cat > conftest.$ac_ext <<EOF
3017 #line 3018 "configure"
3018 #include "confdefs.h"
3019 /* System header to define __stub macros and hopefully few prototypes,
3020 which can conflict with char $ac_func(); below. */
3021 #include <assert.h>
3022 /* Override any gcc2 internal prototype to avoid an error. */
3023 /* We use char because int might match the return type of a gcc2
3024 builtin and then its argument prototype would still apply. */
3025 char $ac_func();
3026
3027 int main() {
3028
3029 /* The GNU C library defines this for functions which it implements
3030 to always fail with ENOSYS. Some functions are actually named
3031 something starting with __ and the normal name is an alias. */
3032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3033 choke me
3034 #else
3035 $ac_func();
3036 #endif
3037
3038 ; return 0; }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3041 rm -rf conftest*
3042 eval "ac_cv_func_$ac_func=yes"
3043 else
3044 echo "configure: failed program was:" >&5
3045 cat conftest.$ac_ext >&5
3046 rm -rf conftest*
3047 eval "ac_cv_func_$ac_func=no"
3048 fi
3049 rm -f conftest*
3050 fi
3051
3052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3053 echo "$ac_t""yes" 1>&6
3054 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3055 cat >> confdefs.h <<EOF
3056 #define $ac_tr_func 1
3057 EOF
3058
3059 else
3060 echo "$ac_t""no" 1>&6
3061 fi
3062 done
3063
3064 fi
3065 ;;
3066 esac
3067
3068
3069 echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6
3070 echo "configure:3071: checking for library containing dnet_htoa" >&5
3071 if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073 else
3074 ac_func_search_save_LIBS="$LIBS"
3075 ac_cv_search_dnet_htoa="no"
3076 cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 /* Override any gcc2 internal prototype to avoid an error. */
3080 /* We use char because int might match the return type of a gcc2
3081 builtin and then its argument prototype would still apply. */
3082 char dnet_htoa();
3083
3084 int main() {
3085 dnet_htoa()
3086 ; return 0; }
3087 EOF
3088 if { (eval echo configure:3089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3089 rm -rf conftest*
3090 ac_cv_search_dnet_htoa="none required"
3091 else
3092 echo "configure: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3094 fi
3095 rm -f conftest*
3096 test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do
3097 LIBS="-l$i $ac_func_search_save_LIBS"
3098 cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101 /* Override any gcc2 internal prototype to avoid an error. */
3102 /* We use char because int might match the return type of a gcc2
3103 builtin and then its argument prototype would still apply. */
3104 char dnet_htoa();
3105
3106 int main() {
3107 dnet_htoa()
3108 ; return 0; }
3109 EOF
3110 if { (eval echo configure:3111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3111 rm -rf conftest*
3112 ac_cv_search_dnet_htoa="-l$i"
3113 break
3114 else
3115 echo "configure: failed program was:" >&5
3116 cat conftest.$ac_ext >&5
3117 fi
3118 rm -f conftest*
3119 done
3120 LIBS="$ac_func_search_save_LIBS"
3121 fi
3122
3123 echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6
3124 if test "$ac_cv_search_dnet_htoa" != "no"; then
3125 test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS"
3126 cat >> confdefs.h <<\EOF
3127 #define HAVE_DNET_HTOA 1
3128 EOF
3129
3130 else :
3131
3132 fi
3133
3134 echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
3135 echo "configure:3136: checking for main in -lrpc" >&5
3136 ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
3137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3138 echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140 ac_save_LIBS="$LIBS"
3141 LIBS="-lrpc $LIBS"
3142 cat > conftest.$ac_ext <<EOF
3143 #line 3144 "configure"
3144 #include "confdefs.h"
3145
3146 int main() {
3147 main()
3148 ; return 0; }
3149 EOF
3150 if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3151 rm -rf conftest*
3152 eval "ac_cv_lib_$ac_lib_var=yes"
3153 else
3154 echo "configure: failed program was:" >&5
3155 cat conftest.$ac_ext >&5
3156 rm -rf conftest*
3157 eval "ac_cv_lib_$ac_lib_var=no"
3158 fi
3159 rm -f conftest*
3160 LIBS="$ac_save_LIBS"
3161
3162 fi
3163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3164 echo "$ac_t""yes" 1>&6
3165 ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3166 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3167 cat >> confdefs.h <<EOF
3168 #define $ac_tr_lib 1
3169 EOF
3170
3171 LIBS="-lrpc $LIBS"
3172
3173 else
3174 echo "$ac_t""no" 1>&6
3175 fi
3176
3177
3178 echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
3179 echo "configure:3180: checking for library containing getrpcbynumber" >&5
3180 if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
3181 echo $ac_n "(cached) $ac_c" 1>&6
3182 else
3183 ac_func_search_save_LIBS="$LIBS"
3184 ac_cv_search_getrpcbynumber="no"
3185 cat > conftest.$ac_ext <<EOF
3186 #line 3187 "configure"
3187 #include "confdefs.h"
3188 /* Override any gcc2 internal prototype to avoid an error. */
3189 /* We use char because int might match the return type of a gcc2
3190 builtin and then its argument prototype would still apply. */
3191 char getrpcbynumber();
3192
3193 int main() {
3194 getrpcbynumber()
3195 ; return 0; }
3196 EOF
3197 if { (eval echo configure:3198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3198 rm -rf conftest*
3199 ac_cv_search_getrpcbynumber="none required"
3200 else
3201 echo "configure: failed program was:" >&5
3202 cat conftest.$ac_ext >&5
3203 fi
3204 rm -f conftest*
3205 test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
3206 LIBS="-l$i $ac_func_search_save_LIBS"
3207 cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210 /* Override any gcc2 internal prototype to avoid an error. */
3211 /* We use char because int might match the return type of a gcc2
3212 builtin and then its argument prototype would still apply. */
3213 char getrpcbynumber();
3214
3215 int main() {
3216 getrpcbynumber()
3217 ; return 0; }
3218 EOF
3219 if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3220 rm -rf conftest*
3221 ac_cv_search_getrpcbynumber="-l$i"
3222 break
3223 else
3224 echo "configure: failed program was:" >&5
3225 cat conftest.$ac_ext >&5
3226 fi
3227 rm -f conftest*
3228 done
3229 LIBS="$ac_func_search_save_LIBS"
3230 fi
3231
3232 echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6
3233 if test "$ac_cv_search_getrpcbynumber" != "no"; then
3234 test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS"
3235
3236 else :
3237
3238 fi
3239
3240
3241
3242 # Most operating systems have gethostbyname() in the default searched
3243 # libraries (i.e. libc):
3244 # Some OSes (eg. Solaris) place it in libnsl
3245 # Some strange OSes (SINIX) have it in libsocket:
3246
3247 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3248 echo "configure:3249: checking for library containing gethostbyname" >&5
3249 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3250 echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252 ac_func_search_save_LIBS="$LIBS"
3253 ac_cv_search_gethostbyname="no"
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 /* Override any gcc2 internal prototype to avoid an error. */
3258 /* We use char because int might match the return type of a gcc2
3259 builtin and then its argument prototype would still apply. */
3260 char gethostbyname();
3261
3262 int main() {
3263 gethostbyname()
3264 ; return 0; }
3265 EOF
3266 if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3267 rm -rf conftest*
3268 ac_cv_search_gethostbyname="none required"
3269 else
3270 echo "configure: failed program was:" >&5
3271 cat conftest.$ac_ext >&5
3272 fi
3273 rm -f conftest*
3274 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
3275 LIBS="-l$i $ac_func_search_save_LIBS"
3276 cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 /* Override any gcc2 internal prototype to avoid an error. */
3280 /* We use char because int might match the return type of a gcc2
3281 builtin and then its argument prototype would still apply. */
3282 char gethostbyname();
3283
3284 int main() {
3285 gethostbyname()
3286 ; return 0; }
3287 EOF
3288 if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3289 rm -rf conftest*
3290 ac_cv_search_gethostbyname="-l$i"
3291 break
3292 else
3293 echo "configure: failed program was:" >&5
3294 cat conftest.$ac_ext >&5
3295 fi
3296 rm -f conftest*
3297 done
3298 LIBS="$ac_func_search_save_LIBS"
3299 fi
3300
3301 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3302 if test "$ac_cv_search_gethostbyname" != "no"; then
3303 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3304
3305 else :
3306
3307 fi
3308 # Unfortunately libsocket sometimes depends on libnsl and
3309 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
3310 if test "$ac_cv_search_gethostbyname" = "no"
3311 then
3312 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3313 echo "configure:3314: checking for gethostbyname in -lsocket" >&5
3314 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
3315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3316 echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318 ac_save_LIBS="$LIBS"
3319 LIBS="-lsocket -lnsl $LIBS"
3320 cat > conftest.$ac_ext <<EOF
3321 #line 3322 "configure"
3322 #include "confdefs.h"
3323 /* Override any gcc2 internal prototype to avoid an error. */
3324 /* We use char because int might match the return type of a gcc2
3325 builtin and then its argument prototype would still apply. */
3326 char gethostbyname();
3327
3328 int main() {
3329 gethostbyname()
3330 ; return 0; }
3331 EOF
3332 if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3333 rm -rf conftest*
3334 eval "ac_cv_lib_$ac_lib_var=yes"
3335 else
3336 echo "configure: failed program was:" >&5
3337 cat conftest.$ac_ext >&5
3338 rm -rf conftest*
3339 eval "ac_cv_lib_$ac_lib_var=no"
3340 fi
3341 rm -f conftest*
3342 LIBS="$ac_save_LIBS"
3343
3344 fi
3345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3346 echo "$ac_t""yes" 1>&6
3347 LIBS="-lsocket -lnsl $LIBS"
3348 else
3349 echo "$ac_t""no" 1>&6
3350 fi
3351
3352 fi
3353
3354 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
3355 echo "configure:3356: checking for library containing socket" >&5
3356 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359 ac_func_search_save_LIBS="$LIBS"
3360 ac_cv_search_socket="no"
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 /* Override any gcc2 internal prototype to avoid an error. */
3365 /* We use char because int might match the return type of a gcc2
3366 builtin and then its argument prototype would still apply. */
3367 char socket();
3368
3369 int main() {
3370 socket()
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3374 rm -rf conftest*
3375 ac_cv_search_socket="none required"
3376 else
3377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 fi
3380 rm -f conftest*
3381 test "$ac_cv_search_socket" = "no" && for i in socket; do
3382 LIBS="-l$i $ac_func_search_save_LIBS"
3383 cat > conftest.$ac_ext <<EOF
3384 #line 3385 "configure"
3385 #include "confdefs.h"
3386 /* Override any gcc2 internal prototype to avoid an error. */
3387 /* We use char because int might match the return type of a gcc2
3388 builtin and then its argument prototype would still apply. */
3389 char socket();
3390
3391 int main() {
3392 socket()
3393 ; return 0; }
3394 EOF
3395 if { (eval echo configure:3396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3396 rm -rf conftest*
3397 ac_cv_search_socket="-l$i"
3398 break
3399 else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 fi
3403 rm -f conftest*
3404 done
3405 LIBS="$ac_func_search_save_LIBS"
3406 fi
3407
3408 echo "$ac_t""$ac_cv_search_socket" 1>&6
3409 if test "$ac_cv_search_socket" != "no"; then
3410 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
3411
3412 else :
3413 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3414 echo "configure:3415: checking for socket in -lsocket" >&5
3415 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3416 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3417 echo $ac_n "(cached) $ac_c" 1>&6
3418 else
3419 ac_save_LIBS="$LIBS"
3420 LIBS="-lsocket -lnsl $LIBS"
3421 cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 /* Override any gcc2 internal prototype to avoid an error. */
3425 /* We use char because int might match the return type of a gcc2
3426 builtin and then its argument prototype would still apply. */
3427 char socket();
3428
3429 int main() {
3430 socket()
3431 ; return 0; }
3432 EOF
3433 if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3434 rm -rf conftest*
3435 eval "ac_cv_lib_$ac_lib_var=yes"
3436 else
3437 echo "configure: failed program was:" >&5
3438 cat conftest.$ac_ext >&5
3439 rm -rf conftest*
3440 eval "ac_cv_lib_$ac_lib_var=no"
3441 fi
3442 rm -f conftest*
3443 LIBS="$ac_save_LIBS"
3444
3445 fi
3446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3447 echo "$ac_t""yes" 1>&6
3448 LIBS="-lsocket -lnsl $LIBS"
3449 else
3450 echo "$ac_t""no" 1>&6
3451 fi
3452
3453 fi
3454 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3455
3456 echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
3457 echo "configure:3458: checking for library containing putmsg" >&5
3458 if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461 ac_func_search_save_LIBS="$LIBS"
3462 ac_cv_search_putmsg="no"
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 /* Override any gcc2 internal prototype to avoid an error. */
3467 /* We use char because int might match the return type of a gcc2
3468 builtin and then its argument prototype would still apply. */
3469 char putmsg();
3470
3471 int main() {
3472 putmsg()
3473 ; return 0; }
3474 EOF
3475 if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3476 rm -rf conftest*
3477 ac_cv_search_putmsg="none required"
3478 else
3479 echo "configure: failed program was:" >&5
3480 cat conftest.$ac_ext >&5
3481 fi
3482 rm -f conftest*
3483 test "$ac_cv_search_putmsg" = "no" && for i in str; do
3484 LIBS="-l$i $ac_func_search_save_LIBS"
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 /* Override any gcc2 internal prototype to avoid an error. */
3489 /* We use char because int might match the return type of a gcc2
3490 builtin and then its argument prototype would still apply. */
3491 char putmsg();
3492
3493 int main() {
3494 putmsg()
3495 ; return 0; }
3496 EOF
3497 if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3498 rm -rf conftest*
3499 ac_cv_search_putmsg="-l$i"
3500 break
3501 else
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3504 fi
3505 rm -f conftest*
3506 done
3507 LIBS="$ac_func_search_save_LIBS"
3508 fi
3509
3510 echo "$ac_t""$ac_cv_search_putmsg" 1>&6
3511 if test "$ac_cv_search_putmsg" != "no"; then
3512 test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
3513
3514 else :
3515
3516 fi
3517
3518
3519 LBL_LIBS="$LIBS"
3520 pfopen=/usr/examples/packetfilter/pfopen.c
3521 if test -f $pfopen ; then
3522 for ac_func in pfopen
3523 do
3524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3525 echo "configure:3526: checking for $ac_func" >&5
3526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3527 echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529 cat > conftest.$ac_ext <<EOF
3530 #line 3531 "configure"
3531 #include "confdefs.h"
3532 /* System header to define __stub macros and hopefully few prototypes,
3533 which can conflict with char $ac_func(); below. */
3534 #include <assert.h>
3535 /* Override any gcc2 internal prototype to avoid an error. */
3536 /* We use char because int might match the return type of a gcc2
3537 builtin and then its argument prototype would still apply. */
3538 char $ac_func();
3539
3540 int main() {
3541
3542 /* The GNU C library defines this for functions which it implements
3543 to always fail with ENOSYS. Some functions are actually named
3544 something starting with __ and the normal name is an alias. */
3545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3546 choke me
3547 #else
3548 $ac_func();
3549 #endif
3550
3551 ; return 0; }
3552 EOF
3553 if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3554 rm -rf conftest*
3555 eval "ac_cv_func_$ac_func=yes"
3556 else
3557 echo "configure: failed program was:" >&5
3558 cat conftest.$ac_ext >&5
3559 rm -rf conftest*
3560 eval "ac_cv_func_$ac_func=no"
3561 fi
3562 rm -f conftest*
3563 fi
3564
3565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3566 echo "$ac_t""yes" 1>&6
3567 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3568 cat >> confdefs.h <<EOF
3569 #define $ac_tr_func 1
3570 EOF
3571
3572 else
3573 echo "$ac_t""no" 1>&6
3574 fi
3575 done
3576
3577 if test $ac_cv_func_pfopen = "no" ; then
3578 echo "$ac_t""Using $pfopen" 1>&6
3579 LIBS="$LIBS $pfopen"
3580 fi
3581 fi
3582 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3583 echo "configure:3584: checking for local pcap library" >&5
3584 libpcap=FAIL
3585 lastdir=FAIL
3586 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3587 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3588 for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
3589 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3590 if test $lastdir = $basedir ; then
3591 continue;
3592 fi
3593 lastdir=$dir
3594 if test -r $dir/libpcap.a ; then
3595 libpcap=$dir/libpcap.a
3596 d=$dir
3597 fi
3598 done
3599 if test $libpcap = FAIL ; then
3600 echo "$ac_t""not found" 1>&6
3601 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3602 echo "configure:3603: checking for main in -lpcap" >&5
3603 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607 ac_save_LIBS="$LIBS"
3608 LIBS="-lpcap $LIBS"
3609 cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612
3613 int main() {
3614 main()
3615 ; return 0; }
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3618 rm -rf conftest*
3619 eval "ac_cv_lib_$ac_lib_var=yes"
3620 else
3621 echo "configure: failed program was:" >&5
3622 cat conftest.$ac_ext >&5
3623 rm -rf conftest*
3624 eval "ac_cv_lib_$ac_lib_var=no"
3625 fi
3626 rm -f conftest*
3627 LIBS="$ac_save_LIBS"
3628
3629 fi
3630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3631 echo "$ac_t""yes" 1>&6
3632 libpcap="-lpcap"
3633 else
3634 echo "$ac_t""no" 1>&6
3635 fi
3636
3637 if test $libpcap = FAIL ; then
3638 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3639 fi
3640 echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
3641 echo "configure:3642: checking for extraneous pcap header directories" >&5
3642 if test \( ! -r /usr/local/include/pcap.h \) -a \
3643 \( ! -r /usr/include/pcap.h \); then
3644 if test -r /usr/local/include/pcap/pcap.h; then
3645 d="/usr/local/include/pcap"
3646 elif test -r /usr/include/pcap/pcap.h; then
3647 d="/usr/include/pcap"
3648 fi
3649 fi
3650 if test -z "$d" ; then
3651 echo "$ac_t""not found" 1>&6
3652 else
3653 V_INCLS="-I$d $V_INCLS"
3654 echo "$ac_t""found -- -I$d added" 1>&6
3655 fi
3656 else
3657 V_PCAPDEP=$libpcap
3658 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3659 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3660 if test -r $d/pcap.h; then
3661 V_INCLS="-I$d $V_INCLS"
3662 elif test -r $places/pcap.h; then
3663 V_INCLS="-I$places $V_INCLS"
3664 else
3665 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3666 fi
3667 echo "$ac_t""$libpcap" 1>&6
3668 fi
3669 LIBS="$libpcap $LIBS"
3670 case "$host_os" in
3671
3672 aix*)
3673 pseexe="/lib/pse.exp"
3674 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $pseexe" >&5
3676 if test -f $pseexe ; then
3677 echo "$ac_t""yes" 1>&6
3678 LIBS="$LIBS -I:$pseexe"
3679 fi
3680 #
3681 # We need "-lodm" and "-lcfg", as libpcap requires them on
3682 # AIX, and we just build a static libpcap.a and thus can't
3683 # arrange that when you link with libpcap you automatically
3684 # link with those libraries.
3685 #
3686 LIBS="$LIBS -lodm -lcfg"
3687 ;;
3688 esac
3689
3690 echo $ac_n "checking for pcap_list_datalinks""... $ac_c" 1>&6
3691 echo "configure:3692: checking for pcap_list_datalinks" >&5
3692 if eval "test \"`echo '$''{'ac_cv_func_pcap_list_datalinks'+set}'`\" = set"; then
3693 echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695 cat > conftest.$ac_ext <<EOF
3696 #line 3697 "configure"
3697 #include "confdefs.h"
3698 /* System header to define __stub macros and hopefully few prototypes,
3699 which can conflict with char pcap_list_datalinks(); below. */
3700 #include <assert.h>
3701 /* Override any gcc2 internal prototype to avoid an error. */
3702 /* We use char because int might match the return type of a gcc2
3703 builtin and then its argument prototype would still apply. */
3704 char pcap_list_datalinks();
3705
3706 int main() {
3707
3708 /* The GNU C library defines this for functions which it implements
3709 to always fail with ENOSYS. Some functions are actually named
3710 something starting with __ and the normal name is an alias. */
3711 #if defined (__stub_pcap_list_datalinks) || defined (__stub___pcap_list_datalinks)
3712 choke me
3713 #else
3714 pcap_list_datalinks();
3715 #endif
3716
3717 ; return 0; }
3718 EOF
3719 if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3720 rm -rf conftest*
3721 eval "ac_cv_func_pcap_list_datalinks=yes"
3722 else
3723 echo "configure: failed program was:" >&5
3724 cat conftest.$ac_ext >&5
3725 rm -rf conftest*
3726 eval "ac_cv_func_pcap_list_datalinks=no"
3727 fi
3728 rm -f conftest*
3729 fi
3730
3731 if eval "test \"`echo '$ac_cv_func_'pcap_list_datalinks`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3733 cat >> confdefs.h <<\EOF
3734 #define HAVE_PCAP_LIST_DATALINKS 1
3735 EOF
3736
3737 else
3738 echo "$ac_t""no" 1>&6
3739 LIBOBJS="$LIBOBJS datalinks.o"
3740 fi
3741
3742 echo $ac_n "checking for pcap_set_datalink""... $ac_c" 1>&6
3743 echo "configure:3744: checking for pcap_set_datalink" >&5
3744 if eval "test \"`echo '$''{'ac_cv_func_pcap_set_datalink'+set}'`\" = set"; then
3745 echo $ac_n "(cached) $ac_c" 1>&6
3746 else
3747 cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 /* System header to define __stub macros and hopefully few prototypes,
3751 which can conflict with char pcap_set_datalink(); below. */
3752 #include <assert.h>
3753 /* Override any gcc2 internal prototype to avoid an error. */
3754 /* We use char because int might match the return type of a gcc2
3755 builtin and then its argument prototype would still apply. */
3756 char pcap_set_datalink();
3757
3758 int main() {
3759
3760 /* The GNU C library defines this for functions which it implements
3761 to always fail with ENOSYS. Some functions are actually named
3762 something starting with __ and the normal name is an alias. */
3763 #if defined (__stub_pcap_set_datalink) || defined (__stub___pcap_set_datalink)
3764 choke me
3765 #else
3766 pcap_set_datalink();
3767 #endif
3768
3769 ; return 0; }
3770 EOF
3771 if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3772 rm -rf conftest*
3773 eval "ac_cv_func_pcap_set_datalink=yes"
3774 else
3775 echo "configure: failed program was:" >&5
3776 cat conftest.$ac_ext >&5
3777 rm -rf conftest*
3778 eval "ac_cv_func_pcap_set_datalink=no"
3779 fi
3780 rm -f conftest*
3781 fi
3782
3783 if eval "test \"`echo '$ac_cv_func_'pcap_set_datalink`\" = yes"; then
3784 echo "$ac_t""yes" 1>&6
3785 cat >> confdefs.h <<\EOF
3786 #define HAVE_PCAP_SET_DATALINK 1
3787 EOF
3788
3789 else
3790 echo "$ac_t""no" 1>&6
3791 fi
3792
3793 echo $ac_n "checking for pcap_datalink_name_to_val""... $ac_c" 1>&6
3794 echo "configure:3795: checking for pcap_datalink_name_to_val" >&5
3795 if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_name_to_val'+set}'`\" = set"; then
3796 echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798 cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 /* System header to define __stub macros and hopefully few prototypes,
3802 which can conflict with char pcap_datalink_name_to_val(); below. */
3803 #include <assert.h>
3804 /* Override any gcc2 internal prototype to avoid an error. */
3805 /* We use char because int might match the return type of a gcc2
3806 builtin and then its argument prototype would still apply. */
3807 char pcap_datalink_name_to_val();
3808
3809 int main() {
3810
3811 /* The GNU C library defines this for functions which it implements
3812 to always fail with ENOSYS. Some functions are actually named
3813 something starting with __ and the normal name is an alias. */
3814 #if defined (__stub_pcap_datalink_name_to_val) || defined (__stub___pcap_datalink_name_to_val)
3815 choke me
3816 #else
3817 pcap_datalink_name_to_val();
3818 #endif
3819
3820 ; return 0; }
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3823 rm -rf conftest*
3824 eval "ac_cv_func_pcap_datalink_name_to_val=yes"
3825 else
3826 echo "configure: failed program was:" >&5
3827 cat conftest.$ac_ext >&5
3828 rm -rf conftest*
3829 eval "ac_cv_func_pcap_datalink_name_to_val=no"
3830 fi
3831 rm -f conftest*
3832 fi
3833
3834 if eval "test \"`echo '$ac_cv_func_'pcap_datalink_name_to_val`\" = yes"; then
3835 echo "$ac_t""yes" 1>&6
3836 cat >> confdefs.h <<\EOF
3837 #define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
3838 EOF
3839
3840 else
3841 echo "$ac_t""no" 1>&6
3842 LIBOBJS="$LIBOBJS dlnames.o"
3843 fi
3844
3845
3846
3847 #
3848 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
3849 # libraries (e.g., "-lsocket -lnsl" on Solaris).
3850 #
3851 # We don't use AC_REPLACE_FUNCS because that uses AC_CHECK_FUNCS which
3852 # use AC_CHECK_FUNC which doesn't let us specify the right #includes
3853 # to make this work on BSD/OS 4.x. BSD/OS 4.x ships with the BIND8
3854 # resolver, and the way it defines inet_{ntop,pton} is rather strange;
3855 # it does not ship with a libc symbol "inet_ntop()", it ships with
3856 # "_inet_ntop()", and has a #define macro in one of the system headers
3857 # to rename it.
3858 #
3859 echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
3860 echo "configure:3861: checking for inet_ntop" >&5
3861 cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864 #include <sys/types.h>
3865 #include <sys/socket.h>
3866 #include <netinet/in.h>
3867 #include <arpa/inet.h>
3868 int main() {
3869 char src[4], dst[128];
3870 inet_ntop(AF_INET, src, dst, sizeof(dst));
3871 ; return 0; }
3872 EOF
3873 if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3874 rm -rf conftest*
3875 echo "$ac_t""yes" 1>&6
3876 else
3877 echo "configure: failed program was:" >&5
3878 cat conftest.$ac_ext >&5
3879 rm -rf conftest*
3880 echo "$ac_t""no" 1>&6
3881 LIBOBJS="$LIBOBJS inet_ntop.o"
3882 fi
3883 rm -f conftest*
3884 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
3885 echo "configure:3886: checking for inet_pton" >&5
3886 cat > conftest.$ac_ext <<EOF
3887 #line 3888 "configure"
3888 #include "confdefs.h"
3889 #include <sys/types.h>
3890 #include <sys/socket.h>
3891 #include <netinet/in.h>
3892 #include <arpa/inet.h>
3893 int main() {
3894 char src[128], dst[4];
3895 inet_pton(AF_INET, src, dst);
3896 ; return 0; }
3897 EOF
3898 if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3899 rm -rf conftest*
3900 echo "$ac_t""yes" 1>&6
3901 else
3902 echo "configure: failed program was:" >&5
3903 cat conftest.$ac_ext >&5
3904 rm -rf conftest*
3905 echo "$ac_t""no" 1>&6
3906 LIBOBJS="$LIBOBJS inet_pton.o"
3907 fi
3908 rm -f conftest*
3909 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3910 echo "configure:3911: checking for inet_aton" >&5
3911 cat > conftest.$ac_ext <<EOF
3912 #line 3913 "configure"
3913 #include "confdefs.h"
3914 #include <sys/types.h>
3915 #include <netinet/in.h>
3916 #include <arpa/inet.h>
3917 int main() {
3918 char src[128];
3919 struct in_addr dst;
3920 inet_aton(src, &dst);
3921 ; return 0; }
3922 EOF
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3924 rm -rf conftest*
3925 echo "$ac_t""yes" 1>&6
3926 else
3927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 rm -rf conftest*
3930 echo "$ac_t""no" 1>&6
3931 LIBOBJS="$LIBOBJS inet_aton.o"
3932 fi
3933 rm -f conftest*
3934
3935
3936 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
3937 echo "configure:3938: checking if sockaddr struct has sa_len member" >&5
3938 if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
3939 echo $ac_n "(cached) $ac_c" 1>&6
3940 else
3941 cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944
3945 # include <sys/types.h>
3946 # include <sys/socket.h>
3947 int main() {
3948 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
3949 ; return 0; }
3950 EOF
3951 if { (eval echo configure:3952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3952 rm -rf conftest*
3953 ac_cv_sockaddr_has_sa_len=yes
3954 else
3955 echo "configure: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
3957 rm -rf conftest*
3958 ac_cv_sockaddr_has_sa_len=no
3959 fi
3960 rm -f conftest*
3961 fi
3962
3963 echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
3964 if test $ac_cv_sockaddr_has_sa_len = yes ; then
3965 cat >> confdefs.h <<\EOF
3966 #define HAVE_SOCKADDR_SA_LEN 1
3967 EOF
3968
3969 fi
3970
3971 if test "$ac_cv_sockaddr_has_sa_len" = no; then
3972 missing_includes=yes
3973 fi
3974
3975 for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
3976 do
3977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3978 echo "configure:3979: checking for $ac_func" >&5
3979 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3980 echo $ac_n "(cached) $ac_c" 1>&6
3981 else
3982 cat > conftest.$ac_ext <<EOF
3983 #line 3984 "configure"
3984 #include "confdefs.h"
3985 /* System header to define __stub macros and hopefully few prototypes,
3986 which can conflict with char $ac_func(); below. */
3987 #include <assert.h>
3988 /* Override any gcc2 internal prototype to avoid an error. */
3989 /* We use char because int might match the return type of a gcc2
3990 builtin and then its argument prototype would still apply. */
3991 char $ac_func();
3992
3993 int main() {
3994
3995 /* The GNU C library defines this for functions which it implements
3996 to always fail with ENOSYS. Some functions are actually named
3997 something starting with __ and the normal name is an alias. */
3998 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3999 choke me
4000 #else
4001 $ac_func();
4002 #endif
4003
4004 ; return 0; }
4005 EOF
4006 if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4007 rm -rf conftest*
4008 eval "ac_cv_func_$ac_func=yes"
4009 else
4010 echo "configure: failed program was:" >&5
4011 cat conftest.$ac_ext >&5
4012 rm -rf conftest*
4013 eval "ac_cv_func_$ac_func=no"
4014 fi
4015 rm -f conftest*
4016 fi
4017
4018 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4019 echo "$ac_t""yes" 1>&6
4020 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4021 cat >> confdefs.h <<EOF
4022 #define $ac_tr_func 1
4023 EOF
4024
4025 else
4026 echo "$ac_t""no" 1>&6
4027 fi
4028 done
4029
4030 if test $ac_cv_func_pcap_lib_version = "no" ; then
4031 echo $ac_n "checking whether pcap_version is defined by libpcap""... $ac_c" 1>&6
4032 echo "configure:4033: checking whether pcap_version is defined by libpcap" >&5
4033 cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036
4037 int main() {
4038
4039 char *
4040 return_pcap_version(void)
4041 {
4042 extern char pcap_version[];
4043
4044 return pcap_version;
4045 }
4046
4047 ; return 0; }
4048 EOF
4049 if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4050 rm -rf conftest*
4051 ac_lbl_cv_pcap_version_defined=yes
4052 else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055 rm -rf conftest*
4056 ac_lbl_cv_pcap_version_defined=no
4057 fi
4058 rm -f conftest*
4059 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
4060 echo "$ac_t""yes" 1>&6
4061 cat >> confdefs.h <<\EOF
4062 #define HAVE_PCAP_VERSION 1
4063 EOF
4064
4065 else
4066 echo "$ac_t""no" 1>&6
4067 fi
4068 fi
4069 echo $ac_n "checking whether pcap_debug is defined by libpcap""... $ac_c" 1>&6
4070 echo "configure:4071: checking whether pcap_debug is defined by libpcap" >&5
4071 cat > conftest.$ac_ext <<EOF
4072 #line 4073 "configure"
4073 #include "confdefs.h"
4074
4075 int main() {
4076
4077 int
4078 return_pcap_debug(void)
4079 {
4080 extern int pcap_debug;
4081
4082 return pcap_debug;
4083 }
4084
4085 ; return 0; }
4086 EOF
4087 if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4088 rm -rf conftest*
4089 ac_lbl_cv_pcap_debug_defined=yes
4090 else
4091 echo "configure: failed program was:" >&5
4092 cat conftest.$ac_ext >&5
4093 rm -rf conftest*
4094 ac_lbl_cv_pcap_debug_defined=no
4095 fi
4096 rm -f conftest*
4097 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
4098 echo "$ac_t""yes" 1>&6
4099 cat >> confdefs.h <<\EOF
4100 #define HAVE_PCAP_DEBUG 1
4101 EOF
4102
4103 else
4104 echo "$ac_t""no" 1>&6
4105 #
4106 # OK, what about "yydebug"?
4107 #
4108 echo $ac_n "checking whether yydebug is defined by libpcap""... $ac_c" 1>&6
4109 echo "configure:4110: checking whether yydebug is defined by libpcap" >&5
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113
4114 int main() {
4115
4116 int
4117 return_yydebug(void)
4118 {
4119 extern int yydebug;
4120
4121 return yydebug;
4122 }
4123
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127 rm -rf conftest*
4128 ac_lbl_cv_yydebug_defined=yes
4129 else
4130 echo "configure: failed program was:" >&5
4131 cat conftest.$ac_ext >&5
4132 rm -rf conftest*
4133 ac_lbl_cv_yydebug_defined=no
4134 fi
4135 rm -f conftest*
4136 if test "$ac_lbl_cv_yydebug_defined" = yes ; then
4137 echo "$ac_t""yes" 1>&6
4138 cat >> confdefs.h <<\EOF
4139 #define HAVE_YYDEBUG 1
4140 EOF
4141
4142 else
4143 echo "$ac_t""no" 1>&6
4144 fi
4145 fi
4146 for ac_func in bpf_dump
4147 do
4148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4149 echo "configure:4150: checking for $ac_func" >&5
4150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4151 echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153 cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 /* System header to define __stub macros and hopefully few prototypes,
4157 which can conflict with char $ac_func(); below. */
4158 #include <assert.h>
4159 /* Override any gcc2 internal prototype to avoid an error. */
4160 /* We use char because int might match the return type of a gcc2
4161 builtin and then its argument prototype would still apply. */
4162 char $ac_func();
4163
4164 int main() {
4165
4166 /* The GNU C library defines this for functions which it implements
4167 to always fail with ENOSYS. Some functions are actually named
4168 something starting with __ and the normal name is an alias. */
4169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4170 choke me
4171 #else
4172 $ac_func();
4173 #endif
4174
4175 ; return 0; }
4176 EOF
4177 if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4178 rm -rf conftest*
4179 eval "ac_cv_func_$ac_func=yes"
4180 else
4181 echo "configure: failed program was:" >&5
4182 cat conftest.$ac_ext >&5
4183 rm -rf conftest*
4184 eval "ac_cv_func_$ac_func=no"
4185 fi
4186 rm -f conftest*
4187 fi
4188
4189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4190 echo "$ac_t""yes" 1>&6
4191 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4192 cat >> confdefs.h <<EOF
4193 #define $ac_tr_func 1
4194 EOF
4195
4196 else
4197 echo "$ac_t""no" 1>&6
4198 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
4199 fi
4200 done
4201
4202
4203 V_GROUP=0
4204 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
4205 V_GROUP=wheel
4206 fi
4207 case "$host_os" in
4208
4209 aix*)
4210 cat >> confdefs.h <<\EOF
4211 #define _SUN 1
4212 EOF
4213
4214 ;;
4215
4216 irix*)
4217 V_GROUP=sys
4218 ;;
4219
4220 osf*)
4221 V_GROUP=system
4222 ;;
4223
4224 solaris*)
4225 V_GROUP=sys
4226 ;;
4227 esac
4228
4229 if test -f /dev/bpf0 ; then
4230 V_GROUP=bpf
4231 fi
4232
4233 echo $ac_n "checking for int8_t using $CC""... $ac_c" 1>&6
4234 echo "configure:4235: checking for int8_t using $CC" >&5
4235 if eval "test \"`echo '$''{'ac_cv_lbl_have_int8_t'+set}'`\" = set"; then
4236 echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238 cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241
4242 # include "confdefs.h"
4243 # include <sys/types.h>
4244 # if STDC_HEADERS
4245 # include <stdlib.h>
4246 # include <stddef.h>
4247 # endif
4248 int main() {
4249 int8_t i
4250 ; return 0; }
4251 EOF
4252 if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4253 rm -rf conftest*
4254 ac_cv_lbl_have_int8_t=yes
4255 else
4256 echo "configure: failed program was:" >&5
4257 cat conftest.$ac_ext >&5
4258 rm -rf conftest*
4259 ac_cv_lbl_have_int8_t=no
4260 fi
4261 rm -f conftest*
4262 fi
4263
4264 echo "$ac_t""$ac_cv_lbl_have_int8_t" 1>&6
4265 if test $ac_cv_lbl_have_int8_t = no ; then
4266 cat >> confdefs.h <<\EOF
4267 #define int8_t signed char
4268 EOF
4269
4270 fi
4271 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
4272 echo "configure:4273: checking for u_int8_t using $CC" >&5
4273 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
4274 echo $ac_n "(cached) $ac_c" 1>&6
4275 else
4276 cat > conftest.$ac_ext <<EOF
4277 #line 4278 "configure"
4278 #include "confdefs.h"
4279
4280 # include "confdefs.h"
4281 # include <sys/types.h>
4282 # if STDC_HEADERS
4283 # include <stdlib.h>
4284 # include <stddef.h>
4285 # endif
4286 int main() {
4287 u_int8_t i
4288 ; return 0; }
4289 EOF
4290 if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4291 rm -rf conftest*
4292 ac_cv_lbl_have_u_int8_t=yes
4293 else
4294 echo "configure: failed program was:" >&5
4295 cat conftest.$ac_ext >&5
4296 rm -rf conftest*
4297 ac_cv_lbl_have_u_int8_t=no
4298 fi
4299 rm -f conftest*
4300 fi
4301
4302 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
4303 if test $ac_cv_lbl_have_u_int8_t = no ; then
4304 cat >> confdefs.h <<\EOF
4305 #define u_int8_t u_char
4306 EOF
4307
4308 fi
4309 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
4310 echo "configure:4311: checking for int16_t using $CC" >&5
4311 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
4312 echo $ac_n "(cached) $ac_c" 1>&6
4313 else
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317
4318 # include "confdefs.h"
4319 # include <sys/types.h>
4320 # if STDC_HEADERS
4321 # include <stdlib.h>
4322 # include <stddef.h>
4323 # endif
4324 int main() {
4325 int16_t i
4326 ; return 0; }
4327 EOF
4328 if { (eval echo configure:4329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4329 rm -rf conftest*
4330 ac_cv_lbl_have_int16_t=yes
4331 else
4332 echo "configure: failed program was:" >&5
4333 cat conftest.$ac_ext >&5
4334 rm -rf conftest*
4335 ac_cv_lbl_have_int16_t=no
4336 fi
4337 rm -f conftest*
4338 fi
4339
4340 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
4341 if test $ac_cv_lbl_have_int16_t = no ; then
4342 cat >> confdefs.h <<\EOF
4343 #define int16_t short
4344 EOF
4345
4346 fi
4347 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
4348 echo "configure:4349: checking for u_int16_t using $CC" >&5
4349 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_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 u_int16_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_u_int16_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_u_int16_t=no
4374 fi
4375 rm -f conftest*
4376 fi
4377
4378 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
4379 if test $ac_cv_lbl_have_u_int16_t = no ; then
4380 cat >> confdefs.h <<\EOF
4381 #define u_int16_t u_short
4382 EOF
4383
4384 fi
4385 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
4386 echo "configure:4387: checking for int32_t using $CC" >&5
4387 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_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 int32_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_int32_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_int32_t=no
4412 fi
4413 rm -f conftest*
4414 fi
4415
4416 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
4417 if test $ac_cv_lbl_have_int32_t = no ; then
4418 cat >> confdefs.h <<\EOF
4419 #define int32_t int
4420 EOF
4421
4422 fi
4423 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
4424 echo "configure:4425: checking for u_int32_t using $CC" >&5
4425 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_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 u_int32_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_u_int32_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_u_int32_t=no
4450 fi
4451 rm -f conftest*
4452 fi
4453
4454 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
4455 if test $ac_cv_lbl_have_u_int32_t = no ; then
4456 cat >> confdefs.h <<\EOF
4457 #define u_int32_t u_int
4458 EOF
4459
4460 fi
4461
4462 rm -f os-proto.h
4463 if test "${LBL_CFLAGS+set}" = set; then
4464 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
4465 fi
4466 if test -f .devel ; then
4467 if test "$GCC" = yes ; then
4468 if test "${LBL_CFLAGS+set}" != set; then
4469 if test "$ac_cv_prog_cc_g" = yes ; then
4470 V_CCOPT="-g $V_CCOPT"
4471 fi
4472 V_CCOPT="$V_CCOPT -Wall"
4473 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
4474 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
4475 fi
4476 fi
4477 else
4478 case "$host_os" in
4479
4480 irix6*)
4481 V_CCOPT="$V_CCOPT -n32"
4482 ;;
4483
4484 *)
4485 ;;
4486 esac
4487 fi
4488 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
4489 name="lbl/os-$os.h"
4490 if test -f $name ; then
4491 ln -s $name os-proto.h
4492 cat >> confdefs.h <<\EOF
4493 #define HAVE_OS_PROTO_H 1
4494 EOF
4495
4496 else
4497 echo "configure: warning: can't find $name" 1>&2
4498 fi
4499 fi
4500
4501 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4502 echo "configure:4503: checking if sockaddr struct has sa_len member" >&5
4503 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509
4510 # include <sys/types.h>
4511 # include <sys/socket.h>
4512 int main() {
4513 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4514 ; return 0; }
4515 EOF
4516 if { (eval echo configure:4517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4517 rm -rf conftest*
4518 ac_cv_lbl_sockaddr_has_sa_len=yes
4519 else
4520 echo "configure: failed program was:" >&5
4521 cat conftest.$ac_ext >&5
4522 rm -rf conftest*
4523 ac_cv_lbl_sockaddr_has_sa_len=no
4524 fi
4525 rm -f conftest*
4526 fi
4527
4528 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
4529 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
4530 cat >> confdefs.h <<\EOF
4531 #define HAVE_SOCKADDR_SA_LEN 1
4532 EOF
4533
4534 fi
4535
4536 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
4537 echo "configure:4538: checking if unaligned accesses fail" >&5
4538 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
4539 echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541 case "$host_cpu" in
4542
4543 #
4544 # These are CPU types where:
4545 #
4546 # the CPU faults on an unaligned access, but at least some
4547 # OSes that support that CPU catch the fault and simulate
4548 # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
4549 # the simulation is slow, so we don't want to use it;
4550 #
4551 # the CPU, I infer (from the old
4552 #
4553 # XXX: should also check that they don't do weird things (like on arm)
4554 #
4555 # comment) doesn't fault on unaligned accesses, but doesn't
4556 # do a normal unaligned fetch, either (e.g., presumably, ARM);
4557 #
4558 # for whatever reason, the test program doesn't work
4559 # (this has been claimed to be the case for several of those
4560 # CPUs - I don't know what the problem is; the problem
4561 # was reported as "the test program dumps core" for SuperH,
4562 # but that's what the test program is *supposed* to do -
4563 # it dumps core before it writes anything, so the test
4564 # for an empty output file should find an empty output
4565 # file and conclude that unaligned accesses don't work).
4566 #
4567 # This run-time test won't work if you're cross-compiling, so
4568 # in order to support cross-compiling for a particular CPU,
4569 # we have to wire in the list of CPU types anyway, as far as
4570 # I know, so perhaps we should just have a set of CPUs on
4571 # which we know it doesn't work, a set of CPUs on which we
4572 # know it does work, and have the script just fail on other
4573 # cpu types and update it when such a failure occurs.
4574 #
4575 alpha*|arm*|hp*|mips*|sh*|sparc*|ia64)
4576 ac_cv_lbl_unaligned_fail=yes
4577 ;;
4578
4579 *)
4580 cat >conftest.c <<EOF
4581 # include <sys/types.h>
4582 # include <sys/wait.h>
4583 # include <stdio.h>
4584 unsigned char a[5] = { 1, 2, 3, 4, 5 };
4585 main() {
4586 unsigned int i;
4587 pid_t pid;
4588 int status;
4589 /* avoid "core dumped" message */
4590 pid = fork();
4591 if (pid < 0)
4592 exit(2);
4593 if (pid > 0) {
4594 /* parent */
4595 pid = waitpid(pid, &status, 0);
4596 if (pid < 0)
4597 exit(3);
4598 exit(!WIFEXITED(status));
4599 }
4600 /* child */
4601 i = *(unsigned int *)&a[1];
4602 printf("%d\n", i);
4603 exit(0);
4604 }
4605 EOF
4606 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
4607 conftest.c $LIBS >/dev/null 2>&1
4608 if test ! -x conftest ; then
4609 ac_cv_lbl_unaligned_fail=yes
4610 else
4611 ./conftest >conftest.out
4612 if test ! -s conftest.out ; then
4613 ac_cv_lbl_unaligned_fail=yes
4614 else
4615 ac_cv_lbl_unaligned_fail=no
4616 fi
4617 fi
4618 rm -f conftest* core core.conftest
4619 ;;
4620 esac
4621 fi
4622
4623 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
4624 if test $ac_cv_lbl_unaligned_fail = yes ; then
4625 cat >> confdefs.h <<\EOF
4626 #define LBL_ALIGN 1
4627 EOF
4628
4629 fi
4630
4631
4632 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
4633 echo "configure:4634: checking for h_errno" >&5
4634 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640
4641 # include <sys/types.h>
4642 # include <netdb.h>
4643 int main() {
4644 int foo = h_errno;
4645 ; return 0; }
4646 EOF
4647 if { (eval echo configure:4648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4648 rm -rf conftest*
4649 ac_cv_var_h_errno=yes
4650 else
4651 echo "configure: failed program was:" >&5
4652 cat conftest.$ac_ext >&5
4653 rm -rf conftest*
4654 ac_cv_var_h_errno=no
4655 fi
4656 rm -f conftest*
4657 fi
4658
4659 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
4660 if test "$ac_cv_var_h_errno" = "yes"; then
4661 cat >> confdefs.h <<\EOF
4662 #define HAVE_H_ERRNO 1
4663 EOF
4664
4665 fi
4666
4667
4668 # Check whether --with-crypto or --without-crypto was given.
4669 if test "${with_crypto+set}" = set; then
4670 withval="$with_crypto"
4671 :
4672 else
4673
4674 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
4675 echo "configure:4676: checking for SSLeay" >&5
4676 ac_cv_ssleay_path=no
4677 incdir=no
4678 for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
4679 #
4680 # XXX - is there a better way to check if a given library is
4681 # in a given directory than checking each of the possible
4682 # shared library suffixes?
4683 #
4684 # Are there any other suffixes we need to look for? Do we have to
4685 # worry about ".so.{version}"?
4686 #
4687 # Or should we just look for "libcrypto.*"?
4688 #
4689 if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \
4690 -f $dir/lib/libcrypto.so -o \
4691 -f $dir/lib/libcrypto.sl -o \
4692 -f $dir/lib/libcrypto.dylib \); then
4693 ac_cv_ssleay_path=$dir
4694 fi
4695 if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4696 incdir="-I$dir/include"
4697 fi
4698 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4699 break;
4700 else
4701 ac_cv_ssleay_path=no
4702 incdir=no
4703 fi
4704 done
4705 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4706 if test "$ac_cv_ssleay_path" != no; then
4707 V_INCLS="$V_INCLS $incdir"
4708 LDFLAGS="-L$dir/lib $LDFLAGS"
4709 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
4710 LIBS="$LIBS -lRSAglue"
4711 fi
4712 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
4713 LIBS="$LIBS -lrsaref"
4714 fi
4715 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4716 echo "configure:4717: checking for des_cbc_encrypt in -lcrypto" >&5
4717 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4719 echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721 ac_save_LIBS="$LIBS"
4722 LIBS="-lcrypto $LIBS"
4723 cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 /* Override any gcc2 internal prototype to avoid an error. */
4727 /* We use char because int might match the return type of a gcc2
4728 builtin and then its argument prototype would still apply. */
4729 char des_cbc_encrypt();
4730
4731 int main() {
4732 des_cbc_encrypt()
4733 ; return 0; }
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736 rm -rf conftest*
4737 eval "ac_cv_lib_$ac_lib_var=yes"
4738 else
4739 echo "configure: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4741 rm -rf conftest*
4742 eval "ac_cv_lib_$ac_lib_var=no"
4743 fi
4744 rm -f conftest*
4745 LIBS="$ac_save_LIBS"
4746
4747 fi
4748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4749 echo "$ac_t""yes" 1>&6
4750 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4751 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4752 cat >> confdefs.h <<EOF
4753 #define $ac_tr_lib 1
4754 EOF
4755
4756 LIBS="-lcrypto $LIBS"
4757
4758 else
4759 echo "$ac_t""no" 1>&6
4760 fi
4761
4762
4763 bak_CPPFLAGS=$CPPFLAGS
4764 CPPFLAGS="$CPPFLAGS $V_INCLS"
4765 for ac_hdr in openssl/cast.h
4766 do
4767 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4768 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4769 echo "configure:4770: checking for $ac_hdr" >&5
4770 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4771 echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773 cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 #include <$ac_hdr>
4777 EOF
4778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4779 { (eval echo configure:4780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4781 if test -z "$ac_err"; then
4782 rm -rf conftest*
4783 eval "ac_cv_header_$ac_safe=yes"
4784 else
4785 echo "$ac_err" >&5
4786 echo "configure: failed program was:" >&5
4787 cat conftest.$ac_ext >&5
4788 rm -rf conftest*
4789 eval "ac_cv_header_$ac_safe=no"
4790 fi
4791 rm -f conftest*
4792 fi
4793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4794 echo "$ac_t""yes" 1>&6
4795 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4796 cat >> confdefs.h <<EOF
4797 #define $ac_tr_hdr 1
4798 EOF
4799
4800 else
4801 echo "$ac_t""no" 1>&6
4802 fi
4803 done
4804
4805
4806 if test "$ac_cv_header_openssl_cast_h" = "yes"; then
4807 echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
4808 echo "configure:4809: checking for buggy CAST128" >&5
4809 if eval "test \"`echo '$''{'td_cv_buggy_cast128'+set}'`\" = set"; then
4810 echo $ac_n "(cached) $ac_c" 1>&6
4811 else
4812 if test "$cross_compiling" = yes; then
4813 td_cv_buggy_cast128="cross-compiling, assume yes"
4814 else
4815 cat > conftest.$ac_ext <<EOF
4816 #line 4817 "configure"
4817 #include "confdefs.h"
4818
4819 #include <openssl/cast.h>
4820 main()
4821 {
4822 unsigned char key[] = {0x01,0x23,0x45,0x67,0x12};
4823 unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
4824 unsigned char out[sizeof(in)];
4825 unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E};
4826 CAST_KEY ks;
4827 CAST_set_key(&ks, sizeof(key), key);
4828 CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT);
4829 if (memcmp(out, ok, sizeof(ok)) != 0)
4830 return 0;
4831 else
4832 return 1;
4833 }
4834 EOF
4835 if { (eval echo configure:4836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4836 then
4837 td_cv_buggy_cast128=yes
4838 else
4839 echo "configure: failed program was:" >&5
4840 cat conftest.$ac_ext >&5
4841 rm -fr conftest*
4842 td_cv_buggy_cast128=no
4843 fi
4844 rm -fr conftest*
4845 fi
4846
4847 fi
4848
4849 echo "$ac_t""$td_cv_buggy_cast128" 1>&6
4850 if test "$td_cv_buggy_cast128" != no; then
4851 echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine."
4852 echo "disabling CAST128 support."
4853 cat >> confdefs.h <<\EOF
4854 #define HAVE_BUGGY_CAST128 1
4855 EOF
4856
4857 fi
4858 fi
4859
4860 CPPFLAGS=$bak_CPPFLAGS
4861 fi
4862
4863 fi
4864
4865 for ac_hdr in openssl/rc5.h
4866 do
4867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4869 echo "configure:4870: checking for $ac_hdr" >&5
4870 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4871 echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873 cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 #include <$ac_hdr>
4877 EOF
4878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4879 { (eval echo configure:4880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4881 if test -z "$ac_err"; then
4882 rm -rf conftest*
4883 eval "ac_cv_header_$ac_safe=yes"
4884 else
4885 echo "$ac_err" >&5
4886 echo "configure: failed program was:" >&5
4887 cat conftest.$ac_ext >&5
4888 rm -rf conftest*
4889 eval "ac_cv_header_$ac_safe=no"
4890 fi
4891 rm -f conftest*
4892 fi
4893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4894 echo "$ac_t""yes" 1>&6
4895 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4896 cat >> confdefs.h <<EOF
4897 #define $ac_tr_hdr 1
4898 EOF
4899
4900 else
4901 echo "$ac_t""no" 1>&6
4902 fi
4903 done
4904
4905
4906
4907
4908
4909
4910
4911
4912 # Find a good install program. We prefer a C program (faster),
4913 # so one script is as good as another. But avoid the broken or
4914 # incompatible versions:
4915 # SysV /etc/install, /usr/sbin/install
4916 # SunOS /usr/etc/install
4917 # IRIX /sbin/install
4918 # AIX /bin/install
4919 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4920 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4921 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4922 # ./install, which can be erroneously created by make from ./install.sh.
4923 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4924 echo "configure:4925: checking for a BSD compatible install" >&5
4925 if test -z "$INSTALL"; then
4926 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4927 echo $ac_n "(cached) $ac_c" 1>&6
4928 else
4929 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4930 for ac_dir in $PATH; do
4931 # Account for people who put trailing slashes in PATH elements.
4932 case "$ac_dir/" in
4933 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4934 *)
4935 # OSF1 and SCO ODT 3.0 have their own names for install.
4936 # Don't use installbsd from OSF since it installs stuff as root
4937 # by default.
4938 for ac_prog in ginstall scoinst install; do
4939 if test -f $ac_dir/$ac_prog; then
4940 if test $ac_prog = install &&
4941 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4942 # AIX install. It has an incompatible calling convention.
4943 :
4944 else
4945 ac_cv_path_install="$ac_dir/$ac_prog -c"
4946 break 2
4947 fi
4948 fi
4949 done
4950 ;;
4951 esac
4952 done
4953 IFS="$ac_save_IFS"
4954
4955 fi
4956 if test "${ac_cv_path_install+set}" = set; then
4957 INSTALL="$ac_cv_path_install"
4958 else
4959 # As a last resort, use the slow shell script. We don't cache a
4960 # path for INSTALL within a source directory, because that will
4961 # break other packages using the cache if that directory is
4962 # removed, or if the path is relative.
4963 INSTALL="$ac_install_sh"
4964 fi
4965 fi
4966 echo "$ac_t""$INSTALL" 1>&6
4967
4968 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4969 # It thinks the first close brace ends the variable substitution.
4970 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4971
4972 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4973
4974 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4975
4976
4977
4978
4979
4980 trap '' 1 2 15
4981 cat > confcache <<\EOF
4982 # This file is a shell script that caches the results of configure
4983 # tests run on this system so they can be shared between configure
4984 # scripts and configure runs. It is not useful on other systems.
4985 # If it contains results you don't want to keep, you may remove or edit it.
4986 #
4987 # By default, configure uses ./config.cache as the cache file,
4988 # creating it if it does not exist already. You can give configure
4989 # the --cache-file=FILE option to use a different cache file; that is
4990 # what configure does when it calls configure scripts in
4991 # subdirectories, so they share the cache.
4992 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4993 # config.status only pays attention to the cache file if you give it the
4994 # --recheck option to rerun configure.
4995 #
4996 EOF
4997 # The following way of writing the cache mishandles newlines in values,
4998 # but we know of no workaround that is simple, portable, and efficient.
4999 # So, don't put newlines in cache variables' values.
5000 # Ultrix sh set writes to stderr and can't be redirected directly,
5001 # and sets the high bit in the cache file unless we assign to the vars.
5002 (set) 2>&1 |
5003 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5004 *ac_space=\ *)
5005 # `set' does not quote correctly, so add quotes (double-quote substitution
5006 # turns \\\\ into \\, and sed turns \\ into \).
5007 sed -n \
5008 -e "s/'/'\\\\''/g" \
5009 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5010 ;;
5011 *)
5012 # `set' quotes correctly as required by POSIX, so do not add quotes.
5013 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5014 ;;
5015 esac >> confcache
5016 if cmp -s $cache_file confcache; then
5017 :
5018 else
5019 if test -w $cache_file; then
5020 echo "updating cache $cache_file"
5021 cat confcache > $cache_file
5022 else
5023 echo "not updating unwritable cache $cache_file"
5024 fi
5025 fi
5026 rm -f confcache
5027
5028 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5029
5030 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5031 # Let make expand exec_prefix.
5032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5033
5034 # Any assignment to VPATH causes Sun make to only execute
5035 # the first set of double-colon rules, so remove it if not needed.
5036 # If there is a colon in the path, we need to keep it.
5037 if test "x$srcdir" = x.; then
5038 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5039 fi
5040
5041 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5042
5043 DEFS=-DHAVE_CONFIG_H
5044
5045 # Without the "./", some shells look in PATH for config.status.
5046 : ${CONFIG_STATUS=./config.status}
5047
5048 echo creating $CONFIG_STATUS
5049 rm -f $CONFIG_STATUS
5050 cat > $CONFIG_STATUS <<EOF
5051 #! /bin/sh
5052 # Generated automatically by configure.
5053 # Run this file to recreate the current configuration.
5054 # This directory was configured as follows,
5055 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5056 #
5057 # $0 $ac_configure_args
5058 #
5059 # Compiler output produced by configure, useful for debugging
5060 # configure, is in ./config.log if it exists.
5061
5062 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5063 for ac_option
5064 do
5065 case "\$ac_option" in
5066 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5067 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5068 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5069 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5070 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5071 exit 0 ;;
5072 -help | --help | --hel | --he | --h)
5073 echo "\$ac_cs_usage"; exit 0 ;;
5074 *) echo "\$ac_cs_usage"; exit 1 ;;
5075 esac
5076 done
5077
5078 ac_given_srcdir=$srcdir
5079 ac_given_INSTALL="$INSTALL"
5080
5081 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5082 EOF
5083 cat >> $CONFIG_STATUS <<EOF
5084
5085 # Protect against being on the right side of a sed subst in config.status.
5086 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5087 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5088 $ac_vpsub
5089 $extrasub
5090 s%@SHELL@%$SHELL%g
5091 s%@CFLAGS@%$CFLAGS%g
5092 s%@CPPFLAGS@%$CPPFLAGS%g
5093 s%@CXXFLAGS@%$CXXFLAGS%g
5094 s%@FFLAGS@%$FFLAGS%g
5095 s%@DEFS@%$DEFS%g
5096 s%@LDFLAGS@%$LDFLAGS%g
5097 s%@LIBS@%$LIBS%g
5098 s%@exec_prefix@%$exec_prefix%g
5099 s%@prefix@%$prefix%g
5100 s%@program_transform_name@%$program_transform_name%g
5101 s%@bindir@%$bindir%g
5102 s%@sbindir@%$sbindir%g
5103 s%@libexecdir@%$libexecdir%g
5104 s%@datadir@%$datadir%g
5105 s%@sysconfdir@%$sysconfdir%g
5106 s%@sharedstatedir@%$sharedstatedir%g
5107 s%@localstatedir@%$localstatedir%g
5108 s%@libdir@%$libdir%g
5109 s%@includedir@%$includedir%g
5110 s%@oldincludedir@%$oldincludedir%g
5111 s%@infodir@%$infodir%g
5112 s%@mandir@%$mandir%g
5113 s%@host@%$host%g
5114 s%@host_alias@%$host_alias%g
5115 s%@host_cpu@%$host_cpu%g
5116 s%@host_vendor@%$host_vendor%g
5117 s%@host_os@%$host_os%g
5118 s%@SHLICC2@%$SHLICC2%g
5119 s%@CC@%$CC%g
5120 s%@CPP@%$CPP%g
5121 s%@LIBOBJS@%$LIBOBJS%g
5122 s%@V_CCOPT@%$V_CCOPT%g
5123 s%@V_GROUP@%$V_GROUP%g
5124 s%@V_INCLS@%$V_INCLS%g
5125 s%@V_PCAPDEP@%$V_PCAPDEP%g
5126 s%@LOCALSRC@%$LOCALSRC%g
5127 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5128 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5129 s%@INSTALL_DATA@%$INSTALL_DATA%g
5130
5131 CEOF
5132 EOF
5133
5134 cat >> $CONFIG_STATUS <<\EOF
5135
5136 # Split the substitutions into bite-sized pieces for seds with
5137 # small command number limits, like on Digital OSF/1 and HP-UX.
5138 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5139 ac_file=1 # Number of current file.
5140 ac_beg=1 # First line for current file.
5141 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5142 ac_more_lines=:
5143 ac_sed_cmds=""
5144 while $ac_more_lines; do
5145 if test $ac_beg -gt 1; then
5146 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5147 else
5148 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5149 fi
5150 if test ! -s conftest.s$ac_file; then
5151 ac_more_lines=false
5152 rm -f conftest.s$ac_file
5153 else
5154 if test -z "$ac_sed_cmds"; then
5155 ac_sed_cmds="sed -f conftest.s$ac_file"
5156 else
5157 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5158 fi
5159 ac_file=`expr $ac_file + 1`
5160 ac_beg=$ac_end
5161 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5162 fi
5163 done
5164 if test -z "$ac_sed_cmds"; then
5165 ac_sed_cmds=cat
5166 fi
5167 EOF
5168
5169 cat >> $CONFIG_STATUS <<EOF
5170
5171 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5172 EOF
5173 cat >> $CONFIG_STATUS <<\EOF
5174 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5175 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5176 case "$ac_file" in
5177 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5178 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5179 *) ac_file_in="${ac_file}.in" ;;
5180 esac
5181
5182 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5183
5184 # Remove last slash and all that follows it. Not all systems have dirname.
5185 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5186 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5187 # The file is in a subdirectory.
5188 test ! -d "$ac_dir" && mkdir "$ac_dir"
5189 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5190 # A "../" for each directory in $ac_dir_suffix.
5191 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5192 else
5193 ac_dir_suffix= ac_dots=
5194 fi
5195
5196 case "$ac_given_srcdir" in
5197 .) srcdir=.
5198 if test -z "$ac_dots"; then top_srcdir=.
5199 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5200 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5201 *) # Relative path.
5202 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5203 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5204 esac
5205
5206 case "$ac_given_INSTALL" in
5207 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5208 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5209 esac
5210
5211 echo creating "$ac_file"
5212 rm -f "$ac_file"
5213 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5214 case "$ac_file" in
5215 *Makefile*) ac_comsub="1i\\
5216 # $configure_input" ;;
5217 *) ac_comsub= ;;
5218 esac
5219
5220 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5221 sed -e "$ac_comsub
5222 s%@configure_input@%$configure_input%g
5223 s%@srcdir@%$srcdir%g
5224 s%@top_srcdir@%$top_srcdir%g
5225 s%@INSTALL@%$INSTALL%g
5226 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5227 fi; done
5228 rm -f conftest.s*
5229
5230 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5231 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5232 #
5233 # ac_d sets the value in "#define NAME VALUE" lines.
5234 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5235 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5236 ac_dC='\3'
5237 ac_dD='%g'
5238 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5239 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5240 ac_uB='\([ ]\)%\1#\2define\3'
5241 ac_uC=' '
5242 ac_uD='\4%g'
5243 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5244 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5245 ac_eB='$%\1#\2define\3'
5246 ac_eC=' '
5247 ac_eD='%g'
5248
5249 if test "${CONFIG_HEADERS+set}" != set; then
5250 EOF
5251 cat >> $CONFIG_STATUS <<EOF
5252 CONFIG_HEADERS="config.h"
5253 EOF
5254 cat >> $CONFIG_STATUS <<\EOF
5255 fi
5256 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5257 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5258 case "$ac_file" in
5259 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5260 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5261 *) ac_file_in="${ac_file}.in" ;;
5262 esac
5263
5264 echo creating $ac_file
5265
5266 rm -f conftest.frag conftest.in conftest.out
5267 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5268 cat $ac_file_inputs > conftest.in
5269
5270 EOF
5271
5272 # Transform confdefs.h into a sed script conftest.vals that substitutes
5273 # the proper values into config.h.in to produce config.h. And first:
5274 # Protect against being on the right side of a sed subst in config.status.
5275 # Protect against being in an unquoted here document in config.status.
5276 rm -f conftest.vals
5277 cat > conftest.hdr <<\EOF
5278 s/[\\&%]/\\&/g
5279 s%[\\$`]%\\&%g
5280 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5281 s%ac_d%ac_u%gp
5282 s%ac_u%ac_e%gp
5283 EOF
5284 sed -n -f conftest.hdr confdefs.h > conftest.vals
5285 rm -f conftest.hdr
5286
5287 # This sed command replaces #undef with comments. This is necessary, for
5288 # example, in the case of _POSIX_SOURCE, which is predefined and required
5289 # on some systems where configure will not decide to define it.
5290 cat >> conftest.vals <<\EOF
5291 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5292 EOF
5293
5294 # Break up conftest.vals because some shells have a limit on
5295 # the size of here documents, and old seds have small limits too.
5296
5297 rm -f conftest.tail
5298 while :
5299 do
5300 ac_lines=`grep -c . conftest.vals`
5301 # grep -c gives empty output for an empty file on some AIX systems.
5302 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5303 # Write a limited-size here document to conftest.frag.
5304 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5305 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5306 echo 'CEOF
5307 sed -f conftest.frag conftest.in > conftest.out
5308 rm -f conftest.in
5309 mv conftest.out conftest.in
5310 ' >> $CONFIG_STATUS
5311 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5312 rm -f conftest.vals
5313 mv conftest.tail conftest.vals
5314 done
5315 rm -f conftest.vals
5316
5317 cat >> $CONFIG_STATUS <<\EOF
5318 rm -f conftest.frag conftest.h
5319 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5320 cat conftest.in >> conftest.h
5321 rm -f conftest.in
5322 if cmp -s $ac_file conftest.h 2>/dev/null; then
5323 echo "$ac_file is unchanged"
5324 rm -f conftest.h
5325 else
5326 # Remove last slash and all that follows it. Not all systems have dirname.
5327 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5328 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5329 # The file is in a subdirectory.
5330 test ! -d "$ac_dir" && mkdir "$ac_dir"
5331 fi
5332 rm -f $ac_file
5333 mv conftest.h $ac_file
5334 fi
5335 fi; done
5336
5337 EOF
5338 cat >> $CONFIG_STATUS <<EOF
5339
5340
5341 EOF
5342 cat >> $CONFIG_STATUS <<\EOF
5343 if test -f .devel; then
5344 echo timestamp > stamp-h
5345 cat Makefile-devel-adds >> Makefile
5346 make depend
5347 fi
5348
5349 exit 0
5350 EOF
5351 chmod +x $CONFIG_STATUS
5352 rm -fr confdefs* $ac_clean_files
5353 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5354
5355 exit 0