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