xref: /freebsd/contrib/libpcap/configure (revision daf1cffce2e07931f27c6c6998652e90df6ba87e)
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --without-gcc           don't use gcc"
16ac_help="$ac_help
17  --disable-protochain    disable \"protochain\" insn"
18ac_help="$ac_help
19  --with-pcap=TYPE        use packet capture TYPE"
20ac_help="$ac_help
21  --enable-ipv6           build IPv6-capable version"
22ac_help="$ac_help
23  --without-flex          don't use flex"
24ac_help="$ac_help
25  --without-bison         don't use bison"
26
27# Initialize some variables set by options.
28# The variables have the same names as the options, with
29# dashes changed to underlines.
30build=NONE
31cache_file=./config.cache
32exec_prefix=NONE
33host=NONE
34no_create=
35nonopt=NONE
36no_recursion=
37prefix=NONE
38program_prefix=NONE
39program_suffix=NONE
40program_transform_name=s,x,x,
41silent=
42site=
43srcdir=
44target=NONE
45verbose=
46x_includes=NONE
47x_libraries=NONE
48bindir='${exec_prefix}/bin'
49sbindir='${exec_prefix}/sbin'
50libexecdir='${exec_prefix}/libexec'
51datadir='${prefix}/share'
52sysconfdir='${prefix}/etc'
53sharedstatedir='${prefix}/com'
54localstatedir='${prefix}/var'
55libdir='${exec_prefix}/lib'
56includedir='${prefix}/include'
57oldincludedir='/usr/include'
58infodir='${prefix}/info'
59mandir='${prefix}/man'
60
61# Initialize some other variables.
62subdirs=
63MFLAGS= MAKEFLAGS=
64SHELL=${CONFIG_SHELL-/bin/sh}
65# Maximum number of lines to put in a shell here document.
66ac_max_here_lines=12
67
68ac_prev=
69for ac_option
70do
71
72  # If the previous option needs an argument, assign it.
73  if test -n "$ac_prev"; then
74    eval "$ac_prev=\$ac_option"
75    ac_prev=
76    continue
77  fi
78
79  case "$ac_option" in
80  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81  *) ac_optarg= ;;
82  esac
83
84  # Accept the important Cygnus configure options, so we can diagnose typos.
85
86  case "$ac_option" in
87
88  -bindir | --bindir | --bindi | --bind | --bin | --bi)
89    ac_prev=bindir ;;
90  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91    bindir="$ac_optarg" ;;
92
93  -build | --build | --buil | --bui | --bu)
94    ac_prev=build ;;
95  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96    build="$ac_optarg" ;;
97
98  -cache-file | --cache-file | --cache-fil | --cache-fi \
99  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100    ac_prev=cache_file ;;
101  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103    cache_file="$ac_optarg" ;;
104
105  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106    ac_prev=datadir ;;
107  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108  | --da=*)
109    datadir="$ac_optarg" ;;
110
111  -disable-* | --disable-*)
112    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113    # Reject names that are not valid shell variable names.
114    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116    fi
117    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118    eval "enable_${ac_feature}=no" ;;
119
120  -enable-* | --enable-*)
121    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122    # Reject names that are not valid shell variable names.
123    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125    fi
126    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127    case "$ac_option" in
128      *=*) ;;
129      *) ac_optarg=yes ;;
130    esac
131    eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135  | --exec | --exe | --ex)
136    ac_prev=exec_prefix ;;
137  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139  | --exec=* | --exe=* | --ex=*)
140    exec_prefix="$ac_optarg" ;;
141
142  -gas | --gas | --ga | --g)
143    # Obsolete; use --with-gas.
144    with_gas=yes ;;
145
146  -help | --help | --hel | --he)
147    # Omit some internal or obsolete options to make the list less imposing.
148    # This message is too long to be a string in the A/UX 3.1 sh.
149    cat << EOF
150Usage: configure [options] [host]
151Options: [defaults in brackets after descriptions]
152Configuration:
153  --cache-file=FILE       cache test results in FILE
154  --help                  print this message
155  --no-create             do not create output files
156  --quiet, --silent       do not print \`checking...' messages
157  --version               print the version of autoconf that created configure
158Directory and file names:
159  --prefix=PREFIX         install architecture-independent files in PREFIX
160                          [$ac_default_prefix]
161  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
162                          [same as prefix]
163  --bindir=DIR            user executables in DIR [EPREFIX/bin]
164  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
165  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
166  --datadir=DIR           read-only architecture-independent data in DIR
167                          [PREFIX/share]
168  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
169  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
170                          [PREFIX/com]
171  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
172  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
173  --includedir=DIR        C header files in DIR [PREFIX/include]
174  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
175  --infodir=DIR           info documentation in DIR [PREFIX/info]
176  --mandir=DIR            man documentation in DIR [PREFIX/man]
177  --srcdir=DIR            find the sources in DIR [configure dir or ..]
178  --program-prefix=PREFIX prepend PREFIX to installed program names
179  --program-suffix=SUFFIX append SUFFIX to installed program names
180  --program-transform-name=PROGRAM
181                          run sed PROGRAM on installed program names
182EOF
183    cat << EOF
184Host type:
185  --build=BUILD           configure for building on BUILD [BUILD=HOST]
186  --host=HOST             configure for HOST [guessed]
187  --target=TARGET         configure for TARGET [TARGET=HOST]
188Features and packages:
189  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
190  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
191  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
192  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
193  --x-includes=DIR        X include files are in DIR
194  --x-libraries=DIR       X library files are in DIR
195EOF
196    if test -n "$ac_help"; then
197      echo "--enable and --with options recognized:$ac_help"
198    fi
199    exit 0 ;;
200
201  -host | --host | --hos | --ho)
202    ac_prev=host ;;
203  -host=* | --host=* | --hos=* | --ho=*)
204    host="$ac_optarg" ;;
205
206  -includedir | --includedir | --includedi | --included | --include \
207  | --includ | --inclu | --incl | --inc)
208    ac_prev=includedir ;;
209  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210  | --includ=* | --inclu=* | --incl=* | --inc=*)
211    includedir="$ac_optarg" ;;
212
213  -infodir | --infodir | --infodi | --infod | --info | --inf)
214    ac_prev=infodir ;;
215  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216    infodir="$ac_optarg" ;;
217
218  -libdir | --libdir | --libdi | --libd)
219    ac_prev=libdir ;;
220  -libdir=* | --libdir=* | --libdi=* | --libd=*)
221    libdir="$ac_optarg" ;;
222
223  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224  | --libexe | --libex | --libe)
225    ac_prev=libexecdir ;;
226  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227  | --libexe=* | --libex=* | --libe=*)
228    libexecdir="$ac_optarg" ;;
229
230  -localstatedir | --localstatedir | --localstatedi | --localstated \
231  | --localstate | --localstat | --localsta | --localst \
232  | --locals | --local | --loca | --loc | --lo)
233    ac_prev=localstatedir ;;
234  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237    localstatedir="$ac_optarg" ;;
238
239  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240    ac_prev=mandir ;;
241  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242    mandir="$ac_optarg" ;;
243
244  -nfp | --nfp | --nf)
245    # Obsolete; use --without-fp.
246    with_fp=no ;;
247
248  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249  | --no-cr | --no-c)
250    no_create=yes ;;
251
252  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254    no_recursion=yes ;;
255
256  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258  | --oldin | --oldi | --old | --ol | --o)
259    ac_prev=oldincludedir ;;
260  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263    oldincludedir="$ac_optarg" ;;
264
265  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266    ac_prev=prefix ;;
267  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268    prefix="$ac_optarg" ;;
269
270  -program-prefix | --program-prefix | --program-prefi | --program-pref \
271  | --program-pre | --program-pr | --program-p)
272    ac_prev=program_prefix ;;
273  -program-prefix=* | --program-prefix=* | --program-prefi=* \
274  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275    program_prefix="$ac_optarg" ;;
276
277  -program-suffix | --program-suffix | --program-suffi | --program-suff \
278  | --program-suf | --program-su | --program-s)
279    ac_prev=program_suffix ;;
280  -program-suffix=* | --program-suffix=* | --program-suffi=* \
281  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282    program_suffix="$ac_optarg" ;;
283
284  -program-transform-name | --program-transform-name \
285  | --program-transform-nam | --program-transform-na \
286  | --program-transform-n | --program-transform- \
287  | --program-transform | --program-transfor \
288  | --program-transfo | --program-transf \
289  | --program-trans | --program-tran \
290  | --progr-tra | --program-tr | --program-t)
291    ac_prev=program_transform_name ;;
292  -program-transform-name=* | --program-transform-name=* \
293  | --program-transform-nam=* | --program-transform-na=* \
294  | --program-transform-n=* | --program-transform-=* \
295  | --program-transform=* | --program-transfor=* \
296  | --program-transfo=* | --program-transf=* \
297  | --program-trans=* | --program-tran=* \
298  | --progr-tra=* | --program-tr=* | --program-t=*)
299    program_transform_name="$ac_optarg" ;;
300
301  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302  | -silent | --silent | --silen | --sile | --sil)
303    silent=yes ;;
304
305  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306    ac_prev=sbindir ;;
307  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308  | --sbi=* | --sb=*)
309    sbindir="$ac_optarg" ;;
310
311  -sharedstatedir | --sharedstatedir | --sharedstatedi \
312  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313  | --sharedst | --shareds | --shared | --share | --shar \
314  | --sha | --sh)
315    ac_prev=sharedstatedir ;;
316  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319  | --sha=* | --sh=*)
320    sharedstatedir="$ac_optarg" ;;
321
322  -site | --site | --sit)
323    ac_prev=site ;;
324  -site=* | --site=* | --sit=*)
325    site="$ac_optarg" ;;
326
327  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328    ac_prev=srcdir ;;
329  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330    srcdir="$ac_optarg" ;;
331
332  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333  | --syscon | --sysco | --sysc | --sys | --sy)
334    ac_prev=sysconfdir ;;
335  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337    sysconfdir="$ac_optarg" ;;
338
339  -target | --target | --targe | --targ | --tar | --ta | --t)
340    ac_prev=target ;;
341  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342    target="$ac_optarg" ;;
343
344  -v | -verbose | --verbose | --verbos | --verbo | --verb)
345    verbose=yes ;;
346
347  -version | --version | --versio | --versi | --vers)
348    echo "configure generated by autoconf version 2.13"
349    exit 0 ;;
350
351  -with-* | --with-*)
352    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353    # Reject names that are not valid shell variable names.
354    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356    fi
357    ac_package=`echo $ac_package| sed 's/-/_/g'`
358    case "$ac_option" in
359      *=*) ;;
360      *) ac_optarg=yes ;;
361    esac
362    eval "with_${ac_package}='$ac_optarg'" ;;
363
364  -without-* | --without-*)
365    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366    # Reject names that are not valid shell variable names.
367    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369    fi
370    ac_package=`echo $ac_package| sed 's/-/_/g'`
371    eval "with_${ac_package}=no" ;;
372
373  --x)
374    # Obsolete; use --with-x.
375    with_x=yes ;;
376
377  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378  | --x-incl | --x-inc | --x-in | --x-i)
379    ac_prev=x_includes ;;
380  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382    x_includes="$ac_optarg" ;;
383
384  -x-libraries | --x-libraries | --x-librarie | --x-librari \
385  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386    ac_prev=x_libraries ;;
387  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389    x_libraries="$ac_optarg" ;;
390
391  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392    ;;
393
394  *)
395    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396      echo "configure: warning: $ac_option: invalid host type" 1>&2
397    fi
398    if test "x$nonopt" != xNONE; then
399      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400    fi
401    nonopt="$ac_option"
402    ;;
403
404  esac
405done
406
407if test -n "$ac_prev"; then
408  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409fi
410
411trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413# File descriptor usage:
414# 0 standard input
415# 1 file creation
416# 2 errors and warnings
417# 3 some systems may open it to /dev/tty
418# 4 used on the Kubota Titan
419# 6 checking for... messages and results
420# 5 compiler messages saved in config.log
421if test "$silent" = yes; then
422  exec 6>/dev/null
423else
424  exec 6>&1
425fi
426exec 5>./config.log
427
428echo "\
429This file contains any messages produced by compilers while
430running configure, to aid debugging if configure makes a mistake.
431" 1>&5
432
433# Strip out --no-create and --no-recursion so they do not pile up.
434# Also quote any args containing shell metacharacters.
435ac_configure_args=
436for ac_arg
437do
438  case "$ac_arg" in
439  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440  | --no-cr | --no-c) ;;
441  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446  esac
447done
448
449# NLS nuisances.
450# Only set these to C if already set.  These must not be set unconditionally
451# because not all systems understand e.g. LANG=C (notably SCO).
452# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453# Non-C LC_CTYPE values break the ctype check.
454if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
455if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
458
459# confdefs.h avoids OS command line length limits that DEFS can exceed.
460rm -rf conftest* confdefs.h
461# AIX cpp loses on an empty file, so make sure it contains at least a newline.
462echo > confdefs.h
463
464# A filename unique to this package, relative to the directory that
465# configure is in, which we can look for to find out if srcdir is correct.
466ac_unique_file=pcap.c
467
468# Find the source files, if location was not specified.
469if test -z "$srcdir"; then
470  ac_srcdir_defaulted=yes
471  # Try the directory containing this script, then its parent.
472  ac_prog=$0
473  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475  srcdir=$ac_confdir
476  if test ! -r $srcdir/$ac_unique_file; then
477    srcdir=..
478  fi
479else
480  ac_srcdir_defaulted=no
481fi
482if test ! -r $srcdir/$ac_unique_file; then
483  if test "$ac_srcdir_defaulted" = yes; then
484    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485  else
486    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487  fi
488fi
489srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491# Prefer explicitly selected file to automatically selected ones.
492if test -z "$CONFIG_SITE"; then
493  if test "x$prefix" != xNONE; then
494    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495  else
496    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497  fi
498fi
499for ac_site_file in $CONFIG_SITE; do
500  if test -r "$ac_site_file"; then
501    echo "loading site script $ac_site_file"
502    . "$ac_site_file"
503  fi
504done
505
506if test -r "$cache_file"; then
507  echo "loading cache $cache_file"
508  . $cache_file
509else
510  echo "creating cache $cache_file"
511  > $cache_file
512fi
513
514ac_ext=c
515# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516ac_cpp='$CPP $CPPFLAGS'
517ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519cross_compiling=$ac_cv_prog_cc_cross
520
521ac_exeext=
522ac_objext=o
523if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526    ac_n= ac_c='
527' ac_t='	'
528  else
529    ac_n=-n ac_c= ac_t=
530  fi
531else
532  ac_n= ac_c='\c' ac_t=
533fi
534
535
536
537ac_aux_dir=
538for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
539  if test -f $ac_dir/install-sh; then
540    ac_aux_dir=$ac_dir
541    ac_install_sh="$ac_aux_dir/install-sh -c"
542    break
543  elif test -f $ac_dir/install.sh; then
544    ac_aux_dir=$ac_dir
545    ac_install_sh="$ac_aux_dir/install.sh -c"
546    break
547  fi
548done
549if test -z "$ac_aux_dir"; then
550  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
551fi
552ac_config_guess=$ac_aux_dir/config.guess
553ac_config_sub=$ac_aux_dir/config.sub
554ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
555
556
557# Do some error checking and defaulting for the host and target type.
558# The inputs are:
559#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
560#
561# The rules are:
562# 1. You are not allowed to specify --host, --target, and nonopt at the
563#    same time.
564# 2. Host defaults to nonopt.
565# 3. If nonopt is not specified, then host defaults to the current host,
566#    as determined by config.guess.
567# 4. Target and build default to nonopt.
568# 5. If nonopt is not specified, then target and build default to host.
569
570# The aliases save the names the user supplied, while $host etc.
571# will get canonicalized.
572case $host---$target---$nonopt in
573NONE---*---* | *---NONE---* | *---*---NONE) ;;
574*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
575esac
576
577
578# Make sure we can run config.sub.
579if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
580else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
581fi
582
583echo $ac_n "checking host system type""... $ac_c" 1>&6
584echo "configure:585: checking host system type" >&5
585
586host_alias=$host
587case "$host_alias" in
588NONE)
589  case $nonopt in
590  NONE)
591    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
592    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
593    fi ;;
594  *) host_alias=$nonopt ;;
595  esac ;;
596esac
597
598host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
599host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
600host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
601host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
602echo "$ac_t""$host" 1>&6
603
604echo $ac_n "checking target system type""... $ac_c" 1>&6
605echo "configure:606: checking target system type" >&5
606
607target_alias=$target
608case "$target_alias" in
609NONE)
610  case $nonopt in
611  NONE) target_alias=$host_alias ;;
612  *) target_alias=$nonopt ;;
613  esac ;;
614esac
615
616target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
617target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
618target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
619target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
620echo "$ac_t""$target" 1>&6
621
622echo $ac_n "checking build system type""... $ac_c" 1>&6
623echo "configure:624: checking build system type" >&5
624
625build_alias=$build
626case "$build_alias" in
627NONE)
628  case $nonopt in
629  NONE) build_alias=$host_alias ;;
630  *) build_alias=$nonopt ;;
631  esac ;;
632esac
633
634build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
635build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
636build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
637build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
638echo "$ac_t""$build" 1>&6
639
640test "$host_alias" != "$target_alias" &&
641  test "$program_prefix$program_suffix$program_transform_name" = \
642    NONENONEs,x,x, &&
643  program_prefix=${target_alias}-
644
645
646umask 002
647
648if test -z "$PWD" ; then
649	PWD=`pwd`
650fi
651
652
653
654
655
656    # Check whether --with-gcc or --without-gcc was given.
657if test "${with_gcc+set}" = set; then
658  withval="$with_gcc"
659  :
660fi
661
662    V_CCOPT="-O"
663    V_INCLS=""
664    if test "${srcdir}" != "." ; then
665	    V_INCLS="-I\$(srcdir)"
666    fi
667    if test "${CFLAGS+set}" = set; then
668	    LBL_CFLAGS="$CFLAGS"
669    fi
670    if test -z "$CC" ; then
671	    case "$target_os" in
672
673	    bsdi*)
674		    # Extract the first word of "shlicc2", so it can be a program name with args.
675set dummy shlicc2; ac_word=$2
676echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
677echo "configure:678: checking for $ac_word" >&5
678if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
679  echo $ac_n "(cached) $ac_c" 1>&6
680else
681  if test -n "$SHLICC2"; then
682  ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
683else
684  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
685  ac_dummy="$PATH"
686  for ac_dir in $ac_dummy; do
687    test -z "$ac_dir" && ac_dir=.
688    if test -f $ac_dir/$ac_word; then
689      ac_cv_prog_SHLICC2="yes"
690      break
691    fi
692  done
693  IFS="$ac_save_ifs"
694  test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
695fi
696fi
697SHLICC2="$ac_cv_prog_SHLICC2"
698if test -n "$SHLICC2"; then
699  echo "$ac_t""$SHLICC2" 1>&6
700else
701  echo "$ac_t""no" 1>&6
702fi
703
704		    if test $SHLICC2 = yes ; then
705			    CC=shlicc2
706			    export CC
707		    fi
708		    ;;
709	    esac
710    fi
711    if test -z "$CC" -a "$with_gcc" = no ; then
712	    CC=cc
713	    export CC
714    fi
715    # Extract the first word of "gcc", so it can be a program name with args.
716set dummy gcc; ac_word=$2
717echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
718echo "configure:719: checking for $ac_word" >&5
719if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
720  echo $ac_n "(cached) $ac_c" 1>&6
721else
722  if test -n "$CC"; then
723  ac_cv_prog_CC="$CC" # Let the user override the test.
724else
725  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
726  ac_dummy="$PATH"
727  for ac_dir in $ac_dummy; do
728    test -z "$ac_dir" && ac_dir=.
729    if test -f $ac_dir/$ac_word; then
730      ac_cv_prog_CC="gcc"
731      break
732    fi
733  done
734  IFS="$ac_save_ifs"
735fi
736fi
737CC="$ac_cv_prog_CC"
738if test -n "$CC"; then
739  echo "$ac_t""$CC" 1>&6
740else
741  echo "$ac_t""no" 1>&6
742fi
743
744if test -z "$CC"; then
745  # Extract the first word of "cc", so it can be a program name with args.
746set dummy cc; ac_word=$2
747echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
748echo "configure:749: checking for $ac_word" >&5
749if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
750  echo $ac_n "(cached) $ac_c" 1>&6
751else
752  if test -n "$CC"; then
753  ac_cv_prog_CC="$CC" # Let the user override the test.
754else
755  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
756  ac_prog_rejected=no
757  ac_dummy="$PATH"
758  for ac_dir in $ac_dummy; do
759    test -z "$ac_dir" && ac_dir=.
760    if test -f $ac_dir/$ac_word; then
761      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
762        ac_prog_rejected=yes
763	continue
764      fi
765      ac_cv_prog_CC="cc"
766      break
767    fi
768  done
769  IFS="$ac_save_ifs"
770if test $ac_prog_rejected = yes; then
771  # We found a bogon in the path, so make sure we never use it.
772  set dummy $ac_cv_prog_CC
773  shift
774  if test $# -gt 0; then
775    # We chose a different compiler from the bogus one.
776    # However, it has the same basename, so the bogon will be chosen
777    # first if we set CC to just the basename; use the full file name.
778    shift
779    set dummy "$ac_dir/$ac_word" "$@"
780    shift
781    ac_cv_prog_CC="$@"
782  fi
783fi
784fi
785fi
786CC="$ac_cv_prog_CC"
787if test -n "$CC"; then
788  echo "$ac_t""$CC" 1>&6
789else
790  echo "$ac_t""no" 1>&6
791fi
792
793  if test -z "$CC"; then
794    case "`uname -s`" in
795    *win32* | *WIN32*)
796      # Extract the first word of "cl", so it can be a program name with args.
797set dummy cl; ac_word=$2
798echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
799echo "configure:800: checking for $ac_word" >&5
800if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
801  echo $ac_n "(cached) $ac_c" 1>&6
802else
803  if test -n "$CC"; then
804  ac_cv_prog_CC="$CC" # Let the user override the test.
805else
806  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
807  ac_dummy="$PATH"
808  for ac_dir in $ac_dummy; do
809    test -z "$ac_dir" && ac_dir=.
810    if test -f $ac_dir/$ac_word; then
811      ac_cv_prog_CC="cl"
812      break
813    fi
814  done
815  IFS="$ac_save_ifs"
816fi
817fi
818CC="$ac_cv_prog_CC"
819if test -n "$CC"; then
820  echo "$ac_t""$CC" 1>&6
821else
822  echo "$ac_t""no" 1>&6
823fi
824 ;;
825    esac
826  fi
827  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
828fi
829
830echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
831echo "configure:832: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
832
833ac_ext=c
834# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
835ac_cpp='$CPP $CPPFLAGS'
836ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
837ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
838cross_compiling=$ac_cv_prog_cc_cross
839
840cat > conftest.$ac_ext << EOF
841
842#line 843 "configure"
843#include "confdefs.h"
844
845main(){return(0);}
846EOF
847if { (eval echo configure:848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
848  ac_cv_prog_cc_works=yes
849  # If we can't run a trivial program, we are probably using a cross compiler.
850  if (./conftest; exit) 2>/dev/null; then
851    ac_cv_prog_cc_cross=no
852  else
853    ac_cv_prog_cc_cross=yes
854  fi
855else
856  echo "configure: failed program was:" >&5
857  cat conftest.$ac_ext >&5
858  ac_cv_prog_cc_works=no
859fi
860rm -fr conftest*
861ac_ext=c
862# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
863ac_cpp='$CPP $CPPFLAGS'
864ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
865ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
866cross_compiling=$ac_cv_prog_cc_cross
867
868echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
869if test $ac_cv_prog_cc_works = no; then
870  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
871fi
872echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
873echo "configure:874: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
874echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
875cross_compiling=$ac_cv_prog_cc_cross
876
877echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
878echo "configure:879: checking whether we are using GNU C" >&5
879if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
880  echo $ac_n "(cached) $ac_c" 1>&6
881else
882  cat > conftest.c <<EOF
883#ifdef __GNUC__
884  yes;
885#endif
886EOF
887if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
888  ac_cv_prog_gcc=yes
889else
890  ac_cv_prog_gcc=no
891fi
892fi
893
894echo "$ac_t""$ac_cv_prog_gcc" 1>&6
895
896if test $ac_cv_prog_gcc = yes; then
897  GCC=yes
898else
899  GCC=
900fi
901
902ac_test_CFLAGS="${CFLAGS+set}"
903ac_save_CFLAGS="$CFLAGS"
904CFLAGS=
905echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
906echo "configure:907: checking whether ${CC-cc} accepts -g" >&5
907if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
908  echo $ac_n "(cached) $ac_c" 1>&6
909else
910  echo 'void f(){}' > conftest.c
911if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
912  ac_cv_prog_cc_g=yes
913else
914  ac_cv_prog_cc_g=no
915fi
916rm -f conftest*
917
918fi
919
920echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
921if test "$ac_test_CFLAGS" = set; then
922  CFLAGS="$ac_save_CFLAGS"
923elif test $ac_cv_prog_cc_g = yes; then
924  if test "$GCC" = yes; then
925    CFLAGS="-g -O2"
926  else
927    CFLAGS="-g"
928  fi
929else
930  if test "$GCC" = yes; then
931    CFLAGS="-O2"
932  else
933    CFLAGS=
934  fi
935fi
936
937    if test "$GCC" = yes ; then
938	    if test "$SHLICC2" = yes ; then
939		    ac_cv_lbl_gcc_vers=2
940		    V_CCOPT="-O2"
941	    else
942		    echo $ac_n "checking gcc version""... $ac_c" 1>&6
943echo "configure:944: checking gcc version" >&5
944		    if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
945  echo $ac_n "(cached) $ac_c" 1>&6
946else
947  ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
948			    sed -e '/^gcc version /!d' \
949				-e 's/^gcc version //' \
950				-e 's/ .*//' -e 's/^[^0-9]*//' \
951				-e 's/\..*//'`
952fi
953
954		    echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6
955		    if test $ac_cv_lbl_gcc_vers -gt 1 ; then
956			    V_CCOPT="-O2"
957		    fi
958	    fi
959    else
960	    echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
961echo "configure:962: checking that $CC handles ansi prototypes" >&5
962	    if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
963  echo $ac_n "(cached) $ac_c" 1>&6
964else
965  cat > conftest.$ac_ext <<EOF
966#line 967 "configure"
967#include "confdefs.h"
968#include <sys/types.h>
969int main() {
970int frob(int, char *)
971; return 0; }
972EOF
973if { (eval echo configure:974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
974  rm -rf conftest*
975  ac_cv_lbl_cc_ansi_prototypes=yes
976else
977  echo "configure: failed program was:" >&5
978  cat conftest.$ac_ext >&5
979  rm -rf conftest*
980  ac_cv_lbl_cc_ansi_prototypes=no
981fi
982rm -f conftest*
983fi
984
985	    echo "$ac_t""$ac_cv_lbl_cc_ansi_prototypes" 1>&6
986	    if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
987		    case "$target_os" in
988
989		    hpux*)
990			    echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
991echo "configure:992: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
992			    savedcflags="$CFLAGS"
993			    CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
994			    if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
995  echo $ac_n "(cached) $ac_c" 1>&6
996else
997  cat > conftest.$ac_ext <<EOF
998#line 999 "configure"
999#include "confdefs.h"
1000#include <sys/types.h>
1001int main() {
1002int frob(int, char *)
1003; return 0; }
1004EOF
1005if { (eval echo configure:1006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1006  rm -rf conftest*
1007  ac_cv_lbl_cc_hpux_cc_aa=yes
1008else
1009  echo "configure: failed program was:" >&5
1010  cat conftest.$ac_ext >&5
1011  rm -rf conftest*
1012  ac_cv_lbl_cc_hpux_cc_aa=no
1013fi
1014rm -f conftest*
1015fi
1016
1017			    echo "$ac_t""$ac_cv_lbl_cc_hpux_cc_aa" 1>&6
1018			    if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
1019				    { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
1020			    fi
1021			    CFLAGS="$savedcflags"
1022			    V_CCOPT="-Aa $V_CCOPT"
1023			    cat >> confdefs.h <<\EOF
1024#define _HPUX_SOURCE 1
1025EOF
1026
1027			    ;;
1028
1029		    *)
1030			    { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
1031			    ;;
1032		    esac
1033	    fi
1034	    V_INCLS="$V_INCLS -I/usr/local/include"
1035	    LDFLAGS="$LDFLAGS -L/usr/local/lib"
1036
1037	    case "$target_os" in
1038
1039	    irix*)
1040		    V_CCOPT="$V_CCOPT -xansi -signed -g3"
1041		    ;;
1042
1043	    osf*)
1044		    V_CCOPT="$V_CCOPT -std1 -g3"
1045		    ;;
1046
1047	    ultrix*)
1048		    echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
1049echo "configure:1050: checking that Ultrix $CC hacks const in prototypes" >&5
1050		    if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
1051  echo $ac_n "(cached) $ac_c" 1>&6
1052else
1053  cat > conftest.$ac_ext <<EOF
1054#line 1055 "configure"
1055#include "confdefs.h"
1056#include <sys/types.h>
1057int main() {
1058struct a { int b; };
1059			    void c(const struct a *)
1060; return 0; }
1061EOF
1062if { (eval echo configure:1063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1063  rm -rf conftest*
1064  ac_cv_lbl_cc_const_proto=yes
1065else
1066  echo "configure: failed program was:" >&5
1067  cat conftest.$ac_ext >&5
1068  rm -rf conftest*
1069  ac_cv_lbl_cc_const_proto=no
1070fi
1071rm -f conftest*
1072fi
1073
1074		    echo "$ac_t""$ac_cv_lbl_cc_const_proto" 1>&6
1075		    if test $ac_cv_lbl_cc_const_proto = no ; then
1076			    cat >> confdefs.h <<\EOF
1077#define const
1078EOF
1079
1080		    fi
1081		    ;;
1082	    esac
1083    fi
1084
1085
1086echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1087echo "configure:1088: checking how to run the C preprocessor" >&5
1088# On Suns, sometimes $CPP names a directory.
1089if test -n "$CPP" && test -d "$CPP"; then
1090  CPP=
1091fi
1092if test -z "$CPP"; then
1093if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1094  echo $ac_n "(cached) $ac_c" 1>&6
1095else
1096    # This must be in double quotes, not single quotes, because CPP may get
1097  # substituted into the Makefile and "${CC-cc}" will confuse make.
1098  CPP="${CC-cc} -E"
1099  # On the NeXT, cc -E runs the code through the compiler's parser,
1100  # not just through cpp.
1101  cat > conftest.$ac_ext <<EOF
1102#line 1103 "configure"
1103#include "confdefs.h"
1104#include <assert.h>
1105Syntax Error
1106EOF
1107ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1108{ (eval echo configure:1109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1109ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1110if test -z "$ac_err"; then
1111  :
1112else
1113  echo "$ac_err" >&5
1114  echo "configure: failed program was:" >&5
1115  cat conftest.$ac_ext >&5
1116  rm -rf conftest*
1117  CPP="${CC-cc} -E -traditional-cpp"
1118  cat > conftest.$ac_ext <<EOF
1119#line 1120 "configure"
1120#include "confdefs.h"
1121#include <assert.h>
1122Syntax Error
1123EOF
1124ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125{ (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127if test -z "$ac_err"; then
1128  :
1129else
1130  echo "$ac_err" >&5
1131  echo "configure: failed program was:" >&5
1132  cat conftest.$ac_ext >&5
1133  rm -rf conftest*
1134  CPP="${CC-cc} -nologo -E"
1135  cat > conftest.$ac_ext <<EOF
1136#line 1137 "configure"
1137#include "confdefs.h"
1138#include <assert.h>
1139Syntax Error
1140EOF
1141ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1142{ (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1143ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1144if test -z "$ac_err"; then
1145  :
1146else
1147  echo "$ac_err" >&5
1148  echo "configure: failed program was:" >&5
1149  cat conftest.$ac_ext >&5
1150  rm -rf conftest*
1151  CPP=/lib/cpp
1152fi
1153rm -f conftest*
1154fi
1155rm -f conftest*
1156fi
1157rm -f conftest*
1158  ac_cv_prog_CPP="$CPP"
1159fi
1160  CPP="$ac_cv_prog_CPP"
1161else
1162  ac_cv_prog_CPP="$CPP"
1163fi
1164echo "$ac_t""$CPP" 1>&6
1165
1166for ac_hdr in malloc.h sys/ioccom.h sys/sockio.h
1167do
1168ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1169echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1170echo "configure:1171: checking for $ac_hdr" >&5
1171if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1172  echo $ac_n "(cached) $ac_c" 1>&6
1173else
1174  cat > conftest.$ac_ext <<EOF
1175#line 1176 "configure"
1176#include "confdefs.h"
1177#include <$ac_hdr>
1178EOF
1179ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1180{ (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1181ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1182if test -z "$ac_err"; then
1183  rm -rf conftest*
1184  eval "ac_cv_header_$ac_safe=yes"
1185else
1186  echo "$ac_err" >&5
1187  echo "configure: failed program was:" >&5
1188  cat conftest.$ac_ext >&5
1189  rm -rf conftest*
1190  eval "ac_cv_header_$ac_safe=no"
1191fi
1192rm -f conftest*
1193fi
1194if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1195  echo "$ac_t""yes" 1>&6
1196    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1197  cat >> confdefs.h <<EOF
1198#define $ac_tr_hdr 1
1199EOF
1200
1201else
1202  echo "$ac_t""no" 1>&6
1203fi
1204done
1205
1206
1207if test "$GCC" = yes ; then
1208	    echo $ac_n "checking for ANSI ioctl definitions""... $ac_c" 1>&6
1209echo "configure:1210: checking for ANSI ioctl definitions" >&5
1210	    if eval "test \"`echo '$''{'ac_cv_lbl_gcc_fixincludes'+set}'`\" = set"; then
1211  echo $ac_n "(cached) $ac_c" 1>&6
1212else
1213  cat > conftest.$ac_ext <<EOF
1214#line 1215 "configure"
1215#include "confdefs.h"
1216/*
1217		     * This generates a "duplicate case value" when fixincludes
1218		     * has not be run.
1219		     */
1220#		include <sys/types.h>
1221#		include <sys/time.h>
1222#		include <sys/ioctl.h>
1223#		ifdef HAVE_SYS_IOCCOM_H
1224#		include <sys/ioccom.h>
1225#		endif
1226int main() {
1227switch (0) {
1228		    case _IO('A', 1):;
1229		    case _IO('B', 1):;
1230		    }
1231; return 0; }
1232EOF
1233if { (eval echo configure:1234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1234  rm -rf conftest*
1235  ac_cv_lbl_gcc_fixincludes=yes
1236else
1237  echo "configure: failed program was:" >&5
1238  cat conftest.$ac_ext >&5
1239  rm -rf conftest*
1240  ac_cv_lbl_gcc_fixincludes=no
1241fi
1242rm -f conftest*
1243fi
1244
1245	    echo "$ac_t""$ac_cv_lbl_gcc_fixincludes" 1>&6
1246	    if test $ac_cv_lbl_gcc_fixincludes = no ; then
1247		    # Don't cache failure
1248		    unset ac_cv_lbl_gcc_fixincludes
1249		    { echo "configure: error: see the INSTALL for more info" 1>&2; exit 1; }
1250	    fi
1251    fi
1252
1253for ac_func in ether_hostton strerror
1254do
1255echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1256echo "configure:1257: checking for $ac_func" >&5
1257if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1258  echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260  cat > conftest.$ac_ext <<EOF
1261#line 1262 "configure"
1262#include "confdefs.h"
1263/* System header to define __stub macros and hopefully few prototypes,
1264    which can conflict with char $ac_func(); below.  */
1265#include <assert.h>
1266/* Override any gcc2 internal prototype to avoid an error.  */
1267/* We use char because int might match the return type of a gcc2
1268    builtin and then its argument prototype would still apply.  */
1269char $ac_func();
1270
1271int main() {
1272
1273/* The GNU C library defines this for functions which it implements
1274    to always fail with ENOSYS.  Some functions are actually named
1275    something starting with __ and the normal name is an alias.  */
1276#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1277choke me
1278#else
1279$ac_func();
1280#endif
1281
1282; return 0; }
1283EOF
1284if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1285  rm -rf conftest*
1286  eval "ac_cv_func_$ac_func=yes"
1287else
1288  echo "configure: failed program was:" >&5
1289  cat conftest.$ac_ext >&5
1290  rm -rf conftest*
1291  eval "ac_cv_func_$ac_func=no"
1292fi
1293rm -f conftest*
1294fi
1295
1296if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1297  echo "$ac_t""yes" 1>&6
1298    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1299  cat >> confdefs.h <<EOF
1300#define $ac_tr_func 1
1301EOF
1302
1303else
1304  echo "$ac_t""no" 1>&6
1305fi
1306done
1307
1308
1309echo $ac_n "checking if --disable-protochain option is specified""... $ac_c" 1>&6
1310echo "configure:1311: checking if --disable-protochain option is specified" >&5
1311# Check whether --enable-protochain or --disable-protochain was given.
1312if test "${enable_protochain+set}" = set; then
1313  enableval="$enable_protochain"
1314  :
1315fi
1316
1317case "x$enable_protochain" in
1318xyes)	enable_protochain=enabled	;;
1319xno)	enable_protochain=disabled	;;
1320x)	enable_protochain=enabled	;;
1321esac
1322
1323if test "$enable_protochain" = "disabled"; then
1324	cat >> confdefs.h <<\EOF
1325#define NO_PROTOCHAIN 1
1326EOF
1327
1328fi
1329echo "$ac_t""${enable_protochain}" 1>&6
1330
1331# Check whether --with-pcap or --without-pcap was given.
1332if test "${with_pcap+set}" = set; then
1333  withval="$with_pcap"
1334  :
1335fi
1336
1337echo $ac_n "checking packet capture type""... $ac_c" 1>&6
1338echo "configure:1339: checking packet capture type" >&5
1339if test ! -z "$with_pcap" ; then
1340	V_PCAP="$withval"
1341elif test -r /dev/bpf0 ; then
1342	V_PCAP=bpf
1343elif test -r /usr/include/net/pfilt.h ; then
1344	V_PCAP=pf
1345elif test -r /dev/enet ; then
1346	V_PCAP=enet
1347elif test -r /dev/nit ; then
1348	V_PCAP=snit
1349elif test -r /usr/include/sys/net/nit.h ; then
1350	V_PCAP=nit
1351elif test -r /usr/include/net/raw.h ; then
1352	V_PCAP=snoop
1353elif test -r /usr/include/sys/dlpi.h ; then
1354	V_PCAP=dlpi
1355elif test -r /usr/include/linux/socket.h ; then
1356	V_PCAP=linux
1357elif test -c /dev/bpf0 ; then		# check again in case not readable
1358	V_PCAP=bpf
1359elif test -c /dev/enet ; then		# check again in case not readable
1360	V_PCAP=enet
1361elif test -c /dev/nit ; then		# check again in case not readable
1362	V_PCAP=snit
1363else
1364	V_PCAP=null
1365fi
1366echo "$ac_t""$V_PCAP" 1>&6
1367
1368echo $ac_n "checking if --enable-ipv6 option is specified""... $ac_c" 1>&6
1369echo "configure:1370: checking if --enable-ipv6 option is specified" >&5
1370# Check whether --enable-ipv6 or --disable-ipv6 was given.
1371if test "${enable_ipv6+set}" = set; then
1372  enableval="$enable_ipv6"
1373  :
1374fi
1375
1376if test "$enable_ipv6" = "yes"; then
1377	cat >> confdefs.h <<\EOF
1378#define INET6 1
1379EOF
1380
1381fi
1382echo "$ac_t""${enable_ipv6-no}" 1>&6
1383
1384case "$V_PCAP" in
1385
1386dlpi)
1387	for ac_hdr in sys/bufmod.h sys/dlpi_ext.h
1388do
1389ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1390echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1391echo "configure:1392: checking for $ac_hdr" >&5
1392if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1393  echo $ac_n "(cached) $ac_c" 1>&6
1394else
1395  cat > conftest.$ac_ext <<EOF
1396#line 1397 "configure"
1397#include "confdefs.h"
1398#include <$ac_hdr>
1399EOF
1400ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1401{ (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1402ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1403if test -z "$ac_err"; then
1404  rm -rf conftest*
1405  eval "ac_cv_header_$ac_safe=yes"
1406else
1407  echo "$ac_err" >&5
1408  echo "configure: failed program was:" >&5
1409  cat conftest.$ac_ext >&5
1410  rm -rf conftest*
1411  eval "ac_cv_header_$ac_safe=no"
1412fi
1413rm -f conftest*
1414fi
1415if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1416  echo "$ac_t""yes" 1>&6
1417    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1418  cat >> confdefs.h <<EOF
1419#define $ac_tr_hdr 1
1420EOF
1421
1422else
1423  echo "$ac_t""no" 1>&6
1424fi
1425done
1426
1427	echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
1428echo "configure:1429: checking for /dev/dlpi device" >&5
1429	if test -c /dev/dlpi ; then
1430		echo "$ac_t""yes" 1>&6
1431		cat >> confdefs.h <<\EOF
1432#define HAVE_DEV_DLPI 1
1433EOF
1434
1435	else
1436		echo "$ac_t""no" 1>&6
1437		dir="/dev/dlpi"
1438		echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
1439echo "configure:1440: checking for $dir directory" >&5
1440		if test -d $dir ; then
1441			echo "$ac_t""yes" 1>&6
1442			cat >> confdefs.h <<EOF
1443#define PCAP_DEV_PREFIX "$dir"
1444EOF
1445
1446		else
1447			echo "$ac_t""no" 1>&6
1448		fi
1449	fi
1450	;;
1451
1452linux)
1453	for ac_hdr in net/if_arp.h
1454do
1455ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1456echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1457echo "configure:1458: checking for $ac_hdr" >&5
1458if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1459  echo $ac_n "(cached) $ac_c" 1>&6
1460else
1461  cat > conftest.$ac_ext <<EOF
1462#line 1463 "configure"
1463#include "confdefs.h"
1464#include <$ac_hdr>
1465EOF
1466ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1467{ (eval echo configure:1468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1468ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1469if test -z "$ac_err"; then
1470  rm -rf conftest*
1471  eval "ac_cv_header_$ac_safe=yes"
1472else
1473  echo "$ac_err" >&5
1474  echo "configure: failed program was:" >&5
1475  cat conftest.$ac_ext >&5
1476  rm -rf conftest*
1477  eval "ac_cv_header_$ac_safe=no"
1478fi
1479rm -f conftest*
1480fi
1481if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1482  echo "$ac_t""yes" 1>&6
1483    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1484  cat >> confdefs.h <<EOF
1485#define $ac_tr_hdr 1
1486EOF
1487
1488else
1489  echo "$ac_t""no" 1>&6
1490fi
1491done
1492
1493	echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1494echo "configure:1495: checking Linux kernel version" >&5
1495	if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1496  echo $ac_n "(cached) $ac_c" 1>&6
1497else
1498  ac_cv_linux_vers=`uname -r 2>&1 | \
1499		sed -n -e '$s/.* //' -e '$s/\..*//p'`
1500fi
1501
1502	echo "$ac_t""$ac_cv_linux_vers" 1>&6
1503	if test $ac_cv_linux_vers -lt 2 ; then
1504		{ echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
1505	fi
1506	;;
1507
1508null)
1509	echo "configure: warning: cannot determine packet capture interface" 1>&2
1510	echo "configure: warning: (see the INSTALL doc for more info)" 1>&2
1511	;;
1512
1513esac
1514
1515# Check whether --with-flex or --without-flex was given.
1516if test "${with_flex+set}" = set; then
1517  withval="$with_flex"
1518  :
1519fi
1520
1521    # Check whether --with-bison or --without-bison was given.
1522if test "${with_bison+set}" = set; then
1523  withval="$with_bison"
1524  :
1525fi
1526
1527    if test "$with_flex" = no ; then
1528	    V_LEX=lex
1529    else
1530	    for ac_prog in flex
1531do
1532# Extract the first word of "$ac_prog", so it can be a program name with args.
1533set dummy $ac_prog; ac_word=$2
1534echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1535echo "configure:1536: checking for $ac_word" >&5
1536if eval "test \"`echo '$''{'ac_cv_prog_V_LEX'+set}'`\" = set"; then
1537  echo $ac_n "(cached) $ac_c" 1>&6
1538else
1539  if test -n "$V_LEX"; then
1540  ac_cv_prog_V_LEX="$V_LEX" # Let the user override the test.
1541else
1542  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1543  ac_dummy="$PATH"
1544  for ac_dir in $ac_dummy; do
1545    test -z "$ac_dir" && ac_dir=.
1546    if test -f $ac_dir/$ac_word; then
1547      ac_cv_prog_V_LEX="$ac_prog"
1548      break
1549    fi
1550  done
1551  IFS="$ac_save_ifs"
1552fi
1553fi
1554V_LEX="$ac_cv_prog_V_LEX"
1555if test -n "$V_LEX"; then
1556  echo "$ac_t""$V_LEX" 1>&6
1557else
1558  echo "$ac_t""no" 1>&6
1559fi
1560
1561test -n "$V_LEX" && break
1562done
1563test -n "$V_LEX" || V_LEX="lex"
1564
1565    fi
1566    if test "$V_LEX" = flex ; then
1567	    # The -V flag was added in 2.4
1568	    echo $ac_n "checking for flex 2.4 or higher""... $ac_c" 1>&6
1569echo "configure:1570: checking for flex 2.4 or higher" >&5
1570	    if eval "test \"`echo '$''{'ac_cv_lbl_flex_v24'+set}'`\" = set"; then
1571  echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573  if flex -V >/dev/null 2>&1; then
1574			ac_cv_lbl_flex_v24=yes
1575		else
1576			ac_cv_lbl_flex_v24=no
1577		fi
1578fi
1579
1580	    echo "$ac_t""$ac_cv_lbl_flex_v24" 1>&6
1581	    if test $ac_cv_lbl_flex_v24 = no ; then
1582		    s="2.4 or higher required"
1583		    echo "configure: warning: ignoring obsolete flex executable ($s)" 1>&2
1584		    V_LEX=lex
1585	    fi
1586    fi
1587    if test "$with_bison" = no ; then
1588	    V_YACC=yacc
1589    else
1590	    for ac_prog in bison
1591do
1592# Extract the first word of "$ac_prog", so it can be a program name with args.
1593set dummy $ac_prog; ac_word=$2
1594echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1595echo "configure:1596: checking for $ac_word" >&5
1596if eval "test \"`echo '$''{'ac_cv_prog_V_YACC'+set}'`\" = set"; then
1597  echo $ac_n "(cached) $ac_c" 1>&6
1598else
1599  if test -n "$V_YACC"; then
1600  ac_cv_prog_V_YACC="$V_YACC" # Let the user override the test.
1601else
1602  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1603  ac_dummy="$PATH"
1604  for ac_dir in $ac_dummy; do
1605    test -z "$ac_dir" && ac_dir=.
1606    if test -f $ac_dir/$ac_word; then
1607      ac_cv_prog_V_YACC="$ac_prog"
1608      break
1609    fi
1610  done
1611  IFS="$ac_save_ifs"
1612fi
1613fi
1614V_YACC="$ac_cv_prog_V_YACC"
1615if test -n "$V_YACC"; then
1616  echo "$ac_t""$V_YACC" 1>&6
1617else
1618  echo "$ac_t""no" 1>&6
1619fi
1620
1621test -n "$V_YACC" && break
1622done
1623test -n "$V_YACC" || V_YACC="yacc"
1624
1625    fi
1626    if test "$V_YACC" = bison ; then
1627	    V_YACC="$V_YACC -y"
1628    fi
1629    if test "$V_LEX" != lex -a "$V_YACC" = yacc -o "$V_LEX" = lex -a "$V_YACC" != yacc ; then
1630	    echo "configure: warning: don't have both flex and bison; reverting to lex/yacc" 1>&2
1631	    V_LEX=lex
1632	    V_YACC=yacc
1633    fi
1634    if test "$V_LEX" = flex -a -n "pcap_" ; then
1635	    V_LEX="$V_LEX -Ppcap_"
1636	    V_YACC="$V_YACC -p pcap_"
1637    fi
1638
1639case "$target_os" in
1640
1641aix*)
1642		cat >> confdefs.h <<\EOF
1643#define _SUN 1
1644EOF
1645
1646	;;
1647
1648hpux9*)
1649	cat >> confdefs.h <<\EOF
1650#define HAVE_HPUX9 1
1651EOF
1652
1653	;;
1654
1655hpux10.0*)
1656	;;
1657
1658hpux10.1*)
1659	;;
1660
1661hpux*)
1662		cat >> confdefs.h <<\EOF
1663#define HAVE_HPUX10_20 1
1664EOF
1665
1666	;;
1667
1668sinix*)
1669	echo $ac_n "checking if SINIX compiler defines sinix""... $ac_c" 1>&6
1670echo "configure:1671: checking if SINIX compiler defines sinix" >&5
1671	if eval "test \"`echo '$''{'ac_cv_cc_sinix_defined'+set}'`\" = set"; then
1672  echo $ac_n "(cached) $ac_c" 1>&6
1673else
1674  cat > conftest.$ac_ext <<EOF
1675#line 1676 "configure"
1676#include "confdefs.h"
1677
1678int main() {
1679int i = sinix;
1680; return 0; }
1681EOF
1682if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1683  rm -rf conftest*
1684  ac_cv_cc_sinix_defined=yes
1685else
1686  echo "configure: failed program was:" >&5
1687  cat conftest.$ac_ext >&5
1688  rm -rf conftest*
1689  ac_cv_cc_sinix_defined=no
1690fi
1691rm -f conftest*
1692fi
1693
1694	    echo "$ac_t""$ac_cv_cc_sinix_defined" 1>&6
1695	    if test $ac_cv_cc_sinix_defined = no ; then
1696		    cat >> confdefs.h <<\EOF
1697#define sinix 1
1698EOF
1699
1700	    fi
1701	;;
1702
1703solaris*)
1704	cat >> confdefs.h <<\EOF
1705#define HAVE_SOLARIS 1
1706EOF
1707
1708	;;
1709
1710linux*)
1711	V_INCLS="$V_INCLS -Ilinux-include"
1712	;;
1713esac
1714
1715for ac_prog in ranlib
1716do
1717# Extract the first word of "$ac_prog", so it can be a program name with args.
1718set dummy $ac_prog; ac_word=$2
1719echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1720echo "configure:1721: checking for $ac_word" >&5
1721if eval "test \"`echo '$''{'ac_cv_prog_V_RANLIB'+set}'`\" = set"; then
1722  echo $ac_n "(cached) $ac_c" 1>&6
1723else
1724  if test -n "$V_RANLIB"; then
1725  ac_cv_prog_V_RANLIB="$V_RANLIB" # Let the user override the test.
1726else
1727  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1728  ac_dummy="$PATH"
1729  for ac_dir in $ac_dummy; do
1730    test -z "$ac_dir" && ac_dir=.
1731    if test -f $ac_dir/$ac_word; then
1732      ac_cv_prog_V_RANLIB="$ac_prog"
1733      break
1734    fi
1735  done
1736  IFS="$ac_save_ifs"
1737fi
1738fi
1739V_RANLIB="$ac_cv_prog_V_RANLIB"
1740if test -n "$V_RANLIB"; then
1741  echo "$ac_t""$V_RANLIB" 1>&6
1742else
1743  echo "$ac_t""no" 1>&6
1744fi
1745
1746test -n "$V_RANLIB" && break
1747done
1748test -n "$V_RANLIB" || V_RANLIB="@true"
1749
1750
1751rm -f os-proto.h
1752    if test "${LBL_CFLAGS+set}" = set; then
1753	    V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
1754    fi
1755    if test -f .devel ; then
1756	    if test "$GCC" = yes ; then
1757		    if test "${LBL_CFLAGS+set}" != set; then
1758			    if test "$ac_cv_prog_cc_g" = yes ; then
1759				    V_CCOPT="-g $V_CCOPT"
1760			    fi
1761			    V_CCOPT="$V_CCOPT -Wall"
1762			    if test $ac_cv_lbl_gcc_vers -gt 1 ; then
1763				    V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
1764			    fi
1765		    fi
1766	    else
1767		    case "$target_os" in
1768
1769		    irix6*)
1770			    V_CCOPT="$V_CCOPT -n32"
1771			    ;;
1772
1773		    *)
1774			    ;;
1775		    esac
1776	    fi
1777	    os=`echo $target_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
1778	    name="lbl/os-$os.h"
1779	    if test -f $name ; then
1780		    ln -s $name os-proto.h
1781		    cat >> confdefs.h <<\EOF
1782#define HAVE_OS_PROTO_H 1
1783EOF
1784
1785	    else
1786		    echo "configure: warning: can't find $name" 1>&2
1787	    fi
1788    fi
1789
1790echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
1791echo "configure:1792: checking if sockaddr struct has sa_len member" >&5
1792    if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
1793  echo $ac_n "(cached) $ac_c" 1>&6
1794else
1795  cat > conftest.$ac_ext <<EOF
1796#line 1797 "configure"
1797#include "confdefs.h"
1798
1799#	include <sys/types.h>
1800#	include <sys/socket.h>
1801int main() {
1802u_int i = sizeof(((struct sockaddr *)0)->sa_len)
1803; return 0; }
1804EOF
1805if { (eval echo configure:1806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1806  rm -rf conftest*
1807  ac_cv_lbl_sockaddr_has_sa_len=yes
1808else
1809  echo "configure: failed program was:" >&5
1810  cat conftest.$ac_ext >&5
1811  rm -rf conftest*
1812  ac_cv_lbl_sockaddr_has_sa_len=no
1813fi
1814rm -f conftest*
1815fi
1816
1817    echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
1818    if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
1819	    cat >> confdefs.h <<\EOF
1820#define HAVE_SOCKADDR_SA_LEN 1
1821EOF
1822
1823    fi
1824
1825echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
1826echo "configure:1827: checking if unaligned accesses fail" >&5
1827    if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
1828  echo $ac_n "(cached) $ac_c" 1>&6
1829else
1830  case "$target_cpu" in
1831
1832	alpha|hp*|mips|sparc)
1833		ac_cv_lbl_unaligned_fail=yes
1834		;;
1835
1836	*)
1837		cat >conftest.c <<EOF
1838#		include <sys/types.h>
1839#		include <sys/wait.h>
1840#		include <stdio.h>
1841		unsigned char a[5] = { 1, 2, 3, 4, 5 };
1842		main() {
1843		unsigned int i;
1844		pid_t pid;
1845		int status;
1846		/* avoid "core dumped" message */
1847		pid = fork();
1848		if (pid <  0)
1849			exit(2);
1850		if (pid > 0) {
1851			/* parent */
1852			pid = waitpid(pid, &status, 0);
1853			if (pid < 0)
1854				exit(3);
1855			exit(!WIFEXITED(status));
1856		}
1857		/* child */
1858		i = *(unsigned int *)&a[1];
1859		printf("%d\n", i);
1860		exit(0);
1861		}
1862EOF
1863		${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
1864		    conftest.c $LIBS >/dev/null 2>&1
1865		if test ! -x conftest ; then
1866						ac_cv_lbl_unaligned_fail=yes
1867		else
1868			./conftest >conftest.out
1869			if test ! -s conftest.out ; then
1870				ac_cv_lbl_unaligned_fail=yes
1871			else
1872				ac_cv_lbl_unaligned_fail=no
1873			fi
1874		fi
1875		rm -f conftest* core core.conftest
1876		;;
1877	esac
1878fi
1879
1880    echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
1881    if test $ac_cv_lbl_unaligned_fail = yes ; then
1882	    cat >> confdefs.h <<\EOF
1883#define LBL_ALIGN 1
1884EOF
1885
1886    fi
1887
1888if test -r ${srcdir}/lbl/gnuc.h ; then
1889	rm -f gnuc.h
1890	ln -s ${srcdir}/lbl/gnuc.h gnuc.h
1891fi
1892
1893rm -f net
1894ln -s ${srcdir}/bpf/net net
1895
1896
1897
1898
1899
1900
1901
1902
1903# Find a good install program.  We prefer a C program (faster),
1904# so one script is as good as another.  But avoid the broken or
1905# incompatible versions:
1906# SysV /etc/install, /usr/sbin/install
1907# SunOS /usr/etc/install
1908# IRIX /sbin/install
1909# AIX /bin/install
1910# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1911# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1912# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1913# ./install, which can be erroneously created by make from ./install.sh.
1914echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1915echo "configure:1916: checking for a BSD compatible install" >&5
1916if test -z "$INSTALL"; then
1917if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1918  echo $ac_n "(cached) $ac_c" 1>&6
1919else
1920    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
1921  for ac_dir in $PATH; do
1922    # Account for people who put trailing slashes in PATH elements.
1923    case "$ac_dir/" in
1924    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1925    *)
1926      # OSF1 and SCO ODT 3.0 have their own names for install.
1927      # Don't use installbsd from OSF since it installs stuff as root
1928      # by default.
1929      for ac_prog in ginstall scoinst install; do
1930        if test -f $ac_dir/$ac_prog; then
1931	  if test $ac_prog = install &&
1932            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1933	    # AIX install.  It has an incompatible calling convention.
1934	    :
1935	  else
1936	    ac_cv_path_install="$ac_dir/$ac_prog -c"
1937	    break 2
1938	  fi
1939	fi
1940      done
1941      ;;
1942    esac
1943  done
1944  IFS="$ac_save_IFS"
1945
1946fi
1947  if test "${ac_cv_path_install+set}" = set; then
1948    INSTALL="$ac_cv_path_install"
1949  else
1950    # As a last resort, use the slow shell script.  We don't cache a
1951    # path for INSTALL within a source directory, because that will
1952    # break other packages using the cache if that directory is
1953    # removed, or if the path is relative.
1954    INSTALL="$ac_install_sh"
1955  fi
1956fi
1957echo "$ac_t""$INSTALL" 1>&6
1958
1959# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1960# It thinks the first close brace ends the variable substitution.
1961test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1962
1963test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1964
1965test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1966
1967
1968trap '' 1 2 15
1969cat > confcache <<\EOF
1970# This file is a shell script that caches the results of configure
1971# tests run on this system so they can be shared between configure
1972# scripts and configure runs.  It is not useful on other systems.
1973# If it contains results you don't want to keep, you may remove or edit it.
1974#
1975# By default, configure uses ./config.cache as the cache file,
1976# creating it if it does not exist already.  You can give configure
1977# the --cache-file=FILE option to use a different cache file; that is
1978# what configure does when it calls configure scripts in
1979# subdirectories, so they share the cache.
1980# Giving --cache-file=/dev/null disables caching, for debugging configure.
1981# config.status only pays attention to the cache file if you give it the
1982# --recheck option to rerun configure.
1983#
1984EOF
1985# The following way of writing the cache mishandles newlines in values,
1986# but we know of no workaround that is simple, portable, and efficient.
1987# So, don't put newlines in cache variables' values.
1988# Ultrix sh set writes to stderr and can't be redirected directly,
1989# and sets the high bit in the cache file unless we assign to the vars.
1990(set) 2>&1 |
1991  case `(ac_space=' '; set | grep ac_space) 2>&1` in
1992  *ac_space=\ *)
1993    # `set' does not quote correctly, so add quotes (double-quote substitution
1994    # turns \\\\ into \\, and sed turns \\ into \).
1995    sed -n \
1996      -e "s/'/'\\\\''/g" \
1997      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1998    ;;
1999  *)
2000    # `set' quotes correctly as required by POSIX, so do not add quotes.
2001    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2002    ;;
2003  esac >> confcache
2004if cmp -s $cache_file confcache; then
2005  :
2006else
2007  if test -w $cache_file; then
2008    echo "updating cache $cache_file"
2009    cat confcache > $cache_file
2010  else
2011    echo "not updating unwritable cache $cache_file"
2012  fi
2013fi
2014rm -f confcache
2015
2016trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2017
2018test "x$prefix" = xNONE && prefix=$ac_default_prefix
2019# Let make expand exec_prefix.
2020test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2021
2022# Any assignment to VPATH causes Sun make to only execute
2023# the first set of double-colon rules, so remove it if not needed.
2024# If there is a colon in the path, we need to keep it.
2025if test "x$srcdir" = x.; then
2026  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2027fi
2028
2029trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2030
2031# Transform confdefs.h into DEFS.
2032# Protect against shell expansion while executing Makefile rules.
2033# Protect against Makefile macro expansion.
2034cat > conftest.defs <<\EOF
2035s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2036s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
2037s%\[%\\&%g
2038s%\]%\\&%g
2039s%\$%$$%g
2040EOF
2041DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2042rm -f conftest.defs
2043
2044
2045# Without the "./", some shells look in PATH for config.status.
2046: ${CONFIG_STATUS=./config.status}
2047
2048echo creating $CONFIG_STATUS
2049rm -f $CONFIG_STATUS
2050cat > $CONFIG_STATUS <<EOF
2051#! /bin/sh
2052# Generated automatically by configure.
2053# Run this file to recreate the current configuration.
2054# This directory was configured as follows,
2055# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2056#
2057# $0 $ac_configure_args
2058#
2059# Compiler output produced by configure, useful for debugging
2060# configure, is in ./config.log if it exists.
2061
2062ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2063for ac_option
2064do
2065  case "\$ac_option" in
2066  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2067    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2068    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2069  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2070    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2071    exit 0 ;;
2072  -help | --help | --hel | --he | --h)
2073    echo "\$ac_cs_usage"; exit 0 ;;
2074  *) echo "\$ac_cs_usage"; exit 1 ;;
2075  esac
2076done
2077
2078ac_given_srcdir=$srcdir
2079ac_given_INSTALL="$INSTALL"
2080
2081trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2082EOF
2083cat >> $CONFIG_STATUS <<EOF
2084
2085# Protect against being on the right side of a sed subst in config.status.
2086sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2087 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2088$ac_vpsub
2089$extrasub
2090s%@SHELL@%$SHELL%g
2091s%@CFLAGS@%$CFLAGS%g
2092s%@CPPFLAGS@%$CPPFLAGS%g
2093s%@CXXFLAGS@%$CXXFLAGS%g
2094s%@FFLAGS@%$FFLAGS%g
2095s%@DEFS@%$DEFS%g
2096s%@LDFLAGS@%$LDFLAGS%g
2097s%@LIBS@%$LIBS%g
2098s%@exec_prefix@%$exec_prefix%g
2099s%@prefix@%$prefix%g
2100s%@program_transform_name@%$program_transform_name%g
2101s%@bindir@%$bindir%g
2102s%@sbindir@%$sbindir%g
2103s%@libexecdir@%$libexecdir%g
2104s%@datadir@%$datadir%g
2105s%@sysconfdir@%$sysconfdir%g
2106s%@sharedstatedir@%$sharedstatedir%g
2107s%@localstatedir@%$localstatedir%g
2108s%@libdir@%$libdir%g
2109s%@includedir@%$includedir%g
2110s%@oldincludedir@%$oldincludedir%g
2111s%@infodir@%$infodir%g
2112s%@mandir@%$mandir%g
2113s%@host@%$host%g
2114s%@host_alias@%$host_alias%g
2115s%@host_cpu@%$host_cpu%g
2116s%@host_vendor@%$host_vendor%g
2117s%@host_os@%$host_os%g
2118s%@target@%$target%g
2119s%@target_alias@%$target_alias%g
2120s%@target_cpu@%$target_cpu%g
2121s%@target_vendor@%$target_vendor%g
2122s%@target_os@%$target_os%g
2123s%@build@%$build%g
2124s%@build_alias@%$build_alias%g
2125s%@build_cpu@%$build_cpu%g
2126s%@build_vendor@%$build_vendor%g
2127s%@build_os@%$build_os%g
2128s%@SHLICC2@%$SHLICC2%g
2129s%@CC@%$CC%g
2130s%@CPP@%$CPP%g
2131s%@V_LEX@%$V_LEX%g
2132s%@V_YACC@%$V_YACC%g
2133s%@V_RANLIB@%$V_RANLIB%g
2134s%@V_CCOPT@%$V_CCOPT%g
2135s%@V_INCLS@%$V_INCLS%g
2136s%@V_PCAP@%$V_PCAP%g
2137s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2138s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2139s%@INSTALL_DATA@%$INSTALL_DATA%g
2140
2141CEOF
2142EOF
2143
2144cat >> $CONFIG_STATUS <<\EOF
2145
2146# Split the substitutions into bite-sized pieces for seds with
2147# small command number limits, like on Digital OSF/1 and HP-UX.
2148ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2149ac_file=1 # Number of current file.
2150ac_beg=1 # First line for current file.
2151ac_end=$ac_max_sed_cmds # Line after last line for current file.
2152ac_more_lines=:
2153ac_sed_cmds=""
2154while $ac_more_lines; do
2155  if test $ac_beg -gt 1; then
2156    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2157  else
2158    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2159  fi
2160  if test ! -s conftest.s$ac_file; then
2161    ac_more_lines=false
2162    rm -f conftest.s$ac_file
2163  else
2164    if test -z "$ac_sed_cmds"; then
2165      ac_sed_cmds="sed -f conftest.s$ac_file"
2166    else
2167      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2168    fi
2169    ac_file=`expr $ac_file + 1`
2170    ac_beg=$ac_end
2171    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2172  fi
2173done
2174if test -z "$ac_sed_cmds"; then
2175  ac_sed_cmds=cat
2176fi
2177EOF
2178
2179cat >> $CONFIG_STATUS <<EOF
2180
2181CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2182EOF
2183cat >> $CONFIG_STATUS <<\EOF
2184for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2185  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2186  case "$ac_file" in
2187  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2188       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2189  *) ac_file_in="${ac_file}.in" ;;
2190  esac
2191
2192  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2193
2194  # Remove last slash and all that follows it.  Not all systems have dirname.
2195  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2196  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2197    # The file is in a subdirectory.
2198    test ! -d "$ac_dir" && mkdir "$ac_dir"
2199    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2200    # A "../" for each directory in $ac_dir_suffix.
2201    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2202  else
2203    ac_dir_suffix= ac_dots=
2204  fi
2205
2206  case "$ac_given_srcdir" in
2207  .)  srcdir=.
2208      if test -z "$ac_dots"; then top_srcdir=.
2209      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2210  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2211  *) # Relative path.
2212    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2213    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2214  esac
2215
2216  case "$ac_given_INSTALL" in
2217  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2218  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2219  esac
2220
2221  echo creating "$ac_file"
2222  rm -f "$ac_file"
2223  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2224  case "$ac_file" in
2225  *Makefile*) ac_comsub="1i\\
2226# $configure_input" ;;
2227  *) ac_comsub= ;;
2228  esac
2229
2230  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2231  sed -e "$ac_comsub
2232s%@configure_input@%$configure_input%g
2233s%@srcdir@%$srcdir%g
2234s%@top_srcdir@%$top_srcdir%g
2235s%@INSTALL@%$INSTALL%g
2236" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2237fi; done
2238rm -f conftest.s*
2239
2240EOF
2241cat >> $CONFIG_STATUS <<EOF
2242
2243EOF
2244cat >> $CONFIG_STATUS <<\EOF
2245
2246exit 0
2247EOF
2248chmod +x $CONFIG_STATUS
2249rm -fr confdefs* $ac_clean_files
2250test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2251
2252
2253if test -f .devel ; then
2254	make depend
2255fi
2256exit 0
2257