]> The Tcpdump Group git mirrors - tcpdump/blob - configure
- handle the case where we know the ethertype but do not have a printer for it
[tcpdump] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.171
4
5
6
7
8 #
9 # Try compiling a sample of the type of code that appears in
10 # gencode.c with "inline", "__inline__", and "__inline".
11 #
12 # Autoconf's AC_C_INLINE, at least in autoconf 2.13, isn't good enough,
13 # as it just tests whether a function returning "int" can be inlined;
14 # at least some versions of HP's C compiler can inline that, but can't
15 # inline a function that returns a struct pointer.
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76 # Guess values for system-dependent variables and create Makefiles.
77 # Generated automatically using autoconf version 2.13
78 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
79 #
80 # This configure script is free software; the Free Software Foundation
81 # gives unlimited permission to copy, distribute and modify it.
82
83 # Defaults:
84 ac_help=
85 ac_default_prefix=/usr/local
86 # Any additions from configure.in:
87 ac_help="$ac_help
88 --without-gcc don't use gcc"
89 ac_help="$ac_help
90 --enable-smb enable possibly-buggy SMB printer [default=yes]
91 --disable-smb disable possibly-buggy SMB printer"
92 ac_help="$ac_help
93 --enable-ipv6 enable ipv6 (with ipv4) support
94 --disable-ipv6 disable ipv6 support"
95 ac_help="$ac_help
96 --without-crypto disable crypto support"
97
98 # Initialize some variables set by options.
99 # The variables have the same names as the options, with
100 # dashes changed to underlines.
101 build=NONE
102 cache_file=./config.cache
103 exec_prefix=NONE
104 host=NONE
105 no_create=
106 nonopt=NONE
107 no_recursion=
108 prefix=NONE
109 program_prefix=NONE
110 program_suffix=NONE
111 program_transform_name=s,x,x,
112 silent=
113 site=
114 srcdir=
115 target=NONE
116 verbose=
117 x_includes=NONE
118 x_libraries=NONE
119 bindir='${exec_prefix}/bin'
120 sbindir='${exec_prefix}/sbin'
121 libexecdir='${exec_prefix}/libexec'
122 datadir='${prefix}/share'
123 sysconfdir='${prefix}/etc'
124 sharedstatedir='${prefix}/com'
125 localstatedir='${prefix}/var'
126 libdir='${exec_prefix}/lib'
127 includedir='${prefix}/include'
128 oldincludedir='/usr/include'
129 infodir='${prefix}/info'
130 mandir='${prefix}/man'
131
132 # Initialize some other variables.
133 subdirs=
134 MFLAGS= MAKEFLAGS=
135 SHELL=${CONFIG_SHELL-/bin/sh}
136 # Maximum number of lines to put in a shell here document.
137 ac_max_here_lines=12
138
139 ac_prev=
140 for ac_option
141 do
142
143 # If the previous option needs an argument, assign it.
144 if test -n "$ac_prev"; then
145 eval "$ac_prev=\$ac_option"
146 ac_prev=
147 continue
148 fi
149
150 case "$ac_option" in
151 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
152 *) ac_optarg= ;;
153 esac
154
155 # Accept the important Cygnus configure options, so we can diagnose typos.
156
157 case "$ac_option" in
158
159 -bindir | --bindir | --bindi | --bind | --bin | --bi)
160 ac_prev=bindir ;;
161 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
162 bindir="$ac_optarg" ;;
163
164 -build | --build | --buil | --bui | --bu)
165 ac_prev=build ;;
166 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
167 build="$ac_optarg" ;;
168
169 -cache-file | --cache-file | --cache-fil | --cache-fi \
170 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
171 ac_prev=cache_file ;;
172 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
173 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
174 cache_file="$ac_optarg" ;;
175
176 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
177 ac_prev=datadir ;;
178 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
179 | --da=*)
180 datadir="$ac_optarg" ;;
181
182 -disable-* | --disable-*)
183 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
184 # Reject names that are not valid shell variable names.
185 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
186 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
187 fi
188 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
189 eval "enable_${ac_feature}=no" ;;
190
191 -enable-* | --enable-*)
192 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
193 # Reject names that are not valid shell variable names.
194 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
195 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
196 fi
197 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
198 case "$ac_option" in
199 *=*) ;;
200 *) ac_optarg=yes ;;
201 esac
202 eval "enable_${ac_feature}='$ac_optarg'" ;;
203
204 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
205 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
206 | --exec | --exe | --ex)
207 ac_prev=exec_prefix ;;
208 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
209 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
210 | --exec=* | --exe=* | --ex=*)
211 exec_prefix="$ac_optarg" ;;
212
213 -gas | --gas | --ga | --g)
214 # Obsolete; use --with-gas.
215 with_gas=yes ;;
216
217 -help | --help | --hel | --he)
218 # Omit some internal or obsolete options to make the list less imposing.
219 # This message is too long to be a string in the A/UX 3.1 sh.
220 cat << EOF
221 Usage: configure [options] [host]
222 Options: [defaults in brackets after descriptions]
223 Configuration:
224 --cache-file=FILE cache test results in FILE
225 --help print this message
226 --no-create do not create output files
227 --quiet, --silent do not print \`checking...' messages
228 --version print the version of autoconf that created configure
229 Directory and file names:
230 --prefix=PREFIX install architecture-independent files in PREFIX
231 [$ac_default_prefix]
232 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
233 [same as prefix]
234 --bindir=DIR user executables in DIR [EPREFIX/bin]
235 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
236 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
237 --datadir=DIR read-only architecture-independent data in DIR
238 [PREFIX/share]
239 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
240 --sharedstatedir=DIR modifiable architecture-independent data in DIR
241 [PREFIX/com]
242 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
243 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
244 --includedir=DIR C header files in DIR [PREFIX/include]
245 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
246 --infodir=DIR info documentation in DIR [PREFIX/info]
247 --mandir=DIR man documentation in DIR [PREFIX/man]
248 --srcdir=DIR find the sources in DIR [configure dir or ..]
249 --program-prefix=PREFIX prepend PREFIX to installed program names
250 --program-suffix=SUFFIX append SUFFIX to installed program names
251 --program-transform-name=PROGRAM
252 run sed PROGRAM on installed program names
253 EOF
254 cat << EOF
255 Host type:
256 --build=BUILD configure for building on BUILD [BUILD=HOST]
257 --host=HOST configure for HOST [guessed]
258 --target=TARGET configure for TARGET [TARGET=HOST]
259 Features and packages:
260 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
261 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
262 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
263 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
264 --x-includes=DIR X include files are in DIR
265 --x-libraries=DIR X library files are in DIR
266 EOF
267 if test -n "$ac_help"; then
268 echo "--enable and --with options recognized:$ac_help"
269 fi
270 exit 0 ;;
271
272 -host | --host | --hos | --ho)
273 ac_prev=host ;;
274 -host=* | --host=* | --hos=* | --ho=*)
275 host="$ac_optarg" ;;
276
277 -includedir | --includedir | --includedi | --included | --include \
278 | --includ | --inclu | --incl | --inc)
279 ac_prev=includedir ;;
280 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
281 | --includ=* | --inclu=* | --incl=* | --inc=*)
282 includedir="$ac_optarg" ;;
283
284 -infodir | --infodir | --infodi | --infod | --info | --inf)
285 ac_prev=infodir ;;
286 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
287 infodir="$ac_optarg" ;;
288
289 -libdir | --libdir | --libdi | --libd)
290 ac_prev=libdir ;;
291 -libdir=* | --libdir=* | --libdi=* | --libd=*)
292 libdir="$ac_optarg" ;;
293
294 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
295 | --libexe | --libex | --libe)
296 ac_prev=libexecdir ;;
297 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
298 | --libexe=* | --libex=* | --libe=*)
299 libexecdir="$ac_optarg" ;;
300
301 -localstatedir | --localstatedir | --localstatedi | --localstated \
302 | --localstate | --localstat | --localsta | --localst \
303 | --locals | --local | --loca | --loc | --lo)
304 ac_prev=localstatedir ;;
305 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
306 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
307 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
308 localstatedir="$ac_optarg" ;;
309
310 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
311 ac_prev=mandir ;;
312 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
313 mandir="$ac_optarg" ;;
314
315 -nfp | --nfp | --nf)
316 # Obsolete; use --without-fp.
317 with_fp=no ;;
318
319 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
320 | --no-cr | --no-c)
321 no_create=yes ;;
322
323 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
324 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
325 no_recursion=yes ;;
326
327 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
328 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
329 | --oldin | --oldi | --old | --ol | --o)
330 ac_prev=oldincludedir ;;
331 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
332 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
333 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
334 oldincludedir="$ac_optarg" ;;
335
336 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
337 ac_prev=prefix ;;
338 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
339 prefix="$ac_optarg" ;;
340
341 -program-prefix | --program-prefix | --program-prefi | --program-pref \
342 | --program-pre | --program-pr | --program-p)
343 ac_prev=program_prefix ;;
344 -program-prefix=* | --program-prefix=* | --program-prefi=* \
345 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
346 program_prefix="$ac_optarg" ;;
347
348 -program-suffix | --program-suffix | --program-suffi | --program-suff \
349 | --program-suf | --program-su | --program-s)
350 ac_prev=program_suffix ;;
351 -program-suffix=* | --program-suffix=* | --program-suffi=* \
352 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
353 program_suffix="$ac_optarg" ;;
354
355 -program-transform-name | --program-transform-name \
356 | --program-transform-nam | --program-transform-na \
357 | --program-transform-n | --program-transform- \
358 | --program-transform | --program-transfor \
359 | --program-transfo | --program-transf \
360 | --program-trans | --program-tran \
361 | --progr-tra | --program-tr | --program-t)
362 ac_prev=program_transform_name ;;
363 -program-transform-name=* | --program-transform-name=* \
364 | --program-transform-nam=* | --program-transform-na=* \
365 | --program-transform-n=* | --program-transform-=* \
366 | --program-transform=* | --program-transfor=* \
367 | --program-transfo=* | --program-transf=* \
368 | --program-trans=* | --program-tran=* \
369 | --progr-tra=* | --program-tr=* | --program-t=*)
370 program_transform_name="$ac_optarg" ;;
371
372 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
373 | -silent | --silent | --silen | --sile | --sil)
374 silent=yes ;;
375
376 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
377 ac_prev=sbindir ;;
378 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
379 | --sbi=* | --sb=*)
380 sbindir="$ac_optarg" ;;
381
382 -sharedstatedir | --sharedstatedir | --sharedstatedi \
383 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
384 | --sharedst | --shareds | --shared | --share | --shar \
385 | --sha | --sh)
386 ac_prev=sharedstatedir ;;
387 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
388 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
389 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
390 | --sha=* | --sh=*)
391 sharedstatedir="$ac_optarg" ;;
392
393 -site | --site | --sit)
394 ac_prev=site ;;
395 -site=* | --site=* | --sit=*)
396 site="$ac_optarg" ;;
397
398 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
399 ac_prev=srcdir ;;
400 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
401 srcdir="$ac_optarg" ;;
402
403 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
404 | --syscon | --sysco | --sysc | --sys | --sy)
405 ac_prev=sysconfdir ;;
406 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
407 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
408 sysconfdir="$ac_optarg" ;;
409
410 -target | --target | --targe | --targ | --tar | --ta | --t)
411 ac_prev=target ;;
412 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
413 target="$ac_optarg" ;;
414
415 -v | -verbose | --verbose | --verbos | --verbo | --verb)
416 verbose=yes ;;
417
418 -version | --version | --versio | --versi | --vers)
419 echo "configure generated by autoconf version 2.13"
420 exit 0 ;;
421
422 -with-* | --with-*)
423 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
424 # Reject names that are not valid shell variable names.
425 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
426 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
427 fi
428 ac_package=`echo $ac_package| sed 's/-/_/g'`
429 case "$ac_option" in
430 *=*) ;;
431 *) ac_optarg=yes ;;
432 esac
433 eval "with_${ac_package}='$ac_optarg'" ;;
434
435 -without-* | --without-*)
436 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
437 # Reject names that are not valid shell variable names.
438 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
439 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440 fi
441 ac_package=`echo $ac_package| sed 's/-/_/g'`
442 eval "with_${ac_package}=no" ;;
443
444 --x)
445 # Obsolete; use --with-x.
446 with_x=yes ;;
447
448 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
449 | --x-incl | --x-inc | --x-in | --x-i)
450 ac_prev=x_includes ;;
451 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
452 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
453 x_includes="$ac_optarg" ;;
454
455 -x-libraries | --x-libraries | --x-librarie | --x-librari \
456 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
457 ac_prev=x_libraries ;;
458 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
459 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
460 x_libraries="$ac_optarg" ;;
461
462 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
463 ;;
464
465 *)
466 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
467 echo "configure: warning: $ac_option: invalid host type" 1>&2
468 fi
469 if test "x$nonopt" != xNONE; then
470 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
471 fi
472 nonopt="$ac_option"
473 ;;
474
475 esac
476 done
477
478 if test -n "$ac_prev"; then
479 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
480 fi
481
482 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
483
484 # File descriptor usage:
485 # 0 standard input
486 # 1 file creation
487 # 2 errors and warnings
488 # 3 some systems may open it to /dev/tty
489 # 4 used on the Kubota Titan
490 # 6 checking for... messages and results
491 # 5 compiler messages saved in config.log
492 if test "$silent" = yes; then
493 exec 6>/dev/null
494 else
495 exec 6>&1
496 fi
497 exec 5>./config.log
498
499 echo "\
500 This file contains any messages produced by compilers while
501 running configure, to aid debugging if configure makes a mistake.
502 " 1>&5
503
504 # Strip out --no-create and --no-recursion so they do not pile up.
505 # Also quote any args containing shell metacharacters.
506 ac_configure_args=
507 for ac_arg
508 do
509 case "$ac_arg" in
510 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
511 | --no-cr | --no-c) ;;
512 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
513 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
514 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
515 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
516 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
517 esac
518 done
519
520 # NLS nuisances.
521 # Only set these to C if already set. These must not be set unconditionally
522 # because not all systems understand e.g. LANG=C (notably SCO).
523 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
524 # Non-C LC_CTYPE values break the ctype check.
525 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
526 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
527 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
528 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
529
530 # confdefs.h avoids OS command line length limits that DEFS can exceed.
531 rm -rf conftest* confdefs.h
532 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
533 echo > confdefs.h
534
535 # A filename unique to this package, relative to the directory that
536 # configure is in, which we can look for to find out if srcdir is correct.
537 ac_unique_file=tcpdump.c
538
539 # Find the source files, if location was not specified.
540 if test -z "$srcdir"; then
541 ac_srcdir_defaulted=yes
542 # Try the directory containing this script, then its parent.
543 ac_prog=$0
544 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
545 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
546 srcdir=$ac_confdir
547 if test ! -r $srcdir/$ac_unique_file; then
548 srcdir=..
549 fi
550 else
551 ac_srcdir_defaulted=no
552 fi
553 if test ! -r $srcdir/$ac_unique_file; then
554 if test "$ac_srcdir_defaulted" = yes; then
555 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
556 else
557 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
558 fi
559 fi
560 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
561
562 # Prefer explicitly selected file to automatically selected ones.
563 if test -z "$CONFIG_SITE"; then
564 if test "x$prefix" != xNONE; then
565 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
566 else
567 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
568 fi
569 fi
570 for ac_site_file in $CONFIG_SITE; do
571 if test -r "$ac_site_file"; then
572 echo "loading site script $ac_site_file"
573 . "$ac_site_file"
574 fi
575 done
576
577 if test -r "$cache_file"; then
578 echo "loading cache $cache_file"
579 . $cache_file
580 else
581 echo "creating cache $cache_file"
582 > $cache_file
583 fi
584
585 ac_ext=c
586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
587 ac_cpp='$CPP $CPPFLAGS'
588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
589 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
590 cross_compiling=$ac_cv_prog_cc_cross
591
592 ac_exeext=
593 ac_objext=o
594 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
595 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
596 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
597 ac_n= ac_c='
598 ' ac_t=' '
599 else
600 ac_n=-n ac_c= ac_t=
601 fi
602 else
603 ac_n= ac_c='\c' ac_t=
604 fi
605
606
607
608 ac_aux_dir=
609 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
610 if test -f $ac_dir/install-sh; then
611 ac_aux_dir=$ac_dir
612 ac_install_sh="$ac_aux_dir/install-sh -c"
613 break
614 elif test -f $ac_dir/install.sh; then
615 ac_aux_dir=$ac_dir
616 ac_install_sh="$ac_aux_dir/install.sh -c"
617 break
618 fi
619 done
620 if test -z "$ac_aux_dir"; then
621 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
622 fi
623 ac_config_guess=$ac_aux_dir/config.guess
624 ac_config_sub=$ac_aux_dir/config.sub
625 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
626
627
628 # Make sure we can run config.sub.
629 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
630 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
631 fi
632
633 echo $ac_n "checking host system type""... $ac_c" 1>&6
634 echo "configure:635: checking host system type" >&5
635
636 host_alias=$host
637 case "$host_alias" in
638 NONE)
639 case $nonopt in
640 NONE)
641 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
642 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
643 fi ;;
644 *) host_alias=$nonopt ;;
645 esac ;;
646 esac
647
648 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
649 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
650 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
651 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
652 echo "$ac_t""$host" 1>&6
653
654
655
656
657
658
659 # Check whether --with-gcc or --without-gcc was given.
660 if test "${with_gcc+set}" = set; then
661 withval="$with_gcc"
662 :
663 fi
664
665 V_CCOPT="-O"
666 V_INCLS=""
667 if test "${srcdir}" != "." ; then
668 V_INCLS="-I\$(srcdir)"
669 fi
670 if test "${CFLAGS+set}" = set; then
671 LBL_CFLAGS="$CFLAGS"
672 fi
673 if test -z "$CC" ; then
674 case "$host_os" in
675
676 bsdi*)
677 # Extract the first word of "shlicc2", so it can be a program name with args.
678 set dummy shlicc2; ac_word=$2
679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
680 echo "configure:681: checking for $ac_word" >&5
681 if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
682 echo $ac_n "(cached) $ac_c" 1>&6
683 else
684 if test -n "$SHLICC2"; then
685 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
686 else
687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
688 ac_dummy="$PATH"
689 for ac_dir in $ac_dummy; do
690 test -z "$ac_dir" && ac_dir=.
691 if test -f $ac_dir/$ac_word; then
692 ac_cv_prog_SHLICC2="yes"
693 break
694 fi
695 done
696 IFS="$ac_save_ifs"
697 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
698 fi
699 fi
700 SHLICC2="$ac_cv_prog_SHLICC2"
701 if test -n "$SHLICC2"; then
702 echo "$ac_t""$SHLICC2" 1>&6
703 else
704 echo "$ac_t""no" 1>&6
705 fi
706
707 if test $SHLICC2 = yes ; then
708 CC=shlicc2
709 export CC
710 fi
711 ;;
712 esac
713 fi
714 if test -z "$CC" -a "$with_gcc" = no ; then
715 CC=cc
716 export CC
717 fi
718 # Extract the first word of "gcc", so it can be a program name with args.
719 set dummy gcc; ac_word=$2
720 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
721 echo "configure:722: checking for $ac_word" >&5
722 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
723 echo $ac_n "(cached) $ac_c" 1>&6
724 else
725 if test -n "$CC"; then
726 ac_cv_prog_CC="$CC" # Let the user override the test.
727 else
728 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
729 ac_dummy="$PATH"
730 for ac_dir in $ac_dummy; do
731 test -z "$ac_dir" && ac_dir=.
732 if test -f $ac_dir/$ac_word; then
733 ac_cv_prog_CC="gcc"
734 break
735 fi
736 done
737 IFS="$ac_save_ifs"
738 fi
739 fi
740 CC="$ac_cv_prog_CC"
741 if test -n "$CC"; then
742 echo "$ac_t""$CC" 1>&6
743 else
744 echo "$ac_t""no" 1>&6
745 fi
746
747 if test -z "$CC"; then
748 # Extract the first word of "cc", so it can be a program name with args.
749 set dummy cc; ac_word=$2
750 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
751 echo "configure:752: checking for $ac_word" >&5
752 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
753 echo $ac_n "(cached) $ac_c" 1>&6
754 else
755 if test -n "$CC"; then
756 ac_cv_prog_CC="$CC" # Let the user override the test.
757 else
758 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
759 ac_prog_rejected=no
760 ac_dummy="$PATH"
761 for ac_dir in $ac_dummy; do
762 test -z "$ac_dir" && ac_dir=.
763 if test -f $ac_dir/$ac_word; then
764 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
765 ac_prog_rejected=yes
766 continue
767 fi
768 ac_cv_prog_CC="cc"
769 break
770 fi
771 done
772 IFS="$ac_save_ifs"
773 if test $ac_prog_rejected = yes; then
774 # We found a bogon in the path, so make sure we never use it.
775 set dummy $ac_cv_prog_CC
776 shift
777 if test $# -gt 0; then
778 # We chose a different compiler from the bogus one.
779 # However, it has the same basename, so the bogon will be chosen
780 # first if we set CC to just the basename; use the full file name.
781 shift
782 set dummy "$ac_dir/$ac_word" "$@"
783 shift
784 ac_cv_prog_CC="$@"
785 fi
786 fi
787 fi
788 fi
789 CC="$ac_cv_prog_CC"
790 if test -n "$CC"; then
791 echo "$ac_t""$CC" 1>&6
792 else
793 echo "$ac_t""no" 1>&6
794 fi
795
796 if test -z "$CC"; then
797 case "`uname -s`" in
798 *win32* | *WIN32*)
799 # Extract the first word of "cl", so it can be a program name with args.
800 set dummy cl; ac_word=$2
801 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
802 echo "configure:803: checking for $ac_word" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 if test -n "$CC"; then
807 ac_cv_prog_CC="$CC" # Let the user override the test.
808 else
809 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
810 ac_dummy="$PATH"
811 for ac_dir in $ac_dummy; do
812 test -z "$ac_dir" && ac_dir=.
813 if test -f $ac_dir/$ac_word; then
814 ac_cv_prog_CC="cl"
815 break
816 fi
817 done
818 IFS="$ac_save_ifs"
819 fi
820 fi
821 CC="$ac_cv_prog_CC"
822 if test -n "$CC"; then
823 echo "$ac_t""$CC" 1>&6
824 else
825 echo "$ac_t""no" 1>&6
826 fi
827 ;;
828 esac
829 fi
830 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
831 fi
832
833 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
834 echo "configure:835: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
835
836 ac_ext=c
837 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
838 ac_cpp='$CPP $CPPFLAGS'
839 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
840 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
841 cross_compiling=$ac_cv_prog_cc_cross
842
843 cat > conftest.$ac_ext << EOF
844
845 #line 846 "configure"
846 #include "confdefs.h"
847
848 main(){return(0);}
849 EOF
850 if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
851 ac_cv_prog_cc_works=yes
852 # If we can't run a trivial program, we are probably using a cross compiler.
853 if (./conftest; exit) 2>/dev/null; then
854 ac_cv_prog_cc_cross=no
855 else
856 ac_cv_prog_cc_cross=yes
857 fi
858 else
859 echo "configure: failed program was:" >&5
860 cat conftest.$ac_ext >&5
861 ac_cv_prog_cc_works=no
862 fi
863 rm -fr conftest*
864 ac_ext=c
865 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
866 ac_cpp='$CPP $CPPFLAGS'
867 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
868 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
869 cross_compiling=$ac_cv_prog_cc_cross
870
871 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
872 if test $ac_cv_prog_cc_works = no; then
873 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
874 fi
875 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
876 echo "configure:877: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
877 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
878 cross_compiling=$ac_cv_prog_cc_cross
879
880 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
881 echo "configure:882: checking whether we are using GNU C" >&5
882 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
883 echo $ac_n "(cached) $ac_c" 1>&6
884 else
885 cat > conftest.c <<EOF
886 #ifdef __GNUC__
887 yes;
888 #endif
889 EOF
890 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
891 ac_cv_prog_gcc=yes
892 else
893 ac_cv_prog_gcc=no
894 fi
895 fi
896
897 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
898
899 if test $ac_cv_prog_gcc = yes; then
900 GCC=yes
901 else
902 GCC=
903 fi
904
905 ac_test_CFLAGS="${CFLAGS+set}"
906 ac_save_CFLAGS="$CFLAGS"
907 CFLAGS=
908 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
909 echo "configure:910: checking whether ${CC-cc} accepts -g" >&5
910 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
911 echo $ac_n "(cached) $ac_c" 1>&6
912 else
913 echo 'void f(){}' > conftest.c
914 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
915 ac_cv_prog_cc_g=yes
916 else
917 ac_cv_prog_cc_g=no
918 fi
919 rm -f conftest*
920
921 fi
922
923 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
924 if test "$ac_test_CFLAGS" = set; then
925 CFLAGS="$ac_save_CFLAGS"
926 elif test $ac_cv_prog_cc_g = yes; then
927 if test "$GCC" = yes; then
928 CFLAGS="-g -O2"
929 else
930 CFLAGS="-g"
931 fi
932 else
933 if test "$GCC" = yes; then
934 CFLAGS="-O2"
935 else
936 CFLAGS=
937 fi
938 fi
939
940 if test "$GCC" = yes ; then
941 if test "$SHLICC2" = yes ; then
942 ac_cv_lbl_gcc_vers=2
943 V_CCOPT="-O2"
944 else
945 echo $ac_n "checking gcc version""... $ac_c" 1>&6
946 echo "configure:947: checking gcc version" >&5
947 if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
948 echo $ac_n "(cached) $ac_c" 1>&6
949 else
950 ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
951 sed -e '/^gcc version /!d' \
952 -e 's/^gcc version //' \
953 -e 's/ .*//' -e 's/^[^0-9]*//' \
954 -e 's/\..*//'`
955 fi
956
957 echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6
958 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
959 V_CCOPT="-O2"
960 fi
961 fi
962 else
963 echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
964 echo "configure:965: checking that $CC handles ansi prototypes" >&5
965 if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
967 else
968 cat > conftest.$ac_ext <<EOF
969 #line 970 "configure"
970 #include "confdefs.h"
971 #include <sys/types.h>
972 int main() {
973 int frob(int, char *)
974 ; return 0; }
975 EOF
976 if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
977 rm -rf conftest*
978 ac_cv_lbl_cc_ansi_prototypes=yes
979 else
980 echo "configure: failed program was:" >&5
981 cat conftest.$ac_ext >&5
982 rm -rf conftest*
983 ac_cv_lbl_cc_ansi_prototypes=no
984 fi
985 rm -f conftest*
986 fi
987
988 echo "$ac_t""$ac_cv_lbl_cc_ansi_prototypes" 1>&6
989 if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
990 case "$host_os" in
991
992 hpux*)
993 echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
994 echo "configure:995: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
995 savedcflags="$CFLAGS"
996 CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
997 if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
998 echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000 cat > conftest.$ac_ext <<EOF
1001 #line 1002 "configure"
1002 #include "confdefs.h"
1003 #include <sys/types.h>
1004 int main() {
1005 int frob(int, char *)
1006 ; return 0; }
1007 EOF
1008 if { (eval echo configure:1009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1009 rm -rf conftest*
1010 ac_cv_lbl_cc_hpux_cc_aa=yes
1011 else
1012 echo "configure: failed program was:" >&5
1013 cat conftest.$ac_ext >&5
1014 rm -rf conftest*
1015 ac_cv_lbl_cc_hpux_cc_aa=no
1016 fi
1017 rm -f conftest*
1018 fi
1019
1020 echo "$ac_t""$ac_cv_lbl_cc_hpux_cc_aa" 1>&6
1021 if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
1022 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
1023 fi
1024 CFLAGS="$savedcflags"
1025 V_CCOPT="-Aa $V_CCOPT"
1026 cat >> confdefs.h <<\EOF
1027 #define _HPUX_SOURCE 1
1028 EOF
1029
1030 ;;
1031
1032 *)
1033 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
1034 ;;
1035 esac
1036 fi
1037 V_INCLS="$V_INCLS -I/usr/local/include"
1038 LDFLAGS="$LDFLAGS -L/usr/local/lib"
1039
1040 case "$host_os" in
1041
1042 irix*)
1043 V_CCOPT="$V_CCOPT -xansi -signed -O"
1044 ;;
1045
1046 osf*)
1047 V_CCOPT="$V_CCOPT -std1 -O"
1048 ;;
1049
1050 ultrix*)
1051 echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
1052 echo "configure:1053: checking that Ultrix $CC hacks const in prototypes" >&5
1053 if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
1054 echo $ac_n "(cached) $ac_c" 1>&6
1055 else
1056 cat > conftest.$ac_ext <<EOF
1057 #line 1058 "configure"
1058 #include "confdefs.h"
1059 #include <sys/types.h>
1060 int main() {
1061 struct a { int b; };
1062 void c(const struct a *)
1063 ; return 0; }
1064 EOF
1065 if { (eval echo configure:1066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1066 rm -rf conftest*
1067 ac_cv_lbl_cc_const_proto=yes
1068 else
1069 echo "configure: failed program was:" >&5
1070 cat conftest.$ac_ext >&5
1071 rm -rf conftest*
1072 ac_cv_lbl_cc_const_proto=no
1073 fi
1074 rm -f conftest*
1075 fi
1076
1077 echo "$ac_t""$ac_cv_lbl_cc_const_proto" 1>&6
1078 if test $ac_cv_lbl_cc_const_proto = no ; then
1079 cat >> confdefs.h <<\EOF
1080 #define const
1081 EOF
1082
1083 fi
1084 ;;
1085 esac
1086 fi
1087
1088 echo $ac_n "checking for inline""... $ac_c" 1>&6
1089 echo "configure:1090: checking for inline" >&5
1090 if eval "test \"`echo '$''{'ac_cv_lbl_inline'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1092 else
1093
1094 ac_cv_lbl_inline=""
1095 ac_lbl_cc_inline=no
1096 for ac_lbl_inline in inline __inline__ __inline
1097 do
1098 cat > conftest.$ac_ext <<EOF
1099 #line 1100 "configure"
1100 #include "confdefs.h"
1101 #define inline $ac_lbl_inline
1102 static inline struct iltest *foo(void);
1103 struct iltest {
1104 int iltest1;
1105 int iltest2;
1106 };
1107
1108 static inline struct iltest *
1109 foo()
1110 {
1111 static struct iltest xxx;
1112
1113 return &xxx;
1114 }
1115 int main() {
1116
1117 ; return 0; }
1118 EOF
1119 if { (eval echo configure:1120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1120 rm -rf conftest*
1121 ac_lbl_cc_inline=yes
1122 else
1123 echo "configure: failed program was:" >&5
1124 cat conftest.$ac_ext >&5
1125 fi
1126 rm -f conftest*
1127 if test "$ac_lbl_cc_inline" = yes ; then
1128 break;
1129 fi
1130 done
1131 if test "$ac_lbl_cc_inline" = yes ; then
1132 ac_cv_lbl_inline=$ac_lbl_inline
1133 fi
1134 fi
1135
1136 if test ! -z "$ac_cv_lbl_inline" ; then
1137 echo "$ac_t""$ac_cv_lbl_inline" 1>&6
1138 else
1139 echo "$ac_t""no" 1>&6
1140 fi
1141 cat >> confdefs.h <<EOF
1142 #define inline $ac_cv_lbl_inline
1143 EOF
1144
1145
1146 echo $ac_n "checking for __attribute__""... $ac_c" 1>&6
1147 echo "configure:1148: checking for __attribute__" >&5
1148 if eval "test \"`echo '$''{'ac_cv___attribute__'+set}'`\" = set"; then
1149 echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151
1152 cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1155
1156 #include <stdlib.h>
1157
1158 int main() {
1159
1160 static void foo(void) __attribute__ ((noreturn));
1161
1162 static void
1163 foo(void)
1164 {
1165 exit(1);
1166 }
1167
1168 ; return 0; }
1169 EOF
1170 if { (eval echo configure:1171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1171 rm -rf conftest*
1172 ac_cv___attribute__=yes
1173 else
1174 echo "configure: failed program was:" >&5
1175 cat conftest.$ac_ext >&5
1176 rm -rf conftest*
1177 ac_cv___attribute__=no
1178 fi
1179 rm -f conftest*
1180 fi
1181
1182 if test "$ac_cv___attribute__" = "yes"; then
1183 cat >> confdefs.h <<\EOF
1184 #define HAVE___ATTRIBUTE__ 1
1185 EOF
1186
1187 V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
1188 else
1189 V_DEFS="$V_DEFS -D_U_=\"\""
1190 fi
1191 echo "$ac_t""$ac_cv___attribute__" 1>&6
1192
1193
1194 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1195 echo "configure:1196: checking how to run the C preprocessor" >&5
1196 # On Suns, sometimes $CPP names a directory.
1197 if test -n "$CPP" && test -d "$CPP"; then
1198 CPP=
1199 fi
1200 if test -z "$CPP"; then
1201 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1202 echo $ac_n "(cached) $ac_c" 1>&6
1203 else
1204 # This must be in double quotes, not single quotes, because CPP may get
1205 # substituted into the Makefile and "${CC-cc}" will confuse make.
1206 CPP="${CC-cc} -E"
1207 # On the NeXT, cc -E runs the code through the compiler's parser,
1208 # not just through cpp.
1209 cat > conftest.$ac_ext <<EOF
1210 #line 1211 "configure"
1211 #include "confdefs.h"
1212 #include <assert.h>
1213 Syntax Error
1214 EOF
1215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1216 { (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1218 if test -z "$ac_err"; then
1219 :
1220 else
1221 echo "$ac_err" >&5
1222 echo "configure: failed program was:" >&5
1223 cat conftest.$ac_ext >&5
1224 rm -rf conftest*
1225 CPP="${CC-cc} -E -traditional-cpp"
1226 cat > conftest.$ac_ext <<EOF
1227 #line 1228 "configure"
1228 #include "confdefs.h"
1229 #include <assert.h>
1230 Syntax Error
1231 EOF
1232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1233 { (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1235 if test -z "$ac_err"; then
1236 :
1237 else
1238 echo "$ac_err" >&5
1239 echo "configure: failed program was:" >&5
1240 cat conftest.$ac_ext >&5
1241 rm -rf conftest*
1242 CPP="${CC-cc} -nologo -E"
1243 cat > conftest.$ac_ext <<EOF
1244 #line 1245 "configure"
1245 #include "confdefs.h"
1246 #include <assert.h>
1247 Syntax Error
1248 EOF
1249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1250 { (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1252 if test -z "$ac_err"; then
1253 :
1254 else
1255 echo "$ac_err" >&5
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 CPP=/lib/cpp
1260 fi
1261 rm -f conftest*
1262 fi
1263 rm -f conftest*
1264 fi
1265 rm -f conftest*
1266 ac_cv_prog_CPP="$CPP"
1267 fi
1268 CPP="$ac_cv_prog_CPP"
1269 else
1270 ac_cv_prog_CPP="$CPP"
1271 fi
1272 echo "$ac_t""$CPP" 1>&6
1273
1274 for ac_hdr in fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h netinet/ether.h
1275 do
1276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1278 echo "configure:1279: checking for $ac_hdr" >&5
1279 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1280 echo $ac_n "(cached) $ac_c" 1>&6
1281 else
1282 cat > conftest.$ac_ext <<EOF
1283 #line 1284 "configure"
1284 #include "confdefs.h"
1285 #include <$ac_hdr>
1286 EOF
1287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1288 { (eval echo configure:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1290 if test -z "$ac_err"; then
1291 rm -rf conftest*
1292 eval "ac_cv_header_$ac_safe=yes"
1293 else
1294 echo "$ac_err" >&5
1295 echo "configure: failed program was:" >&5
1296 cat conftest.$ac_ext >&5
1297 rm -rf conftest*
1298 eval "ac_cv_header_$ac_safe=no"
1299 fi
1300 rm -f conftest*
1301 fi
1302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1303 echo "$ac_t""yes" 1>&6
1304 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1305 cat >> confdefs.h <<EOF
1306 #define $ac_tr_hdr 1
1307 EOF
1308
1309 else
1310 echo "$ac_t""no" 1>&6
1311 fi
1312 done
1313
1314 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1315 echo "configure:1316: checking whether time.h and sys/time.h may both be included" >&5
1316 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1317 echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319 cat > conftest.$ac_ext <<EOF
1320 #line 1321 "configure"
1321 #include "confdefs.h"
1322 #include <sys/types.h>
1323 #include <sys/time.h>
1324 #include <time.h>
1325 int main() {
1326 struct tm *tp;
1327 ; return 0; }
1328 EOF
1329 if { (eval echo configure:1330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1330 rm -rf conftest*
1331 ac_cv_header_time=yes
1332 else
1333 echo "configure: failed program was:" >&5
1334 cat conftest.$ac_ext >&5
1335 rm -rf conftest*
1336 ac_cv_header_time=no
1337 fi
1338 rm -f conftest*
1339 fi
1340
1341 echo "$ac_t""$ac_cv_header_time" 1>&6
1342 if test $ac_cv_header_time = yes; then
1343 cat >> confdefs.h <<\EOF
1344 #define TIME_WITH_SYS_TIME 1
1345 EOF
1346
1347 fi
1348
1349
1350 case "$host_os" in
1351
1352 linux*)
1353 echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1354 echo "configure:1355: checking Linux kernel version" >&5
1355 if test "$cross_compiling" = yes; then
1356 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1357 echo $ac_n "(cached) $ac_c" 1>&6
1358 else
1359 ac_cv_linux_vers=unknown
1360 fi
1361
1362 else
1363 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1364 echo $ac_n "(cached) $ac_c" 1>&6
1365 else
1366 ac_cv_linux_vers=`uname -r 2>&1 | \
1367 sed -n -e '$s/.* //' -e '$s/\..*//p'`
1368 fi
1369
1370 fi
1371 echo "$ac_t""$ac_cv_linux_vers" 1>&6
1372 if test $ac_cv_linux_vers = unknown ; then
1373 { echo "configure: error: cannot determine linux version when cross-compiling" 1>&2; exit 1; }
1374 fi
1375 if test $ac_cv_linux_vers -lt 2 ; then
1376 { echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
1377 fi
1378 ;;
1379
1380 *)
1381 ;;
1382 esac
1383
1384
1385 for ac_hdr in smi.h
1386 do
1387 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1388 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1389 echo "configure:1390: checking for $ac_hdr" >&5
1390 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1391 echo $ac_n "(cached) $ac_c" 1>&6
1392 else
1393 cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1396 #include <$ac_hdr>
1397 EOF
1398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1399 { (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1401 if test -z "$ac_err"; then
1402 rm -rf conftest*
1403 eval "ac_cv_header_$ac_safe=yes"
1404 else
1405 echo "$ac_err" >&5
1406 echo "configure: failed program was:" >&5
1407 cat conftest.$ac_ext >&5
1408 rm -rf conftest*
1409 eval "ac_cv_header_$ac_safe=no"
1410 fi
1411 rm -f conftest*
1412 fi
1413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1414 echo "$ac_t""yes" 1>&6
1415 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1416 cat >> confdefs.h <<EOF
1417 #define $ac_tr_hdr 1
1418 EOF
1419
1420 else
1421 echo "$ac_t""no" 1>&6
1422 fi
1423 done
1424
1425 echo $ac_n "checking for smiInit in -lsmi""... $ac_c" 1>&6
1426 echo "configure:1427: checking for smiInit in -lsmi" >&5
1427 ac_lib_var=`echo smi'_'smiInit | sed 'y%./+-%__p_%'`
1428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1429 echo $ac_n "(cached) $ac_c" 1>&6
1430 else
1431 ac_save_LIBS="$LIBS"
1432 LIBS="-lsmi $LIBS"
1433 cat > conftest.$ac_ext <<EOF
1434 #line 1435 "configure"
1435 #include "confdefs.h"
1436 /* Override any gcc2 internal prototype to avoid an error. */
1437 /* We use char because int might match the return type of a gcc2
1438 builtin and then its argument prototype would still apply. */
1439 char smiInit();
1440
1441 int main() {
1442 smiInit()
1443 ; return 0; }
1444 EOF
1445 if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1446 rm -rf conftest*
1447 eval "ac_cv_lib_$ac_lib_var=yes"
1448 else
1449 echo "configure: failed program was:" >&5
1450 cat conftest.$ac_ext >&5
1451 rm -rf conftest*
1452 eval "ac_cv_lib_$ac_lib_var=no"
1453 fi
1454 rm -f conftest*
1455 LIBS="$ac_save_LIBS"
1456
1457 fi
1458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1459 echo "$ac_t""yes" 1>&6
1460 ac_tr_lib=HAVE_LIB`echo smi | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1461 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1462 cat >> confdefs.h <<EOF
1463 #define $ac_tr_lib 1
1464 EOF
1465
1466 LIBS="-lsmi $LIBS"
1467
1468 else
1469 echo "$ac_t""no" 1>&6
1470 fi
1471
1472 if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
1473 then
1474 echo $ac_n "checking whether to enable libsmi""... $ac_c" 1>&6
1475 echo "configure:1476: checking whether to enable libsmi" >&5
1476 if test "$cross_compiling" = yes; then
1477 echo "$ac_t""not when cross-compiling" 1>&6
1478 libsmi=no
1479
1480 else
1481 cat > conftest.$ac_ext <<EOF
1482 #line 1483 "configure"
1483 #include "confdefs.h"
1484 /* libsmi available check */
1485 #include <smi.h>
1486 main()
1487 {
1488 int current, revision, age, n;
1489 const int required = 2;
1490 if (smiInit(""))
1491 exit(1);
1492 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
1493 exit(2);
1494 n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
1495 if (n != 3)
1496 exit(3);
1497 if (required < current - age || required > current)
1498 exit(4);
1499 exit(0);
1500 }
1501
1502 EOF
1503 if { (eval echo configure:1504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1504 then
1505 echo "$ac_t""yes" 1>&6
1506 cat >> confdefs.h <<\EOF
1507 #define LIBSMI 1
1508 EOF
1509
1510 libsmi=yes
1511 else
1512 echo "configure: failed program was:" >&5
1513 cat conftest.$ac_ext >&5
1514 rm -fr conftest*
1515 case $? in
1516 1) echo "$ac_t""no - smiInit failed" 1>&6 ;;
1517 2) echo "$ac_t""no - header/library version mismatch" 1>&6 ;;
1518 3) echo "$ac_t""no - can't determine library version" 1>&6 ;;
1519 4) echo "$ac_t""no - too old" 1>&6 ;;
1520 *) echo "$ac_t""no" 1>&6 ;;
1521 esac
1522 libsmi=no
1523 fi
1524 rm -fr conftest*
1525 fi
1526
1527 fi
1528
1529 echo $ac_n "checking whether to enable the possibly-buggy SMB printer""... $ac_c" 1>&6
1530 echo "configure:1531: checking whether to enable the possibly-buggy SMB printer" >&5
1531 # Check whether --enable-smb or --disable-smb was given.
1532 if test "${enable_smb+set}" = set; then
1533 enableval="$enable_smb"
1534 :
1535 else
1536 enableval=yes
1537 fi
1538
1539 case "$enableval" in
1540 yes) echo "$ac_t""yes" 1>&6
1541 echo "configure: warning: The SMB printer may have exploitable buffer overflows!!!" 1>&2
1542 cat >> confdefs.h <<\EOF
1543 #define TCPDUMP_DO_SMB 1
1544 EOF
1545
1546 LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
1547 ;;
1548 *) echo "$ac_t""no" 1>&6
1549 ;;
1550 esac
1551
1552 echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
1553 echo "configure:1554: checking whether to enable ipv6" >&5
1554 # Check whether --enable-ipv6 or --disable-ipv6 was given.
1555 if test "${enable_ipv6+set}" = set; then
1556 enableval="$enable_ipv6"
1557 case "$enableval" in
1558 yes) echo "$ac_t""yes" 1>&6
1559 LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
1560 cat >> confdefs.h <<\EOF
1561 #define INET6 1
1562 EOF
1563
1564 ipv6=yes
1565 ;;
1566 *)
1567 echo "$ac_t""no" 1>&6
1568 ipv6=no
1569 ;;
1570 esac
1571 else
1572 if test "$cross_compiling" = yes; then
1573 echo "$ac_t""no" 1>&6
1574 ipv6=no
1575
1576 else
1577 cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1580 /* AF_INET6 available check */
1581 #include <sys/types.h>
1582 #include <sys/socket.h>
1583 main()
1584 {
1585 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1586 exit(1);
1587 else
1588 exit(0);
1589 }
1590
1591 EOF
1592 if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1593 then
1594 echo "$ac_t""yes" 1>&6
1595 LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
1596 cat >> confdefs.h <<\EOF
1597 #define INET6 1
1598 EOF
1599
1600 ipv6=yes
1601 else
1602 echo "configure: failed program was:" >&5
1603 cat conftest.$ac_ext >&5
1604 rm -fr conftest*
1605 echo "$ac_t""no" 1>&6
1606 ipv6=no
1607 fi
1608 rm -fr conftest*
1609 fi
1610
1611 fi
1612
1613
1614 ipv6type=unknown
1615 ipv6lib=none
1616 ipv6trylibc=no
1617
1618 if test "$ipv6" = "yes"; then
1619 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
1620 echo "configure:1621: checking ipv6 stack type" >&5
1621 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
1622 case $i in
1623 inria)
1624 cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 dnl
1628 #include <netinet/in.h>
1629 #ifdef IPV6_INRIA_VERSION
1630 yes
1631 #endif
1632 EOF
1633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1634 egrep "yes" >/dev/null 2>&1; then
1635 rm -rf conftest*
1636 ipv6type=$i;
1637 CFLAGS="-DINET6 $CFLAGS"
1638 fi
1639 rm -f conftest*
1640
1641 ;;
1642 kame)
1643 cat > conftest.$ac_ext <<EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1646 dnl
1647 #include <netinet/in.h>
1648 #ifdef __KAME__
1649 yes
1650 #endif
1651 EOF
1652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1653 egrep "yes" >/dev/null 2>&1; then
1654 rm -rf conftest*
1655 ipv6type=$i;
1656 ipv6lib=inet6;
1657 ipv6libdir=/usr/local/v6/lib;
1658 ipv6trylibc=yes;
1659 CFLAGS="-DINET6 $CFLAGS"
1660 fi
1661 rm -f conftest*
1662
1663 ;;
1664 linux-glibc)
1665 cat > conftest.$ac_ext <<EOF
1666 #line 1667 "configure"
1667 #include "confdefs.h"
1668 dnl
1669 #include <features.h>
1670 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
1671 yes
1672 #endif
1673 EOF
1674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1675 egrep "yes" >/dev/null 2>&1; then
1676 rm -rf conftest*
1677 ipv6type=$i;
1678 CFLAGS="-DINET6 $CFLAGS"
1679 fi
1680 rm -f conftest*
1681
1682 ;;
1683 linux-libinet6)
1684 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
1685 ipv6type=$i
1686 ipv6lib=inet6
1687 ipv6libdir=/usr/inet6/lib
1688 ipv6trylibc=yes;
1689 CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
1690 fi
1691 ;;
1692 toshiba)
1693 cat > conftest.$ac_ext <<EOF
1694 #line 1695 "configure"
1695 #include "confdefs.h"
1696 dnl
1697 #include <sys/param.h>
1698 #ifdef _TOSHIBA_INET6
1699 yes
1700 #endif
1701 EOF
1702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1703 egrep "yes" >/dev/null 2>&1; then
1704 rm -rf conftest*
1705 ipv6type=$i;
1706 ipv6lib=inet6;
1707 ipv6libdir=/usr/local/v6/lib;
1708 CFLAGS="-DINET6 $CFLAGS"
1709 fi
1710 rm -f conftest*
1711
1712 ;;
1713 v6d)
1714 cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717 dnl
1718 #include </usr/local/v6/include/sys/v6config.h>
1719 #ifdef __V6D__
1720 yes
1721 #endif
1722 EOF
1723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1724 egrep "yes" >/dev/null 2>&1; then
1725 rm -rf conftest*
1726 ipv6type=$i;
1727 ipv6lib=v6;
1728 ipv6libdir=/usr/local/v6/lib;
1729 CFLAGS="-I/usr/local/v6/include $CFLAGS"
1730 fi
1731 rm -f conftest*
1732
1733 ;;
1734 zeta)
1735 cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738 dnl
1739 #include <sys/param.h>
1740 #ifdef _ZETA_MINAMI_INET6
1741 yes
1742 #endif
1743 EOF
1744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1745 egrep "yes" >/dev/null 2>&1; then
1746 rm -rf conftest*
1747 ipv6type=$i;
1748 ipv6lib=inet6;
1749 ipv6libdir=/usr/local/v6/lib;
1750 CFLAGS="-DINET6 $CFLAGS"
1751 fi
1752 rm -f conftest*
1753
1754 ;;
1755 esac
1756 if test "$ipv6type" != "unknown"; then
1757 break
1758 fi
1759 done
1760 echo "$ac_t""$ipv6type" 1>&6
1761 fi
1762
1763 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1764 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1765 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1766 echo "You have $ipv6lib library, using it"
1767 else
1768 if test "$ipv6trylibc" = "yes"; then
1769 echo "You do not have $ipv6lib library, using libc"
1770 else
1771 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1772 echo "You need to fetch lib$ipv6lib.a from appropriate"
1773 echo 'ipv6 kit and compile beforehand.'
1774 exit 1
1775 fi
1776 fi
1777 fi
1778
1779
1780 if test "$ipv6" = "yes"; then
1781 #
1782 # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
1783 # function in libc; there are "ngetaddrinfo()" and
1784 # "ogetaddrinfo()" functions, and <netdb.h> #defines
1785 # "getaddrinfo" to be either "ngetaddrinfo" or
1786 # "ogetaddrinfo", depending on whether _SOCKADDR_LEN
1787 # or _XOPEN_SOURCE_EXTENDED are defined or not.
1788 #
1789 # So this test doesn't work on Tru64 5.1, and possibly
1790 # on other 5.x releases. This causes the configure
1791 # script to become confused, and results in libpcap
1792 # being unbuildable.
1793 #
1794
1795 echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
1796 echo "configure:1797: checking for library containing getaddrinfo" >&5
1797 if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
1798 echo $ac_n "(cached) $ac_c" 1>&6
1799 else
1800 ac_func_search_save_LIBS="$LIBS"
1801 ac_cv_search_getaddrinfo="no"
1802 cat > conftest.$ac_ext <<EOF
1803 #line 1804 "configure"
1804 #include "confdefs.h"
1805 /* Override any gcc2 internal prototype to avoid an error. */
1806 /* We use char because int might match the return type of a gcc2
1807 builtin and then its argument prototype would still apply. */
1808 char getaddrinfo();
1809
1810 int main() {
1811 getaddrinfo()
1812 ; return 0; }
1813 EOF
1814 if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1815 rm -rf conftest*
1816 ac_cv_search_getaddrinfo="none required"
1817 else
1818 echo "configure: failed program was:" >&5
1819 cat conftest.$ac_ext >&5
1820 fi
1821 rm -f conftest*
1822 test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do
1823 LIBS="-l$i $ac_func_search_save_LIBS"
1824 cat > conftest.$ac_ext <<EOF
1825 #line 1826 "configure"
1826 #include "confdefs.h"
1827 /* Override any gcc2 internal prototype to avoid an error. */
1828 /* We use char because int might match the return type of a gcc2
1829 builtin and then its argument prototype would still apply. */
1830 char getaddrinfo();
1831
1832 int main() {
1833 getaddrinfo()
1834 ; return 0; }
1835 EOF
1836 if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1837 rm -rf conftest*
1838 ac_cv_search_getaddrinfo="-l$i"
1839 break
1840 else
1841 echo "configure: failed program was:" >&5
1842 cat conftest.$ac_ext >&5
1843 fi
1844 rm -f conftest*
1845 done
1846 LIBS="$ac_func_search_save_LIBS"
1847 fi
1848
1849 echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
1850 if test "$ac_cv_search_getaddrinfo" != "no"; then
1851 test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
1852 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
1853 echo "configure:1854: checking getaddrinfo bug" >&5
1854 if eval "test \"`echo '$''{'td_cv_buggygetaddrinfo'+set}'`\" = set"; then
1855 echo $ac_n "(cached) $ac_c" 1>&6
1856 else
1857 if test "$cross_compiling" = yes; then
1858 td_cv_buggygetaddrinfo=yes
1859 else
1860 cat > conftest.$ac_ext <<EOF
1861 #line 1862 "configure"
1862 #include "confdefs.h"
1863
1864 #include <sys/types.h>
1865 #include <netdb.h>
1866 #include <string.h>
1867 #include <sys/socket.h>
1868 #include <netinet/in.h>
1869
1870 main()
1871 {
1872 int passive, gaierr, inet4 = 0, inet6 = 0;
1873 struct addrinfo hints, *ai, *aitop;
1874 char straddr[INET6_ADDRSTRLEN], strport[16];
1875
1876 for (passive = 0; passive <= 1; passive++) {
1877 memset(&hints, 0, sizeof(hints));
1878 hints.ai_family = AF_UNSPEC;
1879 hints.ai_flags = passive ? AI_PASSIVE : 0;
1880 hints.ai_socktype = SOCK_STREAM;
1881 hints.ai_protocol = IPPROTO_TCP;
1882 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
1883 (void)gai_strerror(gaierr);
1884 goto bad;
1885 }
1886 for (ai = aitop; ai; ai = ai->ai_next) {
1887 if (ai->ai_addr == NULL ||
1888 ai->ai_addrlen == 0 ||
1889 getnameinfo(ai->ai_addr, ai->ai_addrlen,
1890 straddr, sizeof(straddr), strport, sizeof(strport),
1891 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
1892 goto bad;
1893 }
1894 switch (ai->ai_family) {
1895 case AF_INET:
1896 if (strcmp(strport, "54321") != 0) {
1897 goto bad;
1898 }
1899 if (passive) {
1900 if (strcmp(straddr, "0.0.0.0") != 0) {
1901 goto bad;
1902 }
1903 } else {
1904 if (strcmp(straddr, "127.0.0.1") != 0) {
1905 goto bad;
1906 }
1907 }
1908 inet4++;
1909 break;
1910 case AF_INET6:
1911 if (strcmp(strport, "54321") != 0) {
1912 goto bad;
1913 }
1914 if (passive) {
1915 if (strcmp(straddr, "::") != 0) {
1916 goto bad;
1917 }
1918 } else {
1919 if (strcmp(straddr, "::1") != 0) {
1920 goto bad;
1921 }
1922 }
1923 inet6++;
1924 break;
1925 case AF_UNSPEC:
1926 goto bad;
1927 break;
1928 #ifdef AF_UNIX
1929 case AF_UNIX:
1930 #else
1931 #ifdef AF_LOCAL
1932 case AF_LOCAL:
1933 #endif
1934 #endif
1935 default:
1936 /* another family support? */
1937 break;
1938 }
1939 }
1940 }
1941
1942 /* supported family should be 2, unsupported family should be 0 */
1943 if (!(inet4 == 0 || inet4 == 2))
1944 goto bad;
1945 if (!(inet6 == 0 || inet6 == 2))
1946 goto bad;
1947
1948 if (aitop)
1949 freeaddrinfo(aitop);
1950 exit(0);
1951
1952 bad:
1953 if (aitop)
1954 freeaddrinfo(aitop);
1955 exit(1);
1956 }
1957
1958 EOF
1959 if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1960 then
1961 td_cv_buggygetaddrinfo=no
1962 else
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1965 rm -fr conftest*
1966 td_cv_buggygetaddrinfo=yes
1967 fi
1968 rm -fr conftest*
1969 fi
1970
1971 fi
1972
1973 if test "$td_cv_buggygetaddrinfo" = no; then
1974 echo "$ac_t""good" 1>&6
1975 else
1976 echo "$ac_t""buggy" 1>&6
1977 fi
1978
1979 if test "$td_cv_buggygetaddrinfo" = "yes"; then
1980 #
1981 # XXX - it doesn't appear that "ipv6type" can ever be
1982 # set to "linux". Should this be testing for
1983 # "linux-glibc", or for that *or* "linux-libinet6"?
1984 # If the latter, note that "linux-libinet6" is also
1985 # the type given to some non-Linux OSes.
1986 #
1987 if test "$ipv6type" != "linux"; then
1988 echo 'Fatal: You must get working getaddrinfo() function.'
1989 echo ' or you can specify "--disable-ipv6"'.
1990 exit 1
1991 else
1992 echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
1993 echo ' Better upgrade your system library to newest version'
1994 echo ' of GNU C library (aka glibc).'
1995 fi
1996 fi
1997
1998 else :
1999
2000 fi
2001 for ac_func in getaddrinfo getnameinfo
2002 do
2003 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2004 echo "configure:2005: checking for $ac_func" >&5
2005 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2006 echo $ac_n "(cached) $ac_c" 1>&6
2007 else
2008 cat > conftest.$ac_ext <<EOF
2009 #line 2010 "configure"
2010 #include "confdefs.h"
2011 /* System header to define __stub macros and hopefully few prototypes,
2012 which can conflict with char $ac_func(); below. */
2013 #include <assert.h>
2014 /* Override any gcc2 internal prototype to avoid an error. */
2015 /* We use char because int might match the return type of a gcc2
2016 builtin and then its argument prototype would still apply. */
2017 char $ac_func();
2018
2019 int main() {
2020
2021 /* The GNU C library defines this for functions which it implements
2022 to always fail with ENOSYS. Some functions are actually named
2023 something starting with __ and the normal name is an alias. */
2024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2025 choke me
2026 #else
2027 $ac_func();
2028 #endif
2029
2030 ; return 0; }
2031 EOF
2032 if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2033 rm -rf conftest*
2034 eval "ac_cv_func_$ac_func=yes"
2035 else
2036 echo "configure: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
2038 rm -rf conftest*
2039 eval "ac_cv_func_$ac_func=no"
2040 fi
2041 rm -f conftest*
2042 fi
2043
2044 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2045 echo "$ac_t""yes" 1>&6
2046 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2047 cat >> confdefs.h <<EOF
2048 #define $ac_tr_func 1
2049 EOF
2050
2051 else
2052 echo "$ac_t""no" 1>&6
2053 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2054 fi
2055 done
2056
2057
2058 fi
2059
2060 echo $ac_n "checking for dnet_htoa declaration in netdnet/dnetdb.h""... $ac_c" 1>&6
2061 echo "configure:2062: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
2062 if eval "test \"`echo '$''{'td_cv_decl_netdnet_dnetdb_h_dnet_htoa'+set}'`\" = set"; then
2063 echo $ac_n "(cached) $ac_c" 1>&6
2064 else
2065 cat > conftest.$ac_ext <<EOF
2066 #line 2067 "configure"
2067 #include "confdefs.h"
2068 #include <netdnet/dnetdb.h>
2069 EOF
2070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2071 egrep "dnet_htoa" >/dev/null 2>&1; then
2072 rm -rf conftest*
2073 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
2074 else
2075 rm -rf conftest*
2076 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
2077 fi
2078 rm -f conftest*
2079
2080 fi
2081
2082 echo "$ac_t""$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" 1>&6
2083 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
2084 cat >> confdefs.h <<\EOF
2085 #define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1
2086 EOF
2087
2088 fi
2089
2090 echo $ac_n "checking size of char""... $ac_c" 1>&6
2091 echo "configure:2092: checking size of char" >&5
2092 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2093 echo $ac_n "(cached) $ac_c" 1>&6
2094 else
2095 if test "$cross_compiling" = yes; then
2096 ac_cv_sizeof_char=1
2097 else
2098 cat > conftest.$ac_ext <<EOF
2099 #line 2100 "configure"
2100 #include "confdefs.h"
2101 #include <stdio.h>
2102 main()
2103 {
2104 FILE *f=fopen("conftestval", "w");
2105 if (!f) exit(1);
2106 fprintf(f, "%d\n", sizeof(char));
2107 exit(0);
2108 }
2109 EOF
2110 if { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2111 then
2112 ac_cv_sizeof_char=`cat conftestval`
2113 else
2114 echo "configure: failed program was:" >&5
2115 cat conftest.$ac_ext >&5
2116 rm -fr conftest*
2117 ac_cv_sizeof_char=0
2118 fi
2119 rm -fr conftest*
2120 fi
2121
2122 fi
2123 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2124 cat >> confdefs.h <<EOF
2125 #define SIZEOF_CHAR $ac_cv_sizeof_char
2126 EOF
2127
2128
2129 echo $ac_n "checking size of short""... $ac_c" 1>&6
2130 echo "configure:2131: checking size of short" >&5
2131 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2132 echo $ac_n "(cached) $ac_c" 1>&6
2133 else
2134 if test "$cross_compiling" = yes; then
2135 ac_cv_sizeof_short=2
2136 else
2137 cat > conftest.$ac_ext <<EOF
2138 #line 2139 "configure"
2139 #include "confdefs.h"
2140 #include <stdio.h>
2141 main()
2142 {
2143 FILE *f=fopen("conftestval", "w");
2144 if (!f) exit(1);
2145 fprintf(f, "%d\n", sizeof(short));
2146 exit(0);
2147 }
2148 EOF
2149 if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2150 then
2151 ac_cv_sizeof_short=`cat conftestval`
2152 else
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2155 rm -fr conftest*
2156 ac_cv_sizeof_short=0
2157 fi
2158 rm -fr conftest*
2159 fi
2160
2161 fi
2162 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2163 cat >> confdefs.h <<EOF
2164 #define SIZEOF_SHORT $ac_cv_sizeof_short
2165 EOF
2166
2167
2168 echo $ac_n "checking size of int""... $ac_c" 1>&6
2169 echo "configure:2170: checking size of int" >&5
2170 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173 if test "$cross_compiling" = yes; then
2174 ac_cv_sizeof_int=4
2175 else
2176 cat > conftest.$ac_ext <<EOF
2177 #line 2178 "configure"
2178 #include "confdefs.h"
2179 #include <stdio.h>
2180 main()
2181 {
2182 FILE *f=fopen("conftestval", "w");
2183 if (!f) exit(1);
2184 fprintf(f, "%d\n", sizeof(int));
2185 exit(0);
2186 }
2187 EOF
2188 if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2189 then
2190 ac_cv_sizeof_int=`cat conftestval`
2191 else
2192 echo "configure: failed program was:" >&5
2193 cat conftest.$ac_ext >&5
2194 rm -fr conftest*
2195 ac_cv_sizeof_int=0
2196 fi
2197 rm -fr conftest*
2198 fi
2199
2200 fi
2201 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2202 cat >> confdefs.h <<EOF
2203 #define SIZEOF_INT $ac_cv_sizeof_int
2204 EOF
2205
2206
2207 echo $ac_n "checking size of long""... $ac_c" 1>&6
2208 echo "configure:2209: checking size of long" >&5
2209 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2210 echo $ac_n "(cached) $ac_c" 1>&6
2211 else
2212 if test "$cross_compiling" = yes; then
2213 ac_cv_sizeof_long=4
2214 else
2215 cat > conftest.$ac_ext <<EOF
2216 #line 2217 "configure"
2217 #include "confdefs.h"
2218 #include <stdio.h>
2219 main()
2220 {
2221 FILE *f=fopen("conftestval", "w");
2222 if (!f) exit(1);
2223 fprintf(f, "%d\n", sizeof(long));
2224 exit(0);
2225 }
2226 EOF
2227 if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2228 then
2229 ac_cv_sizeof_long=`cat conftestval`
2230 else
2231 echo "configure: failed program was:" >&5
2232 cat conftest.$ac_ext >&5
2233 rm -fr conftest*
2234 ac_cv_sizeof_long=0
2235 fi
2236 rm -fr conftest*
2237 fi
2238
2239 fi
2240 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2241 cat >> confdefs.h <<EOF
2242 #define SIZEOF_LONG $ac_cv_sizeof_long
2243 EOF
2244
2245
2246
2247
2248
2249 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
2250 echo "configure:2251: checking for addrinfo" >&5
2251 if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
2252 echo $ac_n "(cached) $ac_c" 1>&6
2253 else
2254 cat > conftest.$ac_ext <<EOF
2255 #line 2256 "configure"
2256 #include "confdefs.h"
2257
2258 # include <netdb.h>
2259 int main() {
2260 struct addrinfo a
2261 ; return 0; }
2262 EOF
2263 if { (eval echo configure:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2264 rm -rf conftest*
2265 ac_cv_addrinfo=yes
2266 else
2267 echo "configure: failed program was:" >&5
2268 cat conftest.$ac_ext >&5
2269 rm -rf conftest*
2270 ac_cv_addrinfo=no
2271 fi
2272 rm -f conftest*
2273 fi
2274
2275 echo "$ac_t""$ac_cv_addrinfo" 1>&6
2276 if test $ac_cv_addrinfo = yes; then
2277 cat >> confdefs.h <<\EOF
2278 #define HAVE_ADDRINFO 1
2279 EOF
2280
2281 else
2282 cat >> confdefs.h <<\EOF
2283 #define NEED_ADDRINFO_H 1
2284 EOF
2285
2286 fi
2287
2288 if test "$ac_cv_addrinfo" = no; then
2289 missing_includes=yes
2290 fi
2291
2292
2293 echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
2294 echo "configure:2295: checking for NI_MAXSERV" >&5
2295 if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
2296 echo $ac_n "(cached) $ac_c" 1>&6
2297 else
2298 cat > conftest.$ac_ext <<EOF
2299 #line 2300 "configure"
2300 #include "confdefs.h"
2301 #include <netdb.h>
2302 #ifdef NI_MAXSERV
2303 yes
2304 #endif
2305 EOF
2306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2307 egrep "yes" >/dev/null 2>&1; then
2308 rm -rf conftest*
2309 ac_cv_maxserv=yes
2310 else
2311 rm -rf conftest*
2312 ac_cv_maxserv=no
2313 fi
2314 rm -f conftest*
2315
2316 fi
2317
2318 echo "$ac_t""$ac_cv_maxserv" 1>&6
2319 if test $ac_cv_maxserv != yes; then
2320 cat >> confdefs.h <<\EOF
2321 #define NEED_ADDRINFO_H 1
2322 EOF
2323
2324 fi
2325
2326 if test "$ac_cv_maxserv" = no; then
2327 missing_includes=yes
2328 fi
2329
2330
2331 echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
2332 echo "configure:2333: checking for NI_NAMEREQD" >&5
2333 if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
2334 echo $ac_n "(cached) $ac_c" 1>&6
2335 else
2336 cat > conftest.$ac_ext <<EOF
2337 #line 2338 "configure"
2338 #include "confdefs.h"
2339 #include <netdb.h>
2340 #ifdef NI_NOFQDN
2341 yes
2342 #endif
2343 EOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345 egrep "yes" >/dev/null 2>&1; then
2346 rm -rf conftest*
2347 ac_cv_namereqd=yes
2348 else
2349 rm -rf conftest*
2350 ac_cv_namereqd=no
2351 fi
2352 rm -f conftest*
2353
2354 fi
2355
2356 echo "$ac_t""$ac_cv_namereqd" 1>&6
2357 if test $ac_cv_namereqd != yes; then
2358 cat >> confdefs.h <<\EOF
2359 #define NEED_ADDRINFO_H 1
2360 EOF
2361
2362 fi
2363
2364 if test "$ac_cv_namereqd" = no; then
2365 missing_includes=yes
2366 fi
2367
2368
2369 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
2370 echo "configure:2371: checking for sockaddr_storage" >&5
2371 if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373 else
2374 cat > conftest.$ac_ext <<EOF
2375 #line 2376 "configure"
2376 #include "confdefs.h"
2377
2378 # include <sys/types.h>
2379 # include <sys/socket.h>
2380 int main() {
2381 struct sockaddr_storage s
2382 ; return 0; }
2383 EOF
2384 if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2385 rm -rf conftest*
2386 ac_cv_sa_storage=yes
2387 else
2388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390 rm -rf conftest*
2391 ac_cv_sa_storage=no
2392 fi
2393 rm -f conftest*
2394 fi
2395
2396 echo "$ac_t""$ac_cv_sa_storage" 1>&6
2397 if test $ac_cv_sa_storage = yes; then
2398 cat >> confdefs.h <<\EOF
2399 #define HAVE_SOCKADDR_STORAGE 1
2400 EOF
2401
2402 fi
2403
2404 if test "$ac_cv_sa_storage" = no; then
2405 missing_includes=yes
2406 fi
2407
2408
2409 ac_cv_addrsz=yes
2410 echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
2411 echo "configure:2412: checking for INADDRSZ" >&5
2412 if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
2413 echo $ac_n "(cached) $ac_c" 1>&6
2414 else
2415 cat > conftest.$ac_ext <<EOF
2416 #line 2417 "configure"
2417 #include "confdefs.h"
2418
2419 # include <arpa/nameser.h>
2420 int main() {
2421 int a = INADDRSZ
2422 ; return 0; }
2423 EOF
2424 if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2425 rm -rf conftest*
2426 ac_cv_inaddrsz=yes
2427 else
2428 echo "configure: failed program was:" >&5
2429 cat conftest.$ac_ext >&5
2430 rm -rf conftest*
2431 ac_cv_inaddrsz=no
2432 fi
2433 rm -f conftest*
2434 fi
2435
2436 echo "$ac_t""$ac_cv_inaddrsz" 1>&6
2437 if test $ac_cv_inaddrsz = yes; then
2438 cat >> confdefs.h <<\EOF
2439 #define HAVE_INADDRSZ 1
2440 EOF
2441
2442 else
2443 ac_cv_addrsz=no
2444 fi
2445 echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
2446 echo "configure:2447: checking for IN6ADDRSZ" >&5
2447 if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
2448 echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450 cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453
2454 # include <arpa/nameser.h>
2455 int main() {
2456 int a = IN6ADDRSZ
2457 ; return 0; }
2458 EOF
2459 if { (eval echo configure:2460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2460 rm -rf conftest*
2461 ac_cv_in6addrsz=yes
2462 else
2463 echo "configure: failed program was:" >&5
2464 cat conftest.$ac_ext >&5
2465 rm -rf conftest*
2466 ac_cv_in6addrsz=no
2467 fi
2468 rm -f conftest*
2469 fi
2470
2471 echo "$ac_t""$ac_cv_in6addrsz" 1>&6
2472 if test $ac_cv_in6addrsz = yes; then
2473 cat >> confdefs.h <<\EOF
2474 #define HAVE_IN6ADDRSZ 1
2475 EOF
2476
2477 else
2478 ac_cv_addrsz=no
2479 fi
2480
2481 if test "$ac_cv_addrsz" = no; then
2482 missing_includes=yes
2483 fi
2484
2485
2486 echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
2487 echo "configure:2488: checking for RES_USE_INET6" >&5
2488 if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
2489 echo $ac_n "(cached) $ac_c" 1>&6
2490 else
2491 cat > conftest.$ac_ext <<EOF
2492 #line 2493 "configure"
2493 #include "confdefs.h"
2494
2495 # include <sys/types.h>
2496 # include <netinet/in.h>
2497 # include <resolv.h>
2498 int main() {
2499 int a = RES_USE_INET6
2500 ; return 0; }
2501 EOF
2502 if { (eval echo configure:2503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2503 rm -rf conftest*
2504 ac_cv_res_inet6=yes
2505 else
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2508 rm -rf conftest*
2509 ac_cv_res_inet6=no
2510 fi
2511 rm -f conftest*
2512 fi
2513
2514 echo "$ac_t""$ac_cv_res_inet6" 1>&6
2515 if test $ac_cv_res_inet6 = yes; then
2516 cat >> confdefs.h <<\EOF
2517 #define HAVE_RES_USE_INET6 1
2518 EOF
2519
2520 fi
2521
2522 if test "$ac_cv_res_inet6" = no; then
2523 missing_includes=yes
2524 fi
2525
2526
2527 echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
2528 echo "configure:2529: checking for res_state_ext" >&5
2529 if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
2530 echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532 cat > conftest.$ac_ext <<EOF
2533 #line 2534 "configure"
2534 #include "confdefs.h"
2535
2536 # include <sys/types.h>
2537 # include <netinet/in.h>
2538 # include <netinet6/in6.h>
2539 # include <resolv.h>
2540 int main() {
2541 struct __res_state_ext e
2542 ; return 0; }
2543 EOF
2544 if { (eval echo configure:2545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2545 rm -rf conftest*
2546 ac_cv_res_state_ext=yes
2547 else
2548 echo "configure: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 rm -rf conftest*
2551 ac_cv_res_state_ext=no
2552 fi
2553 rm -f conftest*
2554 fi
2555
2556 echo "$ac_t""$ac_cv_res_state_ext" 1>&6
2557 if test $ac_cv_res_state_ext = yes; then
2558 cat >> confdefs.h <<\EOF
2559 #define HAVE_RES_STATE_EXT 1
2560 EOF
2561
2562 fi
2563
2564 if test "$ac_cv_res_state_ext" = no; then
2565 missing_includes=yes
2566 fi
2567
2568
2569 echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
2570 echo "configure:2571: checking for nsort in res_state" >&5
2571 if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
2572 echo $ac_n "(cached) $ac_c" 1>&6
2573 else
2574 cat > conftest.$ac_ext <<EOF
2575 #line 2576 "configure"
2576 #include "confdefs.h"
2577
2578 # include <sys/types.h>
2579 # include <netinet/in.h>
2580 # include <netinet6/in6.h>
2581 # include <resolv.h>
2582 int main() {
2583 struct __res_state e; e.nsort = 0
2584 ; return 0; }
2585 EOF
2586 if { (eval echo configure:2587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2587 rm -rf conftest*
2588 ac_cv_res_state=yes
2589 else
2590 echo "configure: failed program was:" >&5
2591 cat conftest.$ac_ext >&5
2592 rm -rf conftest*
2593 ac_cv_res_state=no
2594 fi
2595 rm -f conftest*
2596 fi
2597
2598 echo "$ac_t""$ac_cv_res_state" 1>&6
2599 if test $ac_cv_res_state = yes; then
2600 cat >> confdefs.h <<\EOF
2601 #define HAVE_NEW_RES_STATE 1
2602 EOF
2603
2604 fi
2605
2606
2607
2608 for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep
2609 do
2610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2611 echo "configure:2612: checking for $ac_func" >&5
2612 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2613 echo $ac_n "(cached) $ac_c" 1>&6
2614 else
2615 cat > conftest.$ac_ext <<EOF
2616 #line 2617 "configure"
2617 #include "confdefs.h"
2618 /* System header to define __stub macros and hopefully few prototypes,
2619 which can conflict with char $ac_func(); below. */
2620 #include <assert.h>
2621 /* Override any gcc2 internal prototype to avoid an error. */
2622 /* We use char because int might match the return type of a gcc2
2623 builtin and then its argument prototype would still apply. */
2624 char $ac_func();
2625
2626 int main() {
2627
2628 /* The GNU C library defines this for functions which it implements
2629 to always fail with ENOSYS. Some functions are actually named
2630 something starting with __ and the normal name is an alias. */
2631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2632 choke me
2633 #else
2634 $ac_func();
2635 #endif
2636
2637 ; return 0; }
2638 EOF
2639 if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2640 rm -rf conftest*
2641 eval "ac_cv_func_$ac_func=yes"
2642 else
2643 echo "configure: failed program was:" >&5
2644 cat conftest.$ac_ext >&5
2645 rm -rf conftest*
2646 eval "ac_cv_func_$ac_func=no"
2647 fi
2648 rm -f conftest*
2649 fi
2650
2651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2652 echo "$ac_t""yes" 1>&6
2653 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2654 cat >> confdefs.h <<EOF
2655 #define $ac_tr_func 1
2656 EOF
2657
2658 else
2659 echo "$ac_t""no" 1>&6
2660 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2661 fi
2662 done
2663
2664
2665 for ac_func in strftime
2666 do
2667 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2668 echo "configure:2669: checking for $ac_func" >&5
2669 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2670 echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672 cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 /* System header to define __stub macros and hopefully few prototypes,
2676 which can conflict with char $ac_func(); below. */
2677 #include <assert.h>
2678 /* Override any gcc2 internal prototype to avoid an error. */
2679 /* We use char because int might match the return type of a gcc2
2680 builtin and then its argument prototype would still apply. */
2681 char $ac_func();
2682
2683 int main() {
2684
2685 /* The GNU C library defines this for functions which it implements
2686 to always fail with ENOSYS. Some functions are actually named
2687 something starting with __ and the normal name is an alias. */
2688 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2689 choke me
2690 #else
2691 $ac_func();
2692 #endif
2693
2694 ; return 0; }
2695 EOF
2696 if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2697 rm -rf conftest*
2698 eval "ac_cv_func_$ac_func=yes"
2699 else
2700 echo "configure: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2702 rm -rf conftest*
2703 eval "ac_cv_func_$ac_func=no"
2704 fi
2705 rm -f conftest*
2706 fi
2707
2708 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2709 echo "$ac_t""yes" 1>&6
2710 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2711 cat >> confdefs.h <<EOF
2712 #define $ac_tr_func 1
2713 EOF
2714
2715 else
2716 echo "$ac_t""no" 1>&6
2717 fi
2718 done
2719
2720 for ac_func in ether_ntohost
2721 do
2722 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2723 echo "configure:2724: checking for $ac_func" >&5
2724 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2725 echo $ac_n "(cached) $ac_c" 1>&6
2726 else
2727 cat > conftest.$ac_ext <<EOF
2728 #line 2729 "configure"
2729 #include "confdefs.h"
2730 /* System header to define __stub macros and hopefully few prototypes,
2731 which can conflict with char $ac_func(); below. */
2732 #include <assert.h>
2733 /* Override any gcc2 internal prototype to avoid an error. */
2734 /* We use char because int might match the return type of a gcc2
2735 builtin and then its argument prototype would still apply. */
2736 char $ac_func();
2737
2738 int main() {
2739
2740 /* The GNU C library defines this for functions which it implements
2741 to always fail with ENOSYS. Some functions are actually named
2742 something starting with __ and the normal name is an alias. */
2743 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2744 choke me
2745 #else
2746 $ac_func();
2747 #endif
2748
2749 ; return 0; }
2750 EOF
2751 if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2752 rm -rf conftest*
2753 eval "ac_cv_func_$ac_func=yes"
2754 else
2755 echo "configure: failed program was:" >&5
2756 cat conftest.$ac_ext >&5
2757 rm -rf conftest*
2758 eval "ac_cv_func_$ac_func=no"
2759 fi
2760 rm -f conftest*
2761 fi
2762
2763 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2764 echo "$ac_t""yes" 1>&6
2765 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2766 cat >> confdefs.h <<EOF
2767 #define $ac_tr_func 1
2768 EOF
2769
2770 echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
2771 echo "configure:2772: checking for buggy ether_ntohost" >&5
2772 if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
2773 echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775
2776 if test "$cross_compiling" = yes; then
2777 ac_cv_buggy_ether_ntohost="not while cross-compiling"
2778 else
2779 cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782
2783 #include <netdb.h>
2784 #include <sys/types.h>
2785 #include <sys/param.h>
2786 #include <sys/socket.h>
2787
2788 int
2789 main(int argc, char **argv)
2790 {
2791 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
2792 char name[MAXHOSTNAMELEN];
2793
2794 ether_ntohost(name, (struct ether_addr *)ea);
2795 exit(0);
2796 }
2797
2798 EOF
2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2800 then
2801 ac_cv_buggy_ether_ntohost=no
2802 else
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2805 rm -fr conftest*
2806 ac_cv_buggy_ether_ntohost=yes
2807 fi
2808 rm -fr conftest*
2809 fi
2810
2811 fi
2812
2813 echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6
2814 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
2815 cat >> confdefs.h <<\EOF
2816 #define USE_ETHER_NTOHOST 1
2817 EOF
2818
2819 fi
2820
2821 else
2822 echo "$ac_t""no" 1>&6
2823 fi
2824 done
2825
2826 for ac_func in setlinebuf
2827 do
2828 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2829 echo "configure:2830: checking for $ac_func" >&5
2830 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832 else
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836 /* System header to define __stub macros and hopefully few prototypes,
2837 which can conflict with char $ac_func(); below. */
2838 #include <assert.h>
2839 /* Override any gcc2 internal prototype to avoid an error. */
2840 /* We use char because int might match the return type of a gcc2
2841 builtin and then its argument prototype would still apply. */
2842 char $ac_func();
2843
2844 int main() {
2845
2846 /* The GNU C library defines this for functions which it implements
2847 to always fail with ENOSYS. Some functions are actually named
2848 something starting with __ and the normal name is an alias. */
2849 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2850 choke me
2851 #else
2852 $ac_func();
2853 #endif
2854
2855 ; return 0; }
2856 EOF
2857 if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2858 rm -rf conftest*
2859 eval "ac_cv_func_$ac_func=yes"
2860 else
2861 echo "configure: failed program was:" >&5
2862 cat conftest.$ac_ext >&5
2863 rm -rf conftest*
2864 eval "ac_cv_func_$ac_func=no"
2865 fi
2866 rm -f conftest*
2867 fi
2868
2869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2870 echo "$ac_t""yes" 1>&6
2871 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2872 cat >> confdefs.h <<EOF
2873 #define $ac_tr_func 1
2874 EOF
2875
2876 else
2877 echo "$ac_t""no" 1>&6
2878 fi
2879 done
2880
2881
2882 needsnprintf=no
2883 for ac_func in vsnprintf snprintf
2884 do
2885 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2886 echo "configure:2887: checking for $ac_func" >&5
2887 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890 cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 /* System header to define __stub macros and hopefully few prototypes,
2894 which can conflict with char $ac_func(); below. */
2895 #include <assert.h>
2896 /* Override any gcc2 internal prototype to avoid an error. */
2897 /* We use char because int might match the return type of a gcc2
2898 builtin and then its argument prototype would still apply. */
2899 char $ac_func();
2900
2901 int main() {
2902
2903 /* The GNU C library defines this for functions which it implements
2904 to always fail with ENOSYS. Some functions are actually named
2905 something starting with __ and the normal name is an alias. */
2906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2907 choke me
2908 #else
2909 $ac_func();
2910 #endif
2911
2912 ; return 0; }
2913 EOF
2914 if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2915 rm -rf conftest*
2916 eval "ac_cv_func_$ac_func=yes"
2917 else
2918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
2920 rm -rf conftest*
2921 eval "ac_cv_func_$ac_func=no"
2922 fi
2923 rm -f conftest*
2924 fi
2925
2926 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2927 echo "$ac_t""yes" 1>&6
2928 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2929 cat >> confdefs.h <<EOF
2930 #define $ac_tr_func 1
2931 EOF
2932
2933 else
2934 echo "$ac_t""no" 1>&6
2935 needsnprintf=yes
2936 fi
2937 done
2938
2939 if test $needsnprintf = yes; then
2940 LIBOBJS="$LIBOBJS snprintf.o"
2941 fi
2942
2943
2944 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2945 echo "configure:2946: checking return type of signal handlers" >&5
2946 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2947 echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949 cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <sys/types.h>
2953 #include <signal.h>
2954 #ifdef signal
2955 #undef signal
2956 #endif
2957 #ifdef __cplusplus
2958 extern "C" void (*signal (int, void (*)(int)))(int);
2959 #else
2960 void (*signal ()) ();
2961 #endif
2962
2963 int main() {
2964 int i;
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2968 rm -rf conftest*
2969 ac_cv_type_signal=void
2970 else
2971 echo "configure: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
2973 rm -rf conftest*
2974 ac_cv_type_signal=int
2975 fi
2976 rm -f conftest*
2977 fi
2978
2979 echo "$ac_t""$ac_cv_type_signal" 1>&6
2980 cat >> confdefs.h <<EOF
2981 #define RETSIGTYPE $ac_cv_type_signal
2982 EOF
2983
2984
2985 if test "$ac_cv_type_signal" = void ; then
2986 cat >> confdefs.h <<\EOF
2987 #define RETSIGVAL
2988 EOF
2989
2990 else
2991 cat >> confdefs.h <<\EOF
2992 #define RETSIGVAL (0)
2993 EOF
2994
2995 fi
2996 case "$host_os" in
2997
2998 irix*)
2999 cat >> confdefs.h <<\EOF
3000 #define _BSD_SIGNALS 1
3001 EOF
3002
3003 ;;
3004
3005 *)
3006 for ac_func in sigaction
3007 do
3008 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3009 echo "configure:3010: checking for $ac_func" >&5
3010 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3011 echo $ac_n "(cached) $ac_c" 1>&6
3012 else
3013 cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 /* System header to define __stub macros and hopefully few prototypes,
3017 which can conflict with char $ac_func(); below. */
3018 #include <assert.h>
3019 /* Override any gcc2 internal prototype to avoid an error. */
3020 /* We use char because int might match the return type of a gcc2
3021 builtin and then its argument prototype would still apply. */
3022 char $ac_func();
3023
3024 int main() {
3025
3026 /* The GNU C library defines this for functions which it implements
3027 to always fail with ENOSYS. Some functions are actually named
3028 something starting with __ and the normal name is an alias. */
3029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3030 choke me
3031 #else
3032 $ac_func();
3033 #endif
3034
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3038 rm -rf conftest*
3039 eval "ac_cv_func_$ac_func=yes"
3040 else
3041 echo "configure: failed program was:" >&5
3042 cat conftest.$ac_ext >&5
3043 rm -rf conftest*
3044 eval "ac_cv_func_$ac_func=no"
3045 fi
3046 rm -f conftest*
3047 fi
3048
3049 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3050 echo "$ac_t""yes" 1>&6
3051 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3052 cat >> confdefs.h <<EOF
3053 #define $ac_tr_func 1
3054 EOF
3055
3056 else
3057 echo "$ac_t""no" 1>&6
3058 fi
3059 done
3060
3061 if test $ac_cv_func_sigaction = no ; then
3062 for ac_func in sigset
3063 do
3064 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3065 echo "configure:3066: checking for $ac_func" >&5
3066 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3067 echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069 cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 /* System header to define __stub macros and hopefully few prototypes,
3073 which can conflict with char $ac_func(); below. */
3074 #include <assert.h>
3075 /* Override any gcc2 internal prototype to avoid an error. */
3076 /* We use char because int might match the return type of a gcc2
3077 builtin and then its argument prototype would still apply. */
3078 char $ac_func();
3079
3080 int main() {
3081
3082 /* The GNU C library defines this for functions which it implements
3083 to always fail with ENOSYS. Some functions are actually named
3084 something starting with __ and the normal name is an alias. */
3085 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3086 choke me
3087 #else
3088 $ac_func();
3089 #endif
3090
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3094 rm -rf conftest*
3095 eval "ac_cv_func_$ac_func=yes"
3096 else
3097 echo "configure: failed program was:" >&5
3098 cat conftest.$ac_ext >&5
3099 rm -rf conftest*
3100 eval "ac_cv_func_$ac_func=no"
3101 fi
3102 rm -f conftest*
3103 fi
3104
3105 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3106 echo "$ac_t""yes" 1>&6
3107 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3108 cat >> confdefs.h <<EOF
3109 #define $ac_tr_func 1
3110 EOF
3111
3112 else
3113 echo "$ac_t""no" 1>&6
3114 fi
3115 done
3116
3117 fi
3118 ;;
3119 esac
3120
3121
3122 echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6
3123 echo "configure:3124: checking for library containing dnet_htoa" >&5
3124 if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then
3125 echo $ac_n "(cached) $ac_c" 1>&6
3126 else
3127 ac_func_search_save_LIBS="$LIBS"
3128 ac_cv_search_dnet_htoa="no"
3129 cat > conftest.$ac_ext <<EOF
3130 #line 3131 "configure"
3131 #include "confdefs.h"
3132 /* Override any gcc2 internal prototype to avoid an error. */
3133 /* We use char because int might match the return type of a gcc2
3134 builtin and then its argument prototype would still apply. */
3135 char dnet_htoa();
3136
3137 int main() {
3138 dnet_htoa()
3139 ; return 0; }
3140 EOF
3141 if { (eval echo configure:3142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3142 rm -rf conftest*
3143 ac_cv_search_dnet_htoa="none required"
3144 else
3145 echo "configure: failed program was:" >&5
3146 cat conftest.$ac_ext >&5
3147 fi
3148 rm -f conftest*
3149 test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do
3150 LIBS="-l$i $ac_func_search_save_LIBS"
3151 cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154 /* Override any gcc2 internal prototype to avoid an error. */
3155 /* We use char because int might match the return type of a gcc2
3156 builtin and then its argument prototype would still apply. */
3157 char dnet_htoa();
3158
3159 int main() {
3160 dnet_htoa()
3161 ; return 0; }
3162 EOF
3163 if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164 rm -rf conftest*
3165 ac_cv_search_dnet_htoa="-l$i"
3166 break
3167 else
3168 echo "configure: failed program was:" >&5
3169 cat conftest.$ac_ext >&5
3170 fi
3171 rm -f conftest*
3172 done
3173 LIBS="$ac_func_search_save_LIBS"
3174 fi
3175
3176 echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6
3177 if test "$ac_cv_search_dnet_htoa" != "no"; then
3178 test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS"
3179 cat >> confdefs.h <<\EOF
3180 #define HAVE_DNET_HTOA 1
3181 EOF
3182
3183 else :
3184
3185 fi
3186
3187 echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
3188 echo "configure:3189: checking for main in -lrpc" >&5
3189 ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
3190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3191 echo $ac_n "(cached) $ac_c" 1>&6
3192 else
3193 ac_save_LIBS="$LIBS"
3194 LIBS="-lrpc $LIBS"
3195 cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198
3199 int main() {
3200 main()
3201 ; return 0; }
3202 EOF
3203 if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3204 rm -rf conftest*
3205 eval "ac_cv_lib_$ac_lib_var=yes"
3206 else
3207 echo "configure: failed program was:" >&5
3208 cat conftest.$ac_ext >&5
3209 rm -rf conftest*
3210 eval "ac_cv_lib_$ac_lib_var=no"
3211 fi
3212 rm -f conftest*
3213 LIBS="$ac_save_LIBS"
3214
3215 fi
3216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3217 echo "$ac_t""yes" 1>&6
3218 ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3219 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3220 cat >> confdefs.h <<EOF
3221 #define $ac_tr_lib 1
3222 EOF
3223
3224 LIBS="-lrpc $LIBS"
3225
3226 else
3227 echo "$ac_t""no" 1>&6
3228 fi
3229
3230
3231 echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
3232 echo "configure:3233: checking for library containing getrpcbynumber" >&5
3233 if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
3234 echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236 ac_func_search_save_LIBS="$LIBS"
3237 ac_cv_search_getrpcbynumber="no"
3238 cat > conftest.$ac_ext <<EOF
3239 #line 3240 "configure"
3240 #include "confdefs.h"
3241 /* Override any gcc2 internal prototype to avoid an error. */
3242 /* We use char because int might match the return type of a gcc2
3243 builtin and then its argument prototype would still apply. */
3244 char getrpcbynumber();
3245
3246 int main() {
3247 getrpcbynumber()
3248 ; return 0; }
3249 EOF
3250 if { (eval echo configure:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3251 rm -rf conftest*
3252 ac_cv_search_getrpcbynumber="none required"
3253 else
3254 echo "configure: failed program was:" >&5
3255 cat conftest.$ac_ext >&5
3256 fi
3257 rm -f conftest*
3258 test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
3259 LIBS="-l$i $ac_func_search_save_LIBS"
3260 cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263 /* Override any gcc2 internal prototype to avoid an error. */
3264 /* We use char because int might match the return type of a gcc2
3265 builtin and then its argument prototype would still apply. */
3266 char getrpcbynumber();
3267
3268 int main() {
3269 getrpcbynumber()
3270 ; return 0; }
3271 EOF
3272 if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3273 rm -rf conftest*
3274 ac_cv_search_getrpcbynumber="-l$i"
3275 break
3276 else
3277 echo "configure: failed program was:" >&5
3278 cat conftest.$ac_ext >&5
3279 fi
3280 rm -f conftest*
3281 done
3282 LIBS="$ac_func_search_save_LIBS"
3283 fi
3284
3285 echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6
3286 if test "$ac_cv_search_getrpcbynumber" != "no"; then
3287 test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS"
3288
3289 else :
3290
3291 fi
3292
3293
3294
3295 # Most operating systems have gethostbyname() in the default searched
3296 # libraries (i.e. libc):
3297 # Some OSes (eg. Solaris) place it in libnsl
3298 # Some strange OSes (SINIX) have it in libsocket:
3299
3300 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3301 echo "configure:3302: checking for library containing gethostbyname" >&5
3302 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3303 echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305 ac_func_search_save_LIBS="$LIBS"
3306 ac_cv_search_gethostbyname="no"
3307 cat > conftest.$ac_ext <<EOF
3308 #line 3309 "configure"
3309 #include "confdefs.h"
3310 /* Override any gcc2 internal prototype to avoid an error. */
3311 /* We use char because int might match the return type of a gcc2
3312 builtin and then its argument prototype would still apply. */
3313 char gethostbyname();
3314
3315 int main() {
3316 gethostbyname()
3317 ; return 0; }
3318 EOF
3319 if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3320 rm -rf conftest*
3321 ac_cv_search_gethostbyname="none required"
3322 else
3323 echo "configure: failed program was:" >&5
3324 cat conftest.$ac_ext >&5
3325 fi
3326 rm -f conftest*
3327 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
3328 LIBS="-l$i $ac_func_search_save_LIBS"
3329 cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
3331 #include "confdefs.h"
3332 /* Override any gcc2 internal prototype to avoid an error. */
3333 /* We use char because int might match the return type of a gcc2
3334 builtin and then its argument prototype would still apply. */
3335 char gethostbyname();
3336
3337 int main() {
3338 gethostbyname()
3339 ; return 0; }
3340 EOF
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3342 rm -rf conftest*
3343 ac_cv_search_gethostbyname="-l$i"
3344 break
3345 else
3346 echo "configure: failed program was:" >&5
3347 cat conftest.$ac_ext >&5
3348 fi
3349 rm -f conftest*
3350 done
3351 LIBS="$ac_func_search_save_LIBS"
3352 fi
3353
3354 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3355 if test "$ac_cv_search_gethostbyname" != "no"; then
3356 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3357
3358 else :
3359
3360 fi
3361 # Unfortunately libsocket sometimes depends on libnsl and
3362 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
3363 if test "$ac_cv_search_gethostbyname" = "no"
3364 then
3365 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3366 echo "configure:3367: checking for gethostbyname in -lsocket" >&5
3367 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
3368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3369 echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371 ac_save_LIBS="$LIBS"
3372 LIBS="-lsocket -lnsl $LIBS"
3373 cat > conftest.$ac_ext <<EOF
3374 #line 3375 "configure"
3375 #include "confdefs.h"
3376 /* Override any gcc2 internal prototype to avoid an error. */
3377 /* We use char because int might match the return type of a gcc2
3378 builtin and then its argument prototype would still apply. */
3379 char gethostbyname();
3380
3381 int main() {
3382 gethostbyname()
3383 ; return 0; }
3384 EOF
3385 if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3386 rm -rf conftest*
3387 eval "ac_cv_lib_$ac_lib_var=yes"
3388 else
3389 echo "configure: failed program was:" >&5
3390 cat conftest.$ac_ext >&5
3391 rm -rf conftest*
3392 eval "ac_cv_lib_$ac_lib_var=no"
3393 fi
3394 rm -f conftest*
3395 LIBS="$ac_save_LIBS"
3396
3397 fi
3398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3399 echo "$ac_t""yes" 1>&6
3400 LIBS="-lsocket -lnsl $LIBS"
3401 else
3402 echo "$ac_t""no" 1>&6
3403 fi
3404
3405 fi
3406
3407 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
3408 echo "configure:3409: checking for library containing socket" >&5
3409 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
3410 echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412 ac_func_search_save_LIBS="$LIBS"
3413 ac_cv_search_socket="no"
3414 cat > conftest.$ac_ext <<EOF
3415 #line 3416 "configure"
3416 #include "confdefs.h"
3417 /* Override any gcc2 internal prototype to avoid an error. */
3418 /* We use char because int might match the return type of a gcc2
3419 builtin and then its argument prototype would still apply. */
3420 char socket();
3421
3422 int main() {
3423 socket()
3424 ; return 0; }
3425 EOF
3426 if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3427 rm -rf conftest*
3428 ac_cv_search_socket="none required"
3429 else
3430 echo "configure: failed program was:" >&5
3431 cat conftest.$ac_ext >&5
3432 fi
3433 rm -f conftest*
3434 test "$ac_cv_search_socket" = "no" && for i in socket; do
3435 LIBS="-l$i $ac_func_search_save_LIBS"
3436 cat > conftest.$ac_ext <<EOF
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439 /* Override any gcc2 internal prototype to avoid an error. */
3440 /* We use char because int might match the return type of a gcc2
3441 builtin and then its argument prototype would still apply. */
3442 char socket();
3443
3444 int main() {
3445 socket()
3446 ; return 0; }
3447 EOF
3448 if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3449 rm -rf conftest*
3450 ac_cv_search_socket="-l$i"
3451 break
3452 else
3453 echo "configure: failed program was:" >&5
3454 cat conftest.$ac_ext >&5
3455 fi
3456 rm -f conftest*
3457 done
3458 LIBS="$ac_func_search_save_LIBS"
3459 fi
3460
3461 echo "$ac_t""$ac_cv_search_socket" 1>&6
3462 if test "$ac_cv_search_socket" != "no"; then
3463 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
3464
3465 else :
3466 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3467 echo "configure:3468: checking for socket in -lsocket" >&5
3468 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3470 echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472 ac_save_LIBS="$LIBS"
3473 LIBS="-lsocket -lnsl $LIBS"
3474 cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3477 /* Override any gcc2 internal prototype to avoid an error. */
3478 /* We use char because int might match the return type of a gcc2
3479 builtin and then its argument prototype would still apply. */
3480 char socket();
3481
3482 int main() {
3483 socket()
3484 ; return 0; }
3485 EOF
3486 if { (eval echo configure:3487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3487 rm -rf conftest*
3488 eval "ac_cv_lib_$ac_lib_var=yes"
3489 else
3490 echo "configure: failed program was:" >&5
3491 cat conftest.$ac_ext >&5
3492 rm -rf conftest*
3493 eval "ac_cv_lib_$ac_lib_var=no"
3494 fi
3495 rm -f conftest*
3496 LIBS="$ac_save_LIBS"
3497
3498 fi
3499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3500 echo "$ac_t""yes" 1>&6
3501 LIBS="-lsocket -lnsl $LIBS"
3502 else
3503 echo "$ac_t""no" 1>&6
3504 fi
3505
3506 fi
3507 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3508
3509 echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
3510 echo "configure:3511: checking for library containing putmsg" >&5
3511 if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
3512 echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514 ac_func_search_save_LIBS="$LIBS"
3515 ac_cv_search_putmsg="no"
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 /* Override any gcc2 internal prototype to avoid an error. */
3520 /* We use char because int might match the return type of a gcc2
3521 builtin and then its argument prototype would still apply. */
3522 char putmsg();
3523
3524 int main() {
3525 putmsg()
3526 ; return 0; }
3527 EOF
3528 if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3529 rm -rf conftest*
3530 ac_cv_search_putmsg="none required"
3531 else
3532 echo "configure: failed program was:" >&5
3533 cat conftest.$ac_ext >&5
3534 fi
3535 rm -f conftest*
3536 test "$ac_cv_search_putmsg" = "no" && for i in str; do
3537 LIBS="-l$i $ac_func_search_save_LIBS"
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 /* Override any gcc2 internal prototype to avoid an error. */
3542 /* We use char because int might match the return type of a gcc2
3543 builtin and then its argument prototype would still apply. */
3544 char putmsg();
3545
3546 int main() {
3547 putmsg()
3548 ; return 0; }
3549 EOF
3550 if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3551 rm -rf conftest*
3552 ac_cv_search_putmsg="-l$i"
3553 break
3554 else
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
3557 fi
3558 rm -f conftest*
3559 done
3560 LIBS="$ac_func_search_save_LIBS"
3561 fi
3562
3563 echo "$ac_t""$ac_cv_search_putmsg" 1>&6
3564 if test "$ac_cv_search_putmsg" != "no"; then
3565 test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
3566
3567 else :
3568
3569 fi
3570
3571
3572 LBL_LIBS="$LIBS"
3573 pfopen=/usr/examples/packetfilter/pfopen.c
3574 if test -f $pfopen ; then
3575 for ac_func in pfopen
3576 do
3577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3578 echo "configure:3579: checking for $ac_func" >&5
3579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3580 echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582 cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 /* System header to define __stub macros and hopefully few prototypes,
3586 which can conflict with char $ac_func(); below. */
3587 #include <assert.h>
3588 /* Override any gcc2 internal prototype to avoid an error. */
3589 /* We use char because int might match the return type of a gcc2
3590 builtin and then its argument prototype would still apply. */
3591 char $ac_func();
3592
3593 int main() {
3594
3595 /* The GNU C library defines this for functions which it implements
3596 to always fail with ENOSYS. Some functions are actually named
3597 something starting with __ and the normal name is an alias. */
3598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3599 choke me
3600 #else
3601 $ac_func();
3602 #endif
3603
3604 ; return 0; }
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3607 rm -rf conftest*
3608 eval "ac_cv_func_$ac_func=yes"
3609 else
3610 echo "configure: failed program was:" >&5
3611 cat conftest.$ac_ext >&5
3612 rm -rf conftest*
3613 eval "ac_cv_func_$ac_func=no"
3614 fi
3615 rm -f conftest*
3616 fi
3617
3618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3619 echo "$ac_t""yes" 1>&6
3620 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3621 cat >> confdefs.h <<EOF
3622 #define $ac_tr_func 1
3623 EOF
3624
3625 else
3626 echo "$ac_t""no" 1>&6
3627 fi
3628 done
3629
3630 if test $ac_cv_func_pfopen = "no" ; then
3631 echo "$ac_t""Using $pfopen" 1>&6
3632 LIBS="$LIBS $pfopen"
3633 fi
3634 fi
3635 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3636 echo "configure:3637: checking for local pcap library" >&5
3637 libpcap=FAIL
3638 lastdir=FAIL
3639 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3640 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3641 for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
3642 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3643 if test $lastdir = $basedir ; then
3644 continue;
3645 fi
3646 lastdir=$dir
3647 if test -r $dir/libpcap.a ; then
3648 libpcap=$dir/libpcap.a
3649 d=$dir
3650 fi
3651 done
3652 if test $libpcap = FAIL ; then
3653 echo "$ac_t""not found" 1>&6
3654 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3655 echo "configure:3656: checking for main in -lpcap" >&5
3656 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3657 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3658 echo $ac_n "(cached) $ac_c" 1>&6
3659 else
3660 ac_save_LIBS="$LIBS"
3661 LIBS="-lpcap $LIBS"
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665
3666 int main() {
3667 main()
3668 ; return 0; }
3669 EOF
3670 if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3671 rm -rf conftest*
3672 eval "ac_cv_lib_$ac_lib_var=yes"
3673 else
3674 echo "configure: failed program was:" >&5
3675 cat conftest.$ac_ext >&5
3676 rm -rf conftest*
3677 eval "ac_cv_lib_$ac_lib_var=no"
3678 fi
3679 rm -f conftest*
3680 LIBS="$ac_save_LIBS"
3681
3682 fi
3683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3684 echo "$ac_t""yes" 1>&6
3685 libpcap="-lpcap"
3686 else
3687 echo "$ac_t""no" 1>&6
3688 fi
3689
3690 if test $libpcap = FAIL ; then
3691 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3692 fi
3693 echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
3694 echo "configure:3695: checking for extraneous pcap header directories" >&5
3695 if test \( ! -r /usr/local/include/pcap.h \) -a \
3696 \( ! -r /usr/include/pcap.h \); then
3697 if test -r /usr/local/include/pcap/pcap.h; then
3698 d="/usr/local/include/pcap"
3699 elif test -r /usr/include/pcap/pcap.h; then
3700 d="/usr/include/pcap"
3701 fi
3702 fi
3703 if test -z "$d" ; then
3704 echo "$ac_t""not found" 1>&6
3705 else
3706 V_INCLS="-I$d $V_INCLS"
3707 echo "$ac_t""found -- -I$d added" 1>&6
3708 fi
3709 else
3710 V_PCAPDEP=$libpcap
3711 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3712 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3713 if test -r $d/pcap.h; then
3714 V_INCLS="-I$d $V_INCLS"
3715 elif test -r $places/pcap.h; then
3716 V_INCLS="-I$places $V_INCLS"
3717 else
3718 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3719 fi
3720 echo "$ac_t""$libpcap" 1>&6
3721 fi
3722 LIBS="$libpcap $LIBS"
3723 case "$host_os" in
3724
3725 aix*)
3726 pseexe="/lib/pse.exp"
3727 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3728 echo "configure:3729: checking for $pseexe" >&5
3729 if test -f $pseexe ; then
3730 echo "$ac_t""yes" 1>&6
3731 LIBS="$LIBS -I:$pseexe"
3732 fi
3733 #
3734 # We need "-lodm" and "-lcfg", as libpcap requires them on
3735 # AIX, and we just build a static libpcap.a and thus can't
3736 # arrange that when you link with libpcap you automatically
3737 # link with those libraries.
3738 #
3739 LIBS="$LIBS -lodm -lcfg"
3740 ;;
3741 esac
3742
3743 echo $ac_n "checking for pcap_list_datalinks""... $ac_c" 1>&6
3744 echo "configure:3745: checking for pcap_list_datalinks" >&5
3745 if eval "test \"`echo '$''{'ac_cv_func_pcap_list_datalinks'+set}'`\" = set"; then
3746 echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748 cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 /* System header to define __stub macros and hopefully few prototypes,
3752 which can conflict with char pcap_list_datalinks(); below. */
3753 #include <assert.h>
3754 /* Override any gcc2 internal prototype to avoid an error. */
3755 /* We use char because int might match the return type of a gcc2
3756 builtin and then its argument prototype would still apply. */
3757 char pcap_list_datalinks();
3758
3759 int main() {
3760
3761 /* The GNU C library defines this for functions which it implements
3762 to always fail with ENOSYS. Some functions are actually named
3763 something starting with __ and the normal name is an alias. */
3764 #if defined (__stub_pcap_list_datalinks) || defined (__stub___pcap_list_datalinks)
3765 choke me
3766 #else
3767 pcap_list_datalinks();
3768 #endif
3769
3770 ; return 0; }
3771 EOF
3772 if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3773 rm -rf conftest*
3774 eval "ac_cv_func_pcap_list_datalinks=yes"
3775 else
3776 echo "configure: failed program was:" >&5
3777 cat conftest.$ac_ext >&5
3778 rm -rf conftest*
3779 eval "ac_cv_func_pcap_list_datalinks=no"
3780 fi
3781 rm -f conftest*
3782 fi
3783
3784 if eval "test \"`echo '$ac_cv_func_'pcap_list_datalinks`\" = yes"; then
3785 echo "$ac_t""yes" 1>&6
3786 cat >> confdefs.h <<\EOF
3787 #define HAVE_PCAP_LIST_DATALINKS 1
3788 EOF
3789
3790 else
3791 echo "$ac_t""no" 1>&6
3792 LIBOBJS="$LIBOBJS datalinks.o"
3793 fi
3794
3795 echo $ac_n "checking for pcap_set_datalink""... $ac_c" 1>&6
3796 echo "configure:3797: checking for pcap_set_datalink" >&5
3797 if eval "test \"`echo '$''{'ac_cv_func_pcap_set_datalink'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3799 else
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 /* System header to define __stub macros and hopefully few prototypes,
3804 which can conflict with char pcap_set_datalink(); below. */
3805 #include <assert.h>
3806 /* Override any gcc2 internal prototype to avoid an error. */
3807 /* We use char because int might match the return type of a gcc2
3808 builtin and then its argument prototype would still apply. */
3809 char pcap_set_datalink();
3810
3811 int main() {
3812
3813 /* The GNU C library defines this for functions which it implements
3814 to always fail with ENOSYS. Some functions are actually named
3815 something starting with __ and the normal name is an alias. */
3816 #if defined (__stub_pcap_set_datalink) || defined (__stub___pcap_set_datalink)
3817 choke me
3818 #else
3819 pcap_set_datalink();
3820 #endif
3821
3822 ; return 0; }
3823 EOF
3824 if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3825 rm -rf conftest*
3826 eval "ac_cv_func_pcap_set_datalink=yes"
3827 else
3828 echo "configure: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3830 rm -rf conftest*
3831 eval "ac_cv_func_pcap_set_datalink=no"
3832 fi
3833 rm -f conftest*
3834 fi
3835
3836 if eval "test \"`echo '$ac_cv_func_'pcap_set_datalink`\" = yes"; then
3837 echo "$ac_t""yes" 1>&6
3838 cat >> confdefs.h <<\EOF
3839 #define HAVE_PCAP_SET_DATALINK 1
3840 EOF
3841
3842 else
3843 echo "$ac_t""no" 1>&6
3844 fi
3845
3846 echo $ac_n "checking for pcap_datalink_name_to_val""... $ac_c" 1>&6
3847 echo "configure:3848: checking for pcap_datalink_name_to_val" >&5
3848 if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_name_to_val'+set}'`\" = set"; then
3849 echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851 cat > conftest.$ac_ext <<EOF
3852 #line 3853 "configure"
3853 #include "confdefs.h"
3854 /* System header to define __stub macros and hopefully few prototypes,
3855 which can conflict with char pcap_datalink_name_to_val(); below. */
3856 #include <assert.h>
3857 /* Override any gcc2 internal prototype to avoid an error. */
3858 /* We use char because int might match the return type of a gcc2
3859 builtin and then its argument prototype would still apply. */
3860 char pcap_datalink_name_to_val();
3861
3862 int main() {
3863
3864 /* The GNU C library defines this for functions which it implements
3865 to always fail with ENOSYS. Some functions are actually named
3866 something starting with __ and the normal name is an alias. */
3867 #if defined (__stub_pcap_datalink_name_to_val) || defined (__stub___pcap_datalink_name_to_val)
3868 choke me
3869 #else
3870 pcap_datalink_name_to_val();
3871 #endif
3872
3873 ; return 0; }
3874 EOF
3875 if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3876 rm -rf conftest*
3877 eval "ac_cv_func_pcap_datalink_name_to_val=yes"
3878 else
3879 echo "configure: failed program was:" >&5
3880 cat conftest.$ac_ext >&5
3881 rm -rf conftest*
3882 eval "ac_cv_func_pcap_datalink_name_to_val=no"
3883 fi
3884 rm -f conftest*
3885 fi
3886
3887 if eval "test \"`echo '$ac_cv_func_'pcap_datalink_name_to_val`\" = yes"; then
3888 echo "$ac_t""yes" 1>&6
3889
3890 cat >> confdefs.h <<\EOF
3891 #define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
3892 EOF
3893
3894 echo $ac_n "checking for pcap_datalink_val_to_description""... $ac_c" 1>&6
3895 echo "configure:3896: checking for pcap_datalink_val_to_description" >&5
3896 if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_val_to_description'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
3898 else
3899 cat > conftest.$ac_ext <<EOF
3900 #line 3901 "configure"
3901 #include "confdefs.h"
3902 /* System header to define __stub macros and hopefully few prototypes,
3903 which can conflict with char pcap_datalink_val_to_description(); below. */
3904 #include <assert.h>
3905 /* Override any gcc2 internal prototype to avoid an error. */
3906 /* We use char because int might match the return type of a gcc2
3907 builtin and then its argument prototype would still apply. */
3908 char pcap_datalink_val_to_description();
3909
3910 int main() {
3911
3912 /* The GNU C library defines this for functions which it implements
3913 to always fail with ENOSYS. Some functions are actually named
3914 something starting with __ and the normal name is an alias. */
3915 #if defined (__stub_pcap_datalink_val_to_description) || defined (__stub___pcap_datalink_val_to_description)
3916 choke me
3917 #else
3918 pcap_datalink_val_to_description();
3919 #endif
3920
3921 ; return 0; }
3922 EOF
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3924 rm -rf conftest*
3925 eval "ac_cv_func_pcap_datalink_val_to_description=yes"
3926 else
3927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 rm -rf conftest*
3930 eval "ac_cv_func_pcap_datalink_val_to_description=no"
3931 fi
3932 rm -f conftest*
3933 fi
3934
3935 if eval "test \"`echo '$ac_cv_func_'pcap_datalink_val_to_description`\" = yes"; then
3936 echo "$ac_t""yes" 1>&6
3937 cat >> confdefs.h <<\EOF
3938 #define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
3939 EOF
3940
3941 else
3942 echo "$ac_t""no" 1>&6
3943 LIBOBJS="$LIBOBJS dlnames.o"
3944 fi
3945
3946
3947 else
3948 echo "$ac_t""no" 1>&6
3949 LIBOBJS="$LIBOBJS dlnames.o"
3950 fi
3951
3952
3953 for ac_func in pcap_breakloop
3954 do
3955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3956 echo "configure:3957: checking for $ac_func" >&5
3957 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960 cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963 /* System header to define __stub macros and hopefully few prototypes,
3964 which can conflict with char $ac_func(); below. */
3965 #include <assert.h>
3966 /* Override any gcc2 internal prototype to avoid an error. */
3967 /* We use char because int might match the return type of a gcc2
3968 builtin and then its argument prototype would still apply. */
3969 char $ac_func();
3970
3971 int main() {
3972
3973 /* The GNU C library defines this for functions which it implements
3974 to always fail with ENOSYS. Some functions are actually named
3975 something starting with __ and the normal name is an alias. */
3976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3977 choke me
3978 #else
3979 $ac_func();
3980 #endif
3981
3982 ; return 0; }
3983 EOF
3984 if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3985 rm -rf conftest*
3986 eval "ac_cv_func_$ac_func=yes"
3987 else
3988 echo "configure: failed program was:" >&5
3989 cat conftest.$ac_ext >&5
3990 rm -rf conftest*
3991 eval "ac_cv_func_$ac_func=no"
3992 fi
3993 rm -f conftest*
3994 fi
3995
3996 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3997 echo "$ac_t""yes" 1>&6
3998 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3999 cat >> confdefs.h <<EOF
4000 #define $ac_tr_func 1
4001 EOF
4002
4003 else
4004 echo "$ac_t""no" 1>&6
4005 fi
4006 done
4007
4008
4009
4010 #
4011 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
4012 # libraries (e.g., "-lsocket -lnsl" on Solaris).
4013 #
4014 # We don't use AC_REPLACE_FUNCS because that uses AC_CHECK_FUNCS which
4015 # use AC_CHECK_FUNC which doesn't let us specify the right #includes
4016 # to make this work on BSD/OS 4.x. BSD/OS 4.x ships with the BIND8
4017 # resolver, and the way it defines inet_{ntop,pton} is rather strange;
4018 # it does not ship with a libc symbol "inet_ntop()", it ships with
4019 # "_inet_ntop()", and has a #define macro in one of the system headers
4020 # to rename it.
4021 #
4022 echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
4023 echo "configure:4024: checking for inet_ntop" >&5
4024 cat > conftest.$ac_ext <<EOF
4025 #line 4026 "configure"
4026 #include "confdefs.h"
4027 #include <sys/types.h>
4028 #include <sys/socket.h>
4029 #include <netinet/in.h>
4030 #include <arpa/inet.h>
4031 int main() {
4032 char src[4], dst[128];
4033 inet_ntop(AF_INET, src, dst, sizeof(dst));
4034 ; return 0; }
4035 EOF
4036 if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4037 rm -rf conftest*
4038 echo "$ac_t""yes" 1>&6
4039 else
4040 echo "configure: failed program was:" >&5
4041 cat conftest.$ac_ext >&5
4042 rm -rf conftest*
4043 echo "$ac_t""no" 1>&6
4044 LIBOBJS="$LIBOBJS inet_ntop.o"
4045 fi
4046 rm -f conftest*
4047 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
4048 echo "configure:4049: checking for inet_pton" >&5
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 #include <sys/types.h>
4053 #include <sys/socket.h>
4054 #include <netinet/in.h>
4055 #include <arpa/inet.h>
4056 int main() {
4057 char src[128], dst[4];
4058 inet_pton(AF_INET, src, dst);
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062 rm -rf conftest*
4063 echo "$ac_t""yes" 1>&6
4064 else
4065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -rf conftest*
4068 echo "$ac_t""no" 1>&6
4069 LIBOBJS="$LIBOBJS inet_pton.o"
4070 fi
4071 rm -f conftest*
4072 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
4073 echo "configure:4074: checking for inet_aton" >&5
4074 cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 #include <sys/types.h>
4078 #include <netinet/in.h>
4079 #include <arpa/inet.h>
4080 int main() {
4081 char src[128];
4082 struct in_addr dst;
4083 inet_aton(src, &dst);
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4087 rm -rf conftest*
4088 echo "$ac_t""yes" 1>&6
4089 else
4090 echo "configure: failed program was:" >&5
4091 cat conftest.$ac_ext >&5
4092 rm -rf conftest*
4093 echo "$ac_t""no" 1>&6
4094 LIBOBJS="$LIBOBJS inet_aton.o"
4095 fi
4096 rm -f conftest*
4097
4098
4099 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4100 echo "configure:4101: checking if sockaddr struct has sa_len member" >&5
4101 if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
4102 echo $ac_n "(cached) $ac_c" 1>&6
4103 else
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107
4108 # include <sys/types.h>
4109 # include <sys/socket.h>
4110 int main() {
4111 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4112 ; return 0; }
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4115 rm -rf conftest*
4116 ac_cv_sockaddr_has_sa_len=yes
4117 else
4118 echo "configure: failed program was:" >&5
4119 cat conftest.$ac_ext >&5
4120 rm -rf conftest*
4121 ac_cv_sockaddr_has_sa_len=no
4122 fi
4123 rm -f conftest*
4124 fi
4125
4126 echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
4127 if test $ac_cv_sockaddr_has_sa_len = yes ; then
4128 cat >> confdefs.h <<\EOF
4129 #define HAVE_SOCKADDR_SA_LEN 1
4130 EOF
4131
4132 fi
4133
4134 if test "$ac_cv_sockaddr_has_sa_len" = no; then
4135 missing_includes=yes
4136 fi
4137
4138 for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
4139 do
4140 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4141 echo "configure:4142: checking for $ac_func" >&5
4142 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4143 echo $ac_n "(cached) $ac_c" 1>&6
4144 else
4145 cat > conftest.$ac_ext <<EOF
4146 #line 4147 "configure"
4147 #include "confdefs.h"
4148 /* System header to define __stub macros and hopefully few prototypes,
4149 which can conflict with char $ac_func(); below. */
4150 #include <assert.h>
4151 /* Override any gcc2 internal prototype to avoid an error. */
4152 /* We use char because int might match the return type of a gcc2
4153 builtin and then its argument prototype would still apply. */
4154 char $ac_func();
4155
4156 int main() {
4157
4158 /* The GNU C library defines this for functions which it implements
4159 to always fail with ENOSYS. Some functions are actually named
4160 something starting with __ and the normal name is an alias. */
4161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4162 choke me
4163 #else
4164 $ac_func();
4165 #endif
4166
4167 ; return 0; }
4168 EOF
4169 if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4170 rm -rf conftest*
4171 eval "ac_cv_func_$ac_func=yes"
4172 else
4173 echo "configure: failed program was:" >&5
4174 cat conftest.$ac_ext >&5
4175 rm -rf conftest*
4176 eval "ac_cv_func_$ac_func=no"
4177 fi
4178 rm -f conftest*
4179 fi
4180
4181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4182 echo "$ac_t""yes" 1>&6
4183 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4184 cat >> confdefs.h <<EOF
4185 #define $ac_tr_func 1
4186 EOF
4187
4188 else
4189 echo "$ac_t""no" 1>&6
4190 fi
4191 done
4192
4193 if test $ac_cv_func_pcap_lib_version = "no" ; then
4194 echo $ac_n "checking whether pcap_version is defined by libpcap""... $ac_c" 1>&6
4195 echo "configure:4196: checking whether pcap_version is defined by libpcap" >&5
4196 cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4199
4200 int main() {
4201
4202 char *
4203 return_pcap_version(void)
4204 {
4205 extern char pcap_version[];
4206
4207 return pcap_version;
4208 }
4209
4210 ; return 0; }
4211 EOF
4212 if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4213 rm -rf conftest*
4214 ac_lbl_cv_pcap_version_defined=yes
4215 else
4216 echo "configure: failed program was:" >&5
4217 cat conftest.$ac_ext >&5
4218 rm -rf conftest*
4219 ac_lbl_cv_pcap_version_defined=no
4220 fi
4221 rm -f conftest*
4222 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
4223 echo "$ac_t""yes" 1>&6
4224 cat >> confdefs.h <<\EOF
4225 #define HAVE_PCAP_VERSION 1
4226 EOF
4227
4228 else
4229 echo "$ac_t""no" 1>&6
4230 fi
4231 fi
4232 echo $ac_n "checking whether pcap_debug is defined by libpcap""... $ac_c" 1>&6
4233 echo "configure:4234: checking whether pcap_debug is defined by libpcap" >&5
4234 cat > conftest.$ac_ext <<EOF
4235 #line 4236 "configure"
4236 #include "confdefs.h"
4237
4238 int main() {
4239
4240 int
4241 return_pcap_debug(void)
4242 {
4243 extern int pcap_debug;
4244
4245 return pcap_debug;
4246 }
4247
4248 ; return 0; }
4249 EOF
4250 if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4251 rm -rf conftest*
4252 ac_lbl_cv_pcap_debug_defined=yes
4253 else
4254 echo "configure: failed program was:" >&5
4255 cat conftest.$ac_ext >&5
4256 rm -rf conftest*
4257 ac_lbl_cv_pcap_debug_defined=no
4258 fi
4259 rm -f conftest*
4260 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
4261 echo "$ac_t""yes" 1>&6
4262 cat >> confdefs.h <<\EOF
4263 #define HAVE_PCAP_DEBUG 1
4264 EOF
4265
4266 else
4267 echo "$ac_t""no" 1>&6
4268 #
4269 # OK, what about "yydebug"?
4270 #
4271 echo $ac_n "checking whether yydebug is defined by libpcap""... $ac_c" 1>&6
4272 echo "configure:4273: checking whether yydebug is defined by libpcap" >&5
4273 cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276
4277 int main() {
4278
4279 int
4280 return_yydebug(void)
4281 {
4282 extern int yydebug;
4283
4284 return yydebug;
4285 }
4286
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4290 rm -rf conftest*
4291 ac_lbl_cv_yydebug_defined=yes
4292 else
4293 echo "configure: failed program was:" >&5
4294 cat conftest.$ac_ext >&5
4295 rm -rf conftest*
4296 ac_lbl_cv_yydebug_defined=no
4297 fi
4298 rm -f conftest*
4299 if test "$ac_lbl_cv_yydebug_defined" = yes ; then
4300 echo "$ac_t""yes" 1>&6
4301 cat >> confdefs.h <<\EOF
4302 #define HAVE_YYDEBUG 1
4303 EOF
4304
4305 else
4306 echo "$ac_t""no" 1>&6
4307 fi
4308 fi
4309 for ac_func in bpf_dump
4310 do
4311 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_func" >&5
4313 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4314 echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316 cat > conftest.$ac_ext <<EOF
4317 #line 4318 "configure"
4318 #include "confdefs.h"
4319 /* System header to define __stub macros and hopefully few prototypes,
4320 which can conflict with char $ac_func(); below. */
4321 #include <assert.h>
4322 /* Override any gcc2 internal prototype to avoid an error. */
4323 /* We use char because int might match the return type of a gcc2
4324 builtin and then its argument prototype would still apply. */
4325 char $ac_func();
4326
4327 int main() {
4328
4329 /* The GNU C library defines this for functions which it implements
4330 to always fail with ENOSYS. Some functions are actually named
4331 something starting with __ and the normal name is an alias. */
4332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4333 choke me
4334 #else
4335 $ac_func();
4336 #endif
4337
4338 ; return 0; }
4339 EOF
4340 if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4341 rm -rf conftest*
4342 eval "ac_cv_func_$ac_func=yes"
4343 else
4344 echo "configure: failed program was:" >&5
4345 cat conftest.$ac_ext >&5
4346 rm -rf conftest*
4347 eval "ac_cv_func_$ac_func=no"
4348 fi
4349 rm -f conftest*
4350 fi
4351
4352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4353 echo "$ac_t""yes" 1>&6
4354 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4355 cat >> confdefs.h <<EOF
4356 #define $ac_tr_func 1
4357 EOF
4358
4359 else
4360 echo "$ac_t""no" 1>&6
4361 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
4362 fi
4363 done
4364
4365
4366 V_GROUP=0
4367 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
4368 V_GROUP=wheel
4369 fi
4370 case "$host_os" in
4371
4372 aix*)
4373 cat >> confdefs.h <<\EOF
4374 #define _SUN 1
4375 EOF
4376
4377 ;;
4378
4379 irix*)
4380 V_GROUP=sys
4381 ;;
4382
4383 osf*)
4384 V_GROUP=system
4385 ;;
4386
4387 solaris*)
4388 V_GROUP=sys
4389 ;;
4390 esac
4391
4392 if test -f /dev/bpf0 ; then
4393 V_GROUP=bpf
4394 fi
4395
4396 echo $ac_n "checking for int8_t using $CC""... $ac_c" 1>&6
4397 echo "configure:4398: checking for int8_t using $CC" >&5
4398 if eval "test \"`echo '$''{'ac_cv_lbl_have_int8_t'+set}'`\" = set"; then
4399 echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404
4405 # include "confdefs.h"
4406 # include <sys/types.h>
4407 # if STDC_HEADERS
4408 # include <stdlib.h>
4409 # include <stddef.h>
4410 # endif
4411 int main() {
4412 int8_t i
4413 ; return 0; }
4414 EOF
4415 if { (eval echo configure:4416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4416 rm -rf conftest*
4417 ac_cv_lbl_have_int8_t=yes
4418 else
4419 echo "configure: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4421 rm -rf conftest*
4422 ac_cv_lbl_have_int8_t=no
4423 fi
4424 rm -f conftest*
4425 fi
4426
4427 echo "$ac_t""$ac_cv_lbl_have_int8_t" 1>&6
4428 if test $ac_cv_lbl_have_int8_t = no ; then
4429 cat >> confdefs.h <<\EOF
4430 #define int8_t signed char
4431 EOF
4432
4433 fi
4434 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
4435 echo "configure:4436: checking for u_int8_t using $CC" >&5
4436 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
4437 echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439 cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4442
4443 # include "confdefs.h"
4444 # include <sys/types.h>
4445 # if STDC_HEADERS
4446 # include <stdlib.h>
4447 # include <stddef.h>
4448 # endif
4449 int main() {
4450 u_int8_t i
4451 ; return 0; }
4452 EOF
4453 if { (eval echo configure:4454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4454 rm -rf conftest*
4455 ac_cv_lbl_have_u_int8_t=yes
4456 else
4457 echo "configure: failed program was:" >&5
4458 cat conftest.$ac_ext >&5
4459 rm -rf conftest*
4460 ac_cv_lbl_have_u_int8_t=no
4461 fi
4462 rm -f conftest*
4463 fi
4464
4465 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
4466 if test $ac_cv_lbl_have_u_int8_t = no ; then
4467 cat >> confdefs.h <<\EOF
4468 #define u_int8_t u_char
4469 EOF
4470
4471 fi
4472 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
4473 echo "configure:4474: checking for int16_t using $CC" >&5
4474 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
4475 echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477 cat > conftest.$ac_ext <<EOF
4478 #line 4479 "configure"
4479 #include "confdefs.h"
4480
4481 # include "confdefs.h"
4482 # include <sys/types.h>
4483 # if STDC_HEADERS
4484 # include <stdlib.h>
4485 # include <stddef.h>
4486 # endif
4487 int main() {
4488 int16_t i
4489 ; return 0; }
4490 EOF
4491 if { (eval echo configure:4492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4492 rm -rf conftest*
4493 ac_cv_lbl_have_int16_t=yes
4494 else
4495 echo "configure: failed program was:" >&5
4496 cat conftest.$ac_ext >&5
4497 rm -rf conftest*
4498 ac_cv_lbl_have_int16_t=no
4499 fi
4500 rm -f conftest*
4501 fi
4502
4503 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
4504 if test $ac_cv_lbl_have_int16_t = no ; then
4505 cat >> confdefs.h <<\EOF
4506 #define int16_t short
4507 EOF
4508
4509 fi
4510 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
4511 echo "configure:4512: checking for u_int16_t using $CC" >&5
4512 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
4513 echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515 cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518
4519 # include "confdefs.h"
4520 # include <sys/types.h>
4521 # if STDC_HEADERS
4522 # include <stdlib.h>
4523 # include <stddef.h>
4524 # endif
4525 int main() {
4526 u_int16_t i
4527 ; return 0; }
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4530 rm -rf conftest*
4531 ac_cv_lbl_have_u_int16_t=yes
4532 else
4533 echo "configure: failed program was:" >&5
4534 cat conftest.$ac_ext >&5
4535 rm -rf conftest*
4536 ac_cv_lbl_have_u_int16_t=no
4537 fi
4538 rm -f conftest*
4539 fi
4540
4541 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
4542 if test $ac_cv_lbl_have_u_int16_t = no ; then
4543 cat >> confdefs.h <<\EOF
4544 #define u_int16_t u_short
4545 EOF
4546
4547 fi
4548 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
4549 echo "configure:4550: checking for int32_t using $CC" >&5
4550 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
4551 echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553 cat > conftest.$ac_ext <<EOF
4554 #line 4555 "configure"
4555 #include "confdefs.h"
4556
4557 # include "confdefs.h"
4558 # include <sys/types.h>
4559 # if STDC_HEADERS
4560 # include <stdlib.h>
4561 # include <stddef.h>
4562 # endif
4563 int main() {
4564 int32_t i
4565 ; return 0; }
4566 EOF
4567 if { (eval echo configure:4568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4568 rm -rf conftest*
4569 ac_cv_lbl_have_int32_t=yes
4570 else
4571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 rm -rf conftest*
4574 ac_cv_lbl_have_int32_t=no
4575 fi
4576 rm -f conftest*
4577 fi
4578
4579 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
4580 if test $ac_cv_lbl_have_int32_t = no ; then
4581 cat >> confdefs.h <<\EOF
4582 #define int32_t int
4583 EOF
4584
4585 fi
4586 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
4587 echo "configure:4588: checking for u_int32_t using $CC" >&5
4588 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
4589 echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591 cat > conftest.$ac_ext <<EOF
4592 #line 4593 "configure"
4593 #include "confdefs.h"
4594
4595 # include "confdefs.h"
4596 # include <sys/types.h>
4597 # if STDC_HEADERS
4598 # include <stdlib.h>
4599 # include <stddef.h>
4600 # endif
4601 int main() {
4602 u_int32_t i
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4606 rm -rf conftest*
4607 ac_cv_lbl_have_u_int32_t=yes
4608 else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 ac_cv_lbl_have_u_int32_t=no
4613 fi
4614 rm -f conftest*
4615 fi
4616
4617 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
4618 if test $ac_cv_lbl_have_u_int32_t = no ; then
4619 cat >> confdefs.h <<\EOF
4620 #define u_int32_t u_int
4621 EOF
4622
4623 fi
4624
4625 rm -f os-proto.h
4626 if test "${LBL_CFLAGS+set}" = set; then
4627 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
4628 fi
4629 if test -f .devel ; then
4630 if test "$GCC" = yes ; then
4631 if test "${LBL_CFLAGS+set}" != set; then
4632 if test "$ac_cv_prog_cc_g" = yes ; then
4633 V_CCOPT="-g $V_CCOPT"
4634 fi
4635 V_CCOPT="$V_CCOPT -Wall"
4636 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
4637 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
4638 fi
4639 fi
4640 else
4641 case "$host_os" in
4642
4643 irix6*)
4644 V_CCOPT="$V_CCOPT -n32"
4645 ;;
4646
4647 *)
4648 ;;
4649 esac
4650 fi
4651 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
4652 name="lbl/os-$os.h"
4653 if test -f $name ; then
4654 ln -s $name os-proto.h
4655 cat >> confdefs.h <<\EOF
4656 #define HAVE_OS_PROTO_H 1
4657 EOF
4658
4659 else
4660 echo "configure: warning: can't find $name" 1>&2
4661 fi
4662 fi
4663
4664 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4665 echo "configure:4666: checking if sockaddr struct has sa_len member" >&5
4666 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
4667 echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672
4673 # include <sys/types.h>
4674 # include <sys/socket.h>
4675 int main() {
4676 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4677 ; return 0; }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4680 rm -rf conftest*
4681 ac_cv_lbl_sockaddr_has_sa_len=yes
4682 else
4683 echo "configure: failed program was:" >&5
4684 cat conftest.$ac_ext >&5
4685 rm -rf conftest*
4686 ac_cv_lbl_sockaddr_has_sa_len=no
4687 fi
4688 rm -f conftest*
4689 fi
4690
4691 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
4692 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
4693 cat >> confdefs.h <<\EOF
4694 #define HAVE_SOCKADDR_SA_LEN 1
4695 EOF
4696
4697 fi
4698
4699 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
4700 echo "configure:4701: checking if unaligned accesses fail" >&5
4701 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
4702 echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704 case "$host_cpu" in
4705
4706 #
4707 # These are CPU types where:
4708 #
4709 # the CPU faults on an unaligned access, but at least some
4710 # OSes that support that CPU catch the fault and simulate
4711 # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
4712 # the simulation is slow, so we don't want to use it;
4713 #
4714 # the CPU, I infer (from the old
4715 #
4716 # XXX: should also check that they don't do weird things (like on arm)
4717 #
4718 # comment) doesn't fault on unaligned accesses, but doesn't
4719 # do a normal unaligned fetch, either (e.g., presumably, ARM);
4720 #
4721 # for whatever reason, the test program doesn't work
4722 # (this has been claimed to be the case for several of those
4723 # CPUs - I don't know what the problem is; the problem
4724 # was reported as "the test program dumps core" for SuperH,
4725 # but that's what the test program is *supposed* to do -
4726 # it dumps core before it writes anything, so the test
4727 # for an empty output file should find an empty output
4728 # file and conclude that unaligned accesses don't work).
4729 #
4730 # This run-time test won't work if you're cross-compiling, so
4731 # in order to support cross-compiling for a particular CPU,
4732 # we have to wire in the list of CPU types anyway, as far as
4733 # I know, so perhaps we should just have a set of CPUs on
4734 # which we know it doesn't work, a set of CPUs on which we
4735 # know it does work, and have the script just fail on other
4736 # cpu types and update it when such a failure occurs.
4737 #
4738 alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1)
4739 ac_cv_lbl_unaligned_fail=yes
4740 ;;
4741
4742 *)
4743 cat >conftest.c <<EOF
4744 # include <sys/types.h>
4745 # include <sys/wait.h>
4746 # include <stdio.h>
4747 unsigned char a[5] = { 1, 2, 3, 4, 5 };
4748 main() {
4749 unsigned int i;
4750 pid_t pid;
4751 int status;
4752 /* avoid "core dumped" message */
4753 pid = fork();
4754 if (pid < 0)
4755 exit(2);
4756 if (pid > 0) {
4757 /* parent */
4758 pid = waitpid(pid, &status, 0);
4759 if (pid < 0)
4760 exit(3);
4761 exit(!WIFEXITED(status));
4762 }
4763 /* child */
4764 i = *(unsigned int *)&a[1];
4765 printf("%d\n", i);
4766 exit(0);
4767 }
4768 EOF
4769 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
4770 conftest.c $LIBS >/dev/null 2>&1
4771 if test ! -x conftest ; then
4772 ac_cv_lbl_unaligned_fail=yes
4773 else
4774 ./conftest >conftest.out
4775 if test ! -s conftest.out ; then
4776 ac_cv_lbl_unaligned_fail=yes
4777 else
4778 ac_cv_lbl_unaligned_fail=no
4779 fi
4780 fi
4781 rm -f conftest* core core.conftest
4782 ;;
4783 esac
4784 fi
4785
4786 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
4787 if test $ac_cv_lbl_unaligned_fail = yes ; then
4788 cat >> confdefs.h <<\EOF
4789 #define LBL_ALIGN 1
4790 EOF
4791
4792 fi
4793
4794
4795 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
4796 echo "configure:4797: checking for h_errno" >&5
4797 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
4798 echo $ac_n "(cached) $ac_c" 1>&6
4799 else
4800 cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803
4804 # include <sys/types.h>
4805 # include <netdb.h>
4806 int main() {
4807 int foo = h_errno;
4808 ; return 0; }
4809 EOF
4810 if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4811 rm -rf conftest*
4812 ac_cv_var_h_errno=yes
4813 else
4814 echo "configure: failed program was:" >&5
4815 cat conftest.$ac_ext >&5
4816 rm -rf conftest*
4817 ac_cv_var_h_errno=no
4818 fi
4819 rm -f conftest*
4820 fi
4821
4822 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
4823 if test "$ac_cv_var_h_errno" = "yes"; then
4824 cat >> confdefs.h <<\EOF
4825 #define HAVE_H_ERRNO 1
4826 EOF
4827
4828 fi
4829
4830
4831 # Check whether --with-crypto or --without-crypto was given.
4832 if test "${with_crypto+set}" = set; then
4833 withval="$with_crypto"
4834 :
4835 else
4836
4837 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
4838 echo "configure:4839: checking for SSLeay" >&5
4839 ac_cv_ssleay_path=no
4840 incdir=no
4841 for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
4842 #
4843 # XXX - is there a better way to check if a given library is
4844 # in a given directory than checking each of the possible
4845 # shared library suffixes?
4846 #
4847 # Are there any other suffixes we need to look for? Do we have to
4848 # worry about ".so.{version}"?
4849 #
4850 # Or should we just look for "libcrypto.*"?
4851 #
4852 if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \
4853 -f $dir/lib/libcrypto.so -o \
4854 -f $dir/lib/libcrypto.sl -o \
4855 -f $dir/lib/libcrypto.dylib \); then
4856 ac_cv_ssleay_path=$dir
4857 fi
4858 if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4859 incdir="-I$dir/include"
4860 fi
4861 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4862 break;
4863 else
4864 ac_cv_ssleay_path=no
4865 incdir=no
4866 fi
4867 done
4868 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4869 if test "$ac_cv_ssleay_path" != no; then
4870 V_INCLS="$V_INCLS $incdir"
4871 LDFLAGS="-L$dir/lib $LDFLAGS"
4872 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
4873 LIBS="$LIBS -lRSAglue"
4874 fi
4875 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
4876 LIBS="$LIBS -lrsaref"
4877 fi
4878 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4879 echo "configure:4880: checking for des_cbc_encrypt in -lcrypto" >&5
4880 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4881 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4882 echo $ac_n "(cached) $ac_c" 1>&6
4883 else
4884 ac_save_LIBS="$LIBS"
4885 LIBS="-lcrypto $LIBS"
4886 cat > conftest.$ac_ext <<EOF
4887 #line 4888 "configure"
4888 #include "confdefs.h"
4889 /* Override any gcc2 internal prototype to avoid an error. */
4890 /* We use char because int might match the return type of a gcc2
4891 builtin and then its argument prototype would still apply. */
4892 char des_cbc_encrypt();
4893
4894 int main() {
4895 des_cbc_encrypt()
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899 rm -rf conftest*
4900 eval "ac_cv_lib_$ac_lib_var=yes"
4901 else
4902 echo "configure: failed program was:" >&5
4903 cat conftest.$ac_ext >&5
4904 rm -rf conftest*
4905 eval "ac_cv_lib_$ac_lib_var=no"
4906 fi
4907 rm -f conftest*
4908 LIBS="$ac_save_LIBS"
4909
4910 fi
4911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4912 echo "$ac_t""yes" 1>&6
4913 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4914 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4915 cat >> confdefs.h <<EOF
4916 #define $ac_tr_lib 1
4917 EOF
4918
4919 LIBS="-lcrypto $LIBS"
4920
4921 else
4922 echo "$ac_t""no" 1>&6
4923 fi
4924
4925
4926 CPPFLAGS="$CPPFLAGS $V_INCLS"
4927 for ac_hdr in openssl/evp.h
4928 do
4929 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4930 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4931 echo "configure:4932: checking for $ac_hdr" >&5
4932 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4933 echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938 #include <$ac_hdr>
4939 EOF
4940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4941 { (eval echo configure:4942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4943 if test -z "$ac_err"; then
4944 rm -rf conftest*
4945 eval "ac_cv_header_$ac_safe=yes"
4946 else
4947 echo "$ac_err" >&5
4948 echo "configure: failed program was:" >&5
4949 cat conftest.$ac_ext >&5
4950 rm -rf conftest*
4951 eval "ac_cv_header_$ac_safe=no"
4952 fi
4953 rm -f conftest*
4954 fi
4955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4956 echo "$ac_t""yes" 1>&6
4957 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4958 cat >> confdefs.h <<EOF
4959 #define $ac_tr_hdr 1
4960 EOF
4961
4962 else
4963 echo "$ac_t""no" 1>&6
4964 fi
4965 done
4966
4967 fi
4968
4969 fi
4970
4971
4972 if test "$missing_includes" = "yes"; then
4973 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
4974 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
4975 fi
4976
4977
4978
4979
4980
4981
4982
4983
4984 # Find a good install program. We prefer a C program (faster),
4985 # so one script is as good as another. But avoid the broken or
4986 # incompatible versions:
4987 # SysV /etc/install, /usr/sbin/install
4988 # SunOS /usr/etc/install
4989 # IRIX /sbin/install
4990 # AIX /bin/install
4991 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4992 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4993 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4994 # ./install, which can be erroneously created by make from ./install.sh.
4995 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4996 echo "configure:4997: checking for a BSD compatible install" >&5
4997 if test -z "$INSTALL"; then
4998 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4999 echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
5002 for ac_dir in $PATH; do
5003 # Account for people who put trailing slashes in PATH elements.
5004 case "$ac_dir/" in
5005 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
5006 *)
5007 # OSF1 and SCO ODT 3.0 have their own names for install.
5008 # Don't use installbsd from OSF since it installs stuff as root
5009 # by default.
5010 for ac_prog in ginstall scoinst install; do
5011 if test -f $ac_dir/$ac_prog; then
5012 if test $ac_prog = install &&
5013 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
5014 # AIX install. It has an incompatible calling convention.
5015 :
5016 else
5017 ac_cv_path_install="$ac_dir/$ac_prog -c"
5018 break 2
5019 fi
5020 fi
5021 done
5022 ;;
5023 esac
5024 done
5025 IFS="$ac_save_IFS"
5026
5027 fi
5028 if test "${ac_cv_path_install+set}" = set; then
5029 INSTALL="$ac_cv_path_install"
5030 else
5031 # As a last resort, use the slow shell script. We don't cache a
5032 # path for INSTALL within a source directory, because that will
5033 # break other packages using the cache if that directory is
5034 # removed, or if the path is relative.
5035 INSTALL="$ac_install_sh"
5036 fi
5037 fi
5038 echo "$ac_t""$INSTALL" 1>&6
5039
5040 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5041 # It thinks the first close brace ends the variable substitution.
5042 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5043
5044 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
5045
5046 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5047
5048
5049
5050
5051
5052 trap '' 1 2 15
5053 cat > confcache <<\EOF
5054 # This file is a shell script that caches the results of configure
5055 # tests run on this system so they can be shared between configure
5056 # scripts and configure runs. It is not useful on other systems.
5057 # If it contains results you don't want to keep, you may remove or edit it.
5058 #
5059 # By default, configure uses ./config.cache as the cache file,
5060 # creating it if it does not exist already. You can give configure
5061 # the --cache-file=FILE option to use a different cache file; that is
5062 # what configure does when it calls configure scripts in
5063 # subdirectories, so they share the cache.
5064 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5065 # config.status only pays attention to the cache file if you give it the
5066 # --recheck option to rerun configure.
5067 #
5068 EOF
5069 # The following way of writing the cache mishandles newlines in values,
5070 # but we know of no workaround that is simple, portable, and efficient.
5071 # So, don't put newlines in cache variables' values.
5072 # Ultrix sh set writes to stderr and can't be redirected directly,
5073 # and sets the high bit in the cache file unless we assign to the vars.
5074 (set) 2>&1 |
5075 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5076 *ac_space=\ *)
5077 # `set' does not quote correctly, so add quotes (double-quote substitution
5078 # turns \\\\ into \\, and sed turns \\ into \).
5079 sed -n \
5080 -e "s/'/'\\\\''/g" \
5081 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5082 ;;
5083 *)
5084 # `set' quotes correctly as required by POSIX, so do not add quotes.
5085 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5086 ;;
5087 esac >> confcache
5088 if cmp -s $cache_file confcache; then
5089 :
5090 else
5091 if test -w $cache_file; then
5092 echo "updating cache $cache_file"
5093 cat confcache > $cache_file
5094 else
5095 echo "not updating unwritable cache $cache_file"
5096 fi
5097 fi
5098 rm -f confcache
5099
5100 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5101
5102 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5103 # Let make expand exec_prefix.
5104 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5105
5106 # Any assignment to VPATH causes Sun make to only execute
5107 # the first set of double-colon rules, so remove it if not needed.
5108 # If there is a colon in the path, we need to keep it.
5109 if test "x$srcdir" = x.; then
5110 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5111 fi
5112
5113 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5114
5115 DEFS=-DHAVE_CONFIG_H
5116
5117 # Without the "./", some shells look in PATH for config.status.
5118 : ${CONFIG_STATUS=./config.status}
5119
5120 echo creating $CONFIG_STATUS
5121 rm -f $CONFIG_STATUS
5122 cat > $CONFIG_STATUS <<EOF
5123 #! /bin/sh
5124 # Generated automatically by configure.
5125 # Run this file to recreate the current configuration.
5126 # This directory was configured as follows,
5127 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5128 #
5129 # $0 $ac_configure_args
5130 #
5131 # Compiler output produced by configure, useful for debugging
5132 # configure, is in ./config.log if it exists.
5133
5134 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5135 for ac_option
5136 do
5137 case "\$ac_option" in
5138 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5139 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5140 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5141 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5142 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5143 exit 0 ;;
5144 -help | --help | --hel | --he | --h)
5145 echo "\$ac_cs_usage"; exit 0 ;;
5146 *) echo "\$ac_cs_usage"; exit 1 ;;
5147 esac
5148 done
5149
5150 ac_given_srcdir=$srcdir
5151 ac_given_INSTALL="$INSTALL"
5152
5153 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5154 EOF
5155 cat >> $CONFIG_STATUS <<EOF
5156
5157 # Protect against being on the right side of a sed subst in config.status.
5158 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5159 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5160 $ac_vpsub
5161 $extrasub
5162 s%@SHELL@%$SHELL%g
5163 s%@CFLAGS@%$CFLAGS%g
5164 s%@CPPFLAGS@%$CPPFLAGS%g
5165 s%@CXXFLAGS@%$CXXFLAGS%g
5166 s%@FFLAGS@%$FFLAGS%g
5167 s%@DEFS@%$DEFS%g
5168 s%@LDFLAGS@%$LDFLAGS%g
5169 s%@LIBS@%$LIBS%g
5170 s%@exec_prefix@%$exec_prefix%g
5171 s%@prefix@%$prefix%g
5172 s%@program_transform_name@%$program_transform_name%g
5173 s%@bindir@%$bindir%g
5174 s%@sbindir@%$sbindir%g
5175 s%@libexecdir@%$libexecdir%g
5176 s%@datadir@%$datadir%g
5177 s%@sysconfdir@%$sysconfdir%g
5178 s%@sharedstatedir@%$sharedstatedir%g
5179 s%@localstatedir@%$localstatedir%g
5180 s%@libdir@%$libdir%g
5181 s%@includedir@%$includedir%g
5182 s%@oldincludedir@%$oldincludedir%g
5183 s%@infodir@%$infodir%g
5184 s%@mandir@%$mandir%g
5185 s%@host@%$host%g
5186 s%@host_alias@%$host_alias%g
5187 s%@host_cpu@%$host_cpu%g
5188 s%@host_vendor@%$host_vendor%g
5189 s%@host_os@%$host_os%g
5190 s%@SHLICC2@%$SHLICC2%g
5191 s%@CC@%$CC%g
5192 s%@CPP@%$CPP%g
5193 s%@LIBOBJS@%$LIBOBJS%g
5194 s%@V_CCOPT@%$V_CCOPT%g
5195 s%@V_DEFS@%$V_DEFS%g
5196 s%@V_GROUP@%$V_GROUP%g
5197 s%@V_INCLS@%$V_INCLS%g
5198 s%@V_PCAPDEP@%$V_PCAPDEP%g
5199 s%@LOCALSRC@%$LOCALSRC%g
5200 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5201 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5202 s%@INSTALL_DATA@%$INSTALL_DATA%g
5203
5204 CEOF
5205 EOF
5206
5207 cat >> $CONFIG_STATUS <<\EOF
5208
5209 # Split the substitutions into bite-sized pieces for seds with
5210 # small command number limits, like on Digital OSF/1 and HP-UX.
5211 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5212 ac_file=1 # Number of current file.
5213 ac_beg=1 # First line for current file.
5214 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5215 ac_more_lines=:
5216 ac_sed_cmds=""
5217 while $ac_more_lines; do
5218 if test $ac_beg -gt 1; then
5219 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5220 else
5221 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5222 fi
5223 if test ! -s conftest.s$ac_file; then
5224 ac_more_lines=false
5225 rm -f conftest.s$ac_file
5226 else
5227 if test -z "$ac_sed_cmds"; then
5228 ac_sed_cmds="sed -f conftest.s$ac_file"
5229 else
5230 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5231 fi
5232 ac_file=`expr $ac_file + 1`
5233 ac_beg=$ac_end
5234 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5235 fi
5236 done
5237 if test -z "$ac_sed_cmds"; then
5238 ac_sed_cmds=cat
5239 fi
5240 EOF
5241
5242 cat >> $CONFIG_STATUS <<EOF
5243
5244 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5245 EOF
5246 cat >> $CONFIG_STATUS <<\EOF
5247 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5248 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5249 case "$ac_file" in
5250 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5251 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5252 *) ac_file_in="${ac_file}.in" ;;
5253 esac
5254
5255 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5256
5257 # Remove last slash and all that follows it. Not all systems have dirname.
5258 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5259 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5260 # The file is in a subdirectory.
5261 test ! -d "$ac_dir" && mkdir "$ac_dir"
5262 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5263 # A "../" for each directory in $ac_dir_suffix.
5264 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5265 else
5266 ac_dir_suffix= ac_dots=
5267 fi
5268
5269 case "$ac_given_srcdir" in
5270 .) srcdir=.
5271 if test -z "$ac_dots"; then top_srcdir=.
5272 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5273 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5274 *) # Relative path.
5275 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5276 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5277 esac
5278
5279 case "$ac_given_INSTALL" in
5280 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5281 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5282 esac
5283
5284 echo creating "$ac_file"
5285 rm -f "$ac_file"
5286 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5287 case "$ac_file" in
5288 *Makefile*) ac_comsub="1i\\
5289 # $configure_input" ;;
5290 *) ac_comsub= ;;
5291 esac
5292
5293 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5294 sed -e "$ac_comsub
5295 s%@configure_input@%$configure_input%g
5296 s%@srcdir@%$srcdir%g
5297 s%@top_srcdir@%$top_srcdir%g
5298 s%@INSTALL@%$INSTALL%g
5299 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5300 fi; done
5301 rm -f conftest.s*
5302
5303 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5304 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5305 #
5306 # ac_d sets the value in "#define NAME VALUE" lines.
5307 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5308 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5309 ac_dC='\3'
5310 ac_dD='%g'
5311 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5312 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5313 ac_uB='\([ ]\)%\1#\2define\3'
5314 ac_uC=' '
5315 ac_uD='\4%g'
5316 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5317 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5318 ac_eB='$%\1#\2define\3'
5319 ac_eC=' '
5320 ac_eD='%g'
5321
5322 if test "${CONFIG_HEADERS+set}" != set; then
5323 EOF
5324 cat >> $CONFIG_STATUS <<EOF
5325 CONFIG_HEADERS="config.h"
5326 EOF
5327 cat >> $CONFIG_STATUS <<\EOF
5328 fi
5329 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5330 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5331 case "$ac_file" in
5332 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5333 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5334 *) ac_file_in="${ac_file}.in" ;;
5335 esac
5336
5337 echo creating $ac_file
5338
5339 rm -f conftest.frag conftest.in conftest.out
5340 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5341 cat $ac_file_inputs > conftest.in
5342
5343 EOF
5344
5345 # Transform confdefs.h into a sed script conftest.vals that substitutes
5346 # the proper values into config.h.in to produce config.h. And first:
5347 # Protect against being on the right side of a sed subst in config.status.
5348 # Protect against being in an unquoted here document in config.status.
5349 rm -f conftest.vals
5350 cat > conftest.hdr <<\EOF
5351 s/[\\&%]/\\&/g
5352 s%[\\$`]%\\&%g
5353 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5354 s%ac_d%ac_u%gp
5355 s%ac_u%ac_e%gp
5356 EOF
5357 sed -n -f conftest.hdr confdefs.h > conftest.vals
5358 rm -f conftest.hdr
5359
5360 # This sed command replaces #undef with comments. This is necessary, for
5361 # example, in the case of _POSIX_SOURCE, which is predefined and required
5362 # on some systems where configure will not decide to define it.
5363 cat >> conftest.vals <<\EOF
5364 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5365 EOF
5366
5367 # Break up conftest.vals because some shells have a limit on
5368 # the size of here documents, and old seds have small limits too.
5369
5370 rm -f conftest.tail
5371 while :
5372 do
5373 ac_lines=`grep -c . conftest.vals`
5374 # grep -c gives empty output for an empty file on some AIX systems.
5375 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5376 # Write a limited-size here document to conftest.frag.
5377 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5378 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5379 echo 'CEOF
5380 sed -f conftest.frag conftest.in > conftest.out
5381 rm -f conftest.in
5382 mv conftest.out conftest.in
5383 ' >> $CONFIG_STATUS
5384 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5385 rm -f conftest.vals
5386 mv conftest.tail conftest.vals
5387 done
5388 rm -f conftest.vals
5389
5390 cat >> $CONFIG_STATUS <<\EOF
5391 rm -f conftest.frag conftest.h
5392 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5393 cat conftest.in >> conftest.h
5394 rm -f conftest.in
5395 if cmp -s $ac_file conftest.h 2>/dev/null; then
5396 echo "$ac_file is unchanged"
5397 rm -f conftest.h
5398 else
5399 # Remove last slash and all that follows it. Not all systems have dirname.
5400 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5401 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5402 # The file is in a subdirectory.
5403 test ! -d "$ac_dir" && mkdir "$ac_dir"
5404 fi
5405 rm -f $ac_file
5406 mv conftest.h $ac_file
5407 fi
5408 fi; done
5409
5410 EOF
5411 cat >> $CONFIG_STATUS <<EOF
5412
5413
5414 EOF
5415 cat >> $CONFIG_STATUS <<\EOF
5416 if test -f .devel; then
5417 echo timestamp > stamp-h
5418 cat Makefile-devel-adds >> Makefile
5419 make depend
5420 fi
5421
5422 exit 0
5423 EOF
5424 chmod +x $CONFIG_STATUS
5425 rm -fr confdefs* $ac_clean_files
5426 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5427
5428 exit 0