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