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