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