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