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