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