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