]> The Tcpdump Group git mirrors - tcpdump/blob - configure
Add bounds checks.
[tcpdump] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.169.2.1
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 if test "$missing_includes" = "yes"; then
2608 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
2609 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
2610 fi
2611
2612
2613 for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep
2614 do
2615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2616 echo "configure:2617: checking for $ac_func" >&5
2617 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2618 echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620 cat > conftest.$ac_ext <<EOF
2621 #line 2622 "configure"
2622 #include "confdefs.h"
2623 /* System header to define __stub macros and hopefully few prototypes,
2624 which can conflict with char $ac_func(); below. */
2625 #include <assert.h>
2626 /* Override any gcc2 internal prototype to avoid an error. */
2627 /* We use char because int might match the return type of a gcc2
2628 builtin and then its argument prototype would still apply. */
2629 char $ac_func();
2630
2631 int main() {
2632
2633 /* The GNU C library defines this for functions which it implements
2634 to always fail with ENOSYS. Some functions are actually named
2635 something starting with __ and the normal name is an alias. */
2636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2637 choke me
2638 #else
2639 $ac_func();
2640 #endif
2641
2642 ; return 0; }
2643 EOF
2644 if { (eval echo configure:2645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2645 rm -rf conftest*
2646 eval "ac_cv_func_$ac_func=yes"
2647 else
2648 echo "configure: failed program was:" >&5
2649 cat conftest.$ac_ext >&5
2650 rm -rf conftest*
2651 eval "ac_cv_func_$ac_func=no"
2652 fi
2653 rm -f conftest*
2654 fi
2655
2656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2657 echo "$ac_t""yes" 1>&6
2658 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2659 cat >> confdefs.h <<EOF
2660 #define $ac_tr_func 1
2661 EOF
2662
2663 else
2664 echo "$ac_t""no" 1>&6
2665 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2666 fi
2667 done
2668
2669
2670 for ac_func in strftime
2671 do
2672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2673 echo "configure:2674: checking for $ac_func" >&5
2674 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677 cat > conftest.$ac_ext <<EOF
2678 #line 2679 "configure"
2679 #include "confdefs.h"
2680 /* System header to define __stub macros and hopefully few prototypes,
2681 which can conflict with char $ac_func(); below. */
2682 #include <assert.h>
2683 /* Override any gcc2 internal prototype to avoid an error. */
2684 /* We use char because int might match the return type of a gcc2
2685 builtin and then its argument prototype would still apply. */
2686 char $ac_func();
2687
2688 int main() {
2689
2690 /* The GNU C library defines this for functions which it implements
2691 to always fail with ENOSYS. Some functions are actually named
2692 something starting with __ and the normal name is an alias. */
2693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2694 choke me
2695 #else
2696 $ac_func();
2697 #endif
2698
2699 ; return 0; }
2700 EOF
2701 if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2702 rm -rf conftest*
2703 eval "ac_cv_func_$ac_func=yes"
2704 else
2705 echo "configure: failed program was:" >&5
2706 cat conftest.$ac_ext >&5
2707 rm -rf conftest*
2708 eval "ac_cv_func_$ac_func=no"
2709 fi
2710 rm -f conftest*
2711 fi
2712
2713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2714 echo "$ac_t""yes" 1>&6
2715 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2716 cat >> confdefs.h <<EOF
2717 #define $ac_tr_func 1
2718 EOF
2719
2720 else
2721 echo "$ac_t""no" 1>&6
2722 fi
2723 done
2724
2725 for ac_func in ether_ntohost
2726 do
2727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2728 echo "configure:2729: checking for $ac_func" >&5
2729 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2730 echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 /* System header to define __stub macros and hopefully few prototypes,
2736 which can conflict with char $ac_func(); below. */
2737 #include <assert.h>
2738 /* Override any gcc2 internal prototype to avoid an error. */
2739 /* We use char because int might match the return type of a gcc2
2740 builtin and then its argument prototype would still apply. */
2741 char $ac_func();
2742
2743 int main() {
2744
2745 /* The GNU C library defines this for functions which it implements
2746 to always fail with ENOSYS. Some functions are actually named
2747 something starting with __ and the normal name is an alias. */
2748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2749 choke me
2750 #else
2751 $ac_func();
2752 #endif
2753
2754 ; return 0; }
2755 EOF
2756 if { (eval echo configure:2757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2757 rm -rf conftest*
2758 eval "ac_cv_func_$ac_func=yes"
2759 else
2760 echo "configure: failed program was:" >&5
2761 cat conftest.$ac_ext >&5
2762 rm -rf conftest*
2763 eval "ac_cv_func_$ac_func=no"
2764 fi
2765 rm -f conftest*
2766 fi
2767
2768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2769 echo "$ac_t""yes" 1>&6
2770 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2771 cat >> confdefs.h <<EOF
2772 #define $ac_tr_func 1
2773 EOF
2774
2775 echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
2776 echo "configure:2777: checking for buggy ether_ntohost" >&5
2777 if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
2778 echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780
2781 if test "$cross_compiling" = yes; then
2782 ac_cv_buggy_ether_ntohost="not while cross-compiling"
2783 else
2784 cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787
2788 #include <netdb.h>
2789 #include <sys/types.h>
2790 #include <sys/param.h>
2791 #include <sys/socket.h>
2792
2793 int
2794 main(int argc, char **argv)
2795 {
2796 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
2797 char name[MAXHOSTNAMELEN];
2798
2799 ether_ntohost(name, (struct ether_addr *)ea);
2800 exit(0);
2801 }
2802
2803 EOF
2804 if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2805 then
2806 ac_cv_buggy_ether_ntohost=no
2807 else
2808 echo "configure: failed program was:" >&5
2809 cat conftest.$ac_ext >&5
2810 rm -fr conftest*
2811 ac_cv_buggy_ether_ntohost=yes
2812 fi
2813 rm -fr conftest*
2814 fi
2815
2816 fi
2817
2818 echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6
2819 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
2820 cat >> confdefs.h <<\EOF
2821 #define USE_ETHER_NTOHOST 1
2822 EOF
2823
2824 fi
2825
2826 else
2827 echo "$ac_t""no" 1>&6
2828 fi
2829 done
2830
2831 for ac_func in setlinebuf
2832 do
2833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2834 echo "configure:2835: checking for $ac_func" >&5
2835 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2836 echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 /* System header to define __stub macros and hopefully few prototypes,
2842 which can conflict with char $ac_func(); below. */
2843 #include <assert.h>
2844 /* Override any gcc2 internal prototype to avoid an error. */
2845 /* We use char because int might match the return type of a gcc2
2846 builtin and then its argument prototype would still apply. */
2847 char $ac_func();
2848
2849 int main() {
2850
2851 /* The GNU C library defines this for functions which it implements
2852 to always fail with ENOSYS. Some functions are actually named
2853 something starting with __ and the normal name is an alias. */
2854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2855 choke me
2856 #else
2857 $ac_func();
2858 #endif
2859
2860 ; return 0; }
2861 EOF
2862 if { (eval echo configure:2863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2863 rm -rf conftest*
2864 eval "ac_cv_func_$ac_func=yes"
2865 else
2866 echo "configure: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 rm -rf conftest*
2869 eval "ac_cv_func_$ac_func=no"
2870 fi
2871 rm -f conftest*
2872 fi
2873
2874 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2875 echo "$ac_t""yes" 1>&6
2876 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2877 cat >> confdefs.h <<EOF
2878 #define $ac_tr_func 1
2879 EOF
2880
2881 else
2882 echo "$ac_t""no" 1>&6
2883 fi
2884 done
2885
2886
2887 needsnprintf=no
2888 for ac_func in vsnprintf snprintf
2889 do
2890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2891 echo "configure:2892: checking for $ac_func" >&5
2892 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2893 echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895 cat > conftest.$ac_ext <<EOF
2896 #line 2897 "configure"
2897 #include "confdefs.h"
2898 /* System header to define __stub macros and hopefully few prototypes,
2899 which can conflict with char $ac_func(); below. */
2900 #include <assert.h>
2901 /* Override any gcc2 internal prototype to avoid an error. */
2902 /* We use char because int might match the return type of a gcc2
2903 builtin and then its argument prototype would still apply. */
2904 char $ac_func();
2905
2906 int main() {
2907
2908 /* The GNU C library defines this for functions which it implements
2909 to always fail with ENOSYS. Some functions are actually named
2910 something starting with __ and the normal name is an alias. */
2911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2912 choke me
2913 #else
2914 $ac_func();
2915 #endif
2916
2917 ; return 0; }
2918 EOF
2919 if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2920 rm -rf conftest*
2921 eval "ac_cv_func_$ac_func=yes"
2922 else
2923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
2925 rm -rf conftest*
2926 eval "ac_cv_func_$ac_func=no"
2927 fi
2928 rm -f conftest*
2929 fi
2930
2931 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2932 echo "$ac_t""yes" 1>&6
2933 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2934 cat >> confdefs.h <<EOF
2935 #define $ac_tr_func 1
2936 EOF
2937
2938 else
2939 echo "$ac_t""no" 1>&6
2940 needsnprintf=yes
2941 fi
2942 done
2943
2944 if test $needsnprintf = yes; then
2945 LIBOBJS="$LIBOBJS snprintf.o"
2946 fi
2947
2948
2949 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2950 echo "configure:2951: checking return type of signal handlers" >&5
2951 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2952 echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954 cat > conftest.$ac_ext <<EOF
2955 #line 2956 "configure"
2956 #include "confdefs.h"
2957 #include <sys/types.h>
2958 #include <signal.h>
2959 #ifdef signal
2960 #undef signal
2961 #endif
2962 #ifdef __cplusplus
2963 extern "C" void (*signal (int, void (*)(int)))(int);
2964 #else
2965 void (*signal ()) ();
2966 #endif
2967
2968 int main() {
2969 int i;
2970 ; return 0; }
2971 EOF
2972 if { (eval echo configure:2973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2973 rm -rf conftest*
2974 ac_cv_type_signal=void
2975 else
2976 echo "configure: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 rm -rf conftest*
2979 ac_cv_type_signal=int
2980 fi
2981 rm -f conftest*
2982 fi
2983
2984 echo "$ac_t""$ac_cv_type_signal" 1>&6
2985 cat >> confdefs.h <<EOF
2986 #define RETSIGTYPE $ac_cv_type_signal
2987 EOF
2988
2989
2990 if test "$ac_cv_type_signal" = void ; then
2991 cat >> confdefs.h <<\EOF
2992 #define RETSIGVAL
2993 EOF
2994
2995 else
2996 cat >> confdefs.h <<\EOF
2997 #define RETSIGVAL (0)
2998 EOF
2999
3000 fi
3001 case "$host_os" in
3002
3003 irix*)
3004 cat >> confdefs.h <<\EOF
3005 #define _BSD_SIGNALS 1
3006 EOF
3007
3008 ;;
3009
3010 *)
3011 for ac_func in sigaction
3012 do
3013 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3014 echo "configure:3015: checking for $ac_func" >&5
3015 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3016 echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018 cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 /* System header to define __stub macros and hopefully few prototypes,
3022 which can conflict with char $ac_func(); below. */
3023 #include <assert.h>
3024 /* Override any gcc2 internal prototype to avoid an error. */
3025 /* We use char because int might match the return type of a gcc2
3026 builtin and then its argument prototype would still apply. */
3027 char $ac_func();
3028
3029 int main() {
3030
3031 /* The GNU C library defines this for functions which it implements
3032 to always fail with ENOSYS. Some functions are actually named
3033 something starting with __ and the normal name is an alias. */
3034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3035 choke me
3036 #else
3037 $ac_func();
3038 #endif
3039
3040 ; return 0; }
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3043 rm -rf conftest*
3044 eval "ac_cv_func_$ac_func=yes"
3045 else
3046 echo "configure: failed program was:" >&5
3047 cat conftest.$ac_ext >&5
3048 rm -rf conftest*
3049 eval "ac_cv_func_$ac_func=no"
3050 fi
3051 rm -f conftest*
3052 fi
3053
3054 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3055 echo "$ac_t""yes" 1>&6
3056 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3057 cat >> confdefs.h <<EOF
3058 #define $ac_tr_func 1
3059 EOF
3060
3061 else
3062 echo "$ac_t""no" 1>&6
3063 fi
3064 done
3065
3066 if test $ac_cv_func_sigaction = no ; then
3067 for ac_func in sigset
3068 do
3069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3070 echo "configure:3071: checking for $ac_func" >&5
3071 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073 else
3074 cat > conftest.$ac_ext <<EOF
3075 #line 3076 "configure"
3076 #include "confdefs.h"
3077 /* System header to define __stub macros and hopefully few prototypes,
3078 which can conflict with char $ac_func(); below. */
3079 #include <assert.h>
3080 /* Override any gcc2 internal prototype to avoid an error. */
3081 /* We use char because int might match the return type of a gcc2
3082 builtin and then its argument prototype would still apply. */
3083 char $ac_func();
3084
3085 int main() {
3086
3087 /* The GNU C library defines this for functions which it implements
3088 to always fail with ENOSYS. Some functions are actually named
3089 something starting with __ and the normal name is an alias. */
3090 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3091 choke me
3092 #else
3093 $ac_func();
3094 #endif
3095
3096 ; return 0; }
3097 EOF
3098 if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3099 rm -rf conftest*
3100 eval "ac_cv_func_$ac_func=yes"
3101 else
3102 echo "configure: failed program was:" >&5
3103 cat conftest.$ac_ext >&5
3104 rm -rf conftest*
3105 eval "ac_cv_func_$ac_func=no"
3106 fi
3107 rm -f conftest*
3108 fi
3109
3110 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3111 echo "$ac_t""yes" 1>&6
3112 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3113 cat >> confdefs.h <<EOF
3114 #define $ac_tr_func 1
3115 EOF
3116
3117 else
3118 echo "$ac_t""no" 1>&6
3119 fi
3120 done
3121
3122 fi
3123 ;;
3124 esac
3125
3126
3127 echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6
3128 echo "configure:3129: checking for library containing dnet_htoa" >&5
3129 if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then
3130 echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132 ac_func_search_save_LIBS="$LIBS"
3133 ac_cv_search_dnet_htoa="no"
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 /* Override any gcc2 internal prototype to avoid an error. */
3138 /* We use char because int might match the return type of a gcc2
3139 builtin and then its argument prototype would still apply. */
3140 char dnet_htoa();
3141
3142 int main() {
3143 dnet_htoa()
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3147 rm -rf conftest*
3148 ac_cv_search_dnet_htoa="none required"
3149 else
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3152 fi
3153 rm -f conftest*
3154 test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do
3155 LIBS="-l$i $ac_func_search_save_LIBS"
3156 cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 /* Override any gcc2 internal prototype to avoid an error. */
3160 /* We use char because int might match the return type of a gcc2
3161 builtin and then its argument prototype would still apply. */
3162 char dnet_htoa();
3163
3164 int main() {
3165 dnet_htoa()
3166 ; return 0; }
3167 EOF
3168 if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3169 rm -rf conftest*
3170 ac_cv_search_dnet_htoa="-l$i"
3171 break
3172 else
3173 echo "configure: failed program was:" >&5
3174 cat conftest.$ac_ext >&5
3175 fi
3176 rm -f conftest*
3177 done
3178 LIBS="$ac_func_search_save_LIBS"
3179 fi
3180
3181 echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6
3182 if test "$ac_cv_search_dnet_htoa" != "no"; then
3183 test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS"
3184 cat >> confdefs.h <<\EOF
3185 #define HAVE_DNET_HTOA 1
3186 EOF
3187
3188 else :
3189
3190 fi
3191
3192 echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
3193 echo "configure:3194: checking for main in -lrpc" >&5
3194 ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
3195 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3196 echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198 ac_save_LIBS="$LIBS"
3199 LIBS="-lrpc $LIBS"
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203
3204 int main() {
3205 main()
3206 ; return 0; }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3209 rm -rf conftest*
3210 eval "ac_cv_lib_$ac_lib_var=yes"
3211 else
3212 echo "configure: failed program was:" >&5
3213 cat conftest.$ac_ext >&5
3214 rm -rf conftest*
3215 eval "ac_cv_lib_$ac_lib_var=no"
3216 fi
3217 rm -f conftest*
3218 LIBS="$ac_save_LIBS"
3219
3220 fi
3221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3222 echo "$ac_t""yes" 1>&6
3223 ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3224 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3225 cat >> confdefs.h <<EOF
3226 #define $ac_tr_lib 1
3227 EOF
3228
3229 LIBS="-lrpc $LIBS"
3230
3231 else
3232 echo "$ac_t""no" 1>&6
3233 fi
3234
3235
3236 echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
3237 echo "configure:3238: checking for library containing getrpcbynumber" >&5
3238 if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
3239 echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241 ac_func_search_save_LIBS="$LIBS"
3242 ac_cv_search_getrpcbynumber="no"
3243 cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 /* Override any gcc2 internal prototype to avoid an error. */
3247 /* We use char because int might match the return type of a gcc2
3248 builtin and then its argument prototype would still apply. */
3249 char getrpcbynumber();
3250
3251 int main() {
3252 getrpcbynumber()
3253 ; return 0; }
3254 EOF
3255 if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3256 rm -rf conftest*
3257 ac_cv_search_getrpcbynumber="none required"
3258 else
3259 echo "configure: failed program was:" >&5
3260 cat conftest.$ac_ext >&5
3261 fi
3262 rm -f conftest*
3263 test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
3264 LIBS="-l$i $ac_func_search_save_LIBS"
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 /* Override any gcc2 internal prototype to avoid an error. */
3269 /* We use char because int might match the return type of a gcc2
3270 builtin and then its argument prototype would still apply. */
3271 char getrpcbynumber();
3272
3273 int main() {
3274 getrpcbynumber()
3275 ; return 0; }
3276 EOF
3277 if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3278 rm -rf conftest*
3279 ac_cv_search_getrpcbynumber="-l$i"
3280 break
3281 else
3282 echo "configure: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 fi
3285 rm -f conftest*
3286 done
3287 LIBS="$ac_func_search_save_LIBS"
3288 fi
3289
3290 echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6
3291 if test "$ac_cv_search_getrpcbynumber" != "no"; then
3292 test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS"
3293
3294 else :
3295
3296 fi
3297
3298
3299
3300 # Most operating systems have gethostbyname() in the default searched
3301 # libraries (i.e. libc):
3302 # Some OSes (eg. Solaris) place it in libnsl
3303 # Some strange OSes (SINIX) have it in libsocket:
3304
3305 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3306 echo "configure:3307: checking for library containing gethostbyname" >&5
3307 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3308 echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310 ac_func_search_save_LIBS="$LIBS"
3311 ac_cv_search_gethostbyname="no"
3312 cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 /* Override any gcc2 internal prototype to avoid an error. */
3316 /* We use char because int might match the return type of a gcc2
3317 builtin and then its argument prototype would still apply. */
3318 char gethostbyname();
3319
3320 int main() {
3321 gethostbyname()
3322 ; return 0; }
3323 EOF
3324 if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3325 rm -rf conftest*
3326 ac_cv_search_gethostbyname="none required"
3327 else
3328 echo "configure: failed program was:" >&5
3329 cat conftest.$ac_ext >&5
3330 fi
3331 rm -f conftest*
3332 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
3333 LIBS="-l$i $ac_func_search_save_LIBS"
3334 cat > conftest.$ac_ext <<EOF
3335 #line 3336 "configure"
3336 #include "confdefs.h"
3337 /* Override any gcc2 internal prototype to avoid an error. */
3338 /* We use char because int might match the return type of a gcc2
3339 builtin and then its argument prototype would still apply. */
3340 char gethostbyname();
3341
3342 int main() {
3343 gethostbyname()
3344 ; return 0; }
3345 EOF
3346 if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3347 rm -rf conftest*
3348 ac_cv_search_gethostbyname="-l$i"
3349 break
3350 else
3351 echo "configure: failed program was:" >&5
3352 cat conftest.$ac_ext >&5
3353 fi
3354 rm -f conftest*
3355 done
3356 LIBS="$ac_func_search_save_LIBS"
3357 fi
3358
3359 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3360 if test "$ac_cv_search_gethostbyname" != "no"; then
3361 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3362
3363 else :
3364
3365 fi
3366 # Unfortunately libsocket sometimes depends on libnsl and
3367 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
3368 if test "$ac_cv_search_gethostbyname" = "no"
3369 then
3370 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3371 echo "configure:3372: checking for gethostbyname in -lsocket" >&5
3372 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
3373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3374 echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376 ac_save_LIBS="$LIBS"
3377 LIBS="-lsocket -lnsl $LIBS"
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 /* Override any gcc2 internal prototype to avoid an error. */
3382 /* We use char because int might match the return type of a gcc2
3383 builtin and then its argument prototype would still apply. */
3384 char gethostbyname();
3385
3386 int main() {
3387 gethostbyname()
3388 ; return 0; }
3389 EOF
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3391 rm -rf conftest*
3392 eval "ac_cv_lib_$ac_lib_var=yes"
3393 else
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3396 rm -rf conftest*
3397 eval "ac_cv_lib_$ac_lib_var=no"
3398 fi
3399 rm -f conftest*
3400 LIBS="$ac_save_LIBS"
3401
3402 fi
3403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404 echo "$ac_t""yes" 1>&6
3405 LIBS="-lsocket -lnsl $LIBS"
3406 else
3407 echo "$ac_t""no" 1>&6
3408 fi
3409
3410 fi
3411
3412 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
3413 echo "configure:3414: checking for library containing socket" >&5
3414 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
3415 echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417 ac_func_search_save_LIBS="$LIBS"
3418 ac_cv_search_socket="no"
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 /* Override any gcc2 internal prototype to avoid an error. */
3423 /* We use char because int might match the return type of a gcc2
3424 builtin and then its argument prototype would still apply. */
3425 char socket();
3426
3427 int main() {
3428 socket()
3429 ; return 0; }
3430 EOF
3431 if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3432 rm -rf conftest*
3433 ac_cv_search_socket="none required"
3434 else
3435 echo "configure: failed program was:" >&5
3436 cat conftest.$ac_ext >&5
3437 fi
3438 rm -f conftest*
3439 test "$ac_cv_search_socket" = "no" && for i in socket; do
3440 LIBS="-l$i $ac_func_search_save_LIBS"
3441 cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444 /* Override any gcc2 internal prototype to avoid an error. */
3445 /* We use char because int might match the return type of a gcc2
3446 builtin and then its argument prototype would still apply. */
3447 char socket();
3448
3449 int main() {
3450 socket()
3451 ; return 0; }
3452 EOF
3453 if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3454 rm -rf conftest*
3455 ac_cv_search_socket="-l$i"
3456 break
3457 else
3458 echo "configure: failed program was:" >&5
3459 cat conftest.$ac_ext >&5
3460 fi
3461 rm -f conftest*
3462 done
3463 LIBS="$ac_func_search_save_LIBS"
3464 fi
3465
3466 echo "$ac_t""$ac_cv_search_socket" 1>&6
3467 if test "$ac_cv_search_socket" != "no"; then
3468 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
3469
3470 else :
3471 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3472 echo "configure:3473: checking for socket in -lsocket" >&5
3473 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3475 echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477 ac_save_LIBS="$LIBS"
3478 LIBS="-lsocket -lnsl $LIBS"
3479 cat > conftest.$ac_ext <<EOF
3480 #line 3481 "configure"
3481 #include "confdefs.h"
3482 /* Override any gcc2 internal prototype to avoid an error. */
3483 /* We use char because int might match the return type of a gcc2
3484 builtin and then its argument prototype would still apply. */
3485 char socket();
3486
3487 int main() {
3488 socket()
3489 ; return 0; }
3490 EOF
3491 if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3492 rm -rf conftest*
3493 eval "ac_cv_lib_$ac_lib_var=yes"
3494 else
3495 echo "configure: failed program was:" >&5
3496 cat conftest.$ac_ext >&5
3497 rm -rf conftest*
3498 eval "ac_cv_lib_$ac_lib_var=no"
3499 fi
3500 rm -f conftest*
3501 LIBS="$ac_save_LIBS"
3502
3503 fi
3504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3505 echo "$ac_t""yes" 1>&6
3506 LIBS="-lsocket -lnsl $LIBS"
3507 else
3508 echo "$ac_t""no" 1>&6
3509 fi
3510
3511 fi
3512 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3513
3514 echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
3515 echo "configure:3516: checking for library containing putmsg" >&5
3516 if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
3517 echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519 ac_func_search_save_LIBS="$LIBS"
3520 ac_cv_search_putmsg="no"
3521 cat > conftest.$ac_ext <<EOF
3522 #line 3523 "configure"
3523 #include "confdefs.h"
3524 /* Override any gcc2 internal prototype to avoid an error. */
3525 /* We use char because int might match the return type of a gcc2
3526 builtin and then its argument prototype would still apply. */
3527 char putmsg();
3528
3529 int main() {
3530 putmsg()
3531 ; return 0; }
3532 EOF
3533 if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3534 rm -rf conftest*
3535 ac_cv_search_putmsg="none required"
3536 else
3537 echo "configure: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
3539 fi
3540 rm -f conftest*
3541 test "$ac_cv_search_putmsg" = "no" && for i in str; do
3542 LIBS="-l$i $ac_func_search_save_LIBS"
3543 cat > conftest.$ac_ext <<EOF
3544 #line 3545 "configure"
3545 #include "confdefs.h"
3546 /* Override any gcc2 internal prototype to avoid an error. */
3547 /* We use char because int might match the return type of a gcc2
3548 builtin and then its argument prototype would still apply. */
3549 char putmsg();
3550
3551 int main() {
3552 putmsg()
3553 ; return 0; }
3554 EOF
3555 if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3556 rm -rf conftest*
3557 ac_cv_search_putmsg="-l$i"
3558 break
3559 else
3560 echo "configure: failed program was:" >&5
3561 cat conftest.$ac_ext >&5
3562 fi
3563 rm -f conftest*
3564 done
3565 LIBS="$ac_func_search_save_LIBS"
3566 fi
3567
3568 echo "$ac_t""$ac_cv_search_putmsg" 1>&6
3569 if test "$ac_cv_search_putmsg" != "no"; then
3570 test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
3571
3572 else :
3573
3574 fi
3575
3576
3577 LBL_LIBS="$LIBS"
3578 pfopen=/usr/examples/packetfilter/pfopen.c
3579 if test -f $pfopen ; then
3580 for ac_func in pfopen
3581 do
3582 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3583 echo "configure:3584: checking for $ac_func" >&5
3584 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3585 echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587 cat > conftest.$ac_ext <<EOF
3588 #line 3589 "configure"
3589 #include "confdefs.h"
3590 /* System header to define __stub macros and hopefully few prototypes,
3591 which can conflict with char $ac_func(); below. */
3592 #include <assert.h>
3593 /* Override any gcc2 internal prototype to avoid an error. */
3594 /* We use char because int might match the return type of a gcc2
3595 builtin and then its argument prototype would still apply. */
3596 char $ac_func();
3597
3598 int main() {
3599
3600 /* The GNU C library defines this for functions which it implements
3601 to always fail with ENOSYS. Some functions are actually named
3602 something starting with __ and the normal name is an alias. */
3603 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3604 choke me
3605 #else
3606 $ac_func();
3607 #endif
3608
3609 ; return 0; }
3610 EOF
3611 if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3612 rm -rf conftest*
3613 eval "ac_cv_func_$ac_func=yes"
3614 else
3615 echo "configure: failed program was:" >&5
3616 cat conftest.$ac_ext >&5
3617 rm -rf conftest*
3618 eval "ac_cv_func_$ac_func=no"
3619 fi
3620 rm -f conftest*
3621 fi
3622
3623 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3624 echo "$ac_t""yes" 1>&6
3625 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3626 cat >> confdefs.h <<EOF
3627 #define $ac_tr_func 1
3628 EOF
3629
3630 else
3631 echo "$ac_t""no" 1>&6
3632 fi
3633 done
3634
3635 if test $ac_cv_func_pfopen = "no" ; then
3636 echo "$ac_t""Using $pfopen" 1>&6
3637 LIBS="$LIBS $pfopen"
3638 fi
3639 fi
3640 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3641 echo "configure:3642: checking for local pcap library" >&5
3642 libpcap=FAIL
3643 lastdir=FAIL
3644 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3645 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3646 for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
3647 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3648 if test $lastdir = $basedir ; then
3649 continue;
3650 fi
3651 lastdir=$dir
3652 if test -r $dir/libpcap.a ; then
3653 libpcap=$dir/libpcap.a
3654 d=$dir
3655 fi
3656 done
3657 if test $libpcap = FAIL ; then
3658 echo "$ac_t""not found" 1>&6
3659 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3660 echo "configure:3661: checking for main in -lpcap" >&5
3661 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3663 echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665 ac_save_LIBS="$LIBS"
3666 LIBS="-lpcap $LIBS"
3667 cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3670
3671 int main() {
3672 main()
3673 ; return 0; }
3674 EOF
3675 if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3676 rm -rf conftest*
3677 eval "ac_cv_lib_$ac_lib_var=yes"
3678 else
3679 echo "configure: failed program was:" >&5
3680 cat conftest.$ac_ext >&5
3681 rm -rf conftest*
3682 eval "ac_cv_lib_$ac_lib_var=no"
3683 fi
3684 rm -f conftest*
3685 LIBS="$ac_save_LIBS"
3686
3687 fi
3688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3689 echo "$ac_t""yes" 1>&6
3690 libpcap="-lpcap"
3691 else
3692 echo "$ac_t""no" 1>&6
3693 fi
3694
3695 if test $libpcap = FAIL ; then
3696 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3697 fi
3698 echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
3699 echo "configure:3700: checking for extraneous pcap header directories" >&5
3700 if test \( ! -r /usr/local/include/pcap.h \) -a \
3701 \( ! -r /usr/include/pcap.h \); then
3702 if test -r /usr/local/include/pcap/pcap.h; then
3703 d="/usr/local/include/pcap"
3704 elif test -r /usr/include/pcap/pcap.h; then
3705 d="/usr/include/pcap"
3706 fi
3707 fi
3708 if test -z "$d" ; then
3709 echo "$ac_t""not found" 1>&6
3710 else
3711 V_INCLS="-I$d $V_INCLS"
3712 echo "$ac_t""found -- -I$d added" 1>&6
3713 fi
3714 else
3715 V_PCAPDEP=$libpcap
3716 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3717 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3718 if test -r $d/pcap.h; then
3719 V_INCLS="-I$d $V_INCLS"
3720 elif test -r $places/pcap.h; then
3721 V_INCLS="-I$places $V_INCLS"
3722 else
3723 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3724 fi
3725 echo "$ac_t""$libpcap" 1>&6
3726 fi
3727 LIBS="$libpcap $LIBS"
3728 case "$host_os" in
3729
3730 aix*)
3731 pseexe="/lib/pse.exp"
3732 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3733 echo "configure:3734: checking for $pseexe" >&5
3734 if test -f $pseexe ; then
3735 echo "$ac_t""yes" 1>&6
3736 LIBS="$LIBS -I:$pseexe"
3737 fi
3738 #
3739 # We need "-lodm" and "-lcfg", as libpcap requires them on
3740 # AIX, and we just build a static libpcap.a and thus can't
3741 # arrange that when you link with libpcap you automatically
3742 # link with those libraries.
3743 #
3744 LIBS="$LIBS -lodm -lcfg"
3745 ;;
3746 esac
3747
3748 echo $ac_n "checking for pcap_list_datalinks""... $ac_c" 1>&6
3749 echo "configure:3750: checking for pcap_list_datalinks" >&5
3750 if eval "test \"`echo '$''{'ac_cv_func_pcap_list_datalinks'+set}'`\" = set"; then
3751 echo $ac_n "(cached) $ac_c" 1>&6
3752 else
3753 cat > conftest.$ac_ext <<EOF
3754 #line 3755 "configure"
3755 #include "confdefs.h"
3756 /* System header to define __stub macros and hopefully few prototypes,
3757 which can conflict with char pcap_list_datalinks(); below. */
3758 #include <assert.h>
3759 /* Override any gcc2 internal prototype to avoid an error. */
3760 /* We use char because int might match the return type of a gcc2
3761 builtin and then its argument prototype would still apply. */
3762 char pcap_list_datalinks();
3763
3764 int main() {
3765
3766 /* The GNU C library defines this for functions which it implements
3767 to always fail with ENOSYS. Some functions are actually named
3768 something starting with __ and the normal name is an alias. */
3769 #if defined (__stub_pcap_list_datalinks) || defined (__stub___pcap_list_datalinks)
3770 choke me
3771 #else
3772 pcap_list_datalinks();
3773 #endif
3774
3775 ; return 0; }
3776 EOF
3777 if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3778 rm -rf conftest*
3779 eval "ac_cv_func_pcap_list_datalinks=yes"
3780 else
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 rm -rf conftest*
3784 eval "ac_cv_func_pcap_list_datalinks=no"
3785 fi
3786 rm -f conftest*
3787 fi
3788
3789 if eval "test \"`echo '$ac_cv_func_'pcap_list_datalinks`\" = yes"; then
3790 echo "$ac_t""yes" 1>&6
3791 cat >> confdefs.h <<\EOF
3792 #define HAVE_PCAP_LIST_DATALINKS 1
3793 EOF
3794
3795 else
3796 echo "$ac_t""no" 1>&6
3797 LIBOBJS="$LIBOBJS datalinks.o"
3798 fi
3799
3800 echo $ac_n "checking for pcap_set_datalink""... $ac_c" 1>&6
3801 echo "configure:3802: checking for pcap_set_datalink" >&5
3802 if eval "test \"`echo '$''{'ac_cv_func_pcap_set_datalink'+set}'`\" = set"; then
3803 echo $ac_n "(cached) $ac_c" 1>&6
3804 else
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808 /* System header to define __stub macros and hopefully few prototypes,
3809 which can conflict with char pcap_set_datalink(); below. */
3810 #include <assert.h>
3811 /* Override any gcc2 internal prototype to avoid an error. */
3812 /* We use char because int might match the return type of a gcc2
3813 builtin and then its argument prototype would still apply. */
3814 char pcap_set_datalink();
3815
3816 int main() {
3817
3818 /* The GNU C library defines this for functions which it implements
3819 to always fail with ENOSYS. Some functions are actually named
3820 something starting with __ and the normal name is an alias. */
3821 #if defined (__stub_pcap_set_datalink) || defined (__stub___pcap_set_datalink)
3822 choke me
3823 #else
3824 pcap_set_datalink();
3825 #endif
3826
3827 ; return 0; }
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3830 rm -rf conftest*
3831 eval "ac_cv_func_pcap_set_datalink=yes"
3832 else
3833 echo "configure: failed program was:" >&5
3834 cat conftest.$ac_ext >&5
3835 rm -rf conftest*
3836 eval "ac_cv_func_pcap_set_datalink=no"
3837 fi
3838 rm -f conftest*
3839 fi
3840
3841 if eval "test \"`echo '$ac_cv_func_'pcap_set_datalink`\" = yes"; then
3842 echo "$ac_t""yes" 1>&6
3843 cat >> confdefs.h <<\EOF
3844 #define HAVE_PCAP_SET_DATALINK 1
3845 EOF
3846
3847 else
3848 echo "$ac_t""no" 1>&6
3849 fi
3850
3851 echo $ac_n "checking for pcap_datalink_name_to_val""... $ac_c" 1>&6
3852 echo "configure:3853: checking for pcap_datalink_name_to_val" >&5
3853 if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_name_to_val'+set}'`\" = set"; then
3854 echo $ac_n "(cached) $ac_c" 1>&6
3855 else
3856 cat > conftest.$ac_ext <<EOF
3857 #line 3858 "configure"
3858 #include "confdefs.h"
3859 /* System header to define __stub macros and hopefully few prototypes,
3860 which can conflict with char pcap_datalink_name_to_val(); below. */
3861 #include <assert.h>
3862 /* Override any gcc2 internal prototype to avoid an error. */
3863 /* We use char because int might match the return type of a gcc2
3864 builtin and then its argument prototype would still apply. */
3865 char pcap_datalink_name_to_val();
3866
3867 int main() {
3868
3869 /* The GNU C library defines this for functions which it implements
3870 to always fail with ENOSYS. Some functions are actually named
3871 something starting with __ and the normal name is an alias. */
3872 #if defined (__stub_pcap_datalink_name_to_val) || defined (__stub___pcap_datalink_name_to_val)
3873 choke me
3874 #else
3875 pcap_datalink_name_to_val();
3876 #endif
3877
3878 ; return 0; }
3879 EOF
3880 if { (eval echo configure:3881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3881 rm -rf conftest*
3882 eval "ac_cv_func_pcap_datalink_name_to_val=yes"
3883 else
3884 echo "configure: failed program was:" >&5
3885 cat conftest.$ac_ext >&5
3886 rm -rf conftest*
3887 eval "ac_cv_func_pcap_datalink_name_to_val=no"
3888 fi
3889 rm -f conftest*
3890 fi
3891
3892 if eval "test \"`echo '$ac_cv_func_'pcap_datalink_name_to_val`\" = yes"; then
3893 echo "$ac_t""yes" 1>&6
3894
3895 cat >> confdefs.h <<\EOF
3896 #define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
3897 EOF
3898
3899 echo $ac_n "checking for pcap_datalink_val_to_description""... $ac_c" 1>&6
3900 echo "configure:3901: checking for pcap_datalink_val_to_description" >&5
3901 if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_val_to_description'+set}'`\" = set"; then
3902 echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904 cat > conftest.$ac_ext <<EOF
3905 #line 3906 "configure"
3906 #include "confdefs.h"
3907 /* System header to define __stub macros and hopefully few prototypes,
3908 which can conflict with char pcap_datalink_val_to_description(); below. */
3909 #include <assert.h>
3910 /* Override any gcc2 internal prototype to avoid an error. */
3911 /* We use char because int might match the return type of a gcc2
3912 builtin and then its argument prototype would still apply. */
3913 char pcap_datalink_val_to_description();
3914
3915 int main() {
3916
3917 /* The GNU C library defines this for functions which it implements
3918 to always fail with ENOSYS. Some functions are actually named
3919 something starting with __ and the normal name is an alias. */
3920 #if defined (__stub_pcap_datalink_val_to_description) || defined (__stub___pcap_datalink_val_to_description)
3921 choke me
3922 #else
3923 pcap_datalink_val_to_description();
3924 #endif
3925
3926 ; return 0; }
3927 EOF
3928 if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3929 rm -rf conftest*
3930 eval "ac_cv_func_pcap_datalink_val_to_description=yes"
3931 else
3932 echo "configure: failed program was:" >&5
3933 cat conftest.$ac_ext >&5
3934 rm -rf conftest*
3935 eval "ac_cv_func_pcap_datalink_val_to_description=no"
3936 fi
3937 rm -f conftest*
3938 fi
3939
3940 if eval "test \"`echo '$ac_cv_func_'pcap_datalink_val_to_description`\" = yes"; then
3941 echo "$ac_t""yes" 1>&6
3942 cat >> confdefs.h <<\EOF
3943 #define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
3944 EOF
3945
3946 else
3947 echo "$ac_t""no" 1>&6
3948 LIBOBJS="$LIBOBJS dlnames.o"
3949 fi
3950
3951
3952 else
3953 echo "$ac_t""no" 1>&6
3954 LIBOBJS="$LIBOBJS dlnames.o"
3955 fi
3956
3957
3958 for ac_func in pcap_breakloop
3959 do
3960 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3961 echo "configure:3962: checking for $ac_func" >&5
3962 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3963 echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 /* System header to define __stub macros and hopefully few prototypes,
3969 which can conflict with char $ac_func(); below. */
3970 #include <assert.h>
3971 /* Override any gcc2 internal prototype to avoid an error. */
3972 /* We use char because int might match the return type of a gcc2
3973 builtin and then its argument prototype would still apply. */
3974 char $ac_func();
3975
3976 int main() {
3977
3978 /* The GNU C library defines this for functions which it implements
3979 to always fail with ENOSYS. Some functions are actually named
3980 something starting with __ and the normal name is an alias. */
3981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3982 choke me
3983 #else
3984 $ac_func();
3985 #endif
3986
3987 ; return 0; }
3988 EOF
3989 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3990 rm -rf conftest*
3991 eval "ac_cv_func_$ac_func=yes"
3992 else
3993 echo "configure: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 rm -rf conftest*
3996 eval "ac_cv_func_$ac_func=no"
3997 fi
3998 rm -f conftest*
3999 fi
4000
4001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4002 echo "$ac_t""yes" 1>&6
4003 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4004 cat >> confdefs.h <<EOF
4005 #define $ac_tr_func 1
4006 EOF
4007
4008 else
4009 echo "$ac_t""no" 1>&6
4010 fi
4011 done
4012
4013
4014
4015 #
4016 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
4017 # libraries (e.g., "-lsocket -lnsl" on Solaris).
4018 #
4019 # We don't use AC_REPLACE_FUNCS because that uses AC_CHECK_FUNCS which
4020 # use AC_CHECK_FUNC which doesn't let us specify the right #includes
4021 # to make this work on BSD/OS 4.x. BSD/OS 4.x ships with the BIND8
4022 # resolver, and the way it defines inet_{ntop,pton} is rather strange;
4023 # it does not ship with a libc symbol "inet_ntop()", it ships with
4024 # "_inet_ntop()", and has a #define macro in one of the system headers
4025 # to rename it.
4026 #
4027 echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
4028 echo "configure:4029: checking for inet_ntop" >&5
4029 cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 #include <sys/types.h>
4033 #include <sys/socket.h>
4034 #include <netinet/in.h>
4035 #include <arpa/inet.h>
4036 int main() {
4037 char src[4], dst[128];
4038 inet_ntop(AF_INET, src, dst, sizeof(dst));
4039 ; return 0; }
4040 EOF
4041 if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4042 rm -rf conftest*
4043 echo "$ac_t""yes" 1>&6
4044 else
4045 echo "configure: failed program was:" >&5
4046 cat conftest.$ac_ext >&5
4047 rm -rf conftest*
4048 echo "$ac_t""no" 1>&6
4049 LIBOBJS="$LIBOBJS inet_ntop.o"
4050 fi
4051 rm -f conftest*
4052 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
4053 echo "configure:4054: checking for inet_pton" >&5
4054 cat > conftest.$ac_ext <<EOF
4055 #line 4056 "configure"
4056 #include "confdefs.h"
4057 #include <sys/types.h>
4058 #include <sys/socket.h>
4059 #include <netinet/in.h>
4060 #include <arpa/inet.h>
4061 int main() {
4062 char src[128], dst[4];
4063 inet_pton(AF_INET, src, dst);
4064 ; return 0; }
4065 EOF
4066 if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4067 rm -rf conftest*
4068 echo "$ac_t""yes" 1>&6
4069 else
4070 echo "configure: failed program was:" >&5
4071 cat conftest.$ac_ext >&5
4072 rm -rf conftest*
4073 echo "$ac_t""no" 1>&6
4074 LIBOBJS="$LIBOBJS inet_pton.o"
4075 fi
4076 rm -f conftest*
4077 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
4078 echo "configure:4079: checking for inet_aton" >&5
4079 cat > conftest.$ac_ext <<EOF
4080 #line 4081 "configure"
4081 #include "confdefs.h"
4082 #include <sys/types.h>
4083 #include <netinet/in.h>
4084 #include <arpa/inet.h>
4085 int main() {
4086 char src[128];
4087 struct in_addr dst;
4088 inet_aton(src, &dst);
4089 ; return 0; }
4090 EOF
4091 if { (eval echo configure:4092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4092 rm -rf conftest*
4093 echo "$ac_t""yes" 1>&6
4094 else
4095 echo "configure: failed program was:" >&5
4096 cat conftest.$ac_ext >&5
4097 rm -rf conftest*
4098 echo "$ac_t""no" 1>&6
4099 LIBOBJS="$LIBOBJS inet_aton.o"
4100 fi
4101 rm -f conftest*
4102
4103
4104 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4105 echo "configure:4106: checking if sockaddr struct has sa_len member" >&5
4106 if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112
4113 # include <sys/types.h>
4114 # include <sys/socket.h>
4115 int main() {
4116 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4117 ; return 0; }
4118 EOF
4119 if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4120 rm -rf conftest*
4121 ac_cv_sockaddr_has_sa_len=yes
4122 else
4123 echo "configure: failed program was:" >&5
4124 cat conftest.$ac_ext >&5
4125 rm -rf conftest*
4126 ac_cv_sockaddr_has_sa_len=no
4127 fi
4128 rm -f conftest*
4129 fi
4130
4131 echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
4132 if test $ac_cv_sockaddr_has_sa_len = yes ; then
4133 cat >> confdefs.h <<\EOF
4134 #define HAVE_SOCKADDR_SA_LEN 1
4135 EOF
4136
4137 fi
4138
4139 if test "$ac_cv_sockaddr_has_sa_len" = no; then
4140 missing_includes=yes
4141 fi
4142
4143 for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
4144 do
4145 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4146 echo "configure:4147: checking for $ac_func" >&5
4147 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4148 echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 /* System header to define __stub macros and hopefully few prototypes,
4154 which can conflict with char $ac_func(); below. */
4155 #include <assert.h>
4156 /* Override any gcc2 internal prototype to avoid an error. */
4157 /* We use char because int might match the return type of a gcc2
4158 builtin and then its argument prototype would still apply. */
4159 char $ac_func();
4160
4161 int main() {
4162
4163 /* The GNU C library defines this for functions which it implements
4164 to always fail with ENOSYS. Some functions are actually named
4165 something starting with __ and the normal name is an alias. */
4166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4167 choke me
4168 #else
4169 $ac_func();
4170 #endif
4171
4172 ; return 0; }
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4175 rm -rf conftest*
4176 eval "ac_cv_func_$ac_func=yes"
4177 else
4178 echo "configure: failed program was:" >&5
4179 cat conftest.$ac_ext >&5
4180 rm -rf conftest*
4181 eval "ac_cv_func_$ac_func=no"
4182 fi
4183 rm -f conftest*
4184 fi
4185
4186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4187 echo "$ac_t""yes" 1>&6
4188 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4189 cat >> confdefs.h <<EOF
4190 #define $ac_tr_func 1
4191 EOF
4192
4193 else
4194 echo "$ac_t""no" 1>&6
4195 fi
4196 done
4197
4198 if test $ac_cv_func_pcap_lib_version = "no" ; then
4199 echo $ac_n "checking whether pcap_version is defined by libpcap""... $ac_c" 1>&6
4200 echo "configure:4201: checking whether pcap_version is defined by libpcap" >&5
4201 cat > conftest.$ac_ext <<EOF
4202 #line 4203 "configure"
4203 #include "confdefs.h"
4204
4205 int main() {
4206
4207 char *
4208 return_pcap_version(void)
4209 {
4210 extern char pcap_version[];
4211
4212 return pcap_version;
4213 }
4214
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218 rm -rf conftest*
4219 ac_lbl_cv_pcap_version_defined=yes
4220 else
4221 echo "configure: failed program was:" >&5
4222 cat conftest.$ac_ext >&5
4223 rm -rf conftest*
4224 ac_lbl_cv_pcap_version_defined=no
4225 fi
4226 rm -f conftest*
4227 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
4228 echo "$ac_t""yes" 1>&6
4229 cat >> confdefs.h <<\EOF
4230 #define HAVE_PCAP_VERSION 1
4231 EOF
4232
4233 else
4234 echo "$ac_t""no" 1>&6
4235 fi
4236 fi
4237 echo $ac_n "checking whether pcap_debug is defined by libpcap""... $ac_c" 1>&6
4238 echo "configure:4239: checking whether pcap_debug is defined by libpcap" >&5
4239 cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242
4243 int main() {
4244
4245 int
4246 return_pcap_debug(void)
4247 {
4248 extern int pcap_debug;
4249
4250 return pcap_debug;
4251 }
4252
4253 ; return 0; }
4254 EOF
4255 if { (eval echo configure:4256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4256 rm -rf conftest*
4257 ac_lbl_cv_pcap_debug_defined=yes
4258 else
4259 echo "configure: failed program was:" >&5
4260 cat conftest.$ac_ext >&5
4261 rm -rf conftest*
4262 ac_lbl_cv_pcap_debug_defined=no
4263 fi
4264 rm -f conftest*
4265 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
4266 echo "$ac_t""yes" 1>&6
4267 cat >> confdefs.h <<\EOF
4268 #define HAVE_PCAP_DEBUG 1
4269 EOF
4270
4271 else
4272 echo "$ac_t""no" 1>&6
4273 #
4274 # OK, what about "yydebug"?
4275 #
4276 echo $ac_n "checking whether yydebug is defined by libpcap""... $ac_c" 1>&6
4277 echo "configure:4278: checking whether yydebug is defined by libpcap" >&5
4278 cat > conftest.$ac_ext <<EOF
4279 #line 4280 "configure"
4280 #include "confdefs.h"
4281
4282 int main() {
4283
4284 int
4285 return_yydebug(void)
4286 {
4287 extern int yydebug;
4288
4289 return yydebug;
4290 }
4291
4292 ; return 0; }
4293 EOF
4294 if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4295 rm -rf conftest*
4296 ac_lbl_cv_yydebug_defined=yes
4297 else
4298 echo "configure: failed program was:" >&5
4299 cat conftest.$ac_ext >&5
4300 rm -rf conftest*
4301 ac_lbl_cv_yydebug_defined=no
4302 fi
4303 rm -f conftest*
4304 if test "$ac_lbl_cv_yydebug_defined" = yes ; then
4305 echo "$ac_t""yes" 1>&6
4306 cat >> confdefs.h <<\EOF
4307 #define HAVE_YYDEBUG 1
4308 EOF
4309
4310 else
4311 echo "$ac_t""no" 1>&6
4312 fi
4313 fi
4314 for ac_func in bpf_dump
4315 do
4316 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4317 echo "configure:4318: checking for $ac_func" >&5
4318 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4319 echo $ac_n "(cached) $ac_c" 1>&6
4320 else
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 /* System header to define __stub macros and hopefully few prototypes,
4325 which can conflict with char $ac_func(); below. */
4326 #include <assert.h>
4327 /* Override any gcc2 internal prototype to avoid an error. */
4328 /* We use char because int might match the return type of a gcc2
4329 builtin and then its argument prototype would still apply. */
4330 char $ac_func();
4331
4332 int main() {
4333
4334 /* The GNU C library defines this for functions which it implements
4335 to always fail with ENOSYS. Some functions are actually named
4336 something starting with __ and the normal name is an alias. */
4337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4338 choke me
4339 #else
4340 $ac_func();
4341 #endif
4342
4343 ; return 0; }
4344 EOF
4345 if { (eval echo configure:4346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4346 rm -rf conftest*
4347 eval "ac_cv_func_$ac_func=yes"
4348 else
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4351 rm -rf conftest*
4352 eval "ac_cv_func_$ac_func=no"
4353 fi
4354 rm -f conftest*
4355 fi
4356
4357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4358 echo "$ac_t""yes" 1>&6
4359 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4360 cat >> confdefs.h <<EOF
4361 #define $ac_tr_func 1
4362 EOF
4363
4364 else
4365 echo "$ac_t""no" 1>&6
4366 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
4367 fi
4368 done
4369
4370
4371 V_GROUP=0
4372 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
4373 V_GROUP=wheel
4374 fi
4375 case "$host_os" in
4376
4377 aix*)
4378 cat >> confdefs.h <<\EOF
4379 #define _SUN 1
4380 EOF
4381
4382 ;;
4383
4384 irix*)
4385 V_GROUP=sys
4386 ;;
4387
4388 osf*)
4389 V_GROUP=system
4390 ;;
4391
4392 solaris*)
4393 V_GROUP=sys
4394 ;;
4395 esac
4396
4397 if test -f /dev/bpf0 ; then
4398 V_GROUP=bpf
4399 fi
4400
4401 echo $ac_n "checking for int8_t using $CC""... $ac_c" 1>&6
4402 echo "configure:4403: checking for int8_t using $CC" >&5
4403 if eval "test \"`echo '$''{'ac_cv_lbl_have_int8_t'+set}'`\" = set"; then
4404 echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409
4410 # include "confdefs.h"
4411 # include <sys/types.h>
4412 # if STDC_HEADERS
4413 # include <stdlib.h>
4414 # include <stddef.h>
4415 # endif
4416 int main() {
4417 int8_t i
4418 ; return 0; }
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4421 rm -rf conftest*
4422 ac_cv_lbl_have_int8_t=yes
4423 else
4424 echo "configure: failed program was:" >&5
4425 cat conftest.$ac_ext >&5
4426 rm -rf conftest*
4427 ac_cv_lbl_have_int8_t=no
4428 fi
4429 rm -f conftest*
4430 fi
4431
4432 echo "$ac_t""$ac_cv_lbl_have_int8_t" 1>&6
4433 if test $ac_cv_lbl_have_int8_t = no ; then
4434 cat >> confdefs.h <<\EOF
4435 #define int8_t signed char
4436 EOF
4437
4438 fi
4439 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
4440 echo "configure:4441: checking for u_int8_t using $CC" >&5
4441 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
4442 echo $ac_n "(cached) $ac_c" 1>&6
4443 else
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447
4448 # include "confdefs.h"
4449 # include <sys/types.h>
4450 # if STDC_HEADERS
4451 # include <stdlib.h>
4452 # include <stddef.h>
4453 # endif
4454 int main() {
4455 u_int8_t i
4456 ; return 0; }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4459 rm -rf conftest*
4460 ac_cv_lbl_have_u_int8_t=yes
4461 else
4462 echo "configure: failed program was:" >&5
4463 cat conftest.$ac_ext >&5
4464 rm -rf conftest*
4465 ac_cv_lbl_have_u_int8_t=no
4466 fi
4467 rm -f conftest*
4468 fi
4469
4470 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
4471 if test $ac_cv_lbl_have_u_int8_t = no ; then
4472 cat >> confdefs.h <<\EOF
4473 #define u_int8_t u_char
4474 EOF
4475
4476 fi
4477 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
4478 echo "configure:4479: checking for int16_t using $CC" >&5
4479 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
4480 echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482 cat > conftest.$ac_ext <<EOF
4483 #line 4484 "configure"
4484 #include "confdefs.h"
4485
4486 # include "confdefs.h"
4487 # include <sys/types.h>
4488 # if STDC_HEADERS
4489 # include <stdlib.h>
4490 # include <stddef.h>
4491 # endif
4492 int main() {
4493 int16_t i
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4497 rm -rf conftest*
4498 ac_cv_lbl_have_int16_t=yes
4499 else
4500 echo "configure: failed program was:" >&5
4501 cat conftest.$ac_ext >&5
4502 rm -rf conftest*
4503 ac_cv_lbl_have_int16_t=no
4504 fi
4505 rm -f conftest*
4506 fi
4507
4508 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
4509 if test $ac_cv_lbl_have_int16_t = no ; then
4510 cat >> confdefs.h <<\EOF
4511 #define int16_t short
4512 EOF
4513
4514 fi
4515 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
4516 echo "configure:4517: checking for u_int16_t using $CC" >&5
4517 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
4518 echo $ac_n "(cached) $ac_c" 1>&6
4519 else
4520 cat > conftest.$ac_ext <<EOF
4521 #line 4522 "configure"
4522 #include "confdefs.h"
4523
4524 # include "confdefs.h"
4525 # include <sys/types.h>
4526 # if STDC_HEADERS
4527 # include <stdlib.h>
4528 # include <stddef.h>
4529 # endif
4530 int main() {
4531 u_int16_t i
4532 ; return 0; }
4533 EOF
4534 if { (eval echo configure:4535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4535 rm -rf conftest*
4536 ac_cv_lbl_have_u_int16_t=yes
4537 else
4538 echo "configure: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 rm -rf conftest*
4541 ac_cv_lbl_have_u_int16_t=no
4542 fi
4543 rm -f conftest*
4544 fi
4545
4546 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
4547 if test $ac_cv_lbl_have_u_int16_t = no ; then
4548 cat >> confdefs.h <<\EOF
4549 #define u_int16_t u_short
4550 EOF
4551
4552 fi
4553 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
4554 echo "configure:4555: checking for int32_t using $CC" >&5
4555 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
4556 echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561
4562 # include "confdefs.h"
4563 # include <sys/types.h>
4564 # if STDC_HEADERS
4565 # include <stdlib.h>
4566 # include <stddef.h>
4567 # endif
4568 int main() {
4569 int32_t i
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4573 rm -rf conftest*
4574 ac_cv_lbl_have_int32_t=yes
4575 else
4576 echo "configure: failed program was:" >&5
4577 cat conftest.$ac_ext >&5
4578 rm -rf conftest*
4579 ac_cv_lbl_have_int32_t=no
4580 fi
4581 rm -f conftest*
4582 fi
4583
4584 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
4585 if test $ac_cv_lbl_have_int32_t = no ; then
4586 cat >> confdefs.h <<\EOF
4587 #define int32_t int
4588 EOF
4589
4590 fi
4591 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
4592 echo "configure:4593: checking for u_int32_t using $CC" >&5
4593 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
4594 echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596 cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599
4600 # include "confdefs.h"
4601 # include <sys/types.h>
4602 # if STDC_HEADERS
4603 # include <stdlib.h>
4604 # include <stddef.h>
4605 # endif
4606 int main() {
4607 u_int32_t i
4608 ; return 0; }
4609 EOF
4610 if { (eval echo configure:4611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4611 rm -rf conftest*
4612 ac_cv_lbl_have_u_int32_t=yes
4613 else
4614 echo "configure: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
4616 rm -rf conftest*
4617 ac_cv_lbl_have_u_int32_t=no
4618 fi
4619 rm -f conftest*
4620 fi
4621
4622 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
4623 if test $ac_cv_lbl_have_u_int32_t = no ; then
4624 cat >> confdefs.h <<\EOF
4625 #define u_int32_t u_int
4626 EOF
4627
4628 fi
4629
4630 rm -f os-proto.h
4631 if test "${LBL_CFLAGS+set}" = set; then
4632 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
4633 fi
4634 if test -f .devel ; then
4635 if test "$GCC" = yes ; then
4636 if test "${LBL_CFLAGS+set}" != set; then
4637 if test "$ac_cv_prog_cc_g" = yes ; then
4638 V_CCOPT="-g $V_CCOPT"
4639 fi
4640 V_CCOPT="$V_CCOPT -Wall"
4641 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
4642 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
4643 fi
4644 fi
4645 else
4646 case "$host_os" in
4647
4648 irix6*)
4649 V_CCOPT="$V_CCOPT -n32"
4650 ;;
4651
4652 *)
4653 ;;
4654 esac
4655 fi
4656 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
4657 name="lbl/os-$os.h"
4658 if test -f $name ; then
4659 ln -s $name os-proto.h
4660 cat >> confdefs.h <<\EOF
4661 #define HAVE_OS_PROTO_H 1
4662 EOF
4663
4664 else
4665 echo "configure: warning: can't find $name" 1>&2
4666 fi
4667 fi
4668
4669 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4670 echo "configure:4671: checking if sockaddr struct has sa_len member" >&5
4671 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
4672 echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677
4678 # include <sys/types.h>
4679 # include <sys/socket.h>
4680 int main() {
4681 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4682 ; return 0; }
4683 EOF
4684 if { (eval echo configure:4685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4685 rm -rf conftest*
4686 ac_cv_lbl_sockaddr_has_sa_len=yes
4687 else
4688 echo "configure: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 rm -rf conftest*
4691 ac_cv_lbl_sockaddr_has_sa_len=no
4692 fi
4693 rm -f conftest*
4694 fi
4695
4696 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
4697 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
4698 cat >> confdefs.h <<\EOF
4699 #define HAVE_SOCKADDR_SA_LEN 1
4700 EOF
4701
4702 fi
4703
4704 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
4705 echo "configure:4706: checking if unaligned accesses fail" >&5
4706 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
4707 echo $ac_n "(cached) $ac_c" 1>&6
4708 else
4709 case "$host_cpu" in
4710
4711 #
4712 # These are CPU types where:
4713 #
4714 # the CPU faults on an unaligned access, but at least some
4715 # OSes that support that CPU catch the fault and simulate
4716 # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
4717 # the simulation is slow, so we don't want to use it;
4718 #
4719 # the CPU, I infer (from the old
4720 #
4721 # XXX: should also check that they don't do weird things (like on arm)
4722 #
4723 # comment) doesn't fault on unaligned accesses, but doesn't
4724 # do a normal unaligned fetch, either (e.g., presumably, ARM);
4725 #
4726 # for whatever reason, the test program doesn't work
4727 # (this has been claimed to be the case for several of those
4728 # CPUs - I don't know what the problem is; the problem
4729 # was reported as "the test program dumps core" for SuperH,
4730 # but that's what the test program is *supposed* to do -
4731 # it dumps core before it writes anything, so the test
4732 # for an empty output file should find an empty output
4733 # file and conclude that unaligned accesses don't work).
4734 #
4735 # This run-time test won't work if you're cross-compiling, so
4736 # in order to support cross-compiling for a particular CPU,
4737 # we have to wire in the list of CPU types anyway, as far as
4738 # I know, so perhaps we should just have a set of CPUs on
4739 # which we know it doesn't work, a set of CPUs on which we
4740 # know it does work, and have the script just fail on other
4741 # cpu types and update it when such a failure occurs.
4742 #
4743 alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1)
4744 ac_cv_lbl_unaligned_fail=yes
4745 ;;
4746
4747 *)
4748 cat >conftest.c <<EOF
4749 # include <sys/types.h>
4750 # include <sys/wait.h>
4751 # include <stdio.h>
4752 unsigned char a[5] = { 1, 2, 3, 4, 5 };
4753 main() {
4754 unsigned int i;
4755 pid_t pid;
4756 int status;
4757 /* avoid "core dumped" message */
4758 pid = fork();
4759 if (pid < 0)
4760 exit(2);
4761 if (pid > 0) {
4762 /* parent */
4763 pid = waitpid(pid, &status, 0);
4764 if (pid < 0)
4765 exit(3);
4766 exit(!WIFEXITED(status));
4767 }
4768 /* child */
4769 i = *(unsigned int *)&a[1];
4770 printf("%d\n", i);
4771 exit(0);
4772 }
4773 EOF
4774 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
4775 conftest.c $LIBS >/dev/null 2>&1
4776 if test ! -x conftest ; then
4777 ac_cv_lbl_unaligned_fail=yes
4778 else
4779 ./conftest >conftest.out
4780 if test ! -s conftest.out ; then
4781 ac_cv_lbl_unaligned_fail=yes
4782 else
4783 ac_cv_lbl_unaligned_fail=no
4784 fi
4785 fi
4786 rm -f conftest* core core.conftest
4787 ;;
4788 esac
4789 fi
4790
4791 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
4792 if test $ac_cv_lbl_unaligned_fail = yes ; then
4793 cat >> confdefs.h <<\EOF
4794 #define LBL_ALIGN 1
4795 EOF
4796
4797 fi
4798
4799
4800 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
4801 echo "configure:4802: checking for h_errno" >&5
4802 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
4803 echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805 cat > conftest.$ac_ext <<EOF
4806 #line 4807 "configure"
4807 #include "confdefs.h"
4808
4809 # include <sys/types.h>
4810 # include <netdb.h>
4811 int main() {
4812 int foo = h_errno;
4813 ; return 0; }
4814 EOF
4815 if { (eval echo configure:4816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4816 rm -rf conftest*
4817 ac_cv_var_h_errno=yes
4818 else
4819 echo "configure: failed program was:" >&5
4820 cat conftest.$ac_ext >&5
4821 rm -rf conftest*
4822 ac_cv_var_h_errno=no
4823 fi
4824 rm -f conftest*
4825 fi
4826
4827 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
4828 if test "$ac_cv_var_h_errno" = "yes"; then
4829 cat >> confdefs.h <<\EOF
4830 #define HAVE_H_ERRNO 1
4831 EOF
4832
4833 fi
4834
4835
4836 # Check whether --with-crypto or --without-crypto was given.
4837 if test "${with_crypto+set}" = set; then
4838 withval="$with_crypto"
4839 :
4840 else
4841
4842 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
4843 echo "configure:4844: checking for SSLeay" >&5
4844 ac_cv_ssleay_path=no
4845 incdir=no
4846 for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
4847 #
4848 # XXX - is there a better way to check if a given library is
4849 # in a given directory than checking each of the possible
4850 # shared library suffixes?
4851 #
4852 # Are there any other suffixes we need to look for? Do we have to
4853 # worry about ".so.{version}"?
4854 #
4855 # Or should we just look for "libcrypto.*"?
4856 #
4857 if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \
4858 -f $dir/lib/libcrypto.so -o \
4859 -f $dir/lib/libcrypto.sl -o \
4860 -f $dir/lib/libcrypto.dylib \); then
4861 ac_cv_ssleay_path=$dir
4862 fi
4863 if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4864 incdir="-I$dir/include"
4865 fi
4866 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4867 break;
4868 else
4869 ac_cv_ssleay_path=no
4870 incdir=no
4871 fi
4872 done
4873 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4874 if test "$ac_cv_ssleay_path" != no; then
4875 V_INCLS="$V_INCLS $incdir"
4876 LDFLAGS="-L$dir/lib $LDFLAGS"
4877 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
4878 LIBS="$LIBS -lRSAglue"
4879 fi
4880 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
4881 LIBS="$LIBS -lrsaref"
4882 fi
4883 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4884 echo "configure:4885: checking for des_cbc_encrypt in -lcrypto" >&5
4885 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4887 echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889 ac_save_LIBS="$LIBS"
4890 LIBS="-lcrypto $LIBS"
4891 cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 /* Override any gcc2 internal prototype to avoid an error. */
4895 /* We use char because int might match the return type of a gcc2
4896 builtin and then its argument prototype would still apply. */
4897 char des_cbc_encrypt();
4898
4899 int main() {
4900 des_cbc_encrypt()
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4904 rm -rf conftest*
4905 eval "ac_cv_lib_$ac_lib_var=yes"
4906 else
4907 echo "configure: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
4909 rm -rf conftest*
4910 eval "ac_cv_lib_$ac_lib_var=no"
4911 fi
4912 rm -f conftest*
4913 LIBS="$ac_save_LIBS"
4914
4915 fi
4916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4917 echo "$ac_t""yes" 1>&6
4918 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4919 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4920 cat >> confdefs.h <<EOF
4921 #define $ac_tr_lib 1
4922 EOF
4923
4924 LIBS="-lcrypto $LIBS"
4925
4926 else
4927 echo "$ac_t""no" 1>&6
4928 fi
4929
4930
4931 CPPFLAGS="$CPPFLAGS $V_INCLS"
4932 for ac_hdr in openssl/evp.h
4933 do
4934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4936 echo "configure:4937: checking for $ac_hdr" >&5
4937 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4938 echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940 cat > conftest.$ac_ext <<EOF
4941 #line 4942 "configure"
4942 #include "confdefs.h"
4943 #include <$ac_hdr>
4944 EOF
4945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4946 { (eval echo configure:4947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4948 if test -z "$ac_err"; then
4949 rm -rf conftest*
4950 eval "ac_cv_header_$ac_safe=yes"
4951 else
4952 echo "$ac_err" >&5
4953 echo "configure: failed program was:" >&5
4954 cat conftest.$ac_ext >&5
4955 rm -rf conftest*
4956 eval "ac_cv_header_$ac_safe=no"
4957 fi
4958 rm -f conftest*
4959 fi
4960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4961 echo "$ac_t""yes" 1>&6
4962 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4963 cat >> confdefs.h <<EOF
4964 #define $ac_tr_hdr 1
4965 EOF
4966
4967 else
4968 echo "$ac_t""no" 1>&6
4969 fi
4970 done
4971
4972 fi
4973
4974 fi
4975
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