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