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