xref: /freebsd/contrib/tcpdump/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=tcpdump.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 fcntl.h net/slip.h rpc/rpcent.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
1099echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1100echo "configure:1101: checking whether time.h and sys/time.h may both be included" >&5
1101if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1102  echo $ac_n "(cached) $ac_c" 1>&6
1103else
1104  cat > conftest.$ac_ext <<EOF
1105#line 1106 "configure"
1106#include "confdefs.h"
1107#include <sys/types.h>
1108#include <sys/time.h>
1109#include <time.h>
1110int main() {
1111struct tm *tp;
1112; return 0; }
1113EOF
1114if { (eval echo configure:1115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1115  rm -rf conftest*
1116  ac_cv_header_time=yes
1117else
1118  echo "configure: failed program was:" >&5
1119  cat conftest.$ac_ext >&5
1120  rm -rf conftest*
1121  ac_cv_header_time=no
1122fi
1123rm -f conftest*
1124fi
1125
1126echo "$ac_t""$ac_cv_header_time" 1>&6
1127if test $ac_cv_header_time = yes; then
1128  cat >> confdefs.h <<\EOF
1129#define TIME_WITH_SYS_TIME 1
1130EOF
1131
1132fi
1133
1134
1135for ac_func in vfprintf strcasecmp
1136do
1137echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1138echo "configure:1139: checking for $ac_func" >&5
1139if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1140  echo $ac_n "(cached) $ac_c" 1>&6
1141else
1142  cat > conftest.$ac_ext <<EOF
1143#line 1144 "configure"
1144#include "confdefs.h"
1145/* System header to define __stub macros and hopefully few prototypes,
1146    which can conflict with char $ac_func(); below.  */
1147#include <assert.h>
1148/* Override any gcc2 internal prototype to avoid an error.  */
1149/* We use char because int might match the return type of a gcc2
1150    builtin and then its argument prototype would still apply.  */
1151char $ac_func();
1152
1153int main() {
1154
1155/* The GNU C library defines this for functions which it implements
1156    to always fail with ENOSYS.  Some functions are actually named
1157    something starting with __ and the normal name is an alias.  */
1158#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1159choke me
1160#else
1161$ac_func();
1162#endif
1163
1164; return 0; }
1165EOF
1166if { (eval echo configure:1167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1167  rm -rf conftest*
1168  eval "ac_cv_func_$ac_func=yes"
1169else
1170  echo "configure: failed program was:" >&5
1171  cat conftest.$ac_ext >&5
1172  rm -rf conftest*
1173  eval "ac_cv_func_$ac_func=no"
1174fi
1175rm -f conftest*
1176fi
1177
1178if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1179  echo "$ac_t""yes" 1>&6
1180    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1181  cat >> confdefs.h <<EOF
1182#define $ac_tr_func 1
1183EOF
1184
1185else
1186  echo "$ac_t""no" 1>&6
1187LIBOBJS="$LIBOBJS ${ac_func}.o"
1188fi
1189done
1190
1191
1192for ac_func in ether_ntoa setlinebuf
1193do
1194echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1195echo "configure:1196: checking for $ac_func" >&5
1196if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1197  echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199  cat > conftest.$ac_ext <<EOF
1200#line 1201 "configure"
1201#include "confdefs.h"
1202/* System header to define __stub macros and hopefully few prototypes,
1203    which can conflict with char $ac_func(); below.  */
1204#include <assert.h>
1205/* Override any gcc2 internal prototype to avoid an error.  */
1206/* We use char because int might match the return type of a gcc2
1207    builtin and then its argument prototype would still apply.  */
1208char $ac_func();
1209
1210int main() {
1211
1212/* The GNU C library defines this for functions which it implements
1213    to always fail with ENOSYS.  Some functions are actually named
1214    something starting with __ and the normal name is an alias.  */
1215#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1216choke me
1217#else
1218$ac_func();
1219#endif
1220
1221; return 0; }
1222EOF
1223if { (eval echo configure:1224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1224  rm -rf conftest*
1225  eval "ac_cv_func_$ac_func=yes"
1226else
1227  echo "configure: failed program was:" >&5
1228  cat conftest.$ac_ext >&5
1229  rm -rf conftest*
1230  eval "ac_cv_func_$ac_func=no"
1231fi
1232rm -f conftest*
1233fi
1234
1235if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1236  echo "$ac_t""yes" 1>&6
1237    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1238  cat >> confdefs.h <<EOF
1239#define $ac_tr_func 1
1240EOF
1241
1242else
1243  echo "$ac_t""no" 1>&6
1244fi
1245done
1246
1247
1248echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1249echo "configure:1250: checking whether byte ordering is bigendian" >&5
1250if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1251  echo $ac_n "(cached) $ac_c" 1>&6
1252else
1253  ac_cv_c_bigendian=unknown
1254# See if sys/param.h defines the BYTE_ORDER macro.
1255cat > conftest.$ac_ext <<EOF
1256#line 1257 "configure"
1257#include "confdefs.h"
1258#include <sys/types.h>
1259#include <sys/param.h>
1260int main() {
1261
1262#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1263 bogus endian macros
1264#endif
1265; return 0; }
1266EOF
1267if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1268  rm -rf conftest*
1269  # It does; now see whether it defined to BIG_ENDIAN or not.
1270cat > conftest.$ac_ext <<EOF
1271#line 1272 "configure"
1272#include "confdefs.h"
1273#include <sys/types.h>
1274#include <sys/param.h>
1275int main() {
1276
1277#if BYTE_ORDER != BIG_ENDIAN
1278 not big endian
1279#endif
1280; return 0; }
1281EOF
1282if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1283  rm -rf conftest*
1284  ac_cv_c_bigendian=yes
1285else
1286  echo "configure: failed program was:" >&5
1287  cat conftest.$ac_ext >&5
1288  rm -rf conftest*
1289  ac_cv_c_bigendian=no
1290fi
1291rm -f conftest*
1292else
1293  echo "configure: failed program was:" >&5
1294  cat conftest.$ac_ext >&5
1295fi
1296rm -f conftest*
1297if test $ac_cv_c_bigendian = unknown; then
1298if test "$cross_compiling" = yes; then
1299    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1300else
1301  cat > conftest.$ac_ext <<EOF
1302#line 1303 "configure"
1303#include "confdefs.h"
1304main () {
1305  /* Are we little or big endian?  From Harbison&Steele.  */
1306  union
1307  {
1308    long l;
1309    char c[sizeof (long)];
1310  } u;
1311  u.l = 1;
1312  exit (u.c[sizeof (long) - 1] == 1);
1313}
1314EOF
1315if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1316then
1317  ac_cv_c_bigendian=no
1318else
1319  echo "configure: failed program was:" >&5
1320  cat conftest.$ac_ext >&5
1321  rm -fr conftest*
1322  ac_cv_c_bigendian=yes
1323fi
1324rm -fr conftest*
1325fi
1326
1327fi
1328fi
1329
1330echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1331if test $ac_cv_c_bigendian = yes; then
1332  cat >> confdefs.h <<\EOF
1333#define WORDS_BIGENDIAN 1
1334EOF
1335
1336fi
1337
1338
1339echo $ac_n "checking for main in -ldnet""... $ac_c" 1>&6
1340echo "configure:1341: checking for main in -ldnet" >&5
1341ac_lib_var=`echo dnet'_'main | sed 'y%./+-%__p_%'`
1342if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1343  echo $ac_n "(cached) $ac_c" 1>&6
1344else
1345  ac_save_LIBS="$LIBS"
1346LIBS="-ldnet  $LIBS"
1347cat > conftest.$ac_ext <<EOF
1348#line 1349 "configure"
1349#include "confdefs.h"
1350
1351int main() {
1352main()
1353; return 0; }
1354EOF
1355if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1356  rm -rf conftest*
1357  eval "ac_cv_lib_$ac_lib_var=yes"
1358else
1359  echo "configure: failed program was:" >&5
1360  cat conftest.$ac_ext >&5
1361  rm -rf conftest*
1362  eval "ac_cv_lib_$ac_lib_var=no"
1363fi
1364rm -f conftest*
1365LIBS="$ac_save_LIBS"
1366
1367fi
1368if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1369  echo "$ac_t""yes" 1>&6
1370    ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1371    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1372  cat >> confdefs.h <<EOF
1373#define $ac_tr_lib 1
1374EOF
1375
1376  LIBS="-ldnet $LIBS"
1377
1378else
1379  echo "$ac_t""no" 1>&6
1380fi
1381
1382echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
1383echo "configure:1384: checking for main in -lrpc" >&5
1384ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
1385if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1386  echo $ac_n "(cached) $ac_c" 1>&6
1387else
1388  ac_save_LIBS="$LIBS"
1389LIBS="-lrpc  $LIBS"
1390cat > conftest.$ac_ext <<EOF
1391#line 1392 "configure"
1392#include "confdefs.h"
1393
1394int main() {
1395main()
1396; return 0; }
1397EOF
1398if { (eval echo configure:1399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1399  rm -rf conftest*
1400  eval "ac_cv_lib_$ac_lib_var=yes"
1401else
1402  echo "configure: failed program was:" >&5
1403  cat conftest.$ac_ext >&5
1404  rm -rf conftest*
1405  eval "ac_cv_lib_$ac_lib_var=no"
1406fi
1407rm -f conftest*
1408LIBS="$ac_save_LIBS"
1409
1410fi
1411if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1412  echo "$ac_t""yes" 1>&6
1413    ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1414    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1415  cat >> confdefs.h <<EOF
1416#define $ac_tr_lib 1
1417EOF
1418
1419  LIBS="-lrpc $LIBS"
1420
1421else
1422  echo "$ac_t""no" 1>&6
1423fi
1424
1425echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1426echo "configure:1427: checking for main in -lnsl" >&5
1427ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1428if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1429  echo $ac_n "(cached) $ac_c" 1>&6
1430else
1431  ac_save_LIBS="$LIBS"
1432LIBS="-lnsl  $LIBS"
1433cat > conftest.$ac_ext <<EOF
1434#line 1435 "configure"
1435#include "confdefs.h"
1436
1437int main() {
1438main()
1439; return 0; }
1440EOF
1441if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1442  rm -rf conftest*
1443  eval "ac_cv_lib_$ac_lib_var=yes"
1444else
1445  echo "configure: failed program was:" >&5
1446  cat conftest.$ac_ext >&5
1447  rm -rf conftest*
1448  eval "ac_cv_lib_$ac_lib_var=no"
1449fi
1450rm -f conftest*
1451LIBS="$ac_save_LIBS"
1452
1453fi
1454if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1455  echo "$ac_t""yes" 1>&6
1456    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1457    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1458  cat >> confdefs.h <<EOF
1459#define $ac_tr_lib 1
1460EOF
1461
1462  LIBS="-lnsl $LIBS"
1463
1464else
1465  echo "$ac_t""no" 1>&6
1466fi
1467
1468echo $ac_n "checking for main in -lstr""... $ac_c" 1>&6
1469echo "configure:1470: checking for main in -lstr" >&5
1470ac_lib_var=`echo str'_'main | sed 'y%./+-%__p_%'`
1471if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1472  echo $ac_n "(cached) $ac_c" 1>&6
1473else
1474  ac_save_LIBS="$LIBS"
1475LIBS="-lstr  $LIBS"
1476cat > conftest.$ac_ext <<EOF
1477#line 1478 "configure"
1478#include "confdefs.h"
1479
1480int main() {
1481main()
1482; return 0; }
1483EOF
1484if { (eval echo configure:1485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1485  rm -rf conftest*
1486  eval "ac_cv_lib_$ac_lib_var=yes"
1487else
1488  echo "configure: failed program was:" >&5
1489  cat conftest.$ac_ext >&5
1490  rm -rf conftest*
1491  eval "ac_cv_lib_$ac_lib_var=no"
1492fi
1493rm -f conftest*
1494LIBS="$ac_save_LIBS"
1495
1496fi
1497if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1498  echo "$ac_t""yes" 1>&6
1499    ac_tr_lib=HAVE_LIB`echo str | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1500    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1501  cat >> confdefs.h <<EOF
1502#define $ac_tr_lib 1
1503EOF
1504
1505  LIBS="-lstr $LIBS"
1506
1507else
1508  echo "$ac_t""no" 1>&6
1509fi
1510
1511
1512case "$target_os" in
1513irix5.0*)
1514	;;
1515
1516irix5.1*)
1517	;;
1518
1519irix5.2*)
1520	;;
1521
1522*)
1523	echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1524echo "configure:1525: checking for main in -lsocket" >&5
1525ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1526if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1527  echo $ac_n "(cached) $ac_c" 1>&6
1528else
1529  ac_save_LIBS="$LIBS"
1530LIBS="-lsocket  $LIBS"
1531cat > conftest.$ac_ext <<EOF
1532#line 1533 "configure"
1533#include "confdefs.h"
1534
1535int main() {
1536main()
1537; return 0; }
1538EOF
1539if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1540  rm -rf conftest*
1541  eval "ac_cv_lib_$ac_lib_var=yes"
1542else
1543  echo "configure: failed program was:" >&5
1544  cat conftest.$ac_ext >&5
1545  rm -rf conftest*
1546  eval "ac_cv_lib_$ac_lib_var=no"
1547fi
1548rm -f conftest*
1549LIBS="$ac_save_LIBS"
1550
1551fi
1552if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1553  echo "$ac_t""yes" 1>&6
1554    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1555    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1556  cat >> confdefs.h <<EOF
1557#define $ac_tr_lib 1
1558EOF
1559
1560  LIBS="-lsocket $LIBS"
1561
1562else
1563  echo "$ac_t""no" 1>&6
1564fi
1565
1566	;;
1567esac
1568
1569pfopen=/usr/examples/packetfilter/pfopen.c
1570    if test -f $pfopen ; then
1571	    for ac_func in pfopen
1572do
1573echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1574echo "configure:1575: checking for $ac_func" >&5
1575if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1576  echo $ac_n "(cached) $ac_c" 1>&6
1577else
1578  cat > conftest.$ac_ext <<EOF
1579#line 1580 "configure"
1580#include "confdefs.h"
1581/* System header to define __stub macros and hopefully few prototypes,
1582    which can conflict with char $ac_func(); below.  */
1583#include <assert.h>
1584/* Override any gcc2 internal prototype to avoid an error.  */
1585/* We use char because int might match the return type of a gcc2
1586    builtin and then its argument prototype would still apply.  */
1587char $ac_func();
1588
1589int main() {
1590
1591/* The GNU C library defines this for functions which it implements
1592    to always fail with ENOSYS.  Some functions are actually named
1593    something starting with __ and the normal name is an alias.  */
1594#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1595choke me
1596#else
1597$ac_func();
1598#endif
1599
1600; return 0; }
1601EOF
1602if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1603  rm -rf conftest*
1604  eval "ac_cv_func_$ac_func=yes"
1605else
1606  echo "configure: failed program was:" >&5
1607  cat conftest.$ac_ext >&5
1608  rm -rf conftest*
1609  eval "ac_cv_func_$ac_func=no"
1610fi
1611rm -f conftest*
1612fi
1613
1614if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1615  echo "$ac_t""yes" 1>&6
1616    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1617  cat >> confdefs.h <<EOF
1618#define $ac_tr_func 1
1619EOF
1620
1621else
1622  echo "$ac_t""no" 1>&6
1623fi
1624done
1625
1626	    if test $ac_cv_func_pfopen = "no" ; then
1627		    echo "$ac_t""Using $pfopen" 1>&6
1628		    LIBS="$LIBS $pfopen"
1629	    fi
1630    fi
1631    echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
1632echo "configure:1633: checking for local pcap library" >&5
1633    libpcap=FAIL
1634    lastdir=FAIL
1635    places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \
1636	egrep '/libpcap-[0-9]*\.[0-9]*(\.[0-9]*)?([ab][0-9]*)?$'`
1637    for dir in $places ../libpcap libpcap ; do
1638	    basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
1639	    if test $lastdir = $basedir ; then
1640		    		    continue;
1641	    fi
1642	    lastdir=$dir
1643	    if test -r $dir/pcap.c ; then
1644		    libpcap=$dir/libpcap.a
1645		    d=$dir
1646		    	    fi
1647    done
1648    if test $libpcap = FAIL ; then
1649	    echo "$ac_t""not found" 1>&6
1650	    echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
1651echo "configure:1652: checking for main in -lpcap" >&5
1652ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
1653if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1654  echo $ac_n "(cached) $ac_c" 1>&6
1655else
1656  ac_save_LIBS="$LIBS"
1657LIBS="-lpcap  $LIBS"
1658cat > conftest.$ac_ext <<EOF
1659#line 1660 "configure"
1660#include "confdefs.h"
1661
1662int main() {
1663main()
1664; return 0; }
1665EOF
1666if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1667  rm -rf conftest*
1668  eval "ac_cv_lib_$ac_lib_var=yes"
1669else
1670  echo "configure: failed program was:" >&5
1671  cat conftest.$ac_ext >&5
1672  rm -rf conftest*
1673  eval "ac_cv_lib_$ac_lib_var=no"
1674fi
1675rm -f conftest*
1676LIBS="$ac_save_LIBS"
1677
1678fi
1679if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1680  echo "$ac_t""yes" 1>&6
1681  libpcap="-lpcap"
1682else
1683  echo "$ac_t""no" 1>&6
1684fi
1685
1686	    if test $libpcap = FAIL ; then
1687		    { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
1688	    fi
1689    else
1690	    V_PCAPDEP=$libpcap
1691	    V_INCLS="-I$d $V_INCLS"
1692	    echo "$ac_t""$libpcap" 1>&6
1693    fi
1694    LIBS="$libpcap $LIBS"
1695
1696V_GROUP=0
1697case "$target_os" in
1698
1699aix*)
1700		cat >> confdefs.h <<\EOF
1701#define _SUN 1
1702EOF
1703
1704	;;
1705
1706irix*)
1707	V_GROUP=sys
1708	;;
1709
1710osf*)
1711	V_GROUP=system
1712	case "$target_os" in
1713
1714	osf1*)
1715		;;
1716
1717	osf2*)
1718		;;
1719
1720	*)
1721				cat >> confdefs.h <<\EOF
1722#define __STDC__ 2
1723EOF
1724
1725		;;
1726	esac
1727	;;
1728
1729solaris*)
1730	V_GROUP=sys
1731	;;
1732
1733linux*)
1734	V_INCLS="$V_INCLS -Ilinux-include"
1735	;;
1736esac
1737
1738if test -f /dev/bpf0 ; then
1739	V_GROUP=bpf
1740fi
1741
1742echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1743echo "configure:1744: checking for ANSI C header files" >&5
1744if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1745  echo $ac_n "(cached) $ac_c" 1>&6
1746else
1747  cat > conftest.$ac_ext <<EOF
1748#line 1749 "configure"
1749#include "confdefs.h"
1750#include <stdlib.h>
1751#include <stdarg.h>
1752#include <string.h>
1753#include <float.h>
1754EOF
1755ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1756{ (eval echo configure:1757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1757ac_err=`grep -v '^ *+' conftest.out`
1758if test -z "$ac_err"; then
1759  rm -rf conftest*
1760  ac_cv_header_stdc=yes
1761else
1762  echo "$ac_err" >&5
1763  echo "configure: failed program was:" >&5
1764  cat conftest.$ac_ext >&5
1765  rm -rf conftest*
1766  ac_cv_header_stdc=no
1767fi
1768rm -f conftest*
1769
1770if test $ac_cv_header_stdc = yes; then
1771  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1772cat > conftest.$ac_ext <<EOF
1773#line 1774 "configure"
1774#include "confdefs.h"
1775#include <string.h>
1776EOF
1777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1778  egrep "memchr" >/dev/null 2>&1; then
1779  :
1780else
1781  rm -rf conftest*
1782  ac_cv_header_stdc=no
1783fi
1784rm -f conftest*
1785
1786fi
1787
1788if test $ac_cv_header_stdc = yes; then
1789  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1790cat > conftest.$ac_ext <<EOF
1791#line 1792 "configure"
1792#include "confdefs.h"
1793#include <stdlib.h>
1794EOF
1795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1796  egrep "free" >/dev/null 2>&1; then
1797  :
1798else
1799  rm -rf conftest*
1800  ac_cv_header_stdc=no
1801fi
1802rm -f conftest*
1803
1804fi
1805
1806if test $ac_cv_header_stdc = yes; then
1807  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1808if test "$cross_compiling" = yes; then
1809  :
1810else
1811  cat > conftest.$ac_ext <<EOF
1812#line 1813 "configure"
1813#include "confdefs.h"
1814#include <ctype.h>
1815#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1816#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1817#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1818int main () { int i; for (i = 0; i < 256; i++)
1819if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1820exit (0); }
1821
1822EOF
1823if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1824then
1825  :
1826else
1827  echo "configure: failed program was:" >&5
1828  cat conftest.$ac_ext >&5
1829  rm -fr conftest*
1830  ac_cv_header_stdc=no
1831fi
1832rm -fr conftest*
1833fi
1834
1835fi
1836fi
1837
1838echo "$ac_t""$ac_cv_header_stdc" 1>&6
1839if test $ac_cv_header_stdc = yes; then
1840  cat >> confdefs.h <<\EOF
1841#define STDC_HEADERS 1
1842EOF
1843
1844fi
1845
1846echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1847echo "configure:1848: checking for int32_t" >&5
1848if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
1849  echo $ac_n "(cached) $ac_c" 1>&6
1850else
1851  cat > conftest.$ac_ext <<EOF
1852#line 1853 "configure"
1853#include "confdefs.h"
1854#include <sys/types.h>
1855#if STDC_HEADERS
1856#include <stdlib.h>
1857#include <stddef.h>
1858#endif
1859EOF
1860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1861  egrep "int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1862  rm -rf conftest*
1863  ac_cv_type_int32_t=yes
1864else
1865  rm -rf conftest*
1866  ac_cv_type_int32_t=no
1867fi
1868rm -f conftest*
1869
1870fi
1871echo "$ac_t""$ac_cv_type_int32_t" 1>&6
1872if test $ac_cv_type_int32_t = no; then
1873  cat >> confdefs.h <<\EOF
1874#define int32_t int
1875EOF
1876
1877fi
1878
1879echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
1880echo "configure:1881: checking for u_int32_t" >&5
1881if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
1882  echo $ac_n "(cached) $ac_c" 1>&6
1883else
1884  cat > conftest.$ac_ext <<EOF
1885#line 1886 "configure"
1886#include "confdefs.h"
1887#include <sys/types.h>
1888#if STDC_HEADERS
1889#include <stdlib.h>
1890#include <stddef.h>
1891#endif
1892EOF
1893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1894  egrep "u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1895  rm -rf conftest*
1896  ac_cv_type_u_int32_t=yes
1897else
1898  rm -rf conftest*
1899  ac_cv_type_u_int32_t=no
1900fi
1901rm -f conftest*
1902
1903fi
1904echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
1905if test $ac_cv_type_u_int32_t = no; then
1906  cat >> confdefs.h <<\EOF
1907#define u_int32_t u_int
1908EOF
1909
1910fi
1911
1912
1913rm -f os-proto.h
1914    if test "${LBL_CFLAGS+set}" = set; then
1915	    V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
1916    fi
1917    if test $ac_cv_prog_gcc = yes -a -f .devel ; then
1918	    if test "${LBL_CFLAGS+set}" != set; then
1919		    if test "$ac_cv_prog_cc_g" = yes ; then
1920			    V_CCOPT="-g $V_CCOPT"
1921		    fi
1922		    V_CCOPT="$V_CCOPT -Wall"
1923		    if test $ac_cv_gcc_vers -gt 1 ; then
1924			    V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
1925		    fi
1926	    fi
1927	    os=`echo $target_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
1928	    name="lbl/os-$os.h"
1929	    if test -f $name ; then
1930		    ln -s $name os-proto.h
1931		    cat >> confdefs.h <<\EOF
1932#define HAVE_OS_PROTO_H 1
1933EOF
1934
1935	    else
1936		    echo "configure: warning: can't find $name" 1>&2
1937	    fi
1938    fi
1939
1940echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1941echo "configure:1942: checking return type of signal handlers" >&5
1942if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1943  echo $ac_n "(cached) $ac_c" 1>&6
1944else
1945  cat > conftest.$ac_ext <<EOF
1946#line 1947 "configure"
1947#include "confdefs.h"
1948#include <sys/types.h>
1949#include <signal.h>
1950#ifdef signal
1951#undef signal
1952#endif
1953#ifdef __cplusplus
1954extern "C" void (*signal (int, void (*)(int)))(int);
1955#else
1956void (*signal ()) ();
1957#endif
1958
1959int main() {
1960int i;
1961; return 0; }
1962EOF
1963if { (eval echo configure:1964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1964  rm -rf conftest*
1965  ac_cv_type_signal=void
1966else
1967  echo "configure: failed program was:" >&5
1968  cat conftest.$ac_ext >&5
1969  rm -rf conftest*
1970  ac_cv_type_signal=int
1971fi
1972rm -f conftest*
1973fi
1974
1975echo "$ac_t""$ac_cv_type_signal" 1>&6
1976cat >> confdefs.h <<EOF
1977#define RETSIGTYPE $ac_cv_type_signal
1978EOF
1979
1980
1981    if test "$ac_cv_type_signal" = void ; then
1982	    cat >> confdefs.h <<\EOF
1983#define RETSIGVAL
1984EOF
1985
1986    else
1987	    cat >> confdefs.h <<\EOF
1988#define RETSIGVAL (0)
1989EOF
1990
1991    fi
1992    case "$target_os" in
1993
1994    irix*)
1995	    cat >> confdefs.h <<\EOF
1996#define _BSD_SIGNALS 1
1997EOF
1998
1999	    ;;
2000
2001    *)
2002	    for ac_func in sigset
2003do
2004echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2005echo "configure:2006: checking for $ac_func" >&5
2006if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2007  echo $ac_n "(cached) $ac_c" 1>&6
2008else
2009  cat > conftest.$ac_ext <<EOF
2010#line 2011 "configure"
2011#include "confdefs.h"
2012/* System header to define __stub macros and hopefully few prototypes,
2013    which can conflict with char $ac_func(); below.  */
2014#include <assert.h>
2015/* Override any gcc2 internal prototype to avoid an error.  */
2016/* We use char because int might match the return type of a gcc2
2017    builtin and then its argument prototype would still apply.  */
2018char $ac_func();
2019
2020int main() {
2021
2022/* The GNU C library defines this for functions which it implements
2023    to always fail with ENOSYS.  Some functions are actually named
2024    something starting with __ and the normal name is an alias.  */
2025#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2026choke me
2027#else
2028$ac_func();
2029#endif
2030
2031; return 0; }
2032EOF
2033if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2034  rm -rf conftest*
2035  eval "ac_cv_func_$ac_func=yes"
2036else
2037  echo "configure: failed program was:" >&5
2038  cat conftest.$ac_ext >&5
2039  rm -rf conftest*
2040  eval "ac_cv_func_$ac_func=no"
2041fi
2042rm -f conftest*
2043fi
2044
2045if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2046  echo "$ac_t""yes" 1>&6
2047    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2048  cat >> confdefs.h <<EOF
2049#define $ac_tr_func 1
2050EOF
2051
2052else
2053  echo "$ac_t""no" 1>&6
2054fi
2055done
2056
2057	    if test $ac_cv_func_sigset = yes ; then
2058		    cat >> confdefs.h <<\EOF
2059#define signal sigset
2060EOF
2061
2062	    fi
2063	    ;;
2064    esac
2065echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
2066echo "configure:2067: checking if sockaddr struct has sa_len member" >&5
2067    if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
2068  echo $ac_n "(cached) $ac_c" 1>&6
2069else
2070  cat > conftest.$ac_ext <<EOF
2071#line 2072 "configure"
2072#include "confdefs.h"
2073
2074#	include <sys/types.h>
2075#	include <sys/socket.h>
2076int main() {
2077u_int i = sizeof(((struct sockaddr *)0)->sa_len)
2078; return 0; }
2079EOF
2080if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2081  rm -rf conftest*
2082  ac_cv_sockaddr_has_sa_len=yes
2083else
2084  echo "configure: failed program was:" >&5
2085  cat conftest.$ac_ext >&5
2086  rm -rf conftest*
2087  ac_cv_sockaddr_has_sa_len=no
2088fi
2089rm -f conftest*
2090fi
2091
2092    echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
2093    if test $ac_cv_sockaddr_has_sa_len = yes ; then
2094	    cat >> confdefs.h <<\EOF
2095#define HAVE_SOCKADDR_SA_LEN 1
2096EOF
2097
2098    fi
2099
2100echo $ac_n "checking if ether_header uses ether_addr structs""... $ac_c" 1>&6
2101echo "configure:2102: checking if ether_header uses ether_addr structs" >&5
2102if eval "test \"`echo '$''{'ac_cv_ether_header_has_ea'+set}'`\" = set"; then
2103  echo $ac_n "(cached) $ac_c" 1>&6
2104else
2105  LBL_SAVE_CFLAGS="$CFLAGS"
2106    CFLAGS="$CFLAGS $V_INCLS"
2107    cat > conftest.$ac_ext <<EOF
2108#line 2109 "configure"
2109#include "confdefs.h"
2110
2111#	include <sys/types.h>
2112#	if __STDC__
2113	/* osf3 has REALLY good prototyes */
2114	struct mbuf;
2115	struct rtentry;
2116#	endif
2117#	include <sys/socket.h>
2118#	include <net/if.h>
2119#	include <netinet/in.h>
2120#	include <netinet/if_ether.h>
2121int main() {
2122u_int i =
2123	    sizeof(((struct ether_header *)0)->ether_dhost.ether_addr_octet)
2124; return 0; }
2125EOF
2126if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2127  rm -rf conftest*
2128  ac_cv_ether_header_has_ea=yes
2129else
2130  echo "configure: failed program was:" >&5
2131  cat conftest.$ac_ext >&5
2132  rm -rf conftest*
2133  ac_cv_ether_header_has_ea=no
2134fi
2135rm -f conftest*
2136    CFLAGS="$LBL_SAVE_CFLAGS"
2137fi
2138
2139echo "$ac_t""$ac_cv_ether_header_has_ea" 1>&6
2140if test $ac_cv_ether_header_has_ea = yes ; then
2141	cat >> confdefs.h <<\EOF
2142#define ETHER_HEADER_HAS_EA 1
2143EOF
2144
2145fi
2146
2147echo $ac_n "checking if ether_arp uses ether_addr structs""... $ac_c" 1>&6
2148echo "configure:2149: checking if ether_arp uses ether_addr structs" >&5
2149if eval "test \"`echo '$''{'ac_cv_ether_arp_has_ea'+set}'`\" = set"; then
2150  echo $ac_n "(cached) $ac_c" 1>&6
2151else
2152  LBL_SAVE_CFLAGS="$CFLAGS"
2153    CFLAGS="$CFLAGS $V_INCLS"
2154    cat > conftest.$ac_ext <<EOF
2155#line 2156 "configure"
2156#include "confdefs.h"
2157
2158#	include <sys/types.h>
2159#	if __STDC__
2160	/* osf3 has REALLY good prototyes */
2161	struct mbuf;
2162	struct rtentry;
2163#	endif
2164#	include <sys/socket.h>
2165#	include <net/if.h>
2166#	include <netinet/in.h>
2167#	include <netinet/if_ether.h>
2168int main() {
2169u_int i =
2170	    sizeof(((struct ether_arp *)0)->arp_sha.ether_addr_octet)
2171; return 0; }
2172EOF
2173if { (eval echo configure:2174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2174  rm -rf conftest*
2175  ac_cv_ether_arp_has_ea=yes
2176else
2177  echo "configure: failed program was:" >&5
2178  cat conftest.$ac_ext >&5
2179  rm -rf conftest*
2180  ac_cv_ether_arp_has_ea=no
2181fi
2182rm -f conftest*
2183    CFLAGS="$LBL_SAVE_CFLAGS"
2184fi
2185
2186echo "$ac_t""$ac_cv_ether_arp_has_ea" 1>&6
2187if test $ac_cv_ether_arp_has_ea = yes ; then
2188	cat >> confdefs.h <<\EOF
2189#define ETHER_ARP_HAS_EA 1
2190EOF
2191
2192fi
2193
2194echo $ac_n "checking if ether_arp uses erp_xsha member""... $ac_c" 1>&6
2195echo "configure:2196: checking if ether_arp uses erp_xsha member" >&5
2196if eval "test \"`echo '$''{'ac_cv_struct_ether_arp_x'+set}'`\" = set"; then
2197  echo $ac_n "(cached) $ac_c" 1>&6
2198else
2199  LBL_SAVE_CFLAGS="$CFLAGS"
2200    CFLAGS="$CFLAGS $V_INCLS"
2201    cat > conftest.$ac_ext <<EOF
2202#line 2203 "configure"
2203#include "confdefs.h"
2204
2205#	include <sys/types.h>
2206#	include <sys/socket.h>
2207#	if __STDC__
2208	/* osf3 has REALLY good prototyes */
2209	struct mbuf;
2210	struct rtentry;
2211#	endif
2212#	include <net/if.h>
2213#	include <netinet/in.h>
2214#	include <netinet/if_ether.h>
2215int main() {
2216u_int i = sizeof( ((struct ether_arp *)0)->arp_xsha)
2217; return 0; }
2218EOF
2219if { (eval echo configure:2220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2220  rm -rf conftest*
2221  ac_cv_struct_ether_arp_x=yes
2222else
2223  echo "configure: failed program was:" >&5
2224  cat conftest.$ac_ext >&5
2225  rm -rf conftest*
2226  ac_cv_struct_ether_arp_x=no
2227fi
2228rm -f conftest*
2229    CFLAGS="$LBL_SAVE_CFLAGS"
2230fi
2231
2232echo "$ac_t""$ac_cv_struct_ether_arp_x" 1>&6
2233if test $ac_cv_struct_ether_arp_x = yes ; then
2234	cat >> confdefs.h <<\EOF
2235#define ETHER_ARP_HAS_X 1
2236EOF
2237
2238fi
2239
2240echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
2241echo "configure:2242: checking if unaligned accesses fail" >&5
2242    if eval "test \"`echo '$''{'ac_cv_unaligned_fail'+set}'`\" = set"; then
2243  echo $ac_n "(cached) $ac_c" 1>&6
2244else
2245  case "$target_cpu" in
2246
2247	alpha|hp*|mips|sparc)
2248		ac_cv_unaligned_fail=yes
2249		;;
2250
2251	*)
2252		cat >conftest.c <<EOF
2253#		include <sys/types.h>
2254#		include <sys/wait.h>
2255#		include <stdio.h>
2256		unsigned char a[5] = { 1, 2, 3, 4, 5 };
2257		main() {
2258		unsigned int i;
2259		pid_t pid;
2260		int status;
2261		/* avoid "core dumped" message */
2262		pid = fork();
2263		if (pid <  0)
2264			exit(2);
2265		if (pid > 0) {
2266			/* parent */
2267			pid = waitpid(pid, &status, 0);
2268			if (pid < 0)
2269				exit(3);
2270			exit(!WIFEXITED(status));
2271		}
2272		/* child */
2273		i = *(unsigned int *)&a[1];
2274		printf("%d\n", i);
2275		exit(0);
2276		}
2277EOF
2278		${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
2279		    conftest.c $LIBS >/dev/null 2>&1
2280		if test ! -x conftest ; then
2281						ac_cv_unaligned_fail=yes
2282		else
2283			./conftest >conftest.out
2284			if test ! -s conftest.out ; then
2285				ac_cv_unaligned_fail=yes
2286			else
2287				ac_cv_unaligned_fail=no
2288			fi
2289		fi
2290		rm -f conftest* core core.conftest
2291		;;
2292	esac
2293fi
2294
2295    echo "$ac_t""$ac_cv_unaligned_fail" 1>&6
2296    if test $ac_cv_unaligned_fail = yes ; then
2297	    cat >> confdefs.h <<\EOF
2298#define LBL_ALIGN 1
2299EOF
2300
2301    fi
2302
2303if test -r lbl/gnuc.h ; then
2304	rm -f gnuc.h
2305	ln -s lbl/gnuc.h gnuc.h
2306fi
2307
2308
2309
2310
2311
2312
2313# Find a good install program.  We prefer a C program (faster),
2314# so one script is as good as another.  But avoid the broken or
2315# incompatible versions:
2316# SysV /etc/install, /usr/sbin/install
2317# SunOS /usr/etc/install
2318# IRIX /sbin/install
2319# AIX /bin/install
2320# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2321# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2322# ./install, which can be erroneously created by make from ./install.sh.
2323echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2324echo "configure:2325: checking for a BSD compatible install" >&5
2325if test -z "$INSTALL"; then
2326if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2327  echo $ac_n "(cached) $ac_c" 1>&6
2328else
2329    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2330  for ac_dir in $PATH; do
2331    # Account for people who put trailing slashes in PATH elements.
2332    case "$ac_dir/" in
2333    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2334    *)
2335      # OSF1 and SCO ODT 3.0 have their own names for install.
2336      for ac_prog in ginstall installbsd scoinst install; do
2337        if test -f $ac_dir/$ac_prog; then
2338	  if test $ac_prog = install &&
2339            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2340	    # AIX install.  It has an incompatible calling convention.
2341	    # OSF/1 installbsd also uses dspmsg, but is usable.
2342	    :
2343	  else
2344	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2345	    break 2
2346	  fi
2347	fi
2348      done
2349      ;;
2350    esac
2351  done
2352  IFS="$ac_save_IFS"
2353
2354fi
2355  if test "${ac_cv_path_install+set}" = set; then
2356    INSTALL="$ac_cv_path_install"
2357  else
2358    # As a last resort, use the slow shell script.  We don't cache a
2359    # path for INSTALL within a source directory, because that will
2360    # break other packages using the cache if that directory is
2361    # removed, or if the path is relative.
2362    INSTALL="$ac_install_sh"
2363  fi
2364fi
2365echo "$ac_t""$INSTALL" 1>&6
2366
2367# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2368# It thinks the first close brace ends the variable substitution.
2369test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2370
2371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2372
2373
2374trap '' 1 2 15
2375cat > confcache <<\EOF
2376# This file is a shell script that caches the results of configure
2377# tests run on this system so they can be shared between configure
2378# scripts and configure runs.  It is not useful on other systems.
2379# If it contains results you don't want to keep, you may remove or edit it.
2380#
2381# By default, configure uses ./config.cache as the cache file,
2382# creating it if it does not exist already.  You can give configure
2383# the --cache-file=FILE option to use a different cache file; that is
2384# what configure does when it calls configure scripts in
2385# subdirectories, so they share the cache.
2386# Giving --cache-file=/dev/null disables caching, for debugging configure.
2387# config.status only pays attention to the cache file if you give it the
2388# --recheck option to rerun configure.
2389#
2390EOF
2391# The following way of writing the cache mishandles newlines in values,
2392# but we know of no workaround that is simple, portable, and efficient.
2393# So, don't put newlines in cache variables' values.
2394# Ultrix sh set writes to stderr and can't be redirected directly,
2395# and sets the high bit in the cache file unless we assign to the vars.
2396(set) 2>&1 |
2397  case `(ac_space=' '; set) 2>&1` in
2398  *ac_space=\ *)
2399    # `set' does not quote correctly, so add quotes (double-quote substitution
2400    # turns \\\\ into \\, and sed turns \\ into \).
2401    sed -n \
2402      -e "s/'/'\\\\''/g" \
2403      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2404    ;;
2405  *)
2406    # `set' quotes correctly as required by POSIX, so do not add quotes.
2407    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2408    ;;
2409  esac >> confcache
2410if cmp -s $cache_file confcache; then
2411  :
2412else
2413  if test -w $cache_file; then
2414    echo "updating cache $cache_file"
2415    cat confcache > $cache_file
2416  else
2417    echo "not updating unwritable cache $cache_file"
2418  fi
2419fi
2420rm -f confcache
2421
2422trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2423
2424test "x$prefix" = xNONE && prefix=$ac_default_prefix
2425# Let make expand exec_prefix.
2426test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2427
2428# Any assignment to VPATH causes Sun make to only execute
2429# the first set of double-colon rules, so remove it if not needed.
2430# If there is a colon in the path, we need to keep it.
2431if test "x$srcdir" = x.; then
2432  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2433fi
2434
2435trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2436
2437# Transform confdefs.h into DEFS.
2438# Protect against shell expansion while executing Makefile rules.
2439# Protect against Makefile macro expansion.
2440cat > conftest.defs <<\EOF
2441s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2442s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
2443s%\[%\\&%g
2444s%\]%\\&%g
2445s%\$%$$%g
2446EOF
2447DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2448rm -f conftest.defs
2449
2450
2451# Without the "./", some shells look in PATH for config.status.
2452: ${CONFIG_STATUS=./config.status}
2453
2454echo creating $CONFIG_STATUS
2455rm -f $CONFIG_STATUS
2456cat > $CONFIG_STATUS <<EOF
2457#! /bin/sh
2458# Generated automatically by configure.
2459# Run this file to recreate the current configuration.
2460# This directory was configured as follows,
2461# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2462#
2463# $0 $ac_configure_args
2464#
2465# Compiler output produced by configure, useful for debugging
2466# configure, is in ./config.log if it exists.
2467
2468ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2469for ac_option
2470do
2471  case "\$ac_option" in
2472  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2473    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2474    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2475  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2476    echo "$CONFIG_STATUS generated by autoconf version 2.12"
2477    exit 0 ;;
2478  -help | --help | --hel | --he | --h)
2479    echo "\$ac_cs_usage"; exit 0 ;;
2480  *) echo "\$ac_cs_usage"; exit 1 ;;
2481  esac
2482done
2483
2484ac_given_srcdir=$srcdir
2485ac_given_INSTALL="$INSTALL"
2486
2487trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2488EOF
2489cat >> $CONFIG_STATUS <<EOF
2490
2491# Protect against being on the right side of a sed subst in config.status.
2492sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2493 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2494$ac_vpsub
2495$extrasub
2496s%@CFLAGS@%$CFLAGS%g
2497s%@CPPFLAGS@%$CPPFLAGS%g
2498s%@CXXFLAGS@%$CXXFLAGS%g
2499s%@DEFS@%$DEFS%g
2500s%@LDFLAGS@%$LDFLAGS%g
2501s%@LIBS@%$LIBS%g
2502s%@exec_prefix@%$exec_prefix%g
2503s%@prefix@%$prefix%g
2504s%@program_transform_name@%$program_transform_name%g
2505s%@bindir@%$bindir%g
2506s%@sbindir@%$sbindir%g
2507s%@libexecdir@%$libexecdir%g
2508s%@datadir@%$datadir%g
2509s%@sysconfdir@%$sysconfdir%g
2510s%@sharedstatedir@%$sharedstatedir%g
2511s%@localstatedir@%$localstatedir%g
2512s%@libdir@%$libdir%g
2513s%@includedir@%$includedir%g
2514s%@oldincludedir@%$oldincludedir%g
2515s%@infodir@%$infodir%g
2516s%@mandir@%$mandir%g
2517s%@host@%$host%g
2518s%@host_alias@%$host_alias%g
2519s%@host_cpu@%$host_cpu%g
2520s%@host_vendor@%$host_vendor%g
2521s%@host_os@%$host_os%g
2522s%@target@%$target%g
2523s%@target_alias@%$target_alias%g
2524s%@target_cpu@%$target_cpu%g
2525s%@target_vendor@%$target_vendor%g
2526s%@target_os@%$target_os%g
2527s%@build@%$build%g
2528s%@build_alias@%$build_alias%g
2529s%@build_cpu@%$build_cpu%g
2530s%@build_vendor@%$build_vendor%g
2531s%@build_os@%$build_os%g
2532s%@SHLICC2@%$SHLICC2%g
2533s%@CC@%$CC%g
2534s%@CPP@%$CPP%g
2535s%@LIBOBJS@%$LIBOBJS%g
2536s%@V_CCOPT@%$V_CCOPT%g
2537s%@V_GROUP@%$V_GROUP%g
2538s%@V_INCLS@%$V_INCLS%g
2539s%@V_PCAPDEP@%$V_PCAPDEP%g
2540s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2541s%@INSTALL_DATA@%$INSTALL_DATA%g
2542
2543CEOF
2544EOF
2545
2546cat >> $CONFIG_STATUS <<\EOF
2547
2548# Split the substitutions into bite-sized pieces for seds with
2549# small command number limits, like on Digital OSF/1 and HP-UX.
2550ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2551ac_file=1 # Number of current file.
2552ac_beg=1 # First line for current file.
2553ac_end=$ac_max_sed_cmds # Line after last line for current file.
2554ac_more_lines=:
2555ac_sed_cmds=""
2556while $ac_more_lines; do
2557  if test $ac_beg -gt 1; then
2558    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2559  else
2560    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2561  fi
2562  if test ! -s conftest.s$ac_file; then
2563    ac_more_lines=false
2564    rm -f conftest.s$ac_file
2565  else
2566    if test -z "$ac_sed_cmds"; then
2567      ac_sed_cmds="sed -f conftest.s$ac_file"
2568    else
2569      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2570    fi
2571    ac_file=`expr $ac_file + 1`
2572    ac_beg=$ac_end
2573    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2574  fi
2575done
2576if test -z "$ac_sed_cmds"; then
2577  ac_sed_cmds=cat
2578fi
2579EOF
2580
2581cat >> $CONFIG_STATUS <<EOF
2582
2583CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2584EOF
2585cat >> $CONFIG_STATUS <<\EOF
2586for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2587  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2588  case "$ac_file" in
2589  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2590       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2591  *) ac_file_in="${ac_file}.in" ;;
2592  esac
2593
2594  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2595
2596  # Remove last slash and all that follows it.  Not all systems have dirname.
2597  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2598  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2599    # The file is in a subdirectory.
2600    test ! -d "$ac_dir" && mkdir "$ac_dir"
2601    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2602    # A "../" for each directory in $ac_dir_suffix.
2603    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2604  else
2605    ac_dir_suffix= ac_dots=
2606  fi
2607
2608  case "$ac_given_srcdir" in
2609  .)  srcdir=.
2610      if test -z "$ac_dots"; then top_srcdir=.
2611      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2612  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2613  *) # Relative path.
2614    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2615    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2616  esac
2617
2618  case "$ac_given_INSTALL" in
2619  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2620  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2621  esac
2622
2623  echo creating "$ac_file"
2624  rm -f "$ac_file"
2625  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2626  case "$ac_file" in
2627  *Makefile*) ac_comsub="1i\\
2628# $configure_input" ;;
2629  *) ac_comsub= ;;
2630  esac
2631
2632  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2633  sed -e "$ac_comsub
2634s%@configure_input@%$configure_input%g
2635s%@srcdir@%$srcdir%g
2636s%@top_srcdir@%$top_srcdir%g
2637s%@INSTALL@%$INSTALL%g
2638" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2639fi; done
2640rm -f conftest.s*
2641
2642EOF
2643cat >> $CONFIG_STATUS <<EOF
2644
2645EOF
2646cat >> $CONFIG_STATUS <<\EOF
2647
2648exit 0
2649EOF
2650chmod +x $CONFIG_STATUS
2651rm -fr confdefs* $ac_clean_files
2652test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2653
2654
2655if test -f .devel ; then
2656	make depend
2657fi
2658exit 0
2659