]> The Tcpdump Group git mirrors - tcpdump/blob - configure
Don't bother printing the amount of memory we tried to allocate if the
[tcpdump] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.162
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 fi
1188 echo "$ac_t""$ac_cv___attribute__" 1>&6
1189
1190
1191 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1192 echo "configure:1193: checking how to run the C preprocessor" >&5
1193 # On Suns, sometimes $CPP names a directory.
1194 if test -n "$CPP" && test -d "$CPP"; then
1195 CPP=
1196 fi
1197 if test -z "$CPP"; then
1198 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201 # This must be in double quotes, not single quotes, because CPP may get
1202 # substituted into the Makefile and "${CC-cc}" will confuse make.
1203 CPP="${CC-cc} -E"
1204 # On the NeXT, cc -E runs the code through the compiler's parser,
1205 # not just through cpp.
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1209 #include <assert.h>
1210 Syntax Error
1211 EOF
1212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1213 { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1215 if test -z "$ac_err"; then
1216 :
1217 else
1218 echo "$ac_err" >&5
1219 echo "configure: failed program was:" >&5
1220 cat conftest.$ac_ext >&5
1221 rm -rf conftest*
1222 CPP="${CC-cc} -E -traditional-cpp"
1223 cat > conftest.$ac_ext <<EOF
1224 #line 1225 "configure"
1225 #include "confdefs.h"
1226 #include <assert.h>
1227 Syntax Error
1228 EOF
1229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1230 { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1232 if test -z "$ac_err"; then
1233 :
1234 else
1235 echo "$ac_err" >&5
1236 echo "configure: failed program was:" >&5
1237 cat conftest.$ac_ext >&5
1238 rm -rf conftest*
1239 CPP="${CC-cc} -nologo -E"
1240 cat > conftest.$ac_ext <<EOF
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243 #include <assert.h>
1244 Syntax Error
1245 EOF
1246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1247 { (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1249 if test -z "$ac_err"; then
1250 :
1251 else
1252 echo "$ac_err" >&5
1253 echo "configure: failed program was:" >&5
1254 cat conftest.$ac_ext >&5
1255 rm -rf conftest*
1256 CPP=/lib/cpp
1257 fi
1258 rm -f conftest*
1259 fi
1260 rm -f conftest*
1261 fi
1262 rm -f conftest*
1263 ac_cv_prog_CPP="$CPP"
1264 fi
1265 CPP="$ac_cv_prog_CPP"
1266 else
1267 ac_cv_prog_CPP="$CPP"
1268 fi
1269 echo "$ac_t""$CPP" 1>&6
1270
1271 for ac_hdr in fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h netinet/ether.h
1272 do
1273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1275 echo "configure:1276: checking for $ac_hdr" >&5
1276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1277 echo $ac_n "(cached) $ac_c" 1>&6
1278 else
1279 cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282 #include <$ac_hdr>
1283 EOF
1284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1285 { (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1287 if test -z "$ac_err"; then
1288 rm -rf conftest*
1289 eval "ac_cv_header_$ac_safe=yes"
1290 else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
1295 eval "ac_cv_header_$ac_safe=no"
1296 fi
1297 rm -f conftest*
1298 fi
1299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1300 echo "$ac_t""yes" 1>&6
1301 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1302 cat >> confdefs.h <<EOF
1303 #define $ac_tr_hdr 1
1304 EOF
1305
1306 else
1307 echo "$ac_t""no" 1>&6
1308 fi
1309 done
1310
1311 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1312 echo "configure:1313: checking whether time.h and sys/time.h may both be included" >&5
1313 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315 else
1316 cat > conftest.$ac_ext <<EOF
1317 #line 1318 "configure"
1318 #include "confdefs.h"
1319 #include <sys/types.h>
1320 #include <sys/time.h>
1321 #include <time.h>
1322 int main() {
1323 struct tm *tp;
1324 ; return 0; }
1325 EOF
1326 if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1327 rm -rf conftest*
1328 ac_cv_header_time=yes
1329 else
1330 echo "configure: failed program was:" >&5
1331 cat conftest.$ac_ext >&5
1332 rm -rf conftest*
1333 ac_cv_header_time=no
1334 fi
1335 rm -f conftest*
1336 fi
1337
1338 echo "$ac_t""$ac_cv_header_time" 1>&6
1339 if test $ac_cv_header_time = yes; then
1340 cat >> confdefs.h <<\EOF
1341 #define TIME_WITH_SYS_TIME 1
1342 EOF
1343
1344 fi
1345
1346
1347 case "$host_os" in
1348
1349 linux*)
1350 echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1351 echo "configure:1352: checking Linux kernel version" >&5
1352 if test "$cross_compiling" = yes; then
1353 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1354 echo $ac_n "(cached) $ac_c" 1>&6
1355 else
1356 ac_cv_linux_vers=unknown
1357 fi
1358
1359 else
1360 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
1362 else
1363 ac_cv_linux_vers=`uname -r 2>&1 | \
1364 sed -n -e '$s/.* //' -e '$s/\..*//p'`
1365 fi
1366
1367 fi
1368 echo "$ac_t""$ac_cv_linux_vers" 1>&6
1369 if test $ac_cv_linux_vers = unknown ; then
1370 { echo "configure: error: cannot determine linux version when cross-compiling" 1>&2; exit 1; }
1371 fi
1372 if test $ac_cv_linux_vers -lt 2 ; then
1373 { echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
1374 fi
1375 ;;
1376
1377 *)
1378 ;;
1379 esac
1380
1381
1382 for ac_hdr in smi.h
1383 do
1384 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1385 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1386 echo "configure:1387: checking for $ac_hdr" >&5
1387 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390 cat > conftest.$ac_ext <<EOF
1391 #line 1392 "configure"
1392 #include "confdefs.h"
1393 #include <$ac_hdr>
1394 EOF
1395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1396 { (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1398 if test -z "$ac_err"; then
1399 rm -rf conftest*
1400 eval "ac_cv_header_$ac_safe=yes"
1401 else
1402 echo "$ac_err" >&5
1403 echo "configure: failed program was:" >&5
1404 cat conftest.$ac_ext >&5
1405 rm -rf conftest*
1406 eval "ac_cv_header_$ac_safe=no"
1407 fi
1408 rm -f conftest*
1409 fi
1410 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1411 echo "$ac_t""yes" 1>&6
1412 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1413 cat >> confdefs.h <<EOF
1414 #define $ac_tr_hdr 1
1415 EOF
1416
1417 else
1418 echo "$ac_t""no" 1>&6
1419 fi
1420 done
1421
1422 echo $ac_n "checking for smiInit in -lsmi""... $ac_c" 1>&6
1423 echo "configure:1424: checking for smiInit in -lsmi" >&5
1424 ac_lib_var=`echo smi'_'smiInit | sed 'y%./+-%__p_%'`
1425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1426 echo $ac_n "(cached) $ac_c" 1>&6
1427 else
1428 ac_save_LIBS="$LIBS"
1429 LIBS="-lsmi $LIBS"
1430 cat > conftest.$ac_ext <<EOF
1431 #line 1432 "configure"
1432 #include "confdefs.h"
1433 /* Override any gcc2 internal prototype to avoid an error. */
1434 /* We use char because int might match the return type of a gcc2
1435 builtin and then its argument prototype would still apply. */
1436 char smiInit();
1437
1438 int main() {
1439 smiInit()
1440 ; return 0; }
1441 EOF
1442 if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1443 rm -rf conftest*
1444 eval "ac_cv_lib_$ac_lib_var=yes"
1445 else
1446 echo "configure: failed program was:" >&5
1447 cat conftest.$ac_ext >&5
1448 rm -rf conftest*
1449 eval "ac_cv_lib_$ac_lib_var=no"
1450 fi
1451 rm -f conftest*
1452 LIBS="$ac_save_LIBS"
1453
1454 fi
1455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1456 echo "$ac_t""yes" 1>&6
1457 ac_tr_lib=HAVE_LIB`echo smi | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1458 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1459 cat >> confdefs.h <<EOF
1460 #define $ac_tr_lib 1
1461 EOF
1462
1463 LIBS="-lsmi $LIBS"
1464
1465 else
1466 echo "$ac_t""no" 1>&6
1467 fi
1468
1469 if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
1470 then
1471 echo $ac_n "checking whether to enable libsmi""... $ac_c" 1>&6
1472 echo "configure:1473: checking whether to enable libsmi" >&5
1473 if test "$cross_compiling" = yes; then
1474 echo "$ac_t""not when cross-compiling" 1>&6
1475 libsmi=no
1476
1477 else
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1481 /* libsmi available check */
1482 #include <smi.h>
1483 main()
1484 {
1485 int current, revision, age, n;
1486 const int required = 2;
1487 if (smiInit(""))
1488 exit(1);
1489 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
1490 exit(2);
1491 n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
1492 if (n != 3)
1493 exit(3);
1494 if (required < current - age || required > current)
1495 exit(4);
1496 exit(0);
1497 }
1498
1499 EOF
1500 if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1501 then
1502 echo "$ac_t""yes" 1>&6
1503 cat >> confdefs.h <<\EOF
1504 #define LIBSMI 1
1505 EOF
1506
1507 libsmi=yes
1508 else
1509 echo "configure: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1511 rm -fr conftest*
1512 case $? in
1513 1) echo "$ac_t""no - smiInit failed" 1>&6 ;;
1514 2) echo "$ac_t""no - header/library version mismatch" 1>&6 ;;
1515 3) echo "$ac_t""no - can't determine library version" 1>&6 ;;
1516 4) echo "$ac_t""no - too old" 1>&6 ;;
1517 *) echo "$ac_t""no" 1>&6 ;;
1518 esac
1519 libsmi=no
1520 fi
1521 rm -fr conftest*
1522 fi
1523
1524 fi
1525
1526 echo $ac_n "checking whether to enable the possibly-buggy SMB printer""... $ac_c" 1>&6
1527 echo "configure:1528: checking whether to enable the possibly-buggy SMB printer" >&5
1528 # Check whether --enable-smb or --disable-smb was given.
1529 if test "${enable_smb+set}" = set; then
1530 enableval="$enable_smb"
1531 :
1532 else
1533 enableval=yes
1534 fi
1535
1536 case "$enableval" in
1537 yes) echo "$ac_t""yes" 1>&6
1538 echo "configure: warning: The SMB printer may have exploitable buffer overflows!!!" 1>&2
1539 cat >> confdefs.h <<\EOF
1540 #define TCPDUMP_DO_SMB 1
1541 EOF
1542
1543 LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
1544 ;;
1545 *) echo "$ac_t""no" 1>&6
1546 ;;
1547 esac
1548
1549 echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
1550 echo "configure:1551: checking whether to enable ipv6" >&5
1551 # Check whether --enable-ipv6 or --disable-ipv6 was given.
1552 if test "${enable_ipv6+set}" = set; then
1553 enableval="$enable_ipv6"
1554 case "$enableval" in
1555 yes) echo "$ac_t""yes" 1>&6
1556 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"
1557 cat >> confdefs.h <<\EOF
1558 #define INET6 1
1559 EOF
1560
1561 ipv6=yes
1562 ;;
1563 *)
1564 echo "$ac_t""no" 1>&6
1565 ipv6=no
1566 ;;
1567 esac
1568 else
1569 if test "$cross_compiling" = yes; then
1570 echo "$ac_t""no" 1>&6
1571 ipv6=no
1572
1573 else
1574 cat > conftest.$ac_ext <<EOF
1575 #line 1576 "configure"
1576 #include "confdefs.h"
1577 /* AF_INET6 available check */
1578 #include <sys/types.h>
1579 #include <sys/socket.h>
1580 main()
1581 {
1582 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1583 exit(1);
1584 else
1585 exit(0);
1586 }
1587
1588 EOF
1589 if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1590 then
1591 echo "$ac_t""yes" 1>&6
1592 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"
1593 cat >> confdefs.h <<\EOF
1594 #define INET6 1
1595 EOF
1596
1597 ipv6=yes
1598 else
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1601 rm -fr conftest*
1602 echo "$ac_t""no" 1>&6
1603 ipv6=no
1604 fi
1605 rm -fr conftest*
1606 fi
1607
1608 fi
1609
1610
1611 ipv6type=unknown
1612 ipv6lib=none
1613 ipv6trylibc=no
1614
1615 if test "$ipv6" = "yes"; then
1616 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
1617 echo "configure:1618: checking ipv6 stack type" >&5
1618 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
1619 case $i in
1620 inria)
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1624 dnl
1625 #include <netinet/in.h>
1626 #ifdef IPV6_INRIA_VERSION
1627 yes
1628 #endif
1629 EOF
1630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1631 egrep "yes" >/dev/null 2>&1; then
1632 rm -rf conftest*
1633 ipv6type=$i;
1634 CFLAGS="-DINET6 $CFLAGS"
1635 fi
1636 rm -f conftest*
1637
1638 ;;
1639 kame)
1640 cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 dnl
1644 #include <netinet/in.h>
1645 #ifdef __KAME__
1646 yes
1647 #endif
1648 EOF
1649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1650 egrep "yes" >/dev/null 2>&1; then
1651 rm -rf conftest*
1652 ipv6type=$i;
1653 ipv6lib=inet6;
1654 ipv6libdir=/usr/local/v6/lib;
1655 ipv6trylibc=yes;
1656 CFLAGS="-DINET6 $CFLAGS"
1657 fi
1658 rm -f conftest*
1659
1660 ;;
1661 linux-glibc)
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 dnl
1666 #include <features.h>
1667 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
1668 yes
1669 #endif
1670 EOF
1671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1672 egrep "yes" >/dev/null 2>&1; then
1673 rm -rf conftest*
1674 ipv6type=$i;
1675 CFLAGS="-DINET6 $CFLAGS"
1676 fi
1677 rm -f conftest*
1678
1679 ;;
1680 linux-libinet6)
1681 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
1682 ipv6type=$i
1683 ipv6lib=inet6
1684 ipv6libdir=/usr/inet6/lib
1685 ipv6trylibc=yes;
1686 CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
1687 fi
1688 ;;
1689 toshiba)
1690 cat > conftest.$ac_ext <<EOF
1691 #line 1692 "configure"
1692 #include "confdefs.h"
1693 dnl
1694 #include <sys/param.h>
1695 #ifdef _TOSHIBA_INET6
1696 yes
1697 #endif
1698 EOF
1699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1700 egrep "yes" >/dev/null 2>&1; then
1701 rm -rf conftest*
1702 ipv6type=$i;
1703 ipv6lib=inet6;
1704 ipv6libdir=/usr/local/v6/lib;
1705 CFLAGS="-DINET6 $CFLAGS"
1706 fi
1707 rm -f conftest*
1708
1709 ;;
1710 v6d)
1711 cat > conftest.$ac_ext <<EOF
1712 #line 1713 "configure"
1713 #include "confdefs.h"
1714 dnl
1715 #include </usr/local/v6/include/sys/v6config.h>
1716 #ifdef __V6D__
1717 yes
1718 #endif
1719 EOF
1720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1721 egrep "yes" >/dev/null 2>&1; then
1722 rm -rf conftest*
1723 ipv6type=$i;
1724 ipv6lib=v6;
1725 ipv6libdir=/usr/local/v6/lib;
1726 CFLAGS="-I/usr/local/v6/include $CFLAGS"
1727 fi
1728 rm -f conftest*
1729
1730 ;;
1731 zeta)
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1734 "configure"
1734 #include "confdefs.h"
1735 dnl
1736 #include <sys/param.h>
1737 #ifdef _ZETA_MINAMI_INET6
1738 yes
1739 #endif
1740 EOF
1741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1742 egrep "yes" >/dev/null 2>&1; then
1743 rm -rf conftest*
1744 ipv6type=$i;
1745 ipv6lib=inet6;
1746 ipv6libdir=/usr/local/v6/lib;
1747 CFLAGS="-DINET6 $CFLAGS"
1748 fi
1749 rm -f conftest*
1750
1751 ;;
1752 esac
1753 if test "$ipv6type" != "unknown"; then
1754 break
1755 fi
1756 done
1757 echo "$ac_t""$ipv6type" 1>&6
1758 fi
1759
1760 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1761 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1762 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1763 echo "You have $ipv6lib library, using it"
1764 else
1765 if test "$ipv6trylibc" = "yes"; then
1766 echo "You do not have $ipv6lib library, using libc"
1767 else
1768 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1769 echo "You need to fetch lib$ipv6lib.a from appropriate"
1770 echo 'ipv6 kit and compile beforehand.'
1771 exit 1
1772 fi
1773 fi
1774 fi
1775
1776
1777 if test "$ipv6" = "yes"; then
1778 #
1779 # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
1780 # function in libc; there are "ngetaddrinfo()" and
1781 # "ogetaddrinfo()" functions, and <netdb.h> #defines
1782 # "getaddrinfo" to be either "ngetaddrinfo" or
1783 # "ogetaddrinfo", depending on whether _SOCKADDR_LEN
1784 # or _XOPEN_SOURCE_EXTENDED are defined or not.
1785 #
1786 # So this test doesn't work on Tru64 5.1, and possibly
1787 # on other 5.x releases. This causes the configure
1788 # script to become confused, and results in libpcap
1789 # being unbuildable.
1790 #
1791
1792 echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
1793 echo "configure:1794: checking for library containing getaddrinfo" >&5
1794 if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
1795 echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797 ac_func_search_save_LIBS="$LIBS"
1798 ac_cv_search_getaddrinfo="no"
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 /* Override any gcc2 internal prototype to avoid an error. */
1803 /* We use char because int might match the return type of a gcc2
1804 builtin and then its argument prototype would still apply. */
1805 char getaddrinfo();
1806
1807 int main() {
1808 getaddrinfo()
1809 ; return 0; }
1810 EOF
1811 if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1812 rm -rf conftest*
1813 ac_cv_search_getaddrinfo="none required"
1814 else
1815 echo "configure: failed program was:" >&5
1816 cat conftest.$ac_ext >&5
1817 fi
1818 rm -f conftest*
1819 test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do
1820 LIBS="-l$i $ac_func_search_save_LIBS"
1821 cat > conftest.$ac_ext <<EOF
1822 #line 1823 "configure"
1823 #include "confdefs.h"
1824 /* Override any gcc2 internal prototype to avoid an error. */
1825 /* We use char because int might match the return type of a gcc2
1826 builtin and then its argument prototype would still apply. */
1827 char getaddrinfo();
1828
1829 int main() {
1830 getaddrinfo()
1831 ; return 0; }
1832 EOF
1833 if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1834 rm -rf conftest*
1835 ac_cv_search_getaddrinfo="-l$i"
1836 break
1837 else
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1840 fi
1841 rm -f conftest*
1842 done
1843 LIBS="$ac_func_search_save_LIBS"
1844 fi
1845
1846 echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
1847 if test "$ac_cv_search_getaddrinfo" != "no"; then
1848 test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
1849 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
1850 echo "configure:1851: checking getaddrinfo bug" >&5
1851 if eval "test \"`echo '$''{'td_cv_buggygetaddrinfo'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1853 else
1854 if test "$cross_compiling" = yes; then
1855 td_cv_buggygetaddrinfo=yes
1856 else
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860
1861 #include <sys/types.h>
1862 #include <netdb.h>
1863 #include <string.h>
1864 #include <sys/socket.h>
1865 #include <netinet/in.h>
1866
1867 main()
1868 {
1869 int passive, gaierr, inet4 = 0, inet6 = 0;
1870 struct addrinfo hints, *ai, *aitop;
1871 char straddr[INET6_ADDRSTRLEN], strport[16];
1872
1873 for (passive = 0; passive <= 1; passive++) {
1874 memset(&hints, 0, sizeof(hints));
1875 hints.ai_family = AF_UNSPEC;
1876 hints.ai_flags = passive ? AI_PASSIVE : 0;
1877 hints.ai_socktype = SOCK_STREAM;
1878 hints.ai_protocol = IPPROTO_TCP;
1879 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
1880 (void)gai_strerror(gaierr);
1881 goto bad;
1882 }
1883 for (ai = aitop; ai; ai = ai->ai_next) {
1884 if (ai->ai_addr == NULL ||
1885 ai->ai_addrlen == 0 ||
1886 getnameinfo(ai->ai_addr, ai->ai_addrlen,
1887 straddr, sizeof(straddr), strport, sizeof(strport),
1888 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
1889 goto bad;
1890 }
1891 switch (ai->ai_family) {
1892 case AF_INET:
1893 if (strcmp(strport, "54321") != 0) {
1894 goto bad;
1895 }
1896 if (passive) {
1897 if (strcmp(straddr, "0.0.0.0") != 0) {
1898 goto bad;
1899 }
1900 } else {
1901 if (strcmp(straddr, "127.0.0.1") != 0) {
1902 goto bad;
1903 }
1904 }
1905 inet4++;
1906 break;
1907 case AF_INET6:
1908 if (strcmp(strport, "54321") != 0) {
1909 goto bad;
1910 }
1911 if (passive) {
1912 if (strcmp(straddr, "::") != 0) {
1913 goto bad;
1914 }
1915 } else {
1916 if (strcmp(straddr, "::1") != 0) {
1917 goto bad;
1918 }
1919 }
1920 inet6++;
1921 break;
1922 case AF_UNSPEC:
1923 goto bad;
1924 break;
1925 #ifdef AF_UNIX
1926 case AF_UNIX:
1927 #else
1928 #ifdef AF_LOCAL
1929 case AF_LOCAL:
1930 #endif
1931 #endif
1932 default:
1933 /* another family support? */
1934 break;
1935 }
1936 }
1937 }
1938
1939 /* supported family should be 2, unsupported family should be 0 */
1940 if (!(inet4 == 0 || inet4 == 2))
1941 goto bad;
1942 if (!(inet6 == 0 || inet6 == 2))
1943 goto bad;
1944
1945 if (aitop)
1946 freeaddrinfo(aitop);
1947 exit(0);
1948
1949 bad:
1950 if (aitop)
1951 freeaddrinfo(aitop);
1952 exit(1);
1953 }
1954
1955 EOF
1956 if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1957 then
1958 td_cv_buggygetaddrinfo=no
1959 else
1960 echo "configure: failed program was:" >&5
1961 cat conftest.$ac_ext >&5
1962 rm -fr conftest*
1963 td_cv_buggygetaddrinfo=yes
1964 fi
1965 rm -fr conftest*
1966 fi
1967
1968 fi
1969
1970 if test "$td_cv_buggygetaddrinfo" = no; then
1971 echo "$ac_t""good" 1>&6
1972 else
1973 echo "$ac_t""buggy" 1>&6
1974 fi
1975
1976 if test "$td_cv_buggygetaddrinfo" = "yes"; then
1977 #
1978 # XXX - it doesn't appear that "ipv6type" can ever be
1979 # set to "linux". Should this be testing for
1980 # "linux-glibc", or for that *or* "linux-libinet6"?
1981 # If the latter, note that "linux-libinet6" is also
1982 # the type given to some non-Linux OSes.
1983 #
1984 if test "$ipv6type" != "linux"; then
1985 echo 'Fatal: You must get working getaddrinfo() function.'
1986 echo ' or you can specify "--disable-ipv6"'.
1987 exit 1
1988 else
1989 echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
1990 echo ' Better upgrade your system library to newest version'
1991 echo ' of GNU C library (aka glibc).'
1992 fi
1993 fi
1994
1995 else :
1996
1997 fi
1998 for ac_func in getaddrinfo getnameinfo
1999 do
2000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2001 echo "configure:2002: checking for $ac_func" >&5
2002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2003 echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005 cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 /* System header to define __stub macros and hopefully few prototypes,
2009 which can conflict with char $ac_func(); below. */
2010 #include <assert.h>
2011 /* Override any gcc2 internal prototype to avoid an error. */
2012 /* We use char because int might match the return type of a gcc2
2013 builtin and then its argument prototype would still apply. */
2014 char $ac_func();
2015
2016 int main() {
2017
2018 /* The GNU C library defines this for functions which it implements
2019 to always fail with ENOSYS. Some functions are actually named
2020 something starting with __ and the normal name is an alias. */
2021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2022 choke me
2023 #else
2024 $ac_func();
2025 #endif
2026
2027 ; return 0; }
2028 EOF
2029 if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2030 rm -rf conftest*
2031 eval "ac_cv_func_$ac_func=yes"
2032 else
2033 echo "configure: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 rm -rf conftest*
2036 eval "ac_cv_func_$ac_func=no"
2037 fi
2038 rm -f conftest*
2039 fi
2040
2041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2042 echo "$ac_t""yes" 1>&6
2043 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2044 cat >> confdefs.h <<EOF
2045 #define $ac_tr_func 1
2046 EOF
2047
2048 else
2049 echo "$ac_t""no" 1>&6
2050 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2051 fi
2052 done
2053
2054
2055 fi
2056 echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
2057 echo "configure:2058: checking for inet_ntop" >&5
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2061 #include <sys/types.h>
2062 #include <sys/socket.h>
2063 #include <netinet/in.h>
2064 #include <arpa/inet.h>
2065 int main() {
2066 char src[4], dst[128];
2067 inet_ntop(AF_INET, src, dst, sizeof(dst));
2068 ; return 0; }
2069 EOF
2070 if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2071 rm -rf conftest*
2072 echo "$ac_t""yes" 1>&6
2073 else
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2076 rm -rf conftest*
2077 echo "$ac_t""no" 1>&6
2078 for ac_func in inet_ntop
2079 do
2080 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_func" >&5
2082 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085 cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 /* System header to define __stub macros and hopefully few prototypes,
2089 which can conflict with char $ac_func(); below. */
2090 #include <assert.h>
2091 /* Override any gcc2 internal prototype to avoid an error. */
2092 /* We use char because int might match the return type of a gcc2
2093 builtin and then its argument prototype would still apply. */
2094 char $ac_func();
2095
2096 int main() {
2097
2098 /* The GNU C library defines this for functions which it implements
2099 to always fail with ENOSYS. Some functions are actually named
2100 something starting with __ and the normal name is an alias. */
2101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2102 choke me
2103 #else
2104 $ac_func();
2105 #endif
2106
2107 ; return 0; }
2108 EOF
2109 if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2110 rm -rf conftest*
2111 eval "ac_cv_func_$ac_func=yes"
2112 else
2113 echo "configure: failed program was:" >&5
2114 cat conftest.$ac_ext >&5
2115 rm -rf conftest*
2116 eval "ac_cv_func_$ac_func=no"
2117 fi
2118 rm -f conftest*
2119 fi
2120
2121 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2122 echo "$ac_t""yes" 1>&6
2123 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2124 cat >> confdefs.h <<EOF
2125 #define $ac_tr_func 1
2126 EOF
2127
2128 else
2129 echo "$ac_t""no" 1>&6
2130 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2131 fi
2132 done
2133
2134
2135 fi
2136 rm -f conftest*
2137 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
2138 echo "configure:2139: checking for inet_pton" >&5
2139 cat > conftest.$ac_ext <<EOF
2140 #line 2141 "configure"
2141 #include "confdefs.h"
2142 #include <sys/types.h>
2143 #include <sys/socket.h>
2144 #include <netinet/in.h>
2145 #include <arpa/inet.h>
2146 int main() {
2147 char src[128], dst[4];
2148 inet_pton(AF_INET, src, dst);
2149 ; return 0; }
2150 EOF
2151 if { (eval echo configure:2152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2152 rm -rf conftest*
2153 echo "$ac_t""yes" 1>&6
2154 else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 echo "$ac_t""no" 1>&6
2159 for ac_func in inet_pton
2160 do
2161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_func" >&5
2163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2164 echo $ac_n "(cached) $ac_c" 1>&6
2165 else
2166 cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 /* System header to define __stub macros and hopefully few prototypes,
2170 which can conflict with char $ac_func(); below. */
2171 #include <assert.h>
2172 /* Override any gcc2 internal prototype to avoid an error. */
2173 /* We use char because int might match the return type of a gcc2
2174 builtin and then its argument prototype would still apply. */
2175 char $ac_func();
2176
2177 int main() {
2178
2179 /* The GNU C library defines this for functions which it implements
2180 to always fail with ENOSYS. Some functions are actually named
2181 something starting with __ and the normal name is an alias. */
2182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2183 choke me
2184 #else
2185 $ac_func();
2186 #endif
2187
2188 ; return 0; }
2189 EOF
2190 if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2191 rm -rf conftest*
2192 eval "ac_cv_func_$ac_func=yes"
2193 else
2194 echo "configure: failed program was:" >&5
2195 cat conftest.$ac_ext >&5
2196 rm -rf conftest*
2197 eval "ac_cv_func_$ac_func=no"
2198 fi
2199 rm -f conftest*
2200 fi
2201
2202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2203 echo "$ac_t""yes" 1>&6
2204 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2205 cat >> confdefs.h <<EOF
2206 #define $ac_tr_func 1
2207 EOF
2208
2209 else
2210 echo "$ac_t""no" 1>&6
2211 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2212 fi
2213 done
2214
2215
2216 fi
2217 rm -f conftest*
2218 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
2219 echo "configure:2220: checking for inet_aton" >&5
2220 cat > conftest.$ac_ext <<EOF
2221 #line 2222 "configure"
2222 #include "confdefs.h"
2223 #include <sys/types.h>
2224 #include <netinet/in.h>
2225 #include <arpa/inet.h>
2226 int main() {
2227 char src[128];
2228 struct in_addr dst;
2229 inet_aton(src, &dst);
2230 ; return 0; }
2231 EOF
2232 if { (eval echo configure:2233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2233 rm -rf conftest*
2234 echo "$ac_t""yes" 1>&6
2235 else
2236 echo "configure: failed program was:" >&5
2237 cat conftest.$ac_ext >&5
2238 rm -rf conftest*
2239 echo "$ac_t""no" 1>&6
2240 for ac_func in inet_aton
2241 do
2242 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2243 echo "configure:2244: checking for $ac_func" >&5
2244 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2245 echo $ac_n "(cached) $ac_c" 1>&6
2246 else
2247 cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 /* System header to define __stub macros and hopefully few prototypes,
2251 which can conflict with char $ac_func(); below. */
2252 #include <assert.h>
2253 /* Override any gcc2 internal prototype to avoid an error. */
2254 /* We use char because int might match the return type of a gcc2
2255 builtin and then its argument prototype would still apply. */
2256 char $ac_func();
2257
2258 int main() {
2259
2260 /* The GNU C library defines this for functions which it implements
2261 to always fail with ENOSYS. Some functions are actually named
2262 something starting with __ and the normal name is an alias. */
2263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2264 choke me
2265 #else
2266 $ac_func();
2267 #endif
2268
2269 ; return 0; }
2270 EOF
2271 if { (eval echo configure:2272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2272 rm -rf conftest*
2273 eval "ac_cv_func_$ac_func=yes"
2274 else
2275 echo "configure: failed program was:" >&5
2276 cat conftest.$ac_ext >&5
2277 rm -rf conftest*
2278 eval "ac_cv_func_$ac_func=no"
2279 fi
2280 rm -f conftest*
2281 fi
2282
2283 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2284 echo "$ac_t""yes" 1>&6
2285 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2286 cat >> confdefs.h <<EOF
2287 #define $ac_tr_func 1
2288 EOF
2289
2290 else
2291 echo "$ac_t""no" 1>&6
2292 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2293 fi
2294 done
2295
2296
2297 fi
2298 rm -f conftest*
2299
2300
2301 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
2302 echo "configure:2303: checking if sockaddr struct has sa_len member" >&5
2303 if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
2304 echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306 cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309
2310 # include <sys/types.h>
2311 # include <sys/socket.h>
2312 int main() {
2313 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
2314 ; return 0; }
2315 EOF
2316 if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2317 rm -rf conftest*
2318 ac_cv_sockaddr_has_sa_len=yes
2319 else
2320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2322 rm -rf conftest*
2323 ac_cv_sockaddr_has_sa_len=no
2324 fi
2325 rm -f conftest*
2326 fi
2327
2328 echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
2329 if test $ac_cv_sockaddr_has_sa_len = yes ; then
2330 cat >> confdefs.h <<\EOF
2331 #define HAVE_SOCKADDR_SA_LEN 1
2332 EOF
2333
2334 fi
2335
2336 if test "$ac_cv_sockaddr_has_sa_len" = no; then
2337 missing_includes=yes
2338 fi
2339
2340 echo $ac_n "checking for dnet_htoa declaration in netdnet/dnetdb.h""... $ac_c" 1>&6
2341 echo "configure:2342: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
2342 if eval "test \"`echo '$''{'td_cv_decl_netdnet_dnetdb_h_dnet_htoa'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344 else
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 #include <netdnet/dnetdb.h>
2349 EOF
2350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351 egrep "dnet_htoa" >/dev/null 2>&1; then
2352 rm -rf conftest*
2353 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
2354 else
2355 rm -rf conftest*
2356 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
2357 fi
2358 rm -f conftest*
2359
2360 fi
2361
2362 echo "$ac_t""$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" 1>&6
2363 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
2364 cat >> confdefs.h <<\EOF
2365 #define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1
2366 EOF
2367
2368 fi
2369
2370 echo $ac_n "checking size of char""... $ac_c" 1>&6
2371 echo "configure:2372: checking size of char" >&5
2372 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 if test "$cross_compiling" = yes; then
2376 ac_cv_sizeof_char=1
2377 else
2378 cat > conftest.$ac_ext <<EOF
2379 #line 2380 "configure"
2380 #include "confdefs.h"
2381 #include <stdio.h>
2382 main()
2383 {
2384 FILE *f=fopen("conftestval", "w");
2385 if (!f) exit(1);
2386 fprintf(f, "%d\n", sizeof(char));
2387 exit(0);
2388 }
2389 EOF
2390 if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2391 then
2392 ac_cv_sizeof_char=`cat conftestval`
2393 else
2394 echo "configure: failed program was:" >&5
2395 cat conftest.$ac_ext >&5
2396 rm -fr conftest*
2397 ac_cv_sizeof_char=0
2398 fi
2399 rm -fr conftest*
2400 fi
2401
2402 fi
2403 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2404 cat >> confdefs.h <<EOF
2405 #define SIZEOF_CHAR $ac_cv_sizeof_char
2406 EOF
2407
2408
2409 echo $ac_n "checking size of short""... $ac_c" 1>&6
2410 echo "configure:2411: checking size of short" >&5
2411 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 if test "$cross_compiling" = yes; then
2415 ac_cv_sizeof_short=2
2416 else
2417 cat > conftest.$ac_ext <<EOF
2418 #line 2419 "configure"
2419 #include "confdefs.h"
2420 #include <stdio.h>
2421 main()
2422 {
2423 FILE *f=fopen("conftestval", "w");
2424 if (!f) exit(1);
2425 fprintf(f, "%d\n", sizeof(short));
2426 exit(0);
2427 }
2428 EOF
2429 if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2430 then
2431 ac_cv_sizeof_short=`cat conftestval`
2432 else
2433 echo "configure: failed program was:" >&5
2434 cat conftest.$ac_ext >&5
2435 rm -fr conftest*
2436 ac_cv_sizeof_short=0
2437 fi
2438 rm -fr conftest*
2439 fi
2440
2441 fi
2442 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2443 cat >> confdefs.h <<EOF
2444 #define SIZEOF_SHORT $ac_cv_sizeof_short
2445 EOF
2446
2447
2448 echo $ac_n "checking size of int""... $ac_c" 1>&6
2449 echo "configure:2450: checking size of int" >&5
2450 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2451 echo $ac_n "(cached) $ac_c" 1>&6
2452 else
2453 if test "$cross_compiling" = yes; then
2454 ac_cv_sizeof_int=4
2455 else
2456 cat > conftest.$ac_ext <<EOF
2457 #line 2458 "configure"
2458 #include "confdefs.h"
2459 #include <stdio.h>
2460 main()
2461 {
2462 FILE *f=fopen("conftestval", "w");
2463 if (!f) exit(1);
2464 fprintf(f, "%d\n", sizeof(int));
2465 exit(0);
2466 }
2467 EOF
2468 if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2469 then
2470 ac_cv_sizeof_int=`cat conftestval`
2471 else
2472 echo "configure: failed program was:" >&5
2473 cat conftest.$ac_ext >&5
2474 rm -fr conftest*
2475 ac_cv_sizeof_int=0
2476 fi
2477 rm -fr conftest*
2478 fi
2479
2480 fi
2481 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2482 cat >> confdefs.h <<EOF
2483 #define SIZEOF_INT $ac_cv_sizeof_int
2484 EOF
2485
2486
2487 echo $ac_n "checking size of long""... $ac_c" 1>&6
2488 echo "configure:2489: checking size of long" >&5
2489 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2490 echo $ac_n "(cached) $ac_c" 1>&6
2491 else
2492 if test "$cross_compiling" = yes; then
2493 ac_cv_sizeof_long=4
2494 else
2495 cat > conftest.$ac_ext <<EOF
2496 #line 2497 "configure"
2497 #include "confdefs.h"
2498 #include <stdio.h>
2499 main()
2500 {
2501 FILE *f=fopen("conftestval", "w");
2502 if (!f) exit(1);
2503 fprintf(f, "%d\n", sizeof(long));
2504 exit(0);
2505 }
2506 EOF
2507 if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2508 then
2509 ac_cv_sizeof_long=`cat conftestval`
2510 else
2511 echo "configure: failed program was:" >&5
2512 cat conftest.$ac_ext >&5
2513 rm -fr conftest*
2514 ac_cv_sizeof_long=0
2515 fi
2516 rm -fr conftest*
2517 fi
2518
2519 fi
2520 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2521 cat >> confdefs.h <<EOF
2522 #define SIZEOF_LONG $ac_cv_sizeof_long
2523 EOF
2524
2525
2526
2527
2528
2529 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
2530 echo "configure:2531: checking for addrinfo" >&5
2531 if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
2532 echo $ac_n "(cached) $ac_c" 1>&6
2533 else
2534 cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537
2538 # include <netdb.h>
2539 int main() {
2540 struct addrinfo a
2541 ; return 0; }
2542 EOF
2543 if { (eval echo configure:2544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2544 rm -rf conftest*
2545 ac_cv_addrinfo=yes
2546 else
2547 echo "configure: failed program was:" >&5
2548 cat conftest.$ac_ext >&5
2549 rm -rf conftest*
2550 ac_cv_addrinfo=no
2551 fi
2552 rm -f conftest*
2553 fi
2554
2555 echo "$ac_t""$ac_cv_addrinfo" 1>&6
2556 if test $ac_cv_addrinfo = yes; then
2557 cat >> confdefs.h <<\EOF
2558 #define HAVE_ADDRINFO 1
2559 EOF
2560
2561 else
2562 cat >> confdefs.h <<\EOF
2563 #define NEED_ADDRINFO_H 1
2564 EOF
2565
2566 fi
2567
2568 if test "$ac_cv_addrinfo" = no; then
2569 missing_includes=yes
2570 fi
2571
2572
2573 echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
2574 echo "configure:2575: checking for NI_MAXSERV" >&5
2575 if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
2576 echo $ac_n "(cached) $ac_c" 1>&6
2577 else
2578 cat > conftest.$ac_ext <<EOF
2579 #line 2580 "configure"
2580 #include "confdefs.h"
2581 #include <netdb.h>
2582 #ifdef NI_MAXSERV
2583 yes
2584 #endif
2585 EOF
2586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2587 egrep "yes" >/dev/null 2>&1; then
2588 rm -rf conftest*
2589 ac_cv_maxserv=yes
2590 else
2591 rm -rf conftest*
2592 ac_cv_maxserv=no
2593 fi
2594 rm -f conftest*
2595
2596 fi
2597
2598 echo "$ac_t""$ac_cv_maxserv" 1>&6
2599 if test $ac_cv_maxserv != yes; then
2600 cat >> confdefs.h <<\EOF
2601 #define NEED_ADDRINFO_H 1
2602 EOF
2603
2604 fi
2605
2606 if test "$ac_cv_maxserv" = no; then
2607 missing_includes=yes
2608 fi
2609
2610
2611 echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
2612 echo "configure:2613: checking for NI_NAMEREQD" >&5
2613 if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616 cat > conftest.$ac_ext <<EOF
2617 #line 2618 "configure"
2618 #include "confdefs.h"
2619 #include <netdb.h>
2620 #ifdef NI_NOFQDN
2621 yes
2622 #endif
2623 EOF
2624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2625 egrep "yes" >/dev/null 2>&1; then
2626 rm -rf conftest*
2627 ac_cv_namereqd=yes
2628 else
2629 rm -rf conftest*
2630 ac_cv_namereqd=no
2631 fi
2632 rm -f conftest*
2633
2634 fi
2635
2636 echo "$ac_t""$ac_cv_namereqd" 1>&6
2637 if test $ac_cv_namereqd != yes; then
2638 cat >> confdefs.h <<\EOF
2639 #define NEED_ADDRINFO_H 1
2640 EOF
2641
2642 fi
2643
2644 if test "$ac_cv_namereqd" = no; then
2645 missing_includes=yes
2646 fi
2647
2648
2649 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
2650 echo "configure:2651: checking for sockaddr_storage" >&5
2651 if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
2652 echo $ac_n "(cached) $ac_c" 1>&6
2653 else
2654 cat > conftest.$ac_ext <<EOF
2655 #line 2656 "configure"
2656 #include "confdefs.h"
2657
2658 # include <sys/types.h>
2659 # include <sys/socket.h>
2660 int main() {
2661 struct sockaddr_storage s
2662 ; return 0; }
2663 EOF
2664 if { (eval echo configure:2665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2665 rm -rf conftest*
2666 ac_cv_sa_storage=yes
2667 else
2668 echo "configure: failed program was:" >&5
2669 cat conftest.$ac_ext >&5
2670 rm -rf conftest*
2671 ac_cv_sa_storage=no
2672 fi
2673 rm -f conftest*
2674 fi
2675
2676 echo "$ac_t""$ac_cv_sa_storage" 1>&6
2677 if test $ac_cv_sa_storage = yes; then
2678 cat >> confdefs.h <<\EOF
2679 #define HAVE_SOCKADDR_STORAGE 1
2680 EOF
2681
2682 fi
2683
2684 if test "$ac_cv_sa_storage" = no; then
2685 missing_includes=yes
2686 fi
2687
2688
2689 ac_cv_addrsz=yes
2690 echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
2691 echo "configure:2692: checking for INADDRSZ" >&5
2692 if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695 cat > conftest.$ac_ext <<EOF
2696 #line 2697 "configure"
2697 #include "confdefs.h"
2698
2699 # include <arpa/nameser.h>
2700 int main() {
2701 int a = INADDRSZ
2702 ; return 0; }
2703 EOF
2704 if { (eval echo configure:2705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2705 rm -rf conftest*
2706 ac_cv_inaddrsz=yes
2707 else
2708 echo "configure: failed program was:" >&5
2709 cat conftest.$ac_ext >&5
2710 rm -rf conftest*
2711 ac_cv_inaddrsz=no
2712 fi
2713 rm -f conftest*
2714 fi
2715
2716 echo "$ac_t""$ac_cv_inaddrsz" 1>&6
2717 if test $ac_cv_inaddrsz = yes; then
2718 cat >> confdefs.h <<\EOF
2719 #define HAVE_INADDRSZ 1
2720 EOF
2721
2722 else
2723 ac_cv_addrsz=no
2724 fi
2725 echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
2726 echo "configure:2727: checking for IN6ADDRSZ" >&5
2727 if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730 cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733
2734 # include <arpa/nameser.h>
2735 int main() {
2736 int a = IN6ADDRSZ
2737 ; return 0; }
2738 EOF
2739 if { (eval echo configure:2740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2740 rm -rf conftest*
2741 ac_cv_in6addrsz=yes
2742 else
2743 echo "configure: failed program was:" >&5
2744 cat conftest.$ac_ext >&5
2745 rm -rf conftest*
2746 ac_cv_in6addrsz=no
2747 fi
2748 rm -f conftest*
2749 fi
2750
2751 echo "$ac_t""$ac_cv_in6addrsz" 1>&6
2752 if test $ac_cv_in6addrsz = yes; then
2753 cat >> confdefs.h <<\EOF
2754 #define HAVE_IN6ADDRSZ 1
2755 EOF
2756
2757 else
2758 ac_cv_addrsz=no
2759 fi
2760
2761 if test "$ac_cv_addrsz" = no; then
2762 missing_includes=yes
2763 fi
2764
2765
2766 echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
2767 echo "configure:2768: checking for RES_USE_INET6" >&5
2768 if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
2769 echo $ac_n "(cached) $ac_c" 1>&6
2770 else
2771 cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2774
2775 # include <sys/types.h>
2776 # include <netinet/in.h>
2777 # include <resolv.h>
2778 int main() {
2779 int a = RES_USE_INET6
2780 ; return 0; }
2781 EOF
2782 if { (eval echo configure:2783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2783 rm -rf conftest*
2784 ac_cv_res_inet6=yes
2785 else
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2788 rm -rf conftest*
2789 ac_cv_res_inet6=no
2790 fi
2791 rm -f conftest*
2792 fi
2793
2794 echo "$ac_t""$ac_cv_res_inet6" 1>&6
2795 if test $ac_cv_res_inet6 = yes; then
2796 cat >> confdefs.h <<\EOF
2797 #define HAVE_RES_USE_INET6 1
2798 EOF
2799
2800 fi
2801
2802 if test "$ac_cv_res_inet6" = no; then
2803 missing_includes=yes
2804 fi
2805
2806
2807 echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
2808 echo "configure:2809: checking for res_state_ext" >&5
2809 if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
2810 echo $ac_n "(cached) $ac_c" 1>&6
2811 else
2812 cat > conftest.$ac_ext <<EOF
2813 #line 2814 "configure"
2814 #include "confdefs.h"
2815
2816 # include <sys/types.h>
2817 # include <netinet/in.h>
2818 # include <netinet6/in6.h>
2819 # include <resolv.h>
2820 int main() {
2821 struct __res_state_ext e
2822 ; return 0; }
2823 EOF
2824 if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2825 rm -rf conftest*
2826 ac_cv_res_state_ext=yes
2827 else
2828 echo "configure: failed program was:" >&5
2829 cat conftest.$ac_ext >&5
2830 rm -rf conftest*
2831 ac_cv_res_state_ext=no
2832 fi
2833 rm -f conftest*
2834 fi
2835
2836 echo "$ac_t""$ac_cv_res_state_ext" 1>&6
2837 if test $ac_cv_res_state_ext = yes; then
2838 cat >> confdefs.h <<\EOF
2839 #define HAVE_RES_STATE_EXT 1
2840 EOF
2841
2842 fi
2843
2844 if test "$ac_cv_res_state_ext" = no; then
2845 missing_includes=yes
2846 fi
2847
2848
2849 echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
2850 echo "configure:2851: checking for nsort in res_state" >&5
2851 if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
2852 echo $ac_n "(cached) $ac_c" 1>&6
2853 else
2854 cat > conftest.$ac_ext <<EOF
2855 #line 2856 "configure"
2856 #include "confdefs.h"
2857
2858 # include <sys/types.h>
2859 # include <netinet/in.h>
2860 # include <netinet6/in6.h>
2861 # include <resolv.h>
2862 int main() {
2863 struct __res_state e; e.nsort = 0
2864 ; return 0; }
2865 EOF
2866 if { (eval echo configure:2867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2867 rm -rf conftest*
2868 ac_cv_res_state=yes
2869 else
2870 echo "configure: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 rm -rf conftest*
2873 ac_cv_res_state=no
2874 fi
2875 rm -f conftest*
2876 fi
2877
2878 echo "$ac_t""$ac_cv_res_state" 1>&6
2879 if test $ac_cv_res_state = yes; then
2880 cat >> confdefs.h <<\EOF
2881 #define HAVE_NEW_RES_STATE 1
2882 EOF
2883
2884 fi
2885
2886
2887 if test "$missing_includes" = "yes"; then
2888 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
2889 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
2890 fi
2891
2892
2893 for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep
2894 do
2895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2896 echo "configure:2897: checking for $ac_func" >&5
2897 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2898 echo $ac_n "(cached) $ac_c" 1>&6
2899 else
2900 cat > conftest.$ac_ext <<EOF
2901 #line 2902 "configure"
2902 #include "confdefs.h"
2903 /* System header to define __stub macros and hopefully few prototypes,
2904 which can conflict with char $ac_func(); below. */
2905 #include <assert.h>
2906 /* Override any gcc2 internal prototype to avoid an error. */
2907 /* We use char because int might match the return type of a gcc2
2908 builtin and then its argument prototype would still apply. */
2909 char $ac_func();
2910
2911 int main() {
2912
2913 /* The GNU C library defines this for functions which it implements
2914 to always fail with ENOSYS. Some functions are actually named
2915 something starting with __ and the normal name is an alias. */
2916 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2917 choke me
2918 #else
2919 $ac_func();
2920 #endif
2921
2922 ; return 0; }
2923 EOF
2924 if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2925 rm -rf conftest*
2926 eval "ac_cv_func_$ac_func=yes"
2927 else
2928 echo "configure: failed program was:" >&5
2929 cat conftest.$ac_ext >&5
2930 rm -rf conftest*
2931 eval "ac_cv_func_$ac_func=no"
2932 fi
2933 rm -f conftest*
2934 fi
2935
2936 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2937 echo "$ac_t""yes" 1>&6
2938 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2939 cat >> confdefs.h <<EOF
2940 #define $ac_tr_func 1
2941 EOF
2942
2943 else
2944 echo "$ac_t""no" 1>&6
2945 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2946 fi
2947 done
2948
2949
2950 for ac_func in ether_ntohost
2951 do
2952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2953 echo "configure:2954: checking for $ac_func" >&5
2954 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2955 echo $ac_n "(cached) $ac_c" 1>&6
2956 else
2957 cat > conftest.$ac_ext <<EOF
2958 #line 2959 "configure"
2959 #include "confdefs.h"
2960 /* System header to define __stub macros and hopefully few prototypes,
2961 which can conflict with char $ac_func(); below. */
2962 #include <assert.h>
2963 /* Override any gcc2 internal prototype to avoid an error. */
2964 /* We use char because int might match the return type of a gcc2
2965 builtin and then its argument prototype would still apply. */
2966 char $ac_func();
2967
2968 int main() {
2969
2970 /* The GNU C library defines this for functions which it implements
2971 to always fail with ENOSYS. Some functions are actually named
2972 something starting with __ and the normal name is an alias. */
2973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2974 choke me
2975 #else
2976 $ac_func();
2977 #endif
2978
2979 ; return 0; }
2980 EOF
2981 if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2982 rm -rf conftest*
2983 eval "ac_cv_func_$ac_func=yes"
2984 else
2985 echo "configure: failed program was:" >&5
2986 cat conftest.$ac_ext >&5
2987 rm -rf conftest*
2988 eval "ac_cv_func_$ac_func=no"
2989 fi
2990 rm -f conftest*
2991 fi
2992
2993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2994 echo "$ac_t""yes" 1>&6
2995 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2996 cat >> confdefs.h <<EOF
2997 #define $ac_tr_func 1
2998 EOF
2999
3000 echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
3001 echo "configure:3002: checking for buggy ether_ntohost" >&5
3002 if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
3003 echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005
3006 if test "$cross_compiling" = yes; then
3007 ac_cv_buggy_ether_ntohost="not while cross-compiling"
3008 else
3009 cat > conftest.$ac_ext <<EOF
3010 #line 3011 "configure"
3011 #include "confdefs.h"
3012
3013 #include <netdb.h>
3014 #include <sys/types.h>
3015 #include <sys/param.h>
3016 #include <sys/socket.h>
3017
3018 int
3019 main(int argc, char **argv)
3020 {
3021 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
3022 char name[MAXHOSTNAMELEN];
3023
3024 ether_ntohost(name, (struct ether_addr *)ea);
3025 exit(0);
3026 }
3027
3028 EOF
3029 if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3030 then
3031 ac_cv_buggy_ether_ntohost=no
3032 else
3033 echo "configure: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3035 rm -fr conftest*
3036 ac_cv_buggy_ether_ntohost=yes
3037 fi
3038 rm -fr conftest*
3039 fi
3040
3041 fi
3042
3043 echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6
3044 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
3045 cat >> confdefs.h <<\EOF
3046 #define USE_ETHER_NTOHOST 1
3047 EOF
3048
3049 fi
3050
3051 else
3052 echo "$ac_t""no" 1>&6
3053 fi
3054 done
3055
3056 for ac_func in setlinebuf
3057 do
3058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3059 echo "configure:3060: checking for $ac_func" >&5
3060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3061 echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063 cat > conftest.$ac_ext <<EOF
3064 #line 3065 "configure"
3065 #include "confdefs.h"
3066 /* System header to define __stub macros and hopefully few prototypes,
3067 which can conflict with char $ac_func(); below. */
3068 #include <assert.h>
3069 /* Override any gcc2 internal prototype to avoid an error. */
3070 /* We use char because int might match the return type of a gcc2
3071 builtin and then its argument prototype would still apply. */
3072 char $ac_func();
3073
3074 int main() {
3075
3076 /* The GNU C library defines this for functions which it implements
3077 to always fail with ENOSYS. Some functions are actually named
3078 something starting with __ and the normal name is an alias. */
3079 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3080 choke me
3081 #else
3082 $ac_func();
3083 #endif
3084
3085 ; return 0; }
3086 EOF
3087 if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3088 rm -rf conftest*
3089 eval "ac_cv_func_$ac_func=yes"
3090 else
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 rm -rf conftest*
3094 eval "ac_cv_func_$ac_func=no"
3095 fi
3096 rm -f conftest*
3097 fi
3098
3099 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3100 echo "$ac_t""yes" 1>&6
3101 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3102 cat >> confdefs.h <<EOF
3103 #define $ac_tr_func 1
3104 EOF
3105
3106 else
3107 echo "$ac_t""no" 1>&6
3108 fi
3109 done
3110
3111
3112 needsnprintf=no
3113 for ac_func in vsnprintf snprintf
3114 do
3115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3116 echo "configure:3117: checking for $ac_func" >&5
3117 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120 cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123 /* System header to define __stub macros and hopefully few prototypes,
3124 which can conflict with char $ac_func(); below. */
3125 #include <assert.h>
3126 /* Override any gcc2 internal prototype to avoid an error. */
3127 /* We use char because int might match the return type of a gcc2
3128 builtin and then its argument prototype would still apply. */
3129 char $ac_func();
3130
3131 int main() {
3132
3133 /* The GNU C library defines this for functions which it implements
3134 to always fail with ENOSYS. Some functions are actually named
3135 something starting with __ and the normal name is an alias. */
3136 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3137 choke me
3138 #else
3139 $ac_func();
3140 #endif
3141
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3145 rm -rf conftest*
3146 eval "ac_cv_func_$ac_func=yes"
3147 else
3148 echo "configure: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3150 rm -rf conftest*
3151 eval "ac_cv_func_$ac_func=no"
3152 fi
3153 rm -f conftest*
3154 fi
3155
3156 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3157 echo "$ac_t""yes" 1>&6
3158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3159 cat >> confdefs.h <<EOF
3160 #define $ac_tr_func 1
3161 EOF
3162
3163 else
3164 echo "$ac_t""no" 1>&6
3165 needsnprintf=yes
3166 fi
3167 done
3168
3169 if test $needsnprintf = yes; then
3170 LIBOBJS="$LIBOBJS snprintf.o"
3171 fi
3172
3173
3174 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3175 echo "configure:3176: checking return type of signal handlers" >&5
3176 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3177 echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179 cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182 #include <sys/types.h>
3183 #include <signal.h>
3184 #ifdef signal
3185 #undef signal
3186 #endif
3187 #ifdef __cplusplus
3188 extern "C" void (*signal (int, void (*)(int)))(int);
3189 #else
3190 void (*signal ()) ();
3191 #endif
3192
3193 int main() {
3194 int i;
3195 ; return 0; }
3196 EOF
3197 if { (eval echo configure:3198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3198 rm -rf conftest*
3199 ac_cv_type_signal=void
3200 else
3201 echo "configure: failed program was:" >&5
3202 cat conftest.$ac_ext >&5
3203 rm -rf conftest*
3204 ac_cv_type_signal=int
3205 fi
3206 rm -f conftest*
3207 fi
3208
3209 echo "$ac_t""$ac_cv_type_signal" 1>&6
3210 cat >> confdefs.h <<EOF
3211 #define RETSIGTYPE $ac_cv_type_signal
3212 EOF
3213
3214
3215 if test "$ac_cv_type_signal" = void ; then
3216 cat >> confdefs.h <<\EOF
3217 #define RETSIGVAL
3218 EOF
3219
3220 else
3221 cat >> confdefs.h <<\EOF
3222 #define RETSIGVAL (0)
3223 EOF
3224
3225 fi
3226 case "$host_os" in
3227
3228 irix*)
3229 cat >> confdefs.h <<\EOF
3230 #define _BSD_SIGNALS 1
3231 EOF
3232
3233 ;;
3234
3235 *)
3236 for ac_func in sigaction
3237 do
3238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3239 echo "configure:3240: checking for $ac_func" >&5
3240 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3241 echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243 cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 /* System header to define __stub macros and hopefully few prototypes,
3247 which can conflict with char $ac_func(); below. */
3248 #include <assert.h>
3249 /* Override any gcc2 internal prototype to avoid an error. */
3250 /* We use char because int might match the return type of a gcc2
3251 builtin and then its argument prototype would still apply. */
3252 char $ac_func();
3253
3254 int main() {
3255
3256 /* The GNU C library defines this for functions which it implements
3257 to always fail with ENOSYS. Some functions are actually named
3258 something starting with __ and the normal name is an alias. */
3259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3260 choke me
3261 #else
3262 $ac_func();
3263 #endif
3264
3265 ; return 0; }
3266 EOF
3267 if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3268 rm -rf conftest*
3269 eval "ac_cv_func_$ac_func=yes"
3270 else
3271 echo "configure: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3273 rm -rf conftest*
3274 eval "ac_cv_func_$ac_func=no"
3275 fi
3276 rm -f conftest*
3277 fi
3278
3279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3280 echo "$ac_t""yes" 1>&6
3281 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3282 cat >> confdefs.h <<EOF
3283 #define $ac_tr_func 1
3284 EOF
3285
3286 else
3287 echo "$ac_t""no" 1>&6
3288 fi
3289 done
3290
3291 if test $ac_cv_func_sigaction = no ; then
3292 for ac_func in sigset
3293 do
3294 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3295 echo "configure:3296: checking for $ac_func" >&5
3296 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3297 echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299 cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302 /* System header to define __stub macros and hopefully few prototypes,
3303 which can conflict with char $ac_func(); below. */
3304 #include <assert.h>
3305 /* Override any gcc2 internal prototype to avoid an error. */
3306 /* We use char because int might match the return type of a gcc2
3307 builtin and then its argument prototype would still apply. */
3308 char $ac_func();
3309
3310 int main() {
3311
3312 /* The GNU C library defines this for functions which it implements
3313 to always fail with ENOSYS. Some functions are actually named
3314 something starting with __ and the normal name is an alias. */
3315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3316 choke me
3317 #else
3318 $ac_func();
3319 #endif
3320
3321 ; return 0; }
3322 EOF
3323 if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3324 rm -rf conftest*
3325 eval "ac_cv_func_$ac_func=yes"
3326 else
3327 echo "configure: failed program was:" >&5
3328 cat conftest.$ac_ext >&5
3329 rm -rf conftest*
3330 eval "ac_cv_func_$ac_func=no"
3331 fi
3332 rm -f conftest*
3333 fi
3334
3335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3336 echo "$ac_t""yes" 1>&6
3337 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3338 cat >> confdefs.h <<EOF
3339 #define $ac_tr_func 1
3340 EOF
3341
3342 else
3343 echo "$ac_t""no" 1>&6
3344 fi
3345 done
3346
3347 fi
3348 ;;
3349 esac
3350
3351
3352 echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6
3353 echo "configure:3354: checking for library containing dnet_htoa" >&5
3354 if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then
3355 echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357 ac_func_search_save_LIBS="$LIBS"
3358 ac_cv_search_dnet_htoa="no"
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* Override any gcc2 internal prototype to avoid an error. */
3363 /* We use char because int might match the return type of a gcc2
3364 builtin and then its argument prototype would still apply. */
3365 char dnet_htoa();
3366
3367 int main() {
3368 dnet_htoa()
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372 rm -rf conftest*
3373 ac_cv_search_dnet_htoa="none required"
3374 else
3375 echo "configure: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 fi
3378 rm -f conftest*
3379 test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do
3380 LIBS="-l$i $ac_func_search_save_LIBS"
3381 cat > conftest.$ac_ext <<EOF
3382 #line 3383 "configure"
3383 #include "confdefs.h"
3384 /* Override any gcc2 internal prototype to avoid an error. */
3385 /* We use char because int might match the return type of a gcc2
3386 builtin and then its argument prototype would still apply. */
3387 char dnet_htoa();
3388
3389 int main() {
3390 dnet_htoa()
3391 ; return 0; }
3392 EOF
3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3394 rm -rf conftest*
3395 ac_cv_search_dnet_htoa="-l$i"
3396 break
3397 else
3398 echo "configure: failed program was:" >&5
3399 cat conftest.$ac_ext >&5
3400 fi
3401 rm -f conftest*
3402 done
3403 LIBS="$ac_func_search_save_LIBS"
3404 fi
3405
3406 echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6
3407 if test "$ac_cv_search_dnet_htoa" != "no"; then
3408 test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS"
3409 cat >> confdefs.h <<\EOF
3410 #define HAVE_DNET_HTOA 1
3411 EOF
3412
3413 else :
3414
3415 fi
3416
3417 echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
3418 echo "configure:3419: checking for main in -lrpc" >&5
3419 ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
3420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3421 echo $ac_n "(cached) $ac_c" 1>&6
3422 else
3423 ac_save_LIBS="$LIBS"
3424 LIBS="-lrpc $LIBS"
3425 cat > conftest.$ac_ext <<EOF
3426 #line 3427 "configure"
3427 #include "confdefs.h"
3428
3429 int main() {
3430 main()
3431 ; return 0; }
3432 EOF
3433 if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3434 rm -rf conftest*
3435 eval "ac_cv_lib_$ac_lib_var=yes"
3436 else
3437 echo "configure: failed program was:" >&5
3438 cat conftest.$ac_ext >&5
3439 rm -rf conftest*
3440 eval "ac_cv_lib_$ac_lib_var=no"
3441 fi
3442 rm -f conftest*
3443 LIBS="$ac_save_LIBS"
3444
3445 fi
3446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3447 echo "$ac_t""yes" 1>&6
3448 ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3449 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3450 cat >> confdefs.h <<EOF
3451 #define $ac_tr_lib 1
3452 EOF
3453
3454 LIBS="-lrpc $LIBS"
3455
3456 else
3457 echo "$ac_t""no" 1>&6
3458 fi
3459
3460
3461 echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
3462 echo "configure:3463: checking for library containing getrpcbynumber" >&5
3463 if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
3464 echo $ac_n "(cached) $ac_c" 1>&6
3465 else
3466 ac_func_search_save_LIBS="$LIBS"
3467 ac_cv_search_getrpcbynumber="no"
3468 cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471 /* Override any gcc2 internal prototype to avoid an error. */
3472 /* We use char because int might match the return type of a gcc2
3473 builtin and then its argument prototype would still apply. */
3474 char getrpcbynumber();
3475
3476 int main() {
3477 getrpcbynumber()
3478 ; return 0; }
3479 EOF
3480 if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3481 rm -rf conftest*
3482 ac_cv_search_getrpcbynumber="none required"
3483 else
3484 echo "configure: failed program was:" >&5
3485 cat conftest.$ac_ext >&5
3486 fi
3487 rm -f conftest*
3488 test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
3489 LIBS="-l$i $ac_func_search_save_LIBS"
3490 cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 /* Override any gcc2 internal prototype to avoid an error. */
3494 /* We use char because int might match the return type of a gcc2
3495 builtin and then its argument prototype would still apply. */
3496 char getrpcbynumber();
3497
3498 int main() {
3499 getrpcbynumber()
3500 ; return 0; }
3501 EOF
3502 if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3503 rm -rf conftest*
3504 ac_cv_search_getrpcbynumber="-l$i"
3505 break
3506 else
3507 echo "configure: failed program was:" >&5
3508 cat conftest.$ac_ext >&5
3509 fi
3510 rm -f conftest*
3511 done
3512 LIBS="$ac_func_search_save_LIBS"
3513 fi
3514
3515 echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6
3516 if test "$ac_cv_search_getrpcbynumber" != "no"; then
3517 test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS"
3518
3519 else :
3520
3521 fi
3522
3523
3524
3525 # Most operating systems have gethostbyname() in the default searched
3526 # libraries (i.e. libc):
3527 # Some OSes (eg. Solaris) place it in libnsl
3528 # Some strange OSes (SINIX) have it in libsocket:
3529
3530 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3531 echo "configure:3532: checking for library containing gethostbyname" >&5
3532 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3533 echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535 ac_func_search_save_LIBS="$LIBS"
3536 ac_cv_search_gethostbyname="no"
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 /* Override any gcc2 internal prototype to avoid an error. */
3541 /* We use char because int might match the return type of a gcc2
3542 builtin and then its argument prototype would still apply. */
3543 char gethostbyname();
3544
3545 int main() {
3546 gethostbyname()
3547 ; return 0; }
3548 EOF
3549 if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3550 rm -rf conftest*
3551 ac_cv_search_gethostbyname="none required"
3552 else
3553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
3555 fi
3556 rm -f conftest*
3557 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
3558 LIBS="-l$i $ac_func_search_save_LIBS"
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 /* Override any gcc2 internal prototype to avoid an error. */
3563 /* We use char because int might match the return type of a gcc2
3564 builtin and then its argument prototype would still apply. */
3565 char gethostbyname();
3566
3567 int main() {
3568 gethostbyname()
3569 ; return 0; }
3570 EOF
3571 if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3572 rm -rf conftest*
3573 ac_cv_search_gethostbyname="-l$i"
3574 break
3575 else
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 fi
3579 rm -f conftest*
3580 done
3581 LIBS="$ac_func_search_save_LIBS"
3582 fi
3583
3584 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3585 if test "$ac_cv_search_gethostbyname" != "no"; then
3586 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3587
3588 else :
3589
3590 fi
3591 # Unfortunately libsocket sometimes depends on libnsl and
3592 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
3593 if test "$ac_cv_search_gethostbyname" = "no"
3594 then
3595 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3596 echo "configure:3597: checking for gethostbyname in -lsocket" >&5
3597 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
3598 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3599 echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601 ac_save_LIBS="$LIBS"
3602 LIBS="-lsocket -lnsl $LIBS"
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 /* Override any gcc2 internal prototype to avoid an error. */
3607 /* We use char because int might match the return type of a gcc2
3608 builtin and then its argument prototype would still apply. */
3609 char gethostbyname();
3610
3611 int main() {
3612 gethostbyname()
3613 ; return 0; }
3614 EOF
3615 if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3616 rm -rf conftest*
3617 eval "ac_cv_lib_$ac_lib_var=yes"
3618 else
3619 echo "configure: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621 rm -rf conftest*
3622 eval "ac_cv_lib_$ac_lib_var=no"
3623 fi
3624 rm -f conftest*
3625 LIBS="$ac_save_LIBS"
3626
3627 fi
3628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3629 echo "$ac_t""yes" 1>&6
3630 LIBS="-lsocket -lnsl $LIBS"
3631 else
3632 echo "$ac_t""no" 1>&6
3633 fi
3634
3635 fi
3636
3637 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
3638 echo "configure:3639: checking for library containing socket" >&5
3639 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
3640 echo $ac_n "(cached) $ac_c" 1>&6
3641 else
3642 ac_func_search_save_LIBS="$LIBS"
3643 ac_cv_search_socket="no"
3644 cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 /* Override any gcc2 internal prototype to avoid an error. */
3648 /* We use char because int might match the return type of a gcc2
3649 builtin and then its argument prototype would still apply. */
3650 char socket();
3651
3652 int main() {
3653 socket()
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3657 rm -rf conftest*
3658 ac_cv_search_socket="none required"
3659 else
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3662 fi
3663 rm -f conftest*
3664 test "$ac_cv_search_socket" = "no" && for i in socket; do
3665 LIBS="-l$i $ac_func_search_save_LIBS"
3666 cat > conftest.$ac_ext <<EOF
3667 #line 3668 "configure"
3668 #include "confdefs.h"
3669 /* Override any gcc2 internal prototype to avoid an error. */
3670 /* We use char because int might match the return type of a gcc2
3671 builtin and then its argument prototype would still apply. */
3672 char socket();
3673
3674 int main() {
3675 socket()
3676 ; return 0; }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3679 rm -rf conftest*
3680 ac_cv_search_socket="-l$i"
3681 break
3682 else
3683 echo "configure: failed program was:" >&5
3684 cat conftest.$ac_ext >&5
3685 fi
3686 rm -f conftest*
3687 done
3688 LIBS="$ac_func_search_save_LIBS"
3689 fi
3690
3691 echo "$ac_t""$ac_cv_search_socket" 1>&6
3692 if test "$ac_cv_search_socket" != "no"; then
3693 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
3694
3695 else :
3696 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3697 echo "configure:3698: checking for socket in -lsocket" >&5
3698 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3699 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3700 echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702 ac_save_LIBS="$LIBS"
3703 LIBS="-lsocket -lnsl $LIBS"
3704 cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 /* Override any gcc2 internal prototype to avoid an error. */
3708 /* We use char because int might match the return type of a gcc2
3709 builtin and then its argument prototype would still apply. */
3710 char socket();
3711
3712 int main() {
3713 socket()
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3717 rm -rf conftest*
3718 eval "ac_cv_lib_$ac_lib_var=yes"
3719 else
3720 echo "configure: failed program was:" >&5
3721 cat conftest.$ac_ext >&5
3722 rm -rf conftest*
3723 eval "ac_cv_lib_$ac_lib_var=no"
3724 fi
3725 rm -f conftest*
3726 LIBS="$ac_save_LIBS"
3727
3728 fi
3729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3730 echo "$ac_t""yes" 1>&6
3731 LIBS="-lsocket -lnsl $LIBS"
3732 else
3733 echo "$ac_t""no" 1>&6
3734 fi
3735
3736 fi
3737 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3738
3739 echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
3740 echo "configure:3741: checking for library containing putmsg" >&5
3741 if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
3742 echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744 ac_func_search_save_LIBS="$LIBS"
3745 ac_cv_search_putmsg="no"
3746 cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 /* Override any gcc2 internal prototype to avoid an error. */
3750 /* We use char because int might match the return type of a gcc2
3751 builtin and then its argument prototype would still apply. */
3752 char putmsg();
3753
3754 int main() {
3755 putmsg()
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3759 rm -rf conftest*
3760 ac_cv_search_putmsg="none required"
3761 else
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 fi
3765 rm -f conftest*
3766 test "$ac_cv_search_putmsg" = "no" && for i in str; do
3767 LIBS="-l$i $ac_func_search_save_LIBS"
3768 cat > conftest.$ac_ext <<EOF
3769 #line 3770 "configure"
3770 #include "confdefs.h"
3771 /* Override any gcc2 internal prototype to avoid an error. */
3772 /* We use char because int might match the return type of a gcc2
3773 builtin and then its argument prototype would still apply. */
3774 char putmsg();
3775
3776 int main() {
3777 putmsg()
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3781 rm -rf conftest*
3782 ac_cv_search_putmsg="-l$i"
3783 break
3784 else
3785 echo "configure: failed program was:" >&5
3786 cat conftest.$ac_ext >&5
3787 fi
3788 rm -f conftest*
3789 done
3790 LIBS="$ac_func_search_save_LIBS"
3791 fi
3792
3793 echo "$ac_t""$ac_cv_search_putmsg" 1>&6
3794 if test "$ac_cv_search_putmsg" != "no"; then
3795 test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
3796
3797 else :
3798
3799 fi
3800
3801
3802 LBL_LIBS="$LIBS"
3803 pfopen=/usr/examples/packetfilter/pfopen.c
3804 if test -f $pfopen ; then
3805 for ac_func in pfopen
3806 do
3807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3808 echo "configure:3809: checking for $ac_func" >&5
3809 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3810 echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812 cat > conftest.$ac_ext <<EOF
3813 #line 3814 "configure"
3814 #include "confdefs.h"
3815 /* System header to define __stub macros and hopefully few prototypes,
3816 which can conflict with char $ac_func(); below. */
3817 #include <assert.h>
3818 /* Override any gcc2 internal prototype to avoid an error. */
3819 /* We use char because int might match the return type of a gcc2
3820 builtin and then its argument prototype would still apply. */
3821 char $ac_func();
3822
3823 int main() {
3824
3825 /* The GNU C library defines this for functions which it implements
3826 to always fail with ENOSYS. Some functions are actually named
3827 something starting with __ and the normal name is an alias. */
3828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3829 choke me
3830 #else
3831 $ac_func();
3832 #endif
3833
3834 ; return 0; }
3835 EOF
3836 if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3837 rm -rf conftest*
3838 eval "ac_cv_func_$ac_func=yes"
3839 else
3840 echo "configure: failed program was:" >&5
3841 cat conftest.$ac_ext >&5
3842 rm -rf conftest*
3843 eval "ac_cv_func_$ac_func=no"
3844 fi
3845 rm -f conftest*
3846 fi
3847
3848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3849 echo "$ac_t""yes" 1>&6
3850 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3851 cat >> confdefs.h <<EOF
3852 #define $ac_tr_func 1
3853 EOF
3854
3855 else
3856 echo "$ac_t""no" 1>&6
3857 fi
3858 done
3859
3860 if test $ac_cv_func_pfopen = "no" ; then
3861 echo "$ac_t""Using $pfopen" 1>&6
3862 LIBS="$LIBS $pfopen"
3863 fi
3864 fi
3865 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3866 echo "configure:3867: checking for local pcap library" >&5
3867 libpcap=FAIL
3868 lastdir=FAIL
3869 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3870 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3871 for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
3872 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3873 if test $lastdir = $basedir ; then
3874 continue;
3875 fi
3876 lastdir=$dir
3877 if test -r $dir/libpcap.a ; then
3878 libpcap=$dir/libpcap.a
3879 d=$dir
3880 fi
3881 done
3882 if test $libpcap = FAIL ; then
3883 echo "$ac_t""not found" 1>&6
3884 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3885 echo "configure:3886: checking for main in -lpcap" >&5
3886 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3888 echo $ac_n "(cached) $ac_c" 1>&6
3889 else
3890 ac_save_LIBS="$LIBS"
3891 LIBS="-lpcap $LIBS"
3892 cat > conftest.$ac_ext <<EOF
3893 #line 3894 "configure"
3894 #include "confdefs.h"
3895
3896 int main() {
3897 main()
3898 ; return 0; }
3899 EOF
3900 if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3901 rm -rf conftest*
3902 eval "ac_cv_lib_$ac_lib_var=yes"
3903 else
3904 echo "configure: failed program was:" >&5
3905 cat conftest.$ac_ext >&5
3906 rm -rf conftest*
3907 eval "ac_cv_lib_$ac_lib_var=no"
3908 fi
3909 rm -f conftest*
3910 LIBS="$ac_save_LIBS"
3911
3912 fi
3913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3914 echo "$ac_t""yes" 1>&6
3915 libpcap="-lpcap"
3916 else
3917 echo "$ac_t""no" 1>&6
3918 fi
3919
3920 if test $libpcap = FAIL ; then
3921 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3922 fi
3923 echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
3924 echo "configure:3925: checking for extraneous pcap header directories" >&5
3925 if test \( ! -r /usr/local/include/pcap.h \) -a \
3926 \( ! -r /usr/include/pcap.h \); then
3927 if test -r /usr/local/include/pcap/pcap.h; then
3928 d="/usr/local/include/pcap"
3929 elif test -r /usr/include/pcap/pcap.h; then
3930 d="/usr/include/pcap"
3931 fi
3932 fi
3933 if test -z "$d" ; then
3934 echo "$ac_t""not found" 1>&6
3935 else
3936 V_INCLS="-I$d $V_INCLS"
3937 echo "$ac_t""found -- -I$d added" 1>&6
3938 fi
3939 else
3940 V_PCAPDEP=$libpcap
3941 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3942 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3943 if test -r $d/pcap.h; then
3944 V_INCLS="-I$d $V_INCLS"
3945 elif test -r $places/pcap.h; then
3946 V_INCLS="-I$places $V_INCLS"
3947 else
3948 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3949 fi
3950 echo "$ac_t""$libpcap" 1>&6
3951 fi
3952 LIBS="$libpcap $LIBS"
3953 case "$host_os" in
3954
3955 aix*)
3956 pseexe="/lib/pse.exp"
3957 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3958 echo "configure:3959: checking for $pseexe" >&5
3959 if test -f $pseexe ; then
3960 echo "$ac_t""yes" 1>&6
3961 LIBS="$LIBS -I:$pseexe"
3962 fi
3963 #
3964 # We need "-lodm" and "-lcfg", as libpcap requires them on
3965 # AIX, and we just build a static libpcap.a and thus can't
3966 # arrange that when you link with libpcap you automatically
3967 # link with those libraries.
3968 #
3969 LIBS="$LIBS -lodm -lcfg"
3970 ;;
3971 esac
3972
3973 echo $ac_n "checking for pcap_list_datalinks""... $ac_c" 1>&6
3974 echo "configure:3975: checking for pcap_list_datalinks" >&5
3975 if eval "test \"`echo '$''{'ac_cv_func_pcap_list_datalinks'+set}'`\" = set"; then
3976 echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 /* System header to define __stub macros and hopefully few prototypes,
3982 which can conflict with char pcap_list_datalinks(); below. */
3983 #include <assert.h>
3984 /* Override any gcc2 internal prototype to avoid an error. */
3985 /* We use char because int might match the return type of a gcc2
3986 builtin and then its argument prototype would still apply. */
3987 char pcap_list_datalinks();
3988
3989 int main() {
3990
3991 /* The GNU C library defines this for functions which it implements
3992 to always fail with ENOSYS. Some functions are actually named
3993 something starting with __ and the normal name is an alias. */
3994 #if defined (__stub_pcap_list_datalinks) || defined (__stub___pcap_list_datalinks)
3995 choke me
3996 #else
3997 pcap_list_datalinks();
3998 #endif
3999
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4003 rm -rf conftest*
4004 eval "ac_cv_func_pcap_list_datalinks=yes"
4005 else
4006 echo "configure: failed program was:" >&5
4007 cat conftest.$ac_ext >&5
4008 rm -rf conftest*
4009 eval "ac_cv_func_pcap_list_datalinks=no"
4010 fi
4011 rm -f conftest*
4012 fi
4013
4014 if eval "test \"`echo '$ac_cv_func_'pcap_list_datalinks`\" = yes"; then
4015 echo "$ac_t""yes" 1>&6
4016 cat >> confdefs.h <<\EOF
4017 #define HAVE_PCAP_LIST_DATALINKS 1
4018 EOF
4019
4020 else
4021 echo "$ac_t""no" 1>&6
4022 LIBOBJS="$LIBOBJS datalinks.o"
4023 fi
4024
4025 echo $ac_n "checking for pcap_set_datalink""... $ac_c" 1>&6
4026 echo "configure:4027: checking for pcap_set_datalink" >&5
4027 if eval "test \"`echo '$''{'ac_cv_func_pcap_set_datalink'+set}'`\" = set"; then
4028 echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030 cat > conftest.$ac_ext <<EOF
4031 #line 4032 "configure"
4032 #include "confdefs.h"
4033 /* System header to define __stub macros and hopefully few prototypes,
4034 which can conflict with char pcap_set_datalink(); below. */
4035 #include <assert.h>
4036 /* Override any gcc2 internal prototype to avoid an error. */
4037 /* We use char because int might match the return type of a gcc2
4038 builtin and then its argument prototype would still apply. */
4039 char pcap_set_datalink();
4040
4041 int main() {
4042
4043 /* The GNU C library defines this for functions which it implements
4044 to always fail with ENOSYS. Some functions are actually named
4045 something starting with __ and the normal name is an alias. */
4046 #if defined (__stub_pcap_set_datalink) || defined (__stub___pcap_set_datalink)
4047 choke me
4048 #else
4049 pcap_set_datalink();
4050 #endif
4051
4052 ; return 0; }
4053 EOF
4054 if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4055 rm -rf conftest*
4056 eval "ac_cv_func_pcap_set_datalink=yes"
4057 else
4058 echo "configure: failed program was:" >&5
4059 cat conftest.$ac_ext >&5
4060 rm -rf conftest*
4061 eval "ac_cv_func_pcap_set_datalink=no"
4062 fi
4063 rm -f conftest*
4064 fi
4065
4066 if eval "test \"`echo '$ac_cv_func_'pcap_set_datalink`\" = yes"; then
4067 echo "$ac_t""yes" 1>&6
4068 cat >> confdefs.h <<\EOF
4069 #define HAVE_PCAP_SET_DATALINK 1
4070 EOF
4071
4072 else
4073 echo "$ac_t""no" 1>&6
4074 fi
4075
4076 echo $ac_n "checking for pcap_datalink_name_to_val""... $ac_c" 1>&6
4077 echo "configure:4078: checking for pcap_datalink_name_to_val" >&5
4078 if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_name_to_val'+set}'`\" = set"; then
4079 echo $ac_n "(cached) $ac_c" 1>&6
4080 else
4081 cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4084 /* System header to define __stub macros and hopefully few prototypes,
4085 which can conflict with char pcap_datalink_name_to_val(); below. */
4086 #include <assert.h>
4087 /* Override any gcc2 internal prototype to avoid an error. */
4088 /* We use char because int might match the return type of a gcc2
4089 builtin and then its argument prototype would still apply. */
4090 char pcap_datalink_name_to_val();
4091
4092 int main() {
4093
4094 /* The GNU C library defines this for functions which it implements
4095 to always fail with ENOSYS. Some functions are actually named
4096 something starting with __ and the normal name is an alias. */
4097 #if defined (__stub_pcap_datalink_name_to_val) || defined (__stub___pcap_datalink_name_to_val)
4098 choke me
4099 #else
4100 pcap_datalink_name_to_val();
4101 #endif
4102
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106 rm -rf conftest*
4107 eval "ac_cv_func_pcap_datalink_name_to_val=yes"
4108 else
4109 echo "configure: failed program was:" >&5
4110 cat conftest.$ac_ext >&5
4111 rm -rf conftest*
4112 eval "ac_cv_func_pcap_datalink_name_to_val=no"
4113 fi
4114 rm -f conftest*
4115 fi
4116
4117 if eval "test \"`echo '$ac_cv_func_'pcap_datalink_name_to_val`\" = yes"; then
4118 echo "$ac_t""yes" 1>&6
4119 cat >> confdefs.h <<\EOF
4120 #define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
4121 EOF
4122
4123 else
4124 echo "$ac_t""no" 1>&6
4125 LIBOBJS="$LIBOBJS dlnames.o"
4126 fi
4127
4128
4129
4130 for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
4131 do
4132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4133 echo "configure:4134: checking for $ac_func" >&5
4134 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4135 echo $ac_n "(cached) $ac_c" 1>&6
4136 else
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 /* System header to define __stub macros and hopefully few prototypes,
4141 which can conflict with char $ac_func(); below. */
4142 #include <assert.h>
4143 /* Override any gcc2 internal prototype to avoid an error. */
4144 /* We use char because int might match the return type of a gcc2
4145 builtin and then its argument prototype would still apply. */
4146 char $ac_func();
4147
4148 int main() {
4149
4150 /* The GNU C library defines this for functions which it implements
4151 to always fail with ENOSYS. Some functions are actually named
4152 something starting with __ and the normal name is an alias. */
4153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4154 choke me
4155 #else
4156 $ac_func();
4157 #endif
4158
4159 ; return 0; }
4160 EOF
4161 if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4162 rm -rf conftest*
4163 eval "ac_cv_func_$ac_func=yes"
4164 else
4165 echo "configure: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 rm -rf conftest*
4168 eval "ac_cv_func_$ac_func=no"
4169 fi
4170 rm -f conftest*
4171 fi
4172
4173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4174 echo "$ac_t""yes" 1>&6
4175 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4176 cat >> confdefs.h <<EOF
4177 #define $ac_tr_func 1
4178 EOF
4179
4180 else
4181 echo "$ac_t""no" 1>&6
4182 fi
4183 done
4184
4185 if test $ac_cv_func_pcap_lib_version = "no" ; then
4186 echo $ac_n "checking whether pcap_version is defined by libpcap""... $ac_c" 1>&6
4187 echo "configure:4188: checking whether pcap_version is defined by libpcap" >&5
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191
4192 int main() {
4193
4194 char *
4195 return_pcap_version(void)
4196 {
4197 extern char pcap_version[];
4198
4199 return pcap_version;
4200 }
4201
4202 ; return 0; }
4203 EOF
4204 if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4205 rm -rf conftest*
4206 ac_lbl_cv_pcap_version_defined=yes
4207 else
4208 echo "configure: failed program was:" >&5
4209 cat conftest.$ac_ext >&5
4210 rm -rf conftest*
4211 ac_lbl_cv_pcap_version_defined=no
4212 fi
4213 rm -f conftest*
4214 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
4215 echo "$ac_t""yes" 1>&6
4216 cat >> confdefs.h <<\EOF
4217 #define HAVE_PCAP_VERSION 1
4218 EOF
4219
4220 else
4221 echo "$ac_t""no" 1>&6
4222 fi
4223 fi
4224 echo $ac_n "checking whether pcap_debug is defined by libpcap""... $ac_c" 1>&6
4225 echo "configure:4226: checking whether pcap_debug is defined by libpcap" >&5
4226 cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229
4230 int main() {
4231
4232 int
4233 return_pcap_debug(void)
4234 {
4235 extern int pcap_debug;
4236
4237 return pcap_debug;
4238 }
4239
4240 ; return 0; }
4241 EOF
4242 if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4243 rm -rf conftest*
4244 ac_lbl_cv_pcap_debug_defined=yes
4245 else
4246 echo "configure: failed program was:" >&5
4247 cat conftest.$ac_ext >&5
4248 rm -rf conftest*
4249 ac_lbl_cv_pcap_debug_defined=no
4250 fi
4251 rm -f conftest*
4252 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
4253 echo "$ac_t""yes" 1>&6
4254 cat >> confdefs.h <<\EOF
4255 #define HAVE_PCAP_DEBUG 1
4256 EOF
4257
4258 else
4259 echo "$ac_t""no" 1>&6
4260 #
4261 # OK, what about "yydebug"?
4262 #
4263 echo $ac_n "checking whether yydebug is defined by libpcap""... $ac_c" 1>&6
4264 echo "configure:4265: checking whether yydebug is defined by libpcap" >&5
4265 cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268
4269 int main() {
4270
4271 int
4272 return_yydebug(void)
4273 {
4274 extern int yydebug;
4275
4276 return yydebug;
4277 }
4278
4279 ; return 0; }
4280 EOF
4281 if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4282 rm -rf conftest*
4283 ac_lbl_cv_yydebug_defined=yes
4284 else
4285 echo "configure: failed program was:" >&5
4286 cat conftest.$ac_ext >&5
4287 rm -rf conftest*
4288 ac_lbl_cv_yydebug_defined=no
4289 fi
4290 rm -f conftest*
4291 if test "$ac_lbl_cv_yydebug_defined" = yes ; then
4292 echo "$ac_t""yes" 1>&6
4293 cat >> confdefs.h <<\EOF
4294 #define HAVE_YYDEBUG 1
4295 EOF
4296
4297 else
4298 echo "$ac_t""no" 1>&6
4299 fi
4300 fi
4301 for ac_func in bpf_dump
4302 do
4303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4304 echo "configure:4305: checking for $ac_func" >&5
4305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 /* System header to define __stub macros and hopefully few prototypes,
4312 which can conflict with char $ac_func(); below. */
4313 #include <assert.h>
4314 /* Override any gcc2 internal prototype to avoid an error. */
4315 /* We use char because int might match the return type of a gcc2
4316 builtin and then its argument prototype would still apply. */
4317 char $ac_func();
4318
4319 int main() {
4320
4321 /* The GNU C library defines this for functions which it implements
4322 to always fail with ENOSYS. Some functions are actually named
4323 something starting with __ and the normal name is an alias. */
4324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4325 choke me
4326 #else
4327 $ac_func();
4328 #endif
4329
4330 ; return 0; }
4331 EOF
4332 if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4333 rm -rf conftest*
4334 eval "ac_cv_func_$ac_func=yes"
4335 else
4336 echo "configure: failed program was:" >&5
4337 cat conftest.$ac_ext >&5
4338 rm -rf conftest*
4339 eval "ac_cv_func_$ac_func=no"
4340 fi
4341 rm -f conftest*
4342 fi
4343
4344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4345 echo "$ac_t""yes" 1>&6
4346 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4347 cat >> confdefs.h <<EOF
4348 #define $ac_tr_func 1
4349 EOF
4350
4351 else
4352 echo "$ac_t""no" 1>&6
4353 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
4354 fi
4355 done
4356
4357
4358 V_GROUP=0
4359 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
4360 V_GROUP=wheel
4361 fi
4362 case "$host_os" in
4363
4364 aix*)
4365 cat >> confdefs.h <<\EOF
4366 #define _SUN 1
4367 EOF
4368
4369 ;;
4370
4371 irix*)
4372 V_GROUP=sys
4373 ;;
4374
4375 osf*)
4376 V_GROUP=system
4377 ;;
4378
4379 solaris*)
4380 V_GROUP=sys
4381 ;;
4382 esac
4383
4384 if test -f /dev/bpf0 ; then
4385 V_GROUP=bpf
4386 fi
4387
4388 echo $ac_n "checking for int8_t using $CC""... $ac_c" 1>&6
4389 echo "configure:4390: checking for int8_t using $CC" >&5
4390 if eval "test \"`echo '$''{'ac_cv_lbl_have_int8_t'+set}'`\" = set"; then
4391 echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393 cat > conftest.$ac_ext <<EOF
4394 #line 4395 "configure"
4395 #include "confdefs.h"
4396
4397 # include "confdefs.h"
4398 # include <sys/types.h>
4399 # if STDC_HEADERS
4400 # include <stdlib.h>
4401 # include <stddef.h>
4402 # endif
4403 int main() {
4404 int8_t i
4405 ; return 0; }
4406 EOF
4407 if { (eval echo configure:4408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4408 rm -rf conftest*
4409 ac_cv_lbl_have_int8_t=yes
4410 else
4411 echo "configure: failed program was:" >&5
4412 cat conftest.$ac_ext >&5
4413 rm -rf conftest*
4414 ac_cv_lbl_have_int8_t=no
4415 fi
4416 rm -f conftest*
4417 fi
4418
4419 echo "$ac_t""$ac_cv_lbl_have_int8_t" 1>&6
4420 if test $ac_cv_lbl_have_int8_t = no ; then
4421 cat >> confdefs.h <<\EOF
4422 #define int8_t signed char
4423 EOF
4424
4425 fi
4426 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
4427 echo "configure:4428: checking for u_int8_t using $CC" >&5
4428 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
4429 echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434
4435 # include "confdefs.h"
4436 # include <sys/types.h>
4437 # if STDC_HEADERS
4438 # include <stdlib.h>
4439 # include <stddef.h>
4440 # endif
4441 int main() {
4442 u_int8_t i
4443 ; return 0; }
4444 EOF
4445 if { (eval echo configure:4446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4446 rm -rf conftest*
4447 ac_cv_lbl_have_u_int8_t=yes
4448 else
4449 echo "configure: failed program was:" >&5
4450 cat conftest.$ac_ext >&5
4451 rm -rf conftest*
4452 ac_cv_lbl_have_u_int8_t=no
4453 fi
4454 rm -f conftest*
4455 fi
4456
4457 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
4458 if test $ac_cv_lbl_have_u_int8_t = no ; then
4459 cat >> confdefs.h <<\EOF
4460 #define u_int8_t u_char
4461 EOF
4462
4463 fi
4464 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
4465 echo "configure:4466: checking for int16_t using $CC" >&5
4466 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
4467 echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469 cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472
4473 # include "confdefs.h"
4474 # include <sys/types.h>
4475 # if STDC_HEADERS
4476 # include <stdlib.h>
4477 # include <stddef.h>
4478 # endif
4479 int main() {
4480 int16_t i
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4484 rm -rf conftest*
4485 ac_cv_lbl_have_int16_t=yes
4486 else
4487 echo "configure: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4489 rm -rf conftest*
4490 ac_cv_lbl_have_int16_t=no
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
4496 if test $ac_cv_lbl_have_int16_t = no ; then
4497 cat >> confdefs.h <<\EOF
4498 #define int16_t short
4499 EOF
4500
4501 fi
4502 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
4503 echo "configure:4504: checking for u_int16_t using $CC" >&5
4504 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
4505 echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507 cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510
4511 # include "confdefs.h"
4512 # include <sys/types.h>
4513 # if STDC_HEADERS
4514 # include <stdlib.h>
4515 # include <stddef.h>
4516 # endif
4517 int main() {
4518 u_int16_t i
4519 ; return 0; }
4520 EOF
4521 if { (eval echo configure:4522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4522 rm -rf conftest*
4523 ac_cv_lbl_have_u_int16_t=yes
4524 else
4525 echo "configure: failed program was:" >&5
4526 cat conftest.$ac_ext >&5
4527 rm -rf conftest*
4528 ac_cv_lbl_have_u_int16_t=no
4529 fi
4530 rm -f conftest*
4531 fi
4532
4533 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
4534 if test $ac_cv_lbl_have_u_int16_t = no ; then
4535 cat >> confdefs.h <<\EOF
4536 #define u_int16_t u_short
4537 EOF
4538
4539 fi
4540 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
4541 echo "configure:4542: checking for int32_t using $CC" >&5
4542 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
4543 echo $ac_n "(cached) $ac_c" 1>&6
4544 else
4545 cat > conftest.$ac_ext <<EOF
4546 #line 4547 "configure"
4547 #include "confdefs.h"
4548
4549 # include "confdefs.h"
4550 # include <sys/types.h>
4551 # if STDC_HEADERS
4552 # include <stdlib.h>
4553 # include <stddef.h>
4554 # endif
4555 int main() {
4556 int32_t i
4557 ; return 0; }
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4560 rm -rf conftest*
4561 ac_cv_lbl_have_int32_t=yes
4562 else
4563 echo "configure: failed program was:" >&5
4564 cat conftest.$ac_ext >&5
4565 rm -rf conftest*
4566 ac_cv_lbl_have_int32_t=no
4567 fi
4568 rm -f conftest*
4569 fi
4570
4571 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
4572 if test $ac_cv_lbl_have_int32_t = no ; then
4573 cat >> confdefs.h <<\EOF
4574 #define int32_t int
4575 EOF
4576
4577 fi
4578 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
4579 echo "configure:4580: checking for u_int32_t using $CC" >&5
4580 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
4581 echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586
4587 # include "confdefs.h"
4588 # include <sys/types.h>
4589 # if STDC_HEADERS
4590 # include <stdlib.h>
4591 # include <stddef.h>
4592 # endif
4593 int main() {
4594 u_int32_t i
4595 ; return 0; }
4596 EOF
4597 if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4598 rm -rf conftest*
4599 ac_cv_lbl_have_u_int32_t=yes
4600 else
4601 echo "configure: failed program was:" >&5
4602 cat conftest.$ac_ext >&5
4603 rm -rf conftest*
4604 ac_cv_lbl_have_u_int32_t=no
4605 fi
4606 rm -f conftest*
4607 fi
4608
4609 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
4610 if test $ac_cv_lbl_have_u_int32_t = no ; then
4611 cat >> confdefs.h <<\EOF
4612 #define u_int32_t u_int
4613 EOF
4614
4615 fi
4616
4617 rm -f os-proto.h
4618 if test "${LBL_CFLAGS+set}" = set; then
4619 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
4620 fi
4621 if test -f .devel ; then
4622 if test "$GCC" = yes ; then
4623 if test "${LBL_CFLAGS+set}" != set; then
4624 if test "$ac_cv_prog_cc_g" = yes ; then
4625 V_CCOPT="-g $V_CCOPT"
4626 fi
4627 V_CCOPT="$V_CCOPT -Wall"
4628 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
4629 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
4630 fi
4631 fi
4632 else
4633 case "$host_os" in
4634
4635 irix6*)
4636 V_CCOPT="$V_CCOPT -n32"
4637 ;;
4638
4639 *)
4640 ;;
4641 esac
4642 fi
4643 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
4644 name="lbl/os-$os.h"
4645 if test -f $name ; then
4646 ln -s $name os-proto.h
4647 cat >> confdefs.h <<\EOF
4648 #define HAVE_OS_PROTO_H 1
4649 EOF
4650
4651 else
4652 echo "configure: warning: can't find $name" 1>&2
4653 fi
4654 fi
4655
4656 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4657 echo "configure:4658: checking if sockaddr struct has sa_len member" >&5
4658 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
4659 echo $ac_n "(cached) $ac_c" 1>&6
4660 else
4661 cat > conftest.$ac_ext <<EOF
4662 #line 4663 "configure"
4663 #include "confdefs.h"
4664
4665 # include <sys/types.h>
4666 # include <sys/socket.h>
4667 int main() {
4668 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4669 ; return 0; }
4670 EOF
4671 if { (eval echo configure:4672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4672 rm -rf conftest*
4673 ac_cv_lbl_sockaddr_has_sa_len=yes
4674 else
4675 echo "configure: failed program was:" >&5
4676 cat conftest.$ac_ext >&5
4677 rm -rf conftest*
4678 ac_cv_lbl_sockaddr_has_sa_len=no
4679 fi
4680 rm -f conftest*
4681 fi
4682
4683 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
4684 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
4685 cat >> confdefs.h <<\EOF
4686 #define HAVE_SOCKADDR_SA_LEN 1
4687 EOF
4688
4689 fi
4690
4691 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
4692 echo "configure:4693: checking if unaligned accesses fail" >&5
4693 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
4694 echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696 case "$host_cpu" in
4697
4698 #
4699 # These are CPU types where:
4700 #
4701 # the CPU faults on an unaligned access, but at least some
4702 # OSes that support that CPU catch the fault and simulate
4703 # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
4704 # the simulation is slow, so we don't want to use it;
4705 #
4706 # the CPU, I infer (from the old
4707 #
4708 # XXX: should also check that they don't do weird things (like on arm)
4709 #
4710 # comment) doesn't fault on unaligned accesses, but doesn't
4711 # do a normal unaligned fetch, either (e.g., presumably, ARM);
4712 #
4713 # for whatever reason, the test program doesn't work
4714 # (this has been claimed to be the case for several of those
4715 # CPUs - I don't know what the problem is; the problem
4716 # was reported as "the test program dumps core" for SuperH,
4717 # but that's what the test program is *supposed* to do -
4718 # it dumps core before it writes anything, so the test
4719 # for an empty output file should find an empty output
4720 # file and conclude that unaligned accesses don't work).
4721 #
4722 # This run-time test won't work if you're cross-compiling, so
4723 # in order to support cross-compiling for a particular CPU,
4724 # we have to wire in the list of CPU types anyway, as far as
4725 # I know, so perhaps we should just have a set of CPUs on
4726 # which we know it doesn't work, a set of CPUs on which we
4727 # know it does work, and have the script just fail on other
4728 # cpu types and update it when such a failure occurs.
4729 #
4730 alpha*|arm*|hp*|mips*|sh*|sparc*|ia64)
4731 ac_cv_lbl_unaligned_fail=yes
4732 ;;
4733
4734 *)
4735 cat >conftest.c <<EOF
4736 # include <sys/types.h>
4737 # include <sys/wait.h>
4738 # include <stdio.h>
4739 unsigned char a[5] = { 1, 2, 3, 4, 5 };
4740 main() {
4741 unsigned int i;
4742 pid_t pid;
4743 int status;
4744 /* avoid "core dumped" message */
4745 pid = fork();
4746 if (pid < 0)
4747 exit(2);
4748 if (pid > 0) {
4749 /* parent */
4750 pid = waitpid(pid, &status, 0);
4751 if (pid < 0)
4752 exit(3);
4753 exit(!WIFEXITED(status));
4754 }
4755 /* child */
4756 i = *(unsigned int *)&a[1];
4757 printf("%d\n", i);
4758 exit(0);
4759 }
4760 EOF
4761 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
4762 conftest.c $LIBS >/dev/null 2>&1
4763 if test ! -x conftest ; then
4764 ac_cv_lbl_unaligned_fail=yes
4765 else
4766 ./conftest >conftest.out
4767 if test ! -s conftest.out ; then
4768 ac_cv_lbl_unaligned_fail=yes
4769 else
4770 ac_cv_lbl_unaligned_fail=no
4771 fi
4772 fi
4773 rm -f conftest* core core.conftest
4774 ;;
4775 esac
4776 fi
4777
4778 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
4779 if test $ac_cv_lbl_unaligned_fail = yes ; then
4780 cat >> confdefs.h <<\EOF
4781 #define LBL_ALIGN 1
4782 EOF
4783
4784 fi
4785
4786
4787 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
4788 echo "configure:4789: checking for h_errno" >&5
4789 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
4790 echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4792 cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795
4796 # include <sys/types.h>
4797 # include <netdb.h>
4798 int main() {
4799 int foo = h_errno;
4800 ; return 0; }
4801 EOF
4802 if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4803 rm -rf conftest*
4804 ac_cv_var_h_errno=yes
4805 else
4806 echo "configure: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4808 rm -rf conftest*
4809 ac_cv_var_h_errno=no
4810 fi
4811 rm -f conftest*
4812 fi
4813
4814 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
4815 if test "$ac_cv_var_h_errno" = "yes"; then
4816 cat >> confdefs.h <<\EOF
4817 #define HAVE_H_ERRNO 1
4818 EOF
4819
4820 fi
4821
4822
4823 # Check whether --with-crypto or --without-crypto was given.
4824 if test "${with_crypto+set}" = set; then
4825 withval="$with_crypto"
4826 :
4827 else
4828
4829 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
4830 echo "configure:4831: checking for SSLeay" >&5
4831 ac_cv_ssleay_path=no
4832 incdir=no
4833 for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
4834 if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then
4835 ac_cv_ssleay_path=$dir
4836 fi
4837 if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4838 incdir="-I$dir/include"
4839 fi
4840 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4841 break;
4842 else
4843 ac_cv_ssleay_path=no
4844 incdir=no
4845 fi
4846 done
4847 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4848 if test "$ac_cv_ssleay_path" != no; then
4849 V_INCLS="$V_INCLS $incdir"
4850 LDFLAGS="-L$dir/lib $LDFLAGS"
4851 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
4852 LIBS="$LIBS -lRSAglue"
4853 fi
4854 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
4855 LIBS="$LIBS -lrsaref"
4856 fi
4857 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4858 echo "configure:4859: checking for des_cbc_encrypt in -lcrypto" >&5
4859 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4861 echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863 ac_save_LIBS="$LIBS"
4864 LIBS="-lcrypto $LIBS"
4865 cat > conftest.$ac_ext <<EOF
4866 #line 4867 "configure"
4867 #include "confdefs.h"
4868 /* Override any gcc2 internal prototype to avoid an error. */
4869 /* We use char because int might match the return type of a gcc2
4870 builtin and then its argument prototype would still apply. */
4871 char des_cbc_encrypt();
4872
4873 int main() {
4874 des_cbc_encrypt()
4875 ; return 0; }
4876 EOF
4877 if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4878 rm -rf conftest*
4879 eval "ac_cv_lib_$ac_lib_var=yes"
4880 else
4881 echo "configure: failed program was:" >&5
4882 cat conftest.$ac_ext >&5
4883 rm -rf conftest*
4884 eval "ac_cv_lib_$ac_lib_var=no"
4885 fi
4886 rm -f conftest*
4887 LIBS="$ac_save_LIBS"
4888
4889 fi
4890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4891 echo "$ac_t""yes" 1>&6
4892 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4893 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4894 cat >> confdefs.h <<EOF
4895 #define $ac_tr_lib 1
4896 EOF
4897
4898 LIBS="-lcrypto $LIBS"
4899
4900 else
4901 echo "$ac_t""no" 1>&6
4902 fi
4903
4904
4905 bak_CPPFLAGS=$CPPFLAGS
4906 CPPFLAGS="$CPPFLAGS $V_INCLS"
4907 for ac_hdr in openssl/cast.h
4908 do
4909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4911 echo "configure:4912: checking for $ac_hdr" >&5
4912 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4913 echo $ac_n "(cached) $ac_c" 1>&6
4914 else
4915 cat > conftest.$ac_ext <<EOF
4916 #line 4917 "configure"
4917 #include "confdefs.h"
4918 #include <$ac_hdr>
4919 EOF
4920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4921 { (eval echo configure:4922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4923 if test -z "$ac_err"; then
4924 rm -rf conftest*
4925 eval "ac_cv_header_$ac_safe=yes"
4926 else
4927 echo "$ac_err" >&5
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -rf conftest*
4931 eval "ac_cv_header_$ac_safe=no"
4932 fi
4933 rm -f conftest*
4934 fi
4935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4936 echo "$ac_t""yes" 1>&6
4937 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4938 cat >> confdefs.h <<EOF
4939 #define $ac_tr_hdr 1
4940 EOF
4941
4942 else
4943 echo "$ac_t""no" 1>&6
4944 fi
4945 done
4946
4947
4948 if test "$ac_cv_header_openssl_cast_h" = "yes"; then
4949 echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
4950 echo "configure:4951: checking for buggy CAST128" >&5
4951 if eval "test \"`echo '$''{'td_cv_buggy_cast128'+set}'`\" = set"; then
4952 echo $ac_n "(cached) $ac_c" 1>&6
4953 else
4954 if test "$cross_compiling" = yes; then
4955 td_cv_buggy_cast128="cross-compiling, assume yes"
4956 else
4957 cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960
4961 #include <openssl/cast.h>
4962 main()
4963 {
4964 unsigned char key[] = {0x01,0x23,0x45,0x67,0x12};
4965 unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
4966 unsigned char out[sizeof(in)];
4967 unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E};
4968 CAST_KEY ks;
4969 CAST_set_key(&ks, sizeof(key), key);
4970 CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT);
4971 if (memcmp(out, ok, sizeof(ok)) != 0)
4972 return 0;
4973 else
4974 return 1;
4975 }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4978 then
4979 td_cv_buggy_cast128=yes
4980 else
4981 echo "configure: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 rm -fr conftest*
4984 td_cv_buggy_cast128=no
4985 fi
4986 rm -fr conftest*
4987 fi
4988
4989 fi
4990
4991 echo "$ac_t""$td_cv_buggy_cast128" 1>&6
4992 if test "$td_cv_buggy_cast128" != no; then
4993 echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine."
4994 echo "disabling CAST128 support."
4995 cat >> confdefs.h <<\EOF
4996 #define HAVE_BUGGY_CAST128 1
4997 EOF
4998
4999 fi
5000 fi
5001
5002 CPPFLAGS=$bak_CPPFLAGS
5003 fi
5004
5005 fi
5006
5007 for ac_hdr in openssl/rc5.h
5008 do
5009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5011 echo "configure:5012: checking for $ac_hdr" >&5
5012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5013 echo $ac_n "(cached) $ac_c" 1>&6
5014 else
5015 cat > conftest.$ac_ext <<EOF
5016 #line 5017 "configure"
5017 #include "confdefs.h"
5018 #include <$ac_hdr>
5019 EOF
5020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5021 { (eval echo configure:5022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5023 if test -z "$ac_err"; then
5024 rm -rf conftest*
5025 eval "ac_cv_header_$ac_safe=yes"
5026 else
5027 echo "$ac_err" >&5
5028 echo "configure: failed program was:" >&5
5029 cat conftest.$ac_ext >&5
5030 rm -rf conftest*
5031 eval "ac_cv_header_$ac_safe=no"
5032 fi
5033 rm -f conftest*
5034 fi
5035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5036 echo "$ac_t""yes" 1>&6
5037 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5038 cat >> confdefs.h <<EOF
5039 #define $ac_tr_hdr 1
5040 EOF
5041
5042 else
5043 echo "$ac_t""no" 1>&6
5044 fi
5045 done
5046
5047
5048
5049
5050
5051
5052
5053
5054 # Find a good install program. We prefer a C program (faster),
5055 # so one script is as good as another. But avoid the broken or
5056 # incompatible versions:
5057 # SysV /etc/install, /usr/sbin/install
5058 # SunOS /usr/etc/install
5059 # IRIX /sbin/install
5060 # AIX /bin/install
5061 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5062 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5063 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5064 # ./install, which can be erroneously created by make from ./install.sh.
5065 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
5066 echo "configure:5067: checking for a BSD compatible install" >&5
5067 if test -z "$INSTALL"; then
5068 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
5069 echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
5072 for ac_dir in $PATH; do
5073 # Account for people who put trailing slashes in PATH elements.
5074 case "$ac_dir/" in
5075 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
5076 *)
5077 # OSF1 and SCO ODT 3.0 have their own names for install.
5078 # Don't use installbsd from OSF since it installs stuff as root
5079 # by default.
5080 for ac_prog in ginstall scoinst install; do
5081 if test -f $ac_dir/$ac_prog; then
5082 if test $ac_prog = install &&
5083 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
5084 # AIX install. It has an incompatible calling convention.
5085 :
5086 else
5087 ac_cv_path_install="$ac_dir/$ac_prog -c"
5088 break 2
5089 fi
5090 fi
5091 done
5092 ;;
5093 esac
5094 done
5095 IFS="$ac_save_IFS"
5096
5097 fi
5098 if test "${ac_cv_path_install+set}" = set; then
5099 INSTALL="$ac_cv_path_install"
5100 else
5101 # As a last resort, use the slow shell script. We don't cache a
5102 # path for INSTALL within a source directory, because that will
5103 # break other packages using the cache if that directory is
5104 # removed, or if the path is relative.
5105 INSTALL="$ac_install_sh"
5106 fi
5107 fi
5108 echo "$ac_t""$INSTALL" 1>&6
5109
5110 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5111 # It thinks the first close brace ends the variable substitution.
5112 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5113
5114 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
5115
5116 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5117
5118
5119
5120
5121
5122 trap '' 1 2 15
5123 cat > confcache <<\EOF
5124 # This file is a shell script that caches the results of configure
5125 # tests run on this system so they can be shared between configure
5126 # scripts and configure runs. It is not useful on other systems.
5127 # If it contains results you don't want to keep, you may remove or edit it.
5128 #
5129 # By default, configure uses ./config.cache as the cache file,
5130 # creating it if it does not exist already. You can give configure
5131 # the --cache-file=FILE option to use a different cache file; that is
5132 # what configure does when it calls configure scripts in
5133 # subdirectories, so they share the cache.
5134 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5135 # config.status only pays attention to the cache file if you give it the
5136 # --recheck option to rerun configure.
5137 #
5138 EOF
5139 # The following way of writing the cache mishandles newlines in values,
5140 # but we know of no workaround that is simple, portable, and efficient.
5141 # So, don't put newlines in cache variables' values.
5142 # Ultrix sh set writes to stderr and can't be redirected directly,
5143 # and sets the high bit in the cache file unless we assign to the vars.
5144 (set) 2>&1 |
5145 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5146 *ac_space=\ *)
5147 # `set' does not quote correctly, so add quotes (double-quote substitution
5148 # turns \\\\ into \\, and sed turns \\ into \).
5149 sed -n \
5150 -e "s/'/'\\\\''/g" \
5151 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5152 ;;
5153 *)
5154 # `set' quotes correctly as required by POSIX, so do not add quotes.
5155 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5156 ;;
5157 esac >> confcache
5158 if cmp -s $cache_file confcache; then
5159 :
5160 else
5161 if test -w $cache_file; then
5162 echo "updating cache $cache_file"
5163 cat confcache > $cache_file
5164 else
5165 echo "not updating unwritable cache $cache_file"
5166 fi
5167 fi
5168 rm -f confcache
5169
5170 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5171
5172 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5173 # Let make expand exec_prefix.
5174 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5175
5176 # Any assignment to VPATH causes Sun make to only execute
5177 # the first set of double-colon rules, so remove it if not needed.
5178 # If there is a colon in the path, we need to keep it.
5179 if test "x$srcdir" = x.; then
5180 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5181 fi
5182
5183 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5184
5185 DEFS=-DHAVE_CONFIG_H
5186
5187 # Without the "./", some shells look in PATH for config.status.
5188 : ${CONFIG_STATUS=./config.status}
5189
5190 echo creating $CONFIG_STATUS
5191 rm -f $CONFIG_STATUS
5192 cat > $CONFIG_STATUS <<EOF
5193 #! /bin/sh
5194 # Generated automatically by configure.
5195 # Run this file to recreate the current configuration.
5196 # This directory was configured as follows,
5197 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5198 #
5199 # $0 $ac_configure_args
5200 #
5201 # Compiler output produced by configure, useful for debugging
5202 # configure, is in ./config.log if it exists.
5203
5204 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5205 for ac_option
5206 do
5207 case "\$ac_option" in
5208 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5209 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5210 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5211 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5212 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5213 exit 0 ;;
5214 -help | --help | --hel | --he | --h)
5215 echo "\$ac_cs_usage"; exit 0 ;;
5216 *) echo "\$ac_cs_usage"; exit 1 ;;
5217 esac
5218 done
5219
5220 ac_given_srcdir=$srcdir
5221 ac_given_INSTALL="$INSTALL"
5222
5223 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5224 EOF
5225 cat >> $CONFIG_STATUS <<EOF
5226
5227 # Protect against being on the right side of a sed subst in config.status.
5228 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5229 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5230 $ac_vpsub
5231 $extrasub
5232 s%@SHELL@%$SHELL%g
5233 s%@CFLAGS@%$CFLAGS%g
5234 s%@CPPFLAGS@%$CPPFLAGS%g
5235 s%@CXXFLAGS@%$CXXFLAGS%g
5236 s%@FFLAGS@%$FFLAGS%g
5237 s%@DEFS@%$DEFS%g
5238 s%@LDFLAGS@%$LDFLAGS%g
5239 s%@LIBS@%$LIBS%g
5240 s%@exec_prefix@%$exec_prefix%g
5241 s%@prefix@%$prefix%g
5242 s%@program_transform_name@%$program_transform_name%g
5243 s%@bindir@%$bindir%g
5244 s%@sbindir@%$sbindir%g
5245 s%@libexecdir@%$libexecdir%g
5246 s%@datadir@%$datadir%g
5247 s%@sysconfdir@%$sysconfdir%g
5248 s%@sharedstatedir@%$sharedstatedir%g
5249 s%@localstatedir@%$localstatedir%g
5250 s%@libdir@%$libdir%g
5251 s%@includedir@%$includedir%g
5252 s%@oldincludedir@%$oldincludedir%g
5253 s%@infodir@%$infodir%g
5254 s%@mandir@%$mandir%g
5255 s%@host@%$host%g
5256 s%@host_alias@%$host_alias%g
5257 s%@host_cpu@%$host_cpu%g
5258 s%@host_vendor@%$host_vendor%g
5259 s%@host_os@%$host_os%g
5260 s%@SHLICC2@%$SHLICC2%g
5261 s%@CC@%$CC%g
5262 s%@CPP@%$CPP%g
5263 s%@LIBOBJS@%$LIBOBJS%g
5264 s%@V_CCOPT@%$V_CCOPT%g
5265 s%@V_GROUP@%$V_GROUP%g
5266 s%@V_INCLS@%$V_INCLS%g
5267 s%@V_PCAPDEP@%$V_PCAPDEP%g
5268 s%@LOCALSRC@%$LOCALSRC%g
5269 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5270 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5271 s%@INSTALL_DATA@%$INSTALL_DATA%g
5272
5273 CEOF
5274 EOF
5275
5276 cat >> $CONFIG_STATUS <<\EOF
5277
5278 # Split the substitutions into bite-sized pieces for seds with
5279 # small command number limits, like on Digital OSF/1 and HP-UX.
5280 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5281 ac_file=1 # Number of current file.
5282 ac_beg=1 # First line for current file.
5283 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5284 ac_more_lines=:
5285 ac_sed_cmds=""
5286 while $ac_more_lines; do
5287 if test $ac_beg -gt 1; then
5288 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5289 else
5290 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5291 fi
5292 if test ! -s conftest.s$ac_file; then
5293 ac_more_lines=false
5294 rm -f conftest.s$ac_file
5295 else
5296 if test -z "$ac_sed_cmds"; then
5297 ac_sed_cmds="sed -f conftest.s$ac_file"
5298 else
5299 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5300 fi
5301 ac_file=`expr $ac_file + 1`
5302 ac_beg=$ac_end
5303 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5304 fi
5305 done
5306 if test -z "$ac_sed_cmds"; then
5307 ac_sed_cmds=cat
5308 fi
5309 EOF
5310
5311 cat >> $CONFIG_STATUS <<EOF
5312
5313 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5314 EOF
5315 cat >> $CONFIG_STATUS <<\EOF
5316 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5317 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5318 case "$ac_file" in
5319 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5320 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5321 *) ac_file_in="${ac_file}.in" ;;
5322 esac
5323
5324 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5325
5326 # Remove last slash and all that follows it. Not all systems have dirname.
5327 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5328 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5329 # The file is in a subdirectory.
5330 test ! -d "$ac_dir" && mkdir "$ac_dir"
5331 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5332 # A "../" for each directory in $ac_dir_suffix.
5333 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5334 else
5335 ac_dir_suffix= ac_dots=
5336 fi
5337
5338 case "$ac_given_srcdir" in
5339 .) srcdir=.
5340 if test -z "$ac_dots"; then top_srcdir=.
5341 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5342 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5343 *) # Relative path.
5344 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5345 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5346 esac
5347
5348 case "$ac_given_INSTALL" in
5349 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5350 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5351 esac
5352
5353 echo creating "$ac_file"
5354 rm -f "$ac_file"
5355 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5356 case "$ac_file" in
5357 *Makefile*) ac_comsub="1i\\
5358 # $configure_input" ;;
5359 *) ac_comsub= ;;
5360 esac
5361
5362 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5363 sed -e "$ac_comsub
5364 s%@configure_input@%$configure_input%g
5365 s%@srcdir@%$srcdir%g
5366 s%@top_srcdir@%$top_srcdir%g
5367 s%@INSTALL@%$INSTALL%g
5368 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5369 fi; done
5370 rm -f conftest.s*
5371
5372 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5373 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5374 #
5375 # ac_d sets the value in "#define NAME VALUE" lines.
5376 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5377 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5378 ac_dC='\3'
5379 ac_dD='%g'
5380 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5381 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5382 ac_uB='\([ ]\)%\1#\2define\3'
5383 ac_uC=' '
5384 ac_uD='\4%g'
5385 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5386 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5387 ac_eB='$%\1#\2define\3'
5388 ac_eC=' '
5389 ac_eD='%g'
5390
5391 if test "${CONFIG_HEADERS+set}" != set; then
5392 EOF
5393 cat >> $CONFIG_STATUS <<EOF
5394 CONFIG_HEADERS="config.h"
5395 EOF
5396 cat >> $CONFIG_STATUS <<\EOF
5397 fi
5398 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5399 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5400 case "$ac_file" in
5401 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5402 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5403 *) ac_file_in="${ac_file}.in" ;;
5404 esac
5405
5406 echo creating $ac_file
5407
5408 rm -f conftest.frag conftest.in conftest.out
5409 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5410 cat $ac_file_inputs > conftest.in
5411
5412 EOF
5413
5414 # Transform confdefs.h into a sed script conftest.vals that substitutes
5415 # the proper values into config.h.in to produce config.h. And first:
5416 # Protect against being on the right side of a sed subst in config.status.
5417 # Protect against being in an unquoted here document in config.status.
5418 rm -f conftest.vals
5419 cat > conftest.hdr <<\EOF
5420 s/[\\&%]/\\&/g
5421 s%[\\$`]%\\&%g
5422 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5423 s%ac_d%ac_u%gp
5424 s%ac_u%ac_e%gp
5425 EOF
5426 sed -n -f conftest.hdr confdefs.h > conftest.vals
5427 rm -f conftest.hdr
5428
5429 # This sed command replaces #undef with comments. This is necessary, for
5430 # example, in the case of _POSIX_SOURCE, which is predefined and required
5431 # on some systems where configure will not decide to define it.
5432 cat >> conftest.vals <<\EOF
5433 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5434 EOF
5435
5436 # Break up conftest.vals because some shells have a limit on
5437 # the size of here documents, and old seds have small limits too.
5438
5439 rm -f conftest.tail
5440 while :
5441 do
5442 ac_lines=`grep -c . conftest.vals`
5443 # grep -c gives empty output for an empty file on some AIX systems.
5444 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5445 # Write a limited-size here document to conftest.frag.
5446 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5447 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5448 echo 'CEOF
5449 sed -f conftest.frag conftest.in > conftest.out
5450 rm -f conftest.in
5451 mv conftest.out conftest.in
5452 ' >> $CONFIG_STATUS
5453 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5454 rm -f conftest.vals
5455 mv conftest.tail conftest.vals
5456 done
5457 rm -f conftest.vals
5458
5459 cat >> $CONFIG_STATUS <<\EOF
5460 rm -f conftest.frag conftest.h
5461 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5462 cat conftest.in >> conftest.h
5463 rm -f conftest.in
5464 if cmp -s $ac_file conftest.h 2>/dev/null; then
5465 echo "$ac_file is unchanged"
5466 rm -f conftest.h
5467 else
5468 # Remove last slash and all that follows it. Not all systems have dirname.
5469 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5470 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5471 # The file is in a subdirectory.
5472 test ! -d "$ac_dir" && mkdir "$ac_dir"
5473 fi
5474 rm -f $ac_file
5475 mv conftest.h $ac_file
5476 fi
5477 fi; done
5478
5479 EOF
5480 cat >> $CONFIG_STATUS <<EOF
5481
5482
5483 EOF
5484 cat >> $CONFIG_STATUS <<\EOF
5485 if test -f .devel; then
5486 echo timestamp > stamp-h
5487 cat Makefile-devel-adds >> Makefile
5488 make depend
5489 fi
5490
5491 exit 0
5492 EOF
5493 chmod +x $CONFIG_STATUS
5494 rm -fr confdefs* $ac_clean_files
5495 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5496
5497 exit 0