]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libpcap/configure
Virgin import of libpcap 0.3
[FreeBSD/FreeBSD.git] / contrib / libpcap / configure
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:
11 ac_help=
12 ac_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.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 # Maximum number of lines to put in a shell here document.
53 ac_max_here_lines=12
54
55 ac_prev=
56 for ac_option
57 do
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
137 Usage: configure [options] [host]
138 Options: [defaults in brackets after descriptions]
139 Configuration:
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
145 Directory 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
169 EOF
170     cat << EOF
171 Host 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]
175 Features 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
182 EOF
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
392 done
393
394 if test -n "$ac_prev"; then
395   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
396 fi
397
398 trap '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
408 if test "$silent" = yes; then
409   exec 6>/dev/null
410 else
411   exec 6>&1
412 fi
413 exec 5>./config.log
414
415 echo "\
416 This file contains any messages produced by compilers while
417 running 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.
422 ac_configure_args=
423 for ac_arg
424 do
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
434 done
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.
441 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
442 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
443 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
444 if 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.
447 rm -rf conftest* confdefs.h
448 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
449 echo > 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.
453 ac_unique_file=pcap.c
454
455 # Find the source files, if location was not specified.
456 if 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
466 else
467   ac_srcdir_defaulted=no
468 fi
469 if 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
475 fi
476 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
477
478 # Prefer explicitly selected file to automatically selected ones.
479 if 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
485 fi
486 for 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
491 done
492
493 if test -r "$cache_file"; then
494   echo "loading cache $cache_file"
495   . $cache_file
496 else
497   echo "creating cache $cache_file"
498   > $cache_file
499 fi
500
501 ac_ext=c
502 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
503 ac_cpp='$CPP $CPPFLAGS'
504 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
505 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
506 cross_compiling=$ac_cv_prog_cc_cross
507
508 if (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
516 else
517   ac_n= ac_c='\c' ac_t=
518 fi
519
520
521
522 ac_aux_dir=
523 for 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
533 done
534 if 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; }
536 fi
537 ac_config_guess=$ac_aux_dir/config.guess
538 ac_config_sub=$ac_aux_dir/config.sub
539 ac_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.
557 case $host---$target---$nonopt in
558 NONE---*---* | *---NONE---* | *---*---NONE) ;;
559 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
560 esac
561
562
563 # Make sure we can run config.sub.
564 if $ac_config_sub sun4 >/dev/null 2>&1; then :
565 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
566 fi
567
568 echo $ac_n "checking host system type""... $ac_c" 1>&6
569 echo "configure:570: checking host system type" >&5
570
571 host_alias=$host
572 case "$host_alias" in
573 NONE)
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 ;;
581 esac
582
583 host=`$ac_config_sub $host_alias`
584 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
585 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
586 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
587 echo "$ac_t""$host" 1>&6
588
589 echo $ac_n "checking target system type""... $ac_c" 1>&6
590 echo "configure:591: checking target system type" >&5
591
592 target_alias=$target
593 case "$target_alias" in
594 NONE)
595   case $nonopt in
596   NONE) target_alias=$host_alias ;;
597   *) target_alias=$nonopt ;;
598   esac ;;
599 esac
600
601 target=`$ac_config_sub $target_alias`
602 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
603 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
604 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
605 echo "$ac_t""$target" 1>&6
606
607 echo $ac_n "checking build system type""... $ac_c" 1>&6
608 echo "configure:609: checking build system type" >&5
609
610 build_alias=$build
611 case "$build_alias" in
612 NONE)
613   case $nonopt in
614   NONE) build_alias=$host_alias ;;
615   *) build_alias=$nonopt ;;
616   esac ;;
617 esac
618
619 build=`$ac_config_sub $build_alias`
620 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
621 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
622 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
623 echo "$ac_t""$build" 1>&6
624
625 test "$host_alias" != "$target_alias" &&
626   test "$program_prefix$program_suffix$program_transform_name" = \
627     NONENONEs,x,x, &&
628   program_prefix=${target_alias}-
629
630
631 umask 002
632
633 if test -z "$PWD" ; then
634         PWD=`pwd`
635 fi
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.
648 set dummy shlicc2; ac_word=$2
649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
650 echo "configure:651: checking for $ac_word" >&5
651 if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
652   echo $ac_n "(cached) $ac_c" 1>&6
653 else
654   if test -n "$SHLICC2"; then
655   ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
656 else
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"
667 fi
668 fi
669 SHLICC2="$ac_cv_prog_SHLICC2"
670 if test -n "$SHLICC2"; then
671   echo "$ac_t""$SHLICC2" 1>&6
672 else
673   echo "$ac_t""no" 1>&6
674 fi
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.
684 set dummy gcc; ac_word=$2
685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
686 echo "configure:687: checking for $ac_word" >&5
687 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
688   echo $ac_n "(cached) $ac_c" 1>&6
689 else
690   if test -n "$CC"; then
691   ac_cv_prog_CC="$CC" # Let the user override the test.
692 else
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"
702 fi
703 fi
704 CC="$ac_cv_prog_CC"
705 if test -n "$CC"; then
706   echo "$ac_t""$CC" 1>&6
707 else
708   echo "$ac_t""no" 1>&6
709 fi
710
711 if test -z "$CC"; then
712   # Extract the first word of "cc", so it can be a program name with args.
713 set dummy cc; ac_word=$2
714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715 echo "configure:716: checking for $ac_word" >&5
716 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
717   echo $ac_n "(cached) $ac_c" 1>&6
718 else
719   if test -n "$CC"; then
720   ac_cv_prog_CC="$CC" # Let the user override the test.
721 else
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"
736 if 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
749 fi
750 fi
751 fi
752 CC="$ac_cv_prog_CC"
753 if test -n "$CC"; then
754   echo "$ac_t""$CC" 1>&6
755 else
756   echo "$ac_t""no" 1>&6
757 fi
758
759   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
760 fi
761
762 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
763 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
764
765 ac_ext=c
766 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
767 ac_cpp='$CPP $CPPFLAGS'
768 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
769 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
770 cross_compiling=$ac_cv_prog_cc_cross
771
772 cat > conftest.$ac_ext <<EOF
773 #line 774 "configure"
774 #include "confdefs.h"
775 main(){return(0);}
776 EOF
777 if { (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
785 else
786   echo "configure: failed program was:" >&5
787   cat conftest.$ac_ext >&5
788   ac_cv_prog_cc_works=no
789 fi
790 rm -fr conftest*
791
792 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
793 if 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; }
795 fi
796 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
797 echo "configure:798: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
798 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
799 cross_compiling=$ac_cv_prog_cc_cross
800
801 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
802 echo "configure:803: checking whether we are using GNU C" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
804   echo $ac_n "(cached) $ac_c" 1>&6
805 else
806   cat > conftest.c <<EOF
807 #ifdef __GNUC__
808   yes;
809 #endif
810 EOF
811 if { 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
813 else
814   ac_cv_prog_gcc=no
815 fi
816 fi
817
818 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
819
820 if 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
826 echo "configure:827: checking whether ${CC-cc} accepts -g" >&5
827 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
828   echo $ac_n "(cached) $ac_c" 1>&6
829 else
830   echo 'void f(){}' > conftest.c
831 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
832   ac_cv_prog_cc_g=yes
833 else
834   ac_cv_prog_cc_g=no
835 fi
836 rm -f conftest*
837
838 fi
839
840 echo "$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
848 else
849   GCC=
850   test "${CFLAGS+set}" = set || CFLAGS="-g"
851 fi
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
859 echo "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
862 else
863   ac_cv_gcc_vers=`$CC -v 2>&1 | \
864                             sed -n -e '$s/.* //' -e '$s/\..*//p'`
865 fi
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
874 echo "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
877 else
878   cat > conftest.$ac_ext <<EOF
879 #line 880 "configure"
880 #include "confdefs.h"
881 #include <sys/types.h>
882 int main() {
883 int frob(int, char *)
884 ; return 0; }
885 EOF
886 if { (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
889 else
890   echo "configure: failed program was:" >&5
891   cat conftest.$ac_ext >&5
892   rm -rf conftest*
893   ac_cv_cc_ansi_prototypes=no
894 fi
895 rm -f conftest*
896 fi
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
904 echo "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
909 else
910   cat > conftest.$ac_ext <<EOF
911 #line 912 "configure"
912 #include "confdefs.h"
913 #include <sys/types.h>
914 int main() {
915 int frob(int, char *)
916 ; return 0; }
917 EOF
918 if { (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
921 else
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
926 fi
927 rm -f conftest*
928 fi
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
938 EOF
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
961 echo "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
964 else
965   cat > conftest.$ac_ext <<EOF
966 #line 967 "configure"
967 #include "confdefs.h"
968 #include <sys/types.h>
969 int main() {
970 struct a { int b; };
971                             void c(const struct a *)
972 ; return 0; }
973 EOF
974 if { (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
977 else
978   echo "configure: failed program was:" >&5
979   cat conftest.$ac_ext >&5
980   rm -rf conftest*
981   ac_cv_cc_const_proto=no
982 fi
983 rm -f conftest*
984 fi
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 
990 EOF
991
992                     fi
993                     ;;
994             esac
995     fi
996
997
998 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
999 echo "configure:1000: checking how to run the C preprocessor" >&5
1000 # On Suns, sometimes $CPP names a directory.
1001 if test -n "$CPP" && test -d "$CPP"; then
1002   CPP=
1003 fi
1004 if test -z "$CPP"; then
1005 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1006   echo $ac_n "(cached) $ac_c" 1>&6
1007 else
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>
1017 Syntax Error
1018 EOF
1019 ac_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; }
1021 ac_err=`grep -v '^ *+' conftest.out`
1022 if test -z "$ac_err"; then
1023   :
1024 else
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>
1034 Syntax Error
1035 EOF
1036 ac_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; }
1038 ac_err=`grep -v '^ *+' conftest.out`
1039 if test -z "$ac_err"; then
1040   :
1041 else
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
1047 fi
1048 rm -f conftest*
1049 fi
1050 rm -f conftest*
1051   ac_cv_prog_CPP="$CPP"
1052 fi
1053   CPP="$ac_cv_prog_CPP"
1054 else
1055   ac_cv_prog_CPP="$CPP"
1056 fi
1057 echo "$ac_t""$CPP" 1>&6
1058
1059 for ac_hdr in malloc.h sys/ioccom.h sys/sockio.h
1060 do
1061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1063 echo "configure:1064: checking for $ac_hdr" >&5
1064 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1065   echo $ac_n "(cached) $ac_c" 1>&6
1066 else
1067   cat > conftest.$ac_ext <<EOF
1068 #line 1069 "configure"
1069 #include "confdefs.h"
1070 #include <$ac_hdr>
1071 EOF
1072 ac_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; }
1074 ac_err=`grep -v '^ *+' conftest.out`
1075 if test -z "$ac_err"; then
1076   rm -rf conftest*
1077   eval "ac_cv_header_$ac_safe=yes"
1078 else
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"
1084 fi
1085 rm -f conftest*
1086 fi
1087 if 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
1092 EOF
1093  
1094 else
1095   echo "$ac_t""no" 1>&6
1096 fi
1097 done
1098
1099
1100 if test $ac_cv_prog_gcc = yes ; then
1101             echo $ac_n "checking if fixincludes is needed""... $ac_c" 1>&6
1102 echo "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
1105 else
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
1119 int main() {
1120 switch (0) {
1121                     case _IO('A', 1):;
1122                     case _IO('B', 1):;
1123                     }
1124 ; return 0; }
1125 EOF
1126 if { (eval echo configure:1127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1127   rm -rf conftest*
1128   ac_cv_gcc_fixincludes=yes
1129 else
1130   echo "configure: failed program was:" >&5
1131   cat conftest.$ac_ext >&5
1132   rm -rf conftest*
1133   ac_cv_gcc_fixincludes=no
1134 fi
1135 rm -f conftest*
1136 fi
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
1146 for ac_func in ether_hostton strerror
1147 do
1148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1149 echo "configure:1150: checking for $ac_func" >&5
1150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
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.  */
1162 char $ac_func();
1163
1164 int 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)
1170 choke me
1171 #else
1172 $ac_func();
1173 #endif
1174
1175 ; return 0; }
1176 EOF
1177 if { (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"
1180 else
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"
1185 fi
1186 rm -f conftest*
1187 fi
1188
1189 if 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
1194 EOF
1195  
1196 else
1197   echo "$ac_t""no" 1>&6
1198 fi
1199 done
1200
1201
1202 echo $ac_n "checking packet capture type""... $ac_c" 1>&6
1203 echo "configure:1204: checking packet capture type" >&5
1204 if test -r /dev/bpf0 ; then
1205         V_PCAP=bpf
1206 elif test -r /usr/include/net/pfilt.h ; then
1207         V_PCAP=pf
1208 elif test -r /dev/enet ; then
1209         V_PCAP=enet
1210 elif test -r /dev/nit ; then
1211         V_PCAP=snit
1212 elif test -r /usr/include/sys/net/nit.h ; then
1213         V_PCAP=nit
1214 elif test -r /usr/include/net/raw.h ; then
1215         V_PCAP=snoop
1216 elif test -r /usr/include/sys/dlpi.h ; then
1217         V_PCAP=dlpi
1218 elif test -r /usr/include/linux/socket.h ; then
1219         V_PCAP=linux
1220 elif test -c /dev/bpf0 ; then           # check again in case not readable
1221         V_PCAP=bpf
1222 elif test -c /dev/enet ; then           # check again in case not readable
1223         V_PCAP=enet
1224 elif test -c /dev/nit ; then            # check again in case not readable
1225         V_PCAP=snit
1226 else
1227         V_PCAP=null
1228 fi
1229 echo "$ac_t""$V_PCAP" 1>&6
1230
1231 case "$V_PCAP" in
1232
1233 null)
1234         echo "configure: warning: cannot determine packet capture interface" 1>&2
1235         echo "configure: warning: (see INSTALL for more info)" 1>&2
1236         ;;
1237
1238 dlpi)
1239         for ac_hdr in sys/bufmod.h sys/dlpi_ext.h
1240 do
1241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1243 echo "configure:1244: checking for $ac_hdr" >&5
1244 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1245   echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247   cat > conftest.$ac_ext <<EOF
1248 #line 1249 "configure"
1249 #include "confdefs.h"
1250 #include <$ac_hdr>
1251 EOF
1252 ac_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; }
1254 ac_err=`grep -v '^ *+' conftest.out`
1255 if test -z "$ac_err"; then
1256   rm -rf conftest*
1257   eval "ac_cv_header_$ac_safe=yes"
1258 else
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"
1264 fi
1265 rm -f conftest*
1266 fi
1267 if 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
1272 EOF
1273  
1274 else
1275   echo "$ac_t""no" 1>&6
1276 fi
1277 done
1278
1279         echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
1280 echo "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
1285 EOF
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
1291 echo "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"
1296 EOF
1297
1298                 else
1299                         echo "$ac_t""no" 1>&6
1300                 fi
1301         fi
1302         ;;
1303 esac
1304
1305 for ac_prog in flex
1306 do
1307 # Extract the first word of "$ac_prog", so it can be a program name with args.
1308 set dummy $ac_prog; ac_word=$2
1309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1310 echo "configure:1311: checking for $ac_word" >&5
1311 if eval "test \"`echo '$''{'ac_cv_prog_V_LEX'+set}'`\" = set"; then
1312   echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314   if test -n "$V_LEX"; then
1315   ac_cv_prog_V_LEX="$V_LEX" # Let the user override the test.
1316 else
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"
1326 fi
1327 fi
1328 V_LEX="$ac_cv_prog_V_LEX"
1329 if test -n "$V_LEX"; then
1330   echo "$ac_t""$V_LEX" 1>&6
1331 else
1332   echo "$ac_t""no" 1>&6
1333 fi
1334
1335 test -n "$V_LEX" && break
1336 done
1337 test -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
1342 echo "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
1345 else
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
1351 fi
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
1361 do
1362 # Extract the first word of "$ac_prog", so it can be a program name with args.
1363 set dummy $ac_prog; ac_word=$2
1364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1365 echo "configure:1366: checking for $ac_word" >&5
1366 if eval "test \"`echo '$''{'ac_cv_prog_V_YACC'+set}'`\" = set"; then
1367   echo $ac_n "(cached) $ac_c" 1>&6
1368 else
1369   if test -n "$V_YACC"; then
1370   ac_cv_prog_V_YACC="$V_YACC" # Let the user override the test.
1371 else
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"
1381 fi
1382 fi
1383 V_YACC="$ac_cv_prog_V_YACC"
1384 if test -n "$V_YACC"; then
1385   echo "$ac_t""$V_YACC" 1>&6
1386 else
1387   echo "$ac_t""no" 1>&6
1388 fi
1389
1390 test -n "$V_YACC" && break
1391 done
1392 test -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
1407 case "$target_os" in
1408
1409 aix*)
1410                 cat >> confdefs.h <<\EOF
1411 #define _SUN 1
1412 EOF
1413
1414         ;;
1415
1416 hpux9*)
1417         cat >> confdefs.h <<\EOF
1418 #define HAVE_HPUX9 1
1419 EOF
1420
1421         ;;
1422
1423 sinix*)
1424         echo $ac_n "checking if SINIX compiler defines sinix""... $ac_c" 1>&6
1425 echo "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
1428 else
1429   cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1432
1433 int main() {
1434 int i = sinix;
1435 ; return 0; }
1436 EOF
1437 if { (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
1440 else
1441   echo "configure: failed program was:" >&5
1442   cat conftest.$ac_ext >&5
1443   rm -rf conftest*
1444   ac_cv_cc_sinix_defined=no
1445 fi
1446 rm -f conftest*
1447 fi
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
1453 EOF
1454
1455             fi
1456         ;;
1457
1458 solaris*)
1459         cat >> confdefs.h <<\EOF
1460 #define HAVE_SOLARIS 1
1461 EOF
1462
1463         ;;
1464
1465 linux*)
1466         V_INCLS="$V_INCLS -Ilinux-include"
1467         ;;
1468 esac
1469
1470 for ac_prog in ranlib
1471 do
1472 # Extract the first word of "$ac_prog", so it can be a program name with args.
1473 set dummy $ac_prog; ac_word=$2
1474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1475 echo "configure:1476: checking for $ac_word" >&5
1476 if eval "test \"`echo '$''{'ac_cv_prog_V_RANLIB'+set}'`\" = set"; then
1477   echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479   if test -n "$V_RANLIB"; then
1480   ac_cv_prog_V_RANLIB="$V_RANLIB" # Let the user override the test.
1481 else
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"
1491 fi
1492 fi
1493 V_RANLIB="$ac_cv_prog_V_RANLIB"
1494 if test -n "$V_RANLIB"; then
1495   echo "$ac_t""$V_RANLIB" 1>&6
1496 else
1497   echo "$ac_t""no" 1>&6
1498 fi
1499
1500 test -n "$V_RANLIB" && break
1501 done
1502 test -n "$V_RANLIB" || V_RANLIB="@true"
1503
1504
1505 rm -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
1525 EOF
1526
1527             else
1528                     echo "configure: warning: can't find $name" 1>&2
1529             fi
1530     fi
1531
1532 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
1533 echo "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
1536 else
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>
1543 int main() {
1544 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
1545 ; return 0; }
1546 EOF
1547 if { (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
1550 else
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
1555 fi
1556 rm -f conftest*
1557 fi
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
1563 EOF
1564
1565     fi
1566
1567 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
1568 echo "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
1571 else
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                 }
1604 EOF
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
1620 fi
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
1626 EOF
1627
1628     fi
1629
1630 if test -r lbl/gnuc.h ; then
1631         rm -f gnuc.h
1632         ln -s lbl/gnuc.h gnuc.h
1633 fi
1634
1635 rm -f bpf_filter.c
1636 ln -s bpf/net/bpf_filter.c bpf_filter.c
1637 rm -f net
1638 ln -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.
1657 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1658 echo "configure:1659: checking for a BSD compatible install" >&5
1659 if test -z "$INSTALL"; then
1660 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1661   echo $ac_n "(cached) $ac_c" 1>&6
1662 else
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
1688 fi
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
1698 fi
1699 echo "$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.
1703 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1704
1705 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1706
1707
1708 trap '' 1 2 15
1709 cat > 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 #
1724 EOF
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
1744 if cmp -s $cache_file confcache; then
1745   :
1746 else
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
1753 fi
1754 rm -f confcache
1755
1756 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1757
1758 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1759 # Let make expand exec_prefix.
1760 test "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.
1765 if test "x$srcdir" = x.; then
1766   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1767 fi
1768
1769 trap '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.
1774 cat > conftest.defs <<\EOF
1775 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1776 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1777 s%\[%\\&%g
1778 s%\]%\\&%g
1779 s%\$%$$%g
1780 EOF
1781 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1782 rm -f conftest.defs
1783
1784
1785 # Without the "./", some shells look in PATH for config.status.
1786 : ${CONFIG_STATUS=./config.status}
1787
1788 echo creating $CONFIG_STATUS
1789 rm -f $CONFIG_STATUS
1790 cat > $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
1802 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1803 for ac_option
1804 do
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
1816 done
1817
1818 ac_given_srcdir=$srcdir
1819 ac_given_INSTALL="$INSTALL"
1820
1821 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1822 EOF
1823 cat >> $CONFIG_STATUS <<EOF
1824
1825 # Protect against being on the right side of a sed subst in config.status.
1826 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1827  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1828 $ac_vpsub
1829 $extrasub
1830 s%@CFLAGS@%$CFLAGS%g
1831 s%@CPPFLAGS@%$CPPFLAGS%g
1832 s%@CXXFLAGS@%$CXXFLAGS%g
1833 s%@DEFS@%$DEFS%g
1834 s%@LDFLAGS@%$LDFLAGS%g
1835 s%@LIBS@%$LIBS%g
1836 s%@exec_prefix@%$exec_prefix%g
1837 s%@prefix@%$prefix%g
1838 s%@program_transform_name@%$program_transform_name%g
1839 s%@bindir@%$bindir%g
1840 s%@sbindir@%$sbindir%g
1841 s%@libexecdir@%$libexecdir%g
1842 s%@datadir@%$datadir%g
1843 s%@sysconfdir@%$sysconfdir%g
1844 s%@sharedstatedir@%$sharedstatedir%g
1845 s%@localstatedir@%$localstatedir%g
1846 s%@libdir@%$libdir%g
1847 s%@includedir@%$includedir%g
1848 s%@oldincludedir@%$oldincludedir%g
1849 s%@infodir@%$infodir%g
1850 s%@mandir@%$mandir%g
1851 s%@host@%$host%g
1852 s%@host_alias@%$host_alias%g
1853 s%@host_cpu@%$host_cpu%g
1854 s%@host_vendor@%$host_vendor%g
1855 s%@host_os@%$host_os%g
1856 s%@target@%$target%g
1857 s%@target_alias@%$target_alias%g
1858 s%@target_cpu@%$target_cpu%g
1859 s%@target_vendor@%$target_vendor%g
1860 s%@target_os@%$target_os%g
1861 s%@build@%$build%g
1862 s%@build_alias@%$build_alias%g
1863 s%@build_cpu@%$build_cpu%g
1864 s%@build_vendor@%$build_vendor%g
1865 s%@build_os@%$build_os%g
1866 s%@SHLICC2@%$SHLICC2%g
1867 s%@CC@%$CC%g
1868 s%@CPP@%$CPP%g
1869 s%@V_LEX@%$V_LEX%g
1870 s%@V_YACC@%$V_YACC%g
1871 s%@V_RANLIB@%$V_RANLIB%g
1872 s%@V_CCOPT@%$V_CCOPT%g
1873 s%@V_INCLS@%$V_INCLS%g
1874 s%@V_PCAP@%$V_PCAP%g
1875 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1876 s%@INSTALL_DATA@%$INSTALL_DATA%g
1877
1878 CEOF
1879 EOF
1880
1881 cat >> $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.
1885 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1886 ac_file=1 # Number of current file.
1887 ac_beg=1 # First line for current file.
1888 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1889 ac_more_lines=:
1890 ac_sed_cmds=""
1891 while $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
1910 done
1911 if test -z "$ac_sed_cmds"; then
1912   ac_sed_cmds=cat
1913 fi
1914 EOF
1915
1916 cat >> $CONFIG_STATUS <<EOF
1917
1918 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1919 EOF
1920 cat >> $CONFIG_STATUS <<\EOF
1921 for 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
1969 s%@configure_input@%$configure_input%g
1970 s%@srcdir@%$srcdir%g
1971 s%@top_srcdir@%$top_srcdir%g
1972 s%@INSTALL@%$INSTALL%g
1973 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1974 fi; done
1975 rm -f conftest.s*
1976
1977 EOF
1978 cat >> $CONFIG_STATUS <<EOF
1979
1980 EOF
1981 cat >> $CONFIG_STATUS <<\EOF
1982
1983 exit 0
1984 EOF
1985 chmod +x $CONFIG_STATUS
1986 rm -fr confdefs* $ac_clean_files
1987 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1988
1989
1990 if test -f .devel ; then
1991         make depend
1992 fi
1993 exit 0