]> The Tcpdump Group git mirrors - tcpdump/blob - configure
Fix up AC_LBL_C_INLINE to put all of the test code into the "inlines"
[tcpdump] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.152
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 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
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 echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
1780 echo "configure:1781: checking for library containing getaddrinfo" >&5
1781 if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784 ac_func_search_save_LIBS="$LIBS"
1785 ac_cv_search_getaddrinfo="no"
1786 cat > conftest.$ac_ext <<EOF
1787 #line 1788 "configure"
1788 #include "confdefs.h"
1789 /* Override any gcc2 internal prototype to avoid an error. */
1790 /* We use char because int might match the return type of a gcc2
1791 builtin and then its argument prototype would still apply. */
1792 char getaddrinfo();
1793
1794 int main() {
1795 getaddrinfo()
1796 ; return 0; }
1797 EOF
1798 if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1799 rm -rf conftest*
1800 ac_cv_search_getaddrinfo="none required"
1801 else
1802 echo "configure: failed program was:" >&5
1803 cat conftest.$ac_ext >&5
1804 fi
1805 rm -f conftest*
1806 test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do
1807 LIBS="-l$i $ac_func_search_save_LIBS"
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811 /* Override any gcc2 internal prototype to avoid an error. */
1812 /* We use char because int might match the return type of a gcc2
1813 builtin and then its argument prototype would still apply. */
1814 char getaddrinfo();
1815
1816 int main() {
1817 getaddrinfo()
1818 ; return 0; }
1819 EOF
1820 if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1821 rm -rf conftest*
1822 ac_cv_search_getaddrinfo="-l$i"
1823 break
1824 else
1825 echo "configure: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 fi
1828 rm -f conftest*
1829 done
1830 LIBS="$ac_func_search_save_LIBS"
1831 fi
1832
1833 echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
1834 if test "$ac_cv_search_getaddrinfo" != "no"; then
1835 test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
1836 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
1837 echo "configure:1838: checking getaddrinfo bug" >&5
1838 if eval "test \"`echo '$''{'td_cv_buggygetaddrinfo'+set}'`\" = set"; then
1839 echo $ac_n "(cached) $ac_c" 1>&6
1840 else
1841 if test "$cross_compiling" = yes; then
1842 td_cv_buggygetaddrinfo=yes
1843 else
1844 cat > conftest.$ac_ext <<EOF
1845 #line 1846 "configure"
1846 #include "confdefs.h"
1847
1848 #include <sys/types.h>
1849 #include <netdb.h>
1850 #include <string.h>
1851 #include <sys/socket.h>
1852 #include <netinet/in.h>
1853
1854 main()
1855 {
1856 int passive, gaierr, inet4 = 0, inet6 = 0;
1857 struct addrinfo hints, *ai, *aitop;
1858 char straddr[INET6_ADDRSTRLEN], strport[16];
1859
1860 for (passive = 0; passive <= 1; passive++) {
1861 memset(&hints, 0, sizeof(hints));
1862 hints.ai_family = AF_UNSPEC;
1863 hints.ai_flags = passive ? AI_PASSIVE : 0;
1864 hints.ai_socktype = SOCK_STREAM;
1865 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
1866 (void)gai_strerror(gaierr);
1867 goto bad;
1868 }
1869 for (ai = aitop; ai; ai = ai->ai_next) {
1870 if (ai->ai_addr == NULL ||
1871 ai->ai_addrlen == 0 ||
1872 getnameinfo(ai->ai_addr, ai->ai_addrlen,
1873 straddr, sizeof(straddr), strport, sizeof(strport),
1874 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
1875 goto bad;
1876 }
1877 switch (ai->ai_family) {
1878 case AF_INET:
1879 if (strcmp(strport, "54321") != 0) {
1880 goto bad;
1881 }
1882 if (passive) {
1883 if (strcmp(straddr, "0.0.0.0") != 0) {
1884 goto bad;
1885 }
1886 } else {
1887 if (strcmp(straddr, "127.0.0.1") != 0) {
1888 goto bad;
1889 }
1890 }
1891 inet4++;
1892 break;
1893 case AF_INET6:
1894 if (strcmp(strport, "54321") != 0) {
1895 goto bad;
1896 }
1897 if (passive) {
1898 if (strcmp(straddr, "::") != 0) {
1899 goto bad;
1900 }
1901 } else {
1902 if (strcmp(straddr, "::1") != 0) {
1903 goto bad;
1904 }
1905 }
1906 inet6++;
1907 break;
1908 case AF_UNSPEC:
1909 goto bad;
1910 break;
1911 #ifdef AF_UNIX
1912 case AF_UNIX:
1913 #else
1914 #ifdef AF_LOCAL
1915 case AF_LOCAL:
1916 #endif
1917 #endif
1918 default:
1919 /* another family support? */
1920 break;
1921 }
1922 }
1923 }
1924
1925 /* supported family should be 2, unsupported family should be 0 */
1926 if (!(inet4 == 0 || inet4 == 2))
1927 goto bad;
1928 if (!(inet6 == 0 || inet6 == 2))
1929 goto bad;
1930
1931 if (aitop)
1932 freeaddrinfo(aitop);
1933 exit(0);
1934
1935 bad:
1936 if (aitop)
1937 freeaddrinfo(aitop);
1938 exit(1);
1939 }
1940
1941 EOF
1942 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1943 then
1944 td_cv_buggygetaddrinfo=no
1945 else
1946 echo "configure: failed program was:" >&5
1947 cat conftest.$ac_ext >&5
1948 rm -fr conftest*
1949 td_cv_buggygetaddrinfo=yes
1950 fi
1951 rm -fr conftest*
1952 fi
1953
1954 fi
1955
1956 if test "$td_cv_buggygetaddrinfo" = no; then
1957 echo "$ac_t""good" 1>&6
1958 else
1959 echo "$ac_t""buggy" 1>&6
1960 fi
1961
1962 if test "$td_cv_buggygetaddrinfo" = "yes"; then
1963 if test "$ipv6type" != "linux"; then
1964 echo 'Fatal: You must get working getaddrinfo() function.'
1965 echo ' or you can specify "--disable-ipv6"'.
1966 exit 1
1967 else
1968 echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
1969 echo ' Better upgreade your system library to newest version'
1970 echo ' of GNU C library (aka glibc).'
1971 fi
1972 fi
1973
1974 else :
1975
1976 fi
1977 for ac_func in getaddrinfo getnameinfo
1978 do
1979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1980 echo "configure:1981: checking for $ac_func" >&5
1981 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1982 echo $ac_n "(cached) $ac_c" 1>&6
1983 else
1984 cat > conftest.$ac_ext <<EOF
1985 #line 1986 "configure"
1986 #include "confdefs.h"
1987 /* System header to define __stub macros and hopefully few prototypes,
1988 which can conflict with char $ac_func(); below. */
1989 #include <assert.h>
1990 /* Override any gcc2 internal prototype to avoid an error. */
1991 /* We use char because int might match the return type of a gcc2
1992 builtin and then its argument prototype would still apply. */
1993 char $ac_func();
1994
1995 int main() {
1996
1997 /* The GNU C library defines this for functions which it implements
1998 to always fail with ENOSYS. Some functions are actually named
1999 something starting with __ and the normal name is an alias. */
2000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2001 choke me
2002 #else
2003 $ac_func();
2004 #endif
2005
2006 ; return 0; }
2007 EOF
2008 if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2009 rm -rf conftest*
2010 eval "ac_cv_func_$ac_func=yes"
2011 else
2012 echo "configure: failed program was:" >&5
2013 cat conftest.$ac_ext >&5
2014 rm -rf conftest*
2015 eval "ac_cv_func_$ac_func=no"
2016 fi
2017 rm -f conftest*
2018 fi
2019
2020 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2021 echo "$ac_t""yes" 1>&6
2022 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2023 cat >> confdefs.h <<EOF
2024 #define $ac_tr_func 1
2025 EOF
2026
2027 else
2028 echo "$ac_t""no" 1>&6
2029 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2030 fi
2031 done
2032
2033
2034 fi
2035 echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
2036 echo "configure:2037: checking for inet_ntop" >&5
2037 cat > conftest.$ac_ext <<EOF
2038 #line 2039 "configure"
2039 #include "confdefs.h"
2040 #include <sys/types.h>
2041 #include <sys/socket.h>
2042 #include <netinet/in.h>
2043 #include <arpa/inet.h>
2044 int main() {
2045 char src[4], dst[128];
2046 inet_ntop(AF_INET, src, dst, sizeof(dst));
2047 ; return 0; }
2048 EOF
2049 if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2050 rm -rf conftest*
2051 echo "$ac_t""yes" 1>&6
2052 else
2053 echo "configure: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 rm -rf conftest*
2056 echo "$ac_t""no" 1>&6
2057 for ac_func in inet_ntop
2058 do
2059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2060 echo "configure:2061: checking for $ac_func" >&5
2061 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2062 echo $ac_n "(cached) $ac_c" 1>&6
2063 else
2064 cat > conftest.$ac_ext <<EOF
2065 #line 2066 "configure"
2066 #include "confdefs.h"
2067 /* System header to define __stub macros and hopefully few prototypes,
2068 which can conflict with char $ac_func(); below. */
2069 #include <assert.h>
2070 /* Override any gcc2 internal prototype to avoid an error. */
2071 /* We use char because int might match the return type of a gcc2
2072 builtin and then its argument prototype would still apply. */
2073 char $ac_func();
2074
2075 int main() {
2076
2077 /* The GNU C library defines this for functions which it implements
2078 to always fail with ENOSYS. Some functions are actually named
2079 something starting with __ and the normal name is an alias. */
2080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2081 choke me
2082 #else
2083 $ac_func();
2084 #endif
2085
2086 ; return 0; }
2087 EOF
2088 if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2089 rm -rf conftest*
2090 eval "ac_cv_func_$ac_func=yes"
2091 else
2092 echo "configure: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 rm -rf conftest*
2095 eval "ac_cv_func_$ac_func=no"
2096 fi
2097 rm -f conftest*
2098 fi
2099
2100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2101 echo "$ac_t""yes" 1>&6
2102 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2103 cat >> confdefs.h <<EOF
2104 #define $ac_tr_func 1
2105 EOF
2106
2107 else
2108 echo "$ac_t""no" 1>&6
2109 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2110 fi
2111 done
2112
2113
2114 fi
2115 rm -f conftest*
2116 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
2117 echo "configure:2118: checking for inet_pton" >&5
2118 cat > conftest.$ac_ext <<EOF
2119 #line 2120 "configure"
2120 #include "confdefs.h"
2121 #include <sys/types.h>
2122 #include <sys/socket.h>
2123 #include <netinet/in.h>
2124 #include <arpa/inet.h>
2125 int main() {
2126 char src[128], dst[4];
2127 inet_pton(AF_INET, src, dst);
2128 ; return 0; }
2129 EOF
2130 if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2131 rm -rf conftest*
2132 echo "$ac_t""yes" 1>&6
2133 else
2134 echo "configure: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2136 rm -rf conftest*
2137 echo "$ac_t""no" 1>&6
2138 for ac_func in inet_pton
2139 do
2140 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2141 echo "configure:2142: checking for $ac_func" >&5
2142 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
2144 else
2145 cat > conftest.$ac_ext <<EOF
2146 #line 2147 "configure"
2147 #include "confdefs.h"
2148 /* System header to define __stub macros and hopefully few prototypes,
2149 which can conflict with char $ac_func(); below. */
2150 #include <assert.h>
2151 /* Override any gcc2 internal prototype to avoid an error. */
2152 /* We use char because int might match the return type of a gcc2
2153 builtin and then its argument prototype would still apply. */
2154 char $ac_func();
2155
2156 int main() {
2157
2158 /* The GNU C library defines this for functions which it implements
2159 to always fail with ENOSYS. Some functions are actually named
2160 something starting with __ and the normal name is an alias. */
2161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2162 choke me
2163 #else
2164 $ac_func();
2165 #endif
2166
2167 ; return 0; }
2168 EOF
2169 if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2170 rm -rf conftest*
2171 eval "ac_cv_func_$ac_func=yes"
2172 else
2173 echo "configure: failed program was:" >&5
2174 cat conftest.$ac_ext >&5
2175 rm -rf conftest*
2176 eval "ac_cv_func_$ac_func=no"
2177 fi
2178 rm -f conftest*
2179 fi
2180
2181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2182 echo "$ac_t""yes" 1>&6
2183 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2184 cat >> confdefs.h <<EOF
2185 #define $ac_tr_func 1
2186 EOF
2187
2188 else
2189 echo "$ac_t""no" 1>&6
2190 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2191 fi
2192 done
2193
2194
2195 fi
2196 rm -f conftest*
2197 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
2198 echo "configure:2199: checking for inet_aton" >&5
2199 cat > conftest.$ac_ext <<EOF
2200 #line 2201 "configure"
2201 #include "confdefs.h"
2202 #include <sys/types.h>
2203 #include <netinet/in.h>
2204 #include <arpa/inet.h>
2205 int main() {
2206 char src[128];
2207 struct in_addr dst;
2208 inet_aton(src, &dst);
2209 ; return 0; }
2210 EOF
2211 if { (eval echo configure:2212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2212 rm -rf conftest*
2213 echo "$ac_t""yes" 1>&6
2214 else
2215 echo "configure: failed program was:" >&5
2216 cat conftest.$ac_ext >&5
2217 rm -rf conftest*
2218 echo "$ac_t""no" 1>&6
2219 for ac_func in inet_aton
2220 do
2221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2222 echo "configure:2223: checking for $ac_func" >&5
2223 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2224 echo $ac_n "(cached) $ac_c" 1>&6
2225 else
2226 cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 /* System header to define __stub macros and hopefully few prototypes,
2230 which can conflict with char $ac_func(); below. */
2231 #include <assert.h>
2232 /* Override any gcc2 internal prototype to avoid an error. */
2233 /* We use char because int might match the return type of a gcc2
2234 builtin and then its argument prototype would still apply. */
2235 char $ac_func();
2236
2237 int main() {
2238
2239 /* The GNU C library defines this for functions which it implements
2240 to always fail with ENOSYS. Some functions are actually named
2241 something starting with __ and the normal name is an alias. */
2242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2243 choke me
2244 #else
2245 $ac_func();
2246 #endif
2247
2248 ; return 0; }
2249 EOF
2250 if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2251 rm -rf conftest*
2252 eval "ac_cv_func_$ac_func=yes"
2253 else
2254 echo "configure: failed program was:" >&5
2255 cat conftest.$ac_ext >&5
2256 rm -rf conftest*
2257 eval "ac_cv_func_$ac_func=no"
2258 fi
2259 rm -f conftest*
2260 fi
2261
2262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2263 echo "$ac_t""yes" 1>&6
2264 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2265 cat >> confdefs.h <<EOF
2266 #define $ac_tr_func 1
2267 EOF
2268
2269 else
2270 echo "$ac_t""no" 1>&6
2271 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2272 fi
2273 done
2274
2275
2276 fi
2277 rm -f conftest*
2278
2279
2280 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
2281 echo "configure:2282: checking if sockaddr struct has sa_len member" >&5
2282 if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
2283 echo $ac_n "(cached) $ac_c" 1>&6
2284 else
2285 cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288
2289 # include <sys/types.h>
2290 # include <sys/socket.h>
2291 int main() {
2292 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
2293 ; return 0; }
2294 EOF
2295 if { (eval echo configure:2296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2296 rm -rf conftest*
2297 ac_cv_sockaddr_has_sa_len=yes
2298 else
2299 echo "configure: failed program was:" >&5
2300 cat conftest.$ac_ext >&5
2301 rm -rf conftest*
2302 ac_cv_sockaddr_has_sa_len=no
2303 fi
2304 rm -f conftest*
2305 fi
2306
2307 echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
2308 if test $ac_cv_sockaddr_has_sa_len = yes ; then
2309 cat >> confdefs.h <<\EOF
2310 #define HAVE_SOCKADDR_SA_LEN 1
2311 EOF
2312
2313 fi
2314
2315 if test "$ac_cv_sockaddr_has_sa_len" = no; then
2316 missing_includes=yes
2317 fi
2318
2319 echo $ac_n "checking for dnet_htoa declaration in netdnet/dnetdb.h""... $ac_c" 1>&6
2320 echo "configure:2321: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
2321 if eval "test \"`echo '$''{'td_cv_decl_netdnet_dnetdb_h_dnet_htoa'+set}'`\" = set"; then
2322 echo $ac_n "(cached) $ac_c" 1>&6
2323 else
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <netdnet/dnetdb.h>
2328 EOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330 egrep "dnet_htoa" >/dev/null 2>&1; then
2331 rm -rf conftest*
2332 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
2333 else
2334 rm -rf conftest*
2335 td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
2336 fi
2337 rm -f conftest*
2338
2339 fi
2340
2341 echo "$ac_t""$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" 1>&6
2342 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
2343 cat >> confdefs.h <<\EOF
2344 #define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1
2345 EOF
2346
2347 fi
2348
2349 echo $ac_n "checking size of char""... $ac_c" 1>&6
2350 echo "configure:2351: checking size of char" >&5
2351 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354 if test "$cross_compiling" = yes; then
2355 ac_cv_sizeof_char=1
2356 else
2357 cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360 #include <stdio.h>
2361 main()
2362 {
2363 FILE *f=fopen("conftestval", "w");
2364 if (!f) exit(1);
2365 fprintf(f, "%d\n", sizeof(char));
2366 exit(0);
2367 }
2368 EOF
2369 if { (eval echo configure:2370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2370 then
2371 ac_cv_sizeof_char=`cat conftestval`
2372 else
2373 echo "configure: failed program was:" >&5
2374 cat conftest.$ac_ext >&5
2375 rm -fr conftest*
2376 ac_cv_sizeof_char=0
2377 fi
2378 rm -fr conftest*
2379 fi
2380
2381 fi
2382 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2383 cat >> confdefs.h <<EOF
2384 #define SIZEOF_CHAR $ac_cv_sizeof_char
2385 EOF
2386
2387
2388 echo $ac_n "checking size of short""... $ac_c" 1>&6
2389 echo "configure:2390: checking size of short" >&5
2390 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2391 echo $ac_n "(cached) $ac_c" 1>&6
2392 else
2393 if test "$cross_compiling" = yes; then
2394 ac_cv_sizeof_short=2
2395 else
2396 cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 #include <stdio.h>
2400 main()
2401 {
2402 FILE *f=fopen("conftestval", "w");
2403 if (!f) exit(1);
2404 fprintf(f, "%d\n", sizeof(short));
2405 exit(0);
2406 }
2407 EOF
2408 if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2409 then
2410 ac_cv_sizeof_short=`cat conftestval`
2411 else
2412 echo "configure: failed program was:" >&5
2413 cat conftest.$ac_ext >&5
2414 rm -fr conftest*
2415 ac_cv_sizeof_short=0
2416 fi
2417 rm -fr conftest*
2418 fi
2419
2420 fi
2421 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2422 cat >> confdefs.h <<EOF
2423 #define SIZEOF_SHORT $ac_cv_sizeof_short
2424 EOF
2425
2426
2427 echo $ac_n "checking size of int""... $ac_c" 1>&6
2428 echo "configure:2429: checking size of int" >&5
2429 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2430 echo $ac_n "(cached) $ac_c" 1>&6
2431 else
2432 if test "$cross_compiling" = yes; then
2433 ac_cv_sizeof_int=4
2434 else
2435 cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 #include <stdio.h>
2439 main()
2440 {
2441 FILE *f=fopen("conftestval", "w");
2442 if (!f) exit(1);
2443 fprintf(f, "%d\n", sizeof(int));
2444 exit(0);
2445 }
2446 EOF
2447 if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2448 then
2449 ac_cv_sizeof_int=`cat conftestval`
2450 else
2451 echo "configure: failed program was:" >&5
2452 cat conftest.$ac_ext >&5
2453 rm -fr conftest*
2454 ac_cv_sizeof_int=0
2455 fi
2456 rm -fr conftest*
2457 fi
2458
2459 fi
2460 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2461 cat >> confdefs.h <<EOF
2462 #define SIZEOF_INT $ac_cv_sizeof_int
2463 EOF
2464
2465
2466 echo $ac_n "checking size of long""... $ac_c" 1>&6
2467 echo "configure:2468: checking size of long" >&5
2468 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2469 echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471 if test "$cross_compiling" = yes; then
2472 ac_cv_sizeof_long=4
2473 else
2474 cat > conftest.$ac_ext <<EOF
2475 #line 2476 "configure"
2476 #include "confdefs.h"
2477 #include <stdio.h>
2478 main()
2479 {
2480 FILE *f=fopen("conftestval", "w");
2481 if (!f) exit(1);
2482 fprintf(f, "%d\n", sizeof(long));
2483 exit(0);
2484 }
2485 EOF
2486 if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2487 then
2488 ac_cv_sizeof_long=`cat conftestval`
2489 else
2490 echo "configure: failed program was:" >&5
2491 cat conftest.$ac_ext >&5
2492 rm -fr conftest*
2493 ac_cv_sizeof_long=0
2494 fi
2495 rm -fr conftest*
2496 fi
2497
2498 fi
2499 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2500 cat >> confdefs.h <<EOF
2501 #define SIZEOF_LONG $ac_cv_sizeof_long
2502 EOF
2503
2504
2505
2506
2507
2508 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
2509 echo "configure:2510: checking for addrinfo" >&5
2510 if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
2511 echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513 cat > conftest.$ac_ext <<EOF
2514 #line 2515 "configure"
2515 #include "confdefs.h"
2516
2517 # include <netdb.h>
2518 int main() {
2519 struct addrinfo a
2520 ; return 0; }
2521 EOF
2522 if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2523 rm -rf conftest*
2524 ac_cv_addrinfo=yes
2525 else
2526 echo "configure: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 rm -rf conftest*
2529 ac_cv_addrinfo=no
2530 fi
2531 rm -f conftest*
2532 fi
2533
2534 echo "$ac_t""$ac_cv_addrinfo" 1>&6
2535 if test $ac_cv_addrinfo = yes; then
2536 cat >> confdefs.h <<\EOF
2537 #define HAVE_ADDRINFO 1
2538 EOF
2539
2540 else
2541 cat >> confdefs.h <<\EOF
2542 #define NEED_ADDRINFO_H 1
2543 EOF
2544
2545 fi
2546
2547 if test "$ac_cv_addrinfo" = no; then
2548 missing_includes=yes
2549 fi
2550
2551
2552 echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
2553 echo "configure:2554: checking for NI_MAXSERV" >&5
2554 if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
2555 echo $ac_n "(cached) $ac_c" 1>&6
2556 else
2557 cat > conftest.$ac_ext <<EOF
2558 #line 2559 "configure"
2559 #include "confdefs.h"
2560 #include <netdb.h>
2561 #ifdef NI_MAXSERV
2562 yes
2563 #endif
2564 EOF
2565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2566 egrep "yes" >/dev/null 2>&1; then
2567 rm -rf conftest*
2568 ac_cv_maxserv=yes
2569 else
2570 rm -rf conftest*
2571 ac_cv_maxserv=no
2572 fi
2573 rm -f conftest*
2574
2575 fi
2576
2577 echo "$ac_t""$ac_cv_maxserv" 1>&6
2578 if test $ac_cv_maxserv != yes; then
2579 cat >> confdefs.h <<\EOF
2580 #define NEED_ADDRINFO_H 1
2581 EOF
2582
2583 fi
2584
2585 if test "$ac_cv_maxserv" = no; then
2586 missing_includes=yes
2587 fi
2588
2589
2590 echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
2591 echo "configure:2592: checking for NI_NAMEREQD" >&5
2592 if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595 cat > conftest.$ac_ext <<EOF
2596 #line 2597 "configure"
2597 #include "confdefs.h"
2598 #include <netdb.h>
2599 #ifdef NI_NOFQDN
2600 yes
2601 #endif
2602 EOF
2603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2604 egrep "yes" >/dev/null 2>&1; then
2605 rm -rf conftest*
2606 ac_cv_namereqd=yes
2607 else
2608 rm -rf conftest*
2609 ac_cv_namereqd=no
2610 fi
2611 rm -f conftest*
2612
2613 fi
2614
2615 echo "$ac_t""$ac_cv_namereqd" 1>&6
2616 if test $ac_cv_namereqd != yes; then
2617 cat >> confdefs.h <<\EOF
2618 #define NEED_ADDRINFO_H 1
2619 EOF
2620
2621 fi
2622
2623 if test "$ac_cv_namereqd" = no; then
2624 missing_includes=yes
2625 fi
2626
2627
2628 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
2629 echo "configure:2630: checking for sockaddr_storage" >&5
2630 if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
2631 echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633 cat > conftest.$ac_ext <<EOF
2634 #line 2635 "configure"
2635 #include "confdefs.h"
2636
2637 # include <sys/types.h>
2638 # include <sys/socket.h>
2639 int main() {
2640 struct sockaddr_storage s
2641 ; return 0; }
2642 EOF
2643 if { (eval echo configure:2644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2644 rm -rf conftest*
2645 ac_cv_sa_storage=yes
2646 else
2647 echo "configure: failed program was:" >&5
2648 cat conftest.$ac_ext >&5
2649 rm -rf conftest*
2650 ac_cv_sa_storage=no
2651 fi
2652 rm -f conftest*
2653 fi
2654
2655 echo "$ac_t""$ac_cv_sa_storage" 1>&6
2656 if test $ac_cv_sa_storage = yes; then
2657 cat >> confdefs.h <<\EOF
2658 #define HAVE_SOCKADDR_STORAGE 1
2659 EOF
2660
2661 fi
2662
2663 if test "$ac_cv_sa_storage" = no; then
2664 missing_includes=yes
2665 fi
2666
2667
2668 ac_cv_addrsz=yes
2669 echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
2670 echo "configure:2671: checking for INADDRSZ" >&5
2671 if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
2672 echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674 cat > conftest.$ac_ext <<EOF
2675 #line 2676 "configure"
2676 #include "confdefs.h"
2677
2678 # include <arpa/nameser.h>
2679 int main() {
2680 int a = INADDRSZ
2681 ; return 0; }
2682 EOF
2683 if { (eval echo configure:2684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2684 rm -rf conftest*
2685 ac_cv_inaddrsz=yes
2686 else
2687 echo "configure: failed program was:" >&5
2688 cat conftest.$ac_ext >&5
2689 rm -rf conftest*
2690 ac_cv_inaddrsz=no
2691 fi
2692 rm -f conftest*
2693 fi
2694
2695 echo "$ac_t""$ac_cv_inaddrsz" 1>&6
2696 if test $ac_cv_inaddrsz = yes; then
2697 cat >> confdefs.h <<\EOF
2698 #define HAVE_INADDRSZ 1
2699 EOF
2700
2701 else
2702 ac_cv_addrsz=no
2703 fi
2704 echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
2705 echo "configure:2706: checking for IN6ADDRSZ" >&5
2706 if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
2707 echo $ac_n "(cached) $ac_c" 1>&6
2708 else
2709 cat > conftest.$ac_ext <<EOF
2710 #line 2711 "configure"
2711 #include "confdefs.h"
2712
2713 # include <arpa/nameser.h>
2714 int main() {
2715 int a = IN6ADDRSZ
2716 ; return 0; }
2717 EOF
2718 if { (eval echo configure:2719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2719 rm -rf conftest*
2720 ac_cv_in6addrsz=yes
2721 else
2722 echo "configure: failed program was:" >&5
2723 cat conftest.$ac_ext >&5
2724 rm -rf conftest*
2725 ac_cv_in6addrsz=no
2726 fi
2727 rm -f conftest*
2728 fi
2729
2730 echo "$ac_t""$ac_cv_in6addrsz" 1>&6
2731 if test $ac_cv_in6addrsz = yes; then
2732 cat >> confdefs.h <<\EOF
2733 #define HAVE_IN6ADDRSZ 1
2734 EOF
2735
2736 else
2737 ac_cv_addrsz=no
2738 fi
2739
2740 if test "$ac_cv_addrsz" = no; then
2741 missing_includes=yes
2742 fi
2743
2744
2745 echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
2746 echo "configure:2747: checking for RES_USE_INET6" >&5
2747 if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750 cat > conftest.$ac_ext <<EOF
2751 #line 2752 "configure"
2752 #include "confdefs.h"
2753
2754 # include <sys/types.h>
2755 # include <netinet/in.h>
2756 # include <resolv.h>
2757 int main() {
2758 int a = RES_USE_INET6
2759 ; return 0; }
2760 EOF
2761 if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2762 rm -rf conftest*
2763 ac_cv_res_inet6=yes
2764 else
2765 echo "configure: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
2767 rm -rf conftest*
2768 ac_cv_res_inet6=no
2769 fi
2770 rm -f conftest*
2771 fi
2772
2773 echo "$ac_t""$ac_cv_res_inet6" 1>&6
2774 if test $ac_cv_res_inet6 = yes; then
2775 cat >> confdefs.h <<\EOF
2776 #define HAVE_RES_USE_INET6 1
2777 EOF
2778
2779 fi
2780
2781 if test "$ac_cv_res_inet6" = no; then
2782 missing_includes=yes
2783 fi
2784
2785
2786 echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
2787 echo "configure:2788: checking for res_state_ext" >&5
2788 if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
2789 echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791 cat > conftest.$ac_ext <<EOF
2792 #line 2793 "configure"
2793 #include "confdefs.h"
2794
2795 # include <sys/types.h>
2796 # include <netinet/in.h>
2797 # include <netinet6/in6.h>
2798 # include <resolv.h>
2799 int main() {
2800 struct __res_state_ext e
2801 ; return 0; }
2802 EOF
2803 if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2804 rm -rf conftest*
2805 ac_cv_res_state_ext=yes
2806 else
2807 echo "configure: failed program was:" >&5
2808 cat conftest.$ac_ext >&5
2809 rm -rf conftest*
2810 ac_cv_res_state_ext=no
2811 fi
2812 rm -f conftest*
2813 fi
2814
2815 echo "$ac_t""$ac_cv_res_state_ext" 1>&6
2816 if test $ac_cv_res_state_ext = yes; then
2817 cat >> confdefs.h <<\EOF
2818 #define HAVE_RES_STATE_EXT 1
2819 EOF
2820
2821 fi
2822
2823 if test "$ac_cv_res_state_ext" = no; then
2824 missing_includes=yes
2825 fi
2826
2827
2828 echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
2829 echo "configure:2830: checking for nsort in res_state" >&5
2830 if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832 else
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836
2837 # include <sys/types.h>
2838 # include <netinet/in.h>
2839 # include <netinet6/in6.h>
2840 # include <resolv.h>
2841 int main() {
2842 struct __res_state e; e.nsort = 0
2843 ; return 0; }
2844 EOF
2845 if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2846 rm -rf conftest*
2847 ac_cv_res_state=yes
2848 else
2849 echo "configure: failed program was:" >&5
2850 cat conftest.$ac_ext >&5
2851 rm -rf conftest*
2852 ac_cv_res_state=no
2853 fi
2854 rm -f conftest*
2855 fi
2856
2857 echo "$ac_t""$ac_cv_res_state" 1>&6
2858 if test $ac_cv_res_state = yes; then
2859 cat >> confdefs.h <<\EOF
2860 #define HAVE_NEW_RES_STATE 1
2861 EOF
2862
2863 fi
2864
2865
2866 if test "$missing_includes" = "yes"; then
2867 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
2868 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
2869 fi
2870
2871
2872 for ac_func in vfprintf strcasecmp strlcat strlcpy strdup
2873 do
2874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2875 echo "configure:2876: checking for $ac_func" >&5
2876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879 cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 /* System header to define __stub macros and hopefully few prototypes,
2883 which can conflict with char $ac_func(); below. */
2884 #include <assert.h>
2885 /* Override any gcc2 internal prototype to avoid an error. */
2886 /* We use char because int might match the return type of a gcc2
2887 builtin and then its argument prototype would still apply. */
2888 char $ac_func();
2889
2890 int main() {
2891
2892 /* The GNU C library defines this for functions which it implements
2893 to always fail with ENOSYS. Some functions are actually named
2894 something starting with __ and the normal name is an alias. */
2895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2896 choke me
2897 #else
2898 $ac_func();
2899 #endif
2900
2901 ; return 0; }
2902 EOF
2903 if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2904 rm -rf conftest*
2905 eval "ac_cv_func_$ac_func=yes"
2906 else
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 rm -rf conftest*
2910 eval "ac_cv_func_$ac_func=no"
2911 fi
2912 rm -f conftest*
2913 fi
2914
2915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2916 echo "$ac_t""yes" 1>&6
2917 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2918 cat >> confdefs.h <<EOF
2919 #define $ac_tr_func 1
2920 EOF
2921
2922 else
2923 echo "$ac_t""no" 1>&6
2924 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2925 fi
2926 done
2927
2928
2929 for ac_func in ether_ntohost
2930 do
2931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2932 echo "configure:2933: checking for $ac_func" >&5
2933 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2934 echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936 cat > conftest.$ac_ext <<EOF
2937 #line 2938 "configure"
2938 #include "confdefs.h"
2939 /* System header to define __stub macros and hopefully few prototypes,
2940 which can conflict with char $ac_func(); below. */
2941 #include <assert.h>
2942 /* Override any gcc2 internal prototype to avoid an error. */
2943 /* We use char because int might match the return type of a gcc2
2944 builtin and then its argument prototype would still apply. */
2945 char $ac_func();
2946
2947 int main() {
2948
2949 /* The GNU C library defines this for functions which it implements
2950 to always fail with ENOSYS. Some functions are actually named
2951 something starting with __ and the normal name is an alias. */
2952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2953 choke me
2954 #else
2955 $ac_func();
2956 #endif
2957
2958 ; return 0; }
2959 EOF
2960 if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2961 rm -rf conftest*
2962 eval "ac_cv_func_$ac_func=yes"
2963 else
2964 echo "configure: failed program was:" >&5
2965 cat conftest.$ac_ext >&5
2966 rm -rf conftest*
2967 eval "ac_cv_func_$ac_func=no"
2968 fi
2969 rm -f conftest*
2970 fi
2971
2972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2973 echo "$ac_t""yes" 1>&6
2974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2975 cat >> confdefs.h <<EOF
2976 #define $ac_tr_func 1
2977 EOF
2978
2979 echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
2980 echo "configure:2981: checking for buggy ether_ntohost" >&5
2981 if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
2982 echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984
2985 if test "$cross_compiling" = yes; then
2986 ac_cv_buggy_ether_ntohost="not while cross-compiling"
2987 else
2988 cat > conftest.$ac_ext <<EOF
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991
2992 #include <netdb.h>
2993 #include <sys/types.h>
2994 #include <sys/param.h>
2995 #include <sys/socket.h>
2996
2997 int
2998 main(int argc, char **argv)
2999 {
3000 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
3001 char name[MAXHOSTNAMELEN];
3002
3003 ether_ntohost(name, (struct ether_addr *)ea);
3004 exit(0);
3005 }
3006
3007 EOF
3008 if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3009 then
3010 ac_cv_buggy_ether_ntohost=no
3011 else
3012 echo "configure: failed program was:" >&5
3013 cat conftest.$ac_ext >&5
3014 rm -fr conftest*
3015 ac_cv_buggy_ether_ntohost=yes
3016 fi
3017 rm -fr conftest*
3018 fi
3019
3020 fi
3021
3022 echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6
3023 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
3024 cat >> confdefs.h <<\EOF
3025 #define USE_ETHER_NTOHOST 1
3026 EOF
3027
3028 fi
3029
3030 else
3031 echo "$ac_t""no" 1>&6
3032 fi
3033 done
3034
3035 for ac_func in setlinebuf
3036 do
3037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3038 echo "configure:3039: checking for $ac_func" >&5
3039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3040 echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042 cat > conftest.$ac_ext <<EOF
3043 #line 3044 "configure"
3044 #include "confdefs.h"
3045 /* System header to define __stub macros and hopefully few prototypes,
3046 which can conflict with char $ac_func(); below. */
3047 #include <assert.h>
3048 /* Override any gcc2 internal prototype to avoid an error. */
3049 /* We use char because int might match the return type of a gcc2
3050 builtin and then its argument prototype would still apply. */
3051 char $ac_func();
3052
3053 int main() {
3054
3055 /* The GNU C library defines this for functions which it implements
3056 to always fail with ENOSYS. Some functions are actually named
3057 something starting with __ and the normal name is an alias. */
3058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3059 choke me
3060 #else
3061 $ac_func();
3062 #endif
3063
3064 ; return 0; }
3065 EOF
3066 if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3067 rm -rf conftest*
3068 eval "ac_cv_func_$ac_func=yes"
3069 else
3070 echo "configure: failed program was:" >&5
3071 cat conftest.$ac_ext >&5
3072 rm -rf conftest*
3073 eval "ac_cv_func_$ac_func=no"
3074 fi
3075 rm -f conftest*
3076 fi
3077
3078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3079 echo "$ac_t""yes" 1>&6
3080 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3081 cat >> confdefs.h <<EOF
3082 #define $ac_tr_func 1
3083 EOF
3084
3085 else
3086 echo "$ac_t""no" 1>&6
3087 fi
3088 done
3089
3090
3091 needsnprintf=no
3092 for ac_func in vsnprintf snprintf
3093 do
3094 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_func" >&5
3096 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3097 echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099 cat > conftest.$ac_ext <<EOF
3100 #line 3101 "configure"
3101 #include "confdefs.h"
3102 /* System header to define __stub macros and hopefully few prototypes,
3103 which can conflict with char $ac_func(); below. */
3104 #include <assert.h>
3105 /* Override any gcc2 internal prototype to avoid an error. */
3106 /* We use char because int might match the return type of a gcc2
3107 builtin and then its argument prototype would still apply. */
3108 char $ac_func();
3109
3110 int main() {
3111
3112 /* The GNU C library defines this for functions which it implements
3113 to always fail with ENOSYS. Some functions are actually named
3114 something starting with __ and the normal name is an alias. */
3115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3116 choke me
3117 #else
3118 $ac_func();
3119 #endif
3120
3121 ; return 0; }
3122 EOF
3123 if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3124 rm -rf conftest*
3125 eval "ac_cv_func_$ac_func=yes"
3126 else
3127 echo "configure: failed program was:" >&5
3128 cat conftest.$ac_ext >&5
3129 rm -rf conftest*
3130 eval "ac_cv_func_$ac_func=no"
3131 fi
3132 rm -f conftest*
3133 fi
3134
3135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3136 echo "$ac_t""yes" 1>&6
3137 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3138 cat >> confdefs.h <<EOF
3139 #define $ac_tr_func 1
3140 EOF
3141
3142 else
3143 echo "$ac_t""no" 1>&6
3144 needsnprintf=yes
3145 fi
3146 done
3147
3148 if test $needsnprintf = yes; then
3149 LIBOBJS="$LIBOBJS snprintf.o"
3150 fi
3151
3152
3153 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3154 echo "configure:3155: checking return type of signal handlers" >&5
3155 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3156 echo $ac_n "(cached) $ac_c" 1>&6
3157 else
3158 cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161 #include <sys/types.h>
3162 #include <signal.h>
3163 #ifdef signal
3164 #undef signal
3165 #endif
3166 #ifdef __cplusplus
3167 extern "C" void (*signal (int, void (*)(int)))(int);
3168 #else
3169 void (*signal ()) ();
3170 #endif
3171
3172 int main() {
3173 int i;
3174 ; return 0; }
3175 EOF
3176 if { (eval echo configure:3177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3177 rm -rf conftest*
3178 ac_cv_type_signal=void
3179 else
3180 echo "configure: failed program was:" >&5
3181 cat conftest.$ac_ext >&5
3182 rm -rf conftest*
3183 ac_cv_type_signal=int
3184 fi
3185 rm -f conftest*
3186 fi
3187
3188 echo "$ac_t""$ac_cv_type_signal" 1>&6
3189 cat >> confdefs.h <<EOF
3190 #define RETSIGTYPE $ac_cv_type_signal
3191 EOF
3192
3193
3194 if test "$ac_cv_type_signal" = void ; then
3195 cat >> confdefs.h <<\EOF
3196 #define RETSIGVAL
3197 EOF
3198
3199 else
3200 cat >> confdefs.h <<\EOF
3201 #define RETSIGVAL (0)
3202 EOF
3203
3204 fi
3205 case "$host_os" in
3206
3207 irix*)
3208 cat >> confdefs.h <<\EOF
3209 #define _BSD_SIGNALS 1
3210 EOF
3211
3212 ;;
3213
3214 *)
3215 for ac_func in sigaction
3216 do
3217 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3218 echo "configure:3219: checking for $ac_func" >&5
3219 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3220 echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222 cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 /* System header to define __stub macros and hopefully few prototypes,
3226 which can conflict with char $ac_func(); below. */
3227 #include <assert.h>
3228 /* Override any gcc2 internal prototype to avoid an error. */
3229 /* We use char because int might match the return type of a gcc2
3230 builtin and then its argument prototype would still apply. */
3231 char $ac_func();
3232
3233 int main() {
3234
3235 /* The GNU C library defines this for functions which it implements
3236 to always fail with ENOSYS. Some functions are actually named
3237 something starting with __ and the normal name is an alias. */
3238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3239 choke me
3240 #else
3241 $ac_func();
3242 #endif
3243
3244 ; return 0; }
3245 EOF
3246 if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3247 rm -rf conftest*
3248 eval "ac_cv_func_$ac_func=yes"
3249 else
3250 echo "configure: failed program was:" >&5
3251 cat conftest.$ac_ext >&5
3252 rm -rf conftest*
3253 eval "ac_cv_func_$ac_func=no"
3254 fi
3255 rm -f conftest*
3256 fi
3257
3258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3259 echo "$ac_t""yes" 1>&6
3260 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3261 cat >> confdefs.h <<EOF
3262 #define $ac_tr_func 1
3263 EOF
3264
3265 else
3266 echo "$ac_t""no" 1>&6
3267 fi
3268 done
3269
3270 if test $ac_cv_func_sigaction = no ; then
3271 for ac_func in sigset
3272 do
3273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3274 echo "configure:3275: checking for $ac_func" >&5
3275 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3276 echo $ac_n "(cached) $ac_c" 1>&6
3277 else
3278 cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 /* System header to define __stub macros and hopefully few prototypes,
3282 which can conflict with char $ac_func(); below. */
3283 #include <assert.h>
3284 /* Override any gcc2 internal prototype to avoid an error. */
3285 /* We use char because int might match the return type of a gcc2
3286 builtin and then its argument prototype would still apply. */
3287 char $ac_func();
3288
3289 int main() {
3290
3291 /* The GNU C library defines this for functions which it implements
3292 to always fail with ENOSYS. Some functions are actually named
3293 something starting with __ and the normal name is an alias. */
3294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3295 choke me
3296 #else
3297 $ac_func();
3298 #endif
3299
3300 ; return 0; }
3301 EOF
3302 if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3303 rm -rf conftest*
3304 eval "ac_cv_func_$ac_func=yes"
3305 else
3306 echo "configure: failed program was:" >&5
3307 cat conftest.$ac_ext >&5
3308 rm -rf conftest*
3309 eval "ac_cv_func_$ac_func=no"
3310 fi
3311 rm -f conftest*
3312 fi
3313
3314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3315 echo "$ac_t""yes" 1>&6
3316 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3317 cat >> confdefs.h <<EOF
3318 #define $ac_tr_func 1
3319 EOF
3320
3321 else
3322 echo "$ac_t""no" 1>&6
3323 fi
3324 done
3325
3326 fi
3327 ;;
3328 esac
3329
3330
3331 echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6
3332 echo "configure:3333: checking for library containing dnet_htoa" >&5
3333 if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then
3334 echo $ac_n "(cached) $ac_c" 1>&6
3335 else
3336 ac_func_search_save_LIBS="$LIBS"
3337 ac_cv_search_dnet_htoa="no"
3338 cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 /* Override any gcc2 internal prototype to avoid an error. */
3342 /* We use char because int might match the return type of a gcc2
3343 builtin and then its argument prototype would still apply. */
3344 char dnet_htoa();
3345
3346 int main() {
3347 dnet_htoa()
3348 ; return 0; }
3349 EOF
3350 if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3351 rm -rf conftest*
3352 ac_cv_search_dnet_htoa="none required"
3353 else
3354 echo "configure: failed program was:" >&5
3355 cat conftest.$ac_ext >&5
3356 fi
3357 rm -f conftest*
3358 test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do
3359 LIBS="-l$i $ac_func_search_save_LIBS"
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 /* Override any gcc2 internal prototype to avoid an error. */
3364 /* We use char because int might match the return type of a gcc2
3365 builtin and then its argument prototype would still apply. */
3366 char dnet_htoa();
3367
3368 int main() {
3369 dnet_htoa()
3370 ; return 0; }
3371 EOF
3372 if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3373 rm -rf conftest*
3374 ac_cv_search_dnet_htoa="-l$i"
3375 break
3376 else
3377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 fi
3380 rm -f conftest*
3381 done
3382 LIBS="$ac_func_search_save_LIBS"
3383 fi
3384
3385 echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6
3386 if test "$ac_cv_search_dnet_htoa" != "no"; then
3387 test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS"
3388 cat >> confdefs.h <<\EOF
3389 #define HAVE_DNET_HTOA 1
3390 EOF
3391
3392 else :
3393
3394 fi
3395
3396 echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
3397 echo "configure:3398: checking for main in -lrpc" >&5
3398 ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
3399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3400 echo $ac_n "(cached) $ac_c" 1>&6
3401 else
3402 ac_save_LIBS="$LIBS"
3403 LIBS="-lrpc $LIBS"
3404 cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407
3408 int main() {
3409 main()
3410 ; return 0; }
3411 EOF
3412 if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3413 rm -rf conftest*
3414 eval "ac_cv_lib_$ac_lib_var=yes"
3415 else
3416 echo "configure: failed program was:" >&5
3417 cat conftest.$ac_ext >&5
3418 rm -rf conftest*
3419 eval "ac_cv_lib_$ac_lib_var=no"
3420 fi
3421 rm -f conftest*
3422 LIBS="$ac_save_LIBS"
3423
3424 fi
3425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3426 echo "$ac_t""yes" 1>&6
3427 ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3428 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3429 cat >> confdefs.h <<EOF
3430 #define $ac_tr_lib 1
3431 EOF
3432
3433 LIBS="-lrpc $LIBS"
3434
3435 else
3436 echo "$ac_t""no" 1>&6
3437 fi
3438
3439
3440 echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
3441 echo "configure:3442: checking for library containing getrpcbynumber" >&5
3442 if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
3443 echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445 ac_func_search_save_LIBS="$LIBS"
3446 ac_cv_search_getrpcbynumber="no"
3447 cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450 /* Override any gcc2 internal prototype to avoid an error. */
3451 /* We use char because int might match the return type of a gcc2
3452 builtin and then its argument prototype would still apply. */
3453 char getrpcbynumber();
3454
3455 int main() {
3456 getrpcbynumber()
3457 ; return 0; }
3458 EOF
3459 if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3460 rm -rf conftest*
3461 ac_cv_search_getrpcbynumber="none required"
3462 else
3463 echo "configure: failed program was:" >&5
3464 cat conftest.$ac_ext >&5
3465 fi
3466 rm -f conftest*
3467 test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
3468 LIBS="-l$i $ac_func_search_save_LIBS"
3469 cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3472 /* Override any gcc2 internal prototype to avoid an error. */
3473 /* We use char because int might match the return type of a gcc2
3474 builtin and then its argument prototype would still apply. */
3475 char getrpcbynumber();
3476
3477 int main() {
3478 getrpcbynumber()
3479 ; return 0; }
3480 EOF
3481 if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3482 rm -rf conftest*
3483 ac_cv_search_getrpcbynumber="-l$i"
3484 break
3485 else
3486 echo "configure: failed program was:" >&5
3487 cat conftest.$ac_ext >&5
3488 fi
3489 rm -f conftest*
3490 done
3491 LIBS="$ac_func_search_save_LIBS"
3492 fi
3493
3494 echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6
3495 if test "$ac_cv_search_getrpcbynumber" != "no"; then
3496 test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS"
3497
3498 else :
3499
3500 fi
3501
3502
3503
3504 # Most operating systems have gethostbyname() in the default searched
3505 # libraries (i.e. libc):
3506 # Some OSes (eg. Solaris) place it in libnsl
3507 # Some strange OSes (SINIX) have it in libsocket:
3508
3509 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3510 echo "configure:3511: checking for library containing gethostbyname" >&5
3511 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3512 echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514 ac_func_search_save_LIBS="$LIBS"
3515 ac_cv_search_gethostbyname="no"
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 /* Override any gcc2 internal prototype to avoid an error. */
3520 /* We use char because int might match the return type of a gcc2
3521 builtin and then its argument prototype would still apply. */
3522 char gethostbyname();
3523
3524 int main() {
3525 gethostbyname()
3526 ; return 0; }
3527 EOF
3528 if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3529 rm -rf conftest*
3530 ac_cv_search_gethostbyname="none required"
3531 else
3532 echo "configure: failed program was:" >&5
3533 cat conftest.$ac_ext >&5
3534 fi
3535 rm -f conftest*
3536 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
3537 LIBS="-l$i $ac_func_search_save_LIBS"
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 /* Override any gcc2 internal prototype to avoid an error. */
3542 /* We use char because int might match the return type of a gcc2
3543 builtin and then its argument prototype would still apply. */
3544 char gethostbyname();
3545
3546 int main() {
3547 gethostbyname()
3548 ; return 0; }
3549 EOF
3550 if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3551 rm -rf conftest*
3552 ac_cv_search_gethostbyname="-l$i"
3553 break
3554 else
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
3557 fi
3558 rm -f conftest*
3559 done
3560 LIBS="$ac_func_search_save_LIBS"
3561 fi
3562
3563 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3564 if test "$ac_cv_search_gethostbyname" != "no"; then
3565 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3566
3567 else :
3568
3569 fi
3570 # Unfortunately libsocket sometimes depends on libnsl and
3571 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
3572 if test "$ac_cv_search_gethostbyname" = "no"
3573 then
3574 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3575 echo "configure:3576: checking for gethostbyname in -lsocket" >&5
3576 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
3577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3578 echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580 ac_save_LIBS="$LIBS"
3581 LIBS="-lsocket -lnsl $LIBS"
3582 cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 /* Override any gcc2 internal prototype to avoid an error. */
3586 /* We use char because int might match the return type of a gcc2
3587 builtin and then its argument prototype would still apply. */
3588 char gethostbyname();
3589
3590 int main() {
3591 gethostbyname()
3592 ; return 0; }
3593 EOF
3594 if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3595 rm -rf conftest*
3596 eval "ac_cv_lib_$ac_lib_var=yes"
3597 else
3598 echo "configure: failed program was:" >&5
3599 cat conftest.$ac_ext >&5
3600 rm -rf conftest*
3601 eval "ac_cv_lib_$ac_lib_var=no"
3602 fi
3603 rm -f conftest*
3604 LIBS="$ac_save_LIBS"
3605
3606 fi
3607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3608 echo "$ac_t""yes" 1>&6
3609 LIBS="-lsocket -lnsl $LIBS"
3610 else
3611 echo "$ac_t""no" 1>&6
3612 fi
3613
3614 fi
3615
3616 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
3617 echo "configure:3618: checking for library containing socket" >&5
3618 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
3619 echo $ac_n "(cached) $ac_c" 1>&6
3620 else
3621 ac_func_search_save_LIBS="$LIBS"
3622 ac_cv_search_socket="no"
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 /* Override any gcc2 internal prototype to avoid an error. */
3627 /* We use char because int might match the return type of a gcc2
3628 builtin and then its argument prototype would still apply. */
3629 char socket();
3630
3631 int main() {
3632 socket()
3633 ; return 0; }
3634 EOF
3635 if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3636 rm -rf conftest*
3637 ac_cv_search_socket="none required"
3638 else
3639 echo "configure: failed program was:" >&5
3640 cat conftest.$ac_ext >&5
3641 fi
3642 rm -f conftest*
3643 test "$ac_cv_search_socket" = "no" && for i in socket; do
3644 LIBS="-l$i $ac_func_search_save_LIBS"
3645 cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 /* Override any gcc2 internal prototype to avoid an error. */
3649 /* We use char because int might match the return type of a gcc2
3650 builtin and then its argument prototype would still apply. */
3651 char socket();
3652
3653 int main() {
3654 socket()
3655 ; return 0; }
3656 EOF
3657 if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3658 rm -rf conftest*
3659 ac_cv_search_socket="-l$i"
3660 break
3661 else
3662 echo "configure: failed program was:" >&5
3663 cat conftest.$ac_ext >&5
3664 fi
3665 rm -f conftest*
3666 done
3667 LIBS="$ac_func_search_save_LIBS"
3668 fi
3669
3670 echo "$ac_t""$ac_cv_search_socket" 1>&6
3671 if test "$ac_cv_search_socket" != "no"; then
3672 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
3673
3674 else :
3675 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3676 echo "configure:3677: checking for socket in -lsocket" >&5
3677 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3679 echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681 ac_save_LIBS="$LIBS"
3682 LIBS="-lsocket -lnsl $LIBS"
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 /* Override any gcc2 internal prototype to avoid an error. */
3687 /* We use char because int might match the return type of a gcc2
3688 builtin and then its argument prototype would still apply. */
3689 char socket();
3690
3691 int main() {
3692 socket()
3693 ; return 0; }
3694 EOF
3695 if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3696 rm -rf conftest*
3697 eval "ac_cv_lib_$ac_lib_var=yes"
3698 else
3699 echo "configure: failed program was:" >&5
3700 cat conftest.$ac_ext >&5
3701 rm -rf conftest*
3702 eval "ac_cv_lib_$ac_lib_var=no"
3703 fi
3704 rm -f conftest*
3705 LIBS="$ac_save_LIBS"
3706
3707 fi
3708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3709 echo "$ac_t""yes" 1>&6
3710 LIBS="-lsocket -lnsl $LIBS"
3711 else
3712 echo "$ac_t""no" 1>&6
3713 fi
3714
3715 fi
3716 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3717
3718 echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
3719 echo "configure:3720: checking for library containing putmsg" >&5
3720 if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
3721 echo $ac_n "(cached) $ac_c" 1>&6
3722 else
3723 ac_func_search_save_LIBS="$LIBS"
3724 ac_cv_search_putmsg="no"
3725 cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3728 /* Override any gcc2 internal prototype to avoid an error. */
3729 /* We use char because int might match the return type of a gcc2
3730 builtin and then its argument prototype would still apply. */
3731 char putmsg();
3732
3733 int main() {
3734 putmsg()
3735 ; return 0; }
3736 EOF
3737 if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3738 rm -rf conftest*
3739 ac_cv_search_putmsg="none required"
3740 else
3741 echo "configure: failed program was:" >&5
3742 cat conftest.$ac_ext >&5
3743 fi
3744 rm -f conftest*
3745 test "$ac_cv_search_putmsg" = "no" && for i in str; do
3746 LIBS="-l$i $ac_func_search_save_LIBS"
3747 cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 /* Override any gcc2 internal prototype to avoid an error. */
3751 /* We use char because int might match the return type of a gcc2
3752 builtin and then its argument prototype would still apply. */
3753 char putmsg();
3754
3755 int main() {
3756 putmsg()
3757 ; return 0; }
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3760 rm -rf conftest*
3761 ac_cv_search_putmsg="-l$i"
3762 break
3763 else
3764 echo "configure: failed program was:" >&5
3765 cat conftest.$ac_ext >&5
3766 fi
3767 rm -f conftest*
3768 done
3769 LIBS="$ac_func_search_save_LIBS"
3770 fi
3771
3772 echo "$ac_t""$ac_cv_search_putmsg" 1>&6
3773 if test "$ac_cv_search_putmsg" != "no"; then
3774 test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
3775
3776 else :
3777
3778 fi
3779
3780
3781 LBL_LIBS="$LIBS"
3782 pfopen=/usr/examples/packetfilter/pfopen.c
3783 if test -f $pfopen ; then
3784 for ac_func in pfopen
3785 do
3786 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3787 echo "configure:3788: checking for $ac_func" >&5
3788 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3789 echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791 cat > conftest.$ac_ext <<EOF
3792 #line 3793 "configure"
3793 #include "confdefs.h"
3794 /* System header to define __stub macros and hopefully few prototypes,
3795 which can conflict with char $ac_func(); below. */
3796 #include <assert.h>
3797 /* Override any gcc2 internal prototype to avoid an error. */
3798 /* We use char because int might match the return type of a gcc2
3799 builtin and then its argument prototype would still apply. */
3800 char $ac_func();
3801
3802 int main() {
3803
3804 /* The GNU C library defines this for functions which it implements
3805 to always fail with ENOSYS. Some functions are actually named
3806 something starting with __ and the normal name is an alias. */
3807 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3808 choke me
3809 #else
3810 $ac_func();
3811 #endif
3812
3813 ; return 0; }
3814 EOF
3815 if { (eval echo configure:3816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3816 rm -rf conftest*
3817 eval "ac_cv_func_$ac_func=yes"
3818 else
3819 echo "configure: failed program was:" >&5
3820 cat conftest.$ac_ext >&5
3821 rm -rf conftest*
3822 eval "ac_cv_func_$ac_func=no"
3823 fi
3824 rm -f conftest*
3825 fi
3826
3827 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3828 echo "$ac_t""yes" 1>&6
3829 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3830 cat >> confdefs.h <<EOF
3831 #define $ac_tr_func 1
3832 EOF
3833
3834 else
3835 echo "$ac_t""no" 1>&6
3836 fi
3837 done
3838
3839 if test $ac_cv_func_pfopen = "no" ; then
3840 echo "$ac_t""Using $pfopen" 1>&6
3841 LIBS="$LIBS $pfopen"
3842 fi
3843 fi
3844 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3845 echo "configure:3846: checking for local pcap library" >&5
3846 libpcap=FAIL
3847 lastdir=FAIL
3848 places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \
3849 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3850 for dir in $places ../libpcap libpcap ; do
3851 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3852 if test $lastdir = $basedir ; then
3853 continue;
3854 fi
3855 lastdir=$dir
3856 if test -r $dir/libpcap.a ; then
3857 libpcap=$dir/libpcap.a
3858 d=$dir
3859 fi
3860 done
3861 if test $libpcap = FAIL ; then
3862 echo "$ac_t""not found" 1>&6
3863 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3864 echo "configure:3865: checking for main in -lpcap" >&5
3865 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3866 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3867 echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869 ac_save_LIBS="$LIBS"
3870 LIBS="-lpcap $LIBS"
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874
3875 int main() {
3876 main()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3880 rm -rf conftest*
3881 eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883 echo "configure: failed program was:" >&5
3884 cat conftest.$ac_ext >&5
3885 rm -rf conftest*
3886 eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893 echo "$ac_t""yes" 1>&6
3894 libpcap="-lpcap"
3895 else
3896 echo "$ac_t""no" 1>&6
3897 fi
3898
3899 if test $libpcap = FAIL ; then
3900 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3901 fi
3902 else
3903 V_PCAPDEP=$libpcap
3904 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
3905 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
3906 if test -r $d/pcap.h; then
3907 V_INCLS="-I$d $V_INCLS"
3908 elif test -r $places/pcap.h; then
3909 V_INCLS="-I$places $V_INCLS"
3910 else
3911 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3912 fi
3913 echo "$ac_t""$libpcap" 1>&6
3914 fi
3915 LIBS="$libpcap $LIBS"
3916 case "$host_os" in
3917
3918 aix*)
3919 pseexe="/lib/pse.exp"
3920 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $pseexe" >&5
3922 if test -f $pseexe ; then
3923 echo "$ac_t""yes" 1>&6
3924 LIBS="$LIBS -I:$pseexe"
3925 fi
3926 ;;
3927 esac
3928
3929 for ac_func in bpf_dump
3930 do
3931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3932 echo "configure:3933: checking for $ac_func" >&5
3933 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3934 echo $ac_n "(cached) $ac_c" 1>&6
3935 else
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 /* System header to define __stub macros and hopefully few prototypes,
3940 which can conflict with char $ac_func(); below. */
3941 #include <assert.h>
3942 /* Override any gcc2 internal prototype to avoid an error. */
3943 /* We use char because int might match the return type of a gcc2
3944 builtin and then its argument prototype would still apply. */
3945 char $ac_func();
3946
3947 int main() {
3948
3949 /* The GNU C library defines this for functions which it implements
3950 to always fail with ENOSYS. Some functions are actually named
3951 something starting with __ and the normal name is an alias. */
3952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3953 choke me
3954 #else
3955 $ac_func();
3956 #endif
3957
3958 ; return 0; }
3959 EOF
3960 if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3961 rm -rf conftest*
3962 eval "ac_cv_func_$ac_func=yes"
3963 else
3964 echo "configure: failed program was:" >&5
3965 cat conftest.$ac_ext >&5
3966 rm -rf conftest*
3967 eval "ac_cv_func_$ac_func=no"
3968 fi
3969 rm -f conftest*
3970 fi
3971
3972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3973 echo "$ac_t""yes" 1>&6
3974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3975 cat >> confdefs.h <<EOF
3976 #define $ac_tr_func 1
3977 EOF
3978
3979 else
3980 echo "$ac_t""no" 1>&6
3981 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3982 fi
3983 done
3984
3985
3986 V_GROUP=0
3987 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
3988 V_GROUP=wheel
3989 fi
3990 case "$host_os" in
3991
3992 aix*)
3993 cat >> confdefs.h <<\EOF
3994 #define _SUN 1
3995 EOF
3996
3997 ;;
3998
3999 irix*)
4000 V_GROUP=sys
4001 ;;
4002
4003 osf*)
4004 V_GROUP=system
4005 ;;
4006
4007 solaris*)
4008 V_GROUP=sys
4009 ;;
4010 esac
4011
4012 if test -f /dev/bpf0 ; then
4013 V_GROUP=bpf
4014 fi
4015
4016 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
4017 echo "configure:4018: checking for u_int8_t using $CC" >&5
4018 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
4019 echo $ac_n "(cached) $ac_c" 1>&6
4020 else
4021 cat > conftest.$ac_ext <<EOF
4022 #line 4023 "configure"
4023 #include "confdefs.h"
4024
4025 # include "confdefs.h"
4026 # include <sys/types.h>
4027 # if STDC_HEADERS
4028 # include <stdlib.h>
4029 # include <stddef.h>
4030 # endif
4031 int main() {
4032 u_int8_t i
4033 ; return 0; }
4034 EOF
4035 if { (eval echo configure:4036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4036 rm -rf conftest*
4037 ac_cv_lbl_have_u_int8_t=yes
4038 else
4039 echo "configure: failed program was:" >&5
4040 cat conftest.$ac_ext >&5
4041 rm -rf conftest*
4042 ac_cv_lbl_have_u_int8_t=no
4043 fi
4044 rm -f conftest*
4045 fi
4046
4047 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
4048 if test $ac_cv_lbl_have_u_int8_t = no ; then
4049 cat >> confdefs.h <<\EOF
4050 #define u_int8_t u_char
4051 EOF
4052
4053 fi
4054 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
4055 echo "configure:4056: checking for int16_t using $CC" >&5
4056 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
4057 echo $ac_n "(cached) $ac_c" 1>&6
4058 else
4059 cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062
4063 # include "confdefs.h"
4064 # include <sys/types.h>
4065 # if STDC_HEADERS
4066 # include <stdlib.h>
4067 # include <stddef.h>
4068 # endif
4069 int main() {
4070 int16_t i
4071 ; return 0; }
4072 EOF
4073 if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4074 rm -rf conftest*
4075 ac_cv_lbl_have_int16_t=yes
4076 else
4077 echo "configure: failed program was:" >&5
4078 cat conftest.$ac_ext >&5
4079 rm -rf conftest*
4080 ac_cv_lbl_have_int16_t=no
4081 fi
4082 rm -f conftest*
4083 fi
4084
4085 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
4086 if test $ac_cv_lbl_have_int16_t = no ; then
4087 cat >> confdefs.h <<\EOF
4088 #define int16_t short
4089 EOF
4090
4091 fi
4092 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
4093 echo "configure:4094: checking for u_int16_t using $CC" >&5
4094 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
4095 echo $ac_n "(cached) $ac_c" 1>&6
4096 else
4097 cat > conftest.$ac_ext <<EOF
4098 #line 4099 "configure"
4099 #include "confdefs.h"
4100
4101 # include "confdefs.h"
4102 # include <sys/types.h>
4103 # if STDC_HEADERS
4104 # include <stdlib.h>
4105 # include <stddef.h>
4106 # endif
4107 int main() {
4108 u_int16_t i
4109 ; return 0; }
4110 EOF
4111 if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4112 rm -rf conftest*
4113 ac_cv_lbl_have_u_int16_t=yes
4114 else
4115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
4117 rm -rf conftest*
4118 ac_cv_lbl_have_u_int16_t=no
4119 fi
4120 rm -f conftest*
4121 fi
4122
4123 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
4124 if test $ac_cv_lbl_have_u_int16_t = no ; then
4125 cat >> confdefs.h <<\EOF
4126 #define u_int16_t u_short
4127 EOF
4128
4129 fi
4130 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
4131 echo "configure:4132: checking for int32_t using $CC" >&5
4132 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
4133 echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135 cat > conftest.$ac_ext <<EOF
4136 #line 4137 "configure"
4137 #include "confdefs.h"
4138
4139 # include "confdefs.h"
4140 # include <sys/types.h>
4141 # if STDC_HEADERS
4142 # include <stdlib.h>
4143 # include <stddef.h>
4144 # endif
4145 int main() {
4146 int32_t i
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4150 rm -rf conftest*
4151 ac_cv_lbl_have_int32_t=yes
4152 else
4153 echo "configure: failed program was:" >&5
4154 cat conftest.$ac_ext >&5
4155 rm -rf conftest*
4156 ac_cv_lbl_have_int32_t=no
4157 fi
4158 rm -f conftest*
4159 fi
4160
4161 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
4162 if test $ac_cv_lbl_have_int32_t = no ; then
4163 cat >> confdefs.h <<\EOF
4164 #define int32_t int
4165 EOF
4166
4167 fi
4168 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
4169 echo "configure:4170: checking for u_int32_t using $CC" >&5
4170 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
4171 echo $ac_n "(cached) $ac_c" 1>&6
4172 else
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176
4177 # include "confdefs.h"
4178 # include <sys/types.h>
4179 # if STDC_HEADERS
4180 # include <stdlib.h>
4181 # include <stddef.h>
4182 # endif
4183 int main() {
4184 u_int32_t i
4185 ; return 0; }
4186 EOF
4187 if { (eval echo configure:4188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4188 rm -rf conftest*
4189 ac_cv_lbl_have_u_int32_t=yes
4190 else
4191 echo "configure: failed program was:" >&5
4192 cat conftest.$ac_ext >&5
4193 rm -rf conftest*
4194 ac_cv_lbl_have_u_int32_t=no
4195 fi
4196 rm -f conftest*
4197 fi
4198
4199 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
4200 if test $ac_cv_lbl_have_u_int32_t = no ; then
4201 cat >> confdefs.h <<\EOF
4202 #define u_int32_t u_int
4203 EOF
4204
4205 fi
4206
4207 rm -f os-proto.h
4208 if test "${LBL_CFLAGS+set}" = set; then
4209 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
4210 fi
4211 if test -f .devel ; then
4212 if test "$GCC" = yes ; then
4213 if test "${LBL_CFLAGS+set}" != set; then
4214 if test "$ac_cv_prog_cc_g" = yes ; then
4215 V_CCOPT="-g $V_CCOPT"
4216 fi
4217 V_CCOPT="$V_CCOPT -Wall"
4218 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
4219 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
4220 fi
4221 fi
4222 else
4223 case "$host_os" in
4224
4225 irix6*)
4226 V_CCOPT="$V_CCOPT -n32"
4227 ;;
4228
4229 *)
4230 ;;
4231 esac
4232 fi
4233 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
4234 name="lbl/os-$os.h"
4235 if test -f $name ; then
4236 ln -s $name os-proto.h
4237 cat >> confdefs.h <<\EOF
4238 #define HAVE_OS_PROTO_H 1
4239 EOF
4240
4241 else
4242 echo "configure: warning: can't find $name" 1>&2
4243 fi
4244 fi
4245
4246 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4247 echo "configure:4248: checking if sockaddr struct has sa_len member" >&5
4248 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
4249 echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254
4255 # include <sys/types.h>
4256 # include <sys/socket.h>
4257 int main() {
4258 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4259 ; return 0; }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4262 rm -rf conftest*
4263 ac_cv_lbl_sockaddr_has_sa_len=yes
4264 else
4265 echo "configure: failed program was:" >&5
4266 cat conftest.$ac_ext >&5
4267 rm -rf conftest*
4268 ac_cv_lbl_sockaddr_has_sa_len=no
4269 fi
4270 rm -f conftest*
4271 fi
4272
4273 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
4274 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
4275 cat >> confdefs.h <<\EOF
4276 #define HAVE_SOCKADDR_SA_LEN 1
4277 EOF
4278
4279 fi
4280
4281 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
4282 echo "configure:4283: checking if unaligned accesses fail" >&5
4283 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
4284 echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286 case "$host_cpu" in
4287
4288 # XXX: should also check that they don't do weird things (like on arm)
4289 alpha*|arm*|hp*|mips*|sparc*|ia64)
4290 ac_cv_lbl_unaligned_fail=yes
4291 ;;
4292
4293 *)
4294 cat >conftest.c <<EOF
4295 # include <sys/types.h>
4296 # include <sys/wait.h>
4297 # include <stdio.h>
4298 unsigned char a[5] = { 1, 2, 3, 4, 5 };
4299 main() {
4300 unsigned int i;
4301 pid_t pid;
4302 int status;
4303 /* avoid "core dumped" message */
4304 pid = fork();
4305 if (pid < 0)
4306 exit(2);
4307 if (pid > 0) {
4308 /* parent */
4309 pid = waitpid(pid, &status, 0);
4310 if (pid < 0)
4311 exit(3);
4312 exit(!WIFEXITED(status));
4313 }
4314 /* child */
4315 i = *(unsigned int *)&a[1];
4316 printf("%d\n", i);
4317 exit(0);
4318 }
4319 EOF
4320 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
4321 conftest.c $LIBS >/dev/null 2>&1
4322 if test ! -x conftest ; then
4323 ac_cv_lbl_unaligned_fail=yes
4324 else
4325 ./conftest >conftest.out
4326 if test ! -s conftest.out ; then
4327 ac_cv_lbl_unaligned_fail=yes
4328 else
4329 ac_cv_lbl_unaligned_fail=no
4330 fi
4331 fi
4332 rm -f conftest* core core.conftest
4333 ;;
4334 esac
4335 fi
4336
4337 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
4338 if test $ac_cv_lbl_unaligned_fail = yes ; then
4339 cat >> confdefs.h <<\EOF
4340 #define LBL_ALIGN 1
4341 EOF
4342
4343 fi
4344
4345
4346 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
4347 echo "configure:4348: checking for h_errno" >&5
4348 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
4349 echo $ac_n "(cached) $ac_c" 1>&6
4350 else
4351 cat > conftest.$ac_ext <<EOF
4352 #line 4353 "configure"
4353 #include "confdefs.h"
4354
4355 # include <sys/types.h>
4356 # include <netdb.h>
4357 int main() {
4358 int foo = h_errno;
4359 ; return 0; }
4360 EOF
4361 if { (eval echo configure:4362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4362 rm -rf conftest*
4363 ac_cv_var_h_errno=yes
4364 else
4365 echo "configure: failed program was:" >&5
4366 cat conftest.$ac_ext >&5
4367 rm -rf conftest*
4368 ac_cv_var_h_errno=no
4369 fi
4370 rm -f conftest*
4371 fi
4372
4373 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
4374 if test "$ac_cv_var_h_errno" = "yes"; then
4375 cat >> confdefs.h <<\EOF
4376 #define HAVE_H_ERRNO 1
4377 EOF
4378
4379 fi
4380
4381
4382 # Check whether --with-crypto or --without-crypto was given.
4383 if test "${with_crypto+set}" = set; then
4384 withval="$with_crypto"
4385 :
4386 else
4387
4388 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
4389 echo "configure:4390: checking for SSLeay" >&5
4390 ac_cv_ssleay_path=no
4391 incdir=no
4392 for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
4393 if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then
4394 ac_cv_ssleay_path=$dir
4395 fi
4396 if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4397 incdir="-I$dir/include"
4398 fi
4399 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4400 break;
4401 else
4402 ac_cv_ssleay_path=no
4403 incdir=no
4404 fi
4405 done
4406 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4407 if test "$ac_cv_ssleay_path" != no; then
4408 V_INCLS="$V_INCLS $incdir"
4409 LDFLAGS="-L$dir/lib $LDFLAGS"
4410 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
4411 LIBS="$LIBS -lRSAglue"
4412 fi
4413 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
4414 LIBS="$LIBS -lrsaref"
4415 fi
4416 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4417 echo "configure:4418: checking for des_cbc_encrypt in -lcrypto" >&5
4418 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4419 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4420 echo $ac_n "(cached) $ac_c" 1>&6
4421 else
4422 ac_save_LIBS="$LIBS"
4423 LIBS="-lcrypto $LIBS"
4424 cat > conftest.$ac_ext <<EOF
4425 #line 4426 "configure"
4426 #include "confdefs.h"
4427 /* Override any gcc2 internal prototype to avoid an error. */
4428 /* We use char because int might match the return type of a gcc2
4429 builtin and then its argument prototype would still apply. */
4430 char des_cbc_encrypt();
4431
4432 int main() {
4433 des_cbc_encrypt()
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4437 rm -rf conftest*
4438 eval "ac_cv_lib_$ac_lib_var=yes"
4439 else
4440 echo "configure: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4442 rm -rf conftest*
4443 eval "ac_cv_lib_$ac_lib_var=no"
4444 fi
4445 rm -f conftest*
4446 LIBS="$ac_save_LIBS"
4447
4448 fi
4449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4450 echo "$ac_t""yes" 1>&6
4451 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4452 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4453 cat >> confdefs.h <<EOF
4454 #define $ac_tr_lib 1
4455 EOF
4456
4457 LIBS="-lcrypto $LIBS"
4458
4459 else
4460 echo "$ac_t""no" 1>&6
4461 fi
4462
4463
4464 bak_CPPFLAGS=$CPPFLAGS
4465 CPPFLAGS="$CPPFLAGS $V_INCLS"
4466 for ac_hdr in openssl/cast.h
4467 do
4468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4470 echo "configure:4471: checking for $ac_hdr" >&5
4471 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4472 echo $ac_n "(cached) $ac_c" 1>&6
4473 else
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 #include <$ac_hdr>
4478 EOF
4479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4480 { (eval echo configure:4481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4482 if test -z "$ac_err"; then
4483 rm -rf conftest*
4484 eval "ac_cv_header_$ac_safe=yes"
4485 else
4486 echo "$ac_err" >&5
4487 echo "configure: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4489 rm -rf conftest*
4490 eval "ac_cv_header_$ac_safe=no"
4491 fi
4492 rm -f conftest*
4493 fi
4494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4495 echo "$ac_t""yes" 1>&6
4496 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4497 cat >> confdefs.h <<EOF
4498 #define $ac_tr_hdr 1
4499 EOF
4500
4501 else
4502 echo "$ac_t""no" 1>&6
4503 fi
4504 done
4505
4506
4507 if test "$ac_cv_header_openssl_cast_h" = "yes"; then
4508 echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
4509 echo "configure:4510: checking for buggy CAST128" >&5
4510 if eval "test \"`echo '$''{'td_cv_buggy_cast128'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513 if test "$cross_compiling" = yes; then
4514 td_cv_buggy_cast128="cross-compiling, assume yes"
4515 else
4516 cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519
4520 #include <openssl/cast.h>
4521 main()
4522 {
4523 unsigned char key[] = {0x01,0x23,0x45,0x67,0x12};
4524 unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
4525 unsigned char out[sizeof(in)];
4526 unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E};
4527 CAST_KEY ks;
4528 CAST_set_key(&ks, sizeof(key), key);
4529 CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT);
4530 if (memcmp(out, ok, sizeof(ok)) != 0)
4531 return 0;
4532 else
4533 return 1;
4534 }
4535 EOF
4536 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4537 then
4538 td_cv_buggy_cast128=yes
4539 else
4540 echo "configure: failed program was:" >&5
4541 cat conftest.$ac_ext >&5
4542 rm -fr conftest*
4543 td_cv_buggy_cast128=no
4544 fi
4545 rm -fr conftest*
4546 fi
4547
4548 fi
4549
4550 echo "$ac_t""$td_cv_buggy_cast128" 1>&6
4551 if test "$td_cv_buggy_cast128" != no; then
4552 echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine."
4553 echo "disabling CAST128 support."
4554 cat >> confdefs.h <<\EOF
4555 #define HAVE_BUGGY_CAST128 1
4556 EOF
4557
4558 fi
4559 fi
4560
4561 CPPFLAGS=$bak_CPPFLAGS
4562 fi
4563
4564 fi
4565
4566 for ac_hdr in openssl/rc5.h
4567 do
4568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4570 echo "configure:4571: checking for $ac_hdr" >&5
4571 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4572 echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574 cat > conftest.$ac_ext <<EOF
4575 #line 4576 "configure"
4576 #include "confdefs.h"
4577 #include <$ac_hdr>
4578 EOF
4579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4580 { (eval echo configure:4581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4582 if test -z "$ac_err"; then
4583 rm -rf conftest*
4584 eval "ac_cv_header_$ac_safe=yes"
4585 else
4586 echo "$ac_err" >&5
4587 echo "configure: failed program was:" >&5
4588 cat conftest.$ac_ext >&5
4589 rm -rf conftest*
4590 eval "ac_cv_header_$ac_safe=no"
4591 fi
4592 rm -f conftest*
4593 fi
4594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4595 echo "$ac_t""yes" 1>&6
4596 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4597 cat >> confdefs.h <<EOF
4598 #define $ac_tr_hdr 1
4599 EOF
4600
4601 else
4602 echo "$ac_t""no" 1>&6
4603 fi
4604 done
4605
4606
4607
4608
4609
4610
4611
4612
4613 # Find a good install program. We prefer a C program (faster),
4614 # so one script is as good as another. But avoid the broken or
4615 # incompatible versions:
4616 # SysV /etc/install, /usr/sbin/install
4617 # SunOS /usr/etc/install
4618 # IRIX /sbin/install
4619 # AIX /bin/install
4620 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4621 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4622 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4623 # ./install, which can be erroneously created by make from ./install.sh.
4624 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4625 echo "configure:4626: checking for a BSD compatible install" >&5
4626 if test -z "$INSTALL"; then
4627 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4628 echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4631 for ac_dir in $PATH; do
4632 # Account for people who put trailing slashes in PATH elements.
4633 case "$ac_dir/" in
4634 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4635 *)
4636 # OSF1 and SCO ODT 3.0 have their own names for install.
4637 # Don't use installbsd from OSF since it installs stuff as root
4638 # by default.
4639 for ac_prog in ginstall scoinst install; do
4640 if test -f $ac_dir/$ac_prog; then
4641 if test $ac_prog = install &&
4642 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4643 # AIX install. It has an incompatible calling convention.
4644 :
4645 else
4646 ac_cv_path_install="$ac_dir/$ac_prog -c"
4647 break 2
4648 fi
4649 fi
4650 done
4651 ;;
4652 esac
4653 done
4654 IFS="$ac_save_IFS"
4655
4656 fi
4657 if test "${ac_cv_path_install+set}" = set; then
4658 INSTALL="$ac_cv_path_install"
4659 else
4660 # As a last resort, use the slow shell script. We don't cache a
4661 # path for INSTALL within a source directory, because that will
4662 # break other packages using the cache if that directory is
4663 # removed, or if the path is relative.
4664 INSTALL="$ac_install_sh"
4665 fi
4666 fi
4667 echo "$ac_t""$INSTALL" 1>&6
4668
4669 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4670 # It thinks the first close brace ends the variable substitution.
4671 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4672
4673 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4674
4675 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4676
4677
4678
4679
4680
4681 trap '' 1 2 15
4682 cat > confcache <<\EOF
4683 # This file is a shell script that caches the results of configure
4684 # tests run on this system so they can be shared between configure
4685 # scripts and configure runs. It is not useful on other systems.
4686 # If it contains results you don't want to keep, you may remove or edit it.
4687 #
4688 # By default, configure uses ./config.cache as the cache file,
4689 # creating it if it does not exist already. You can give configure
4690 # the --cache-file=FILE option to use a different cache file; that is
4691 # what configure does when it calls configure scripts in
4692 # subdirectories, so they share the cache.
4693 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4694 # config.status only pays attention to the cache file if you give it the
4695 # --recheck option to rerun configure.
4696 #
4697 EOF
4698 # The following way of writing the cache mishandles newlines in values,
4699 # but we know of no workaround that is simple, portable, and efficient.
4700 # So, don't put newlines in cache variables' values.
4701 # Ultrix sh set writes to stderr and can't be redirected directly,
4702 # and sets the high bit in the cache file unless we assign to the vars.
4703 (set) 2>&1 |
4704 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4705 *ac_space=\ *)
4706 # `set' does not quote correctly, so add quotes (double-quote substitution
4707 # turns \\\\ into \\, and sed turns \\ into \).
4708 sed -n \
4709 -e "s/'/'\\\\''/g" \
4710 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4711 ;;
4712 *)
4713 # `set' quotes correctly as required by POSIX, so do not add quotes.
4714 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4715 ;;
4716 esac >> confcache
4717 if cmp -s $cache_file confcache; then
4718 :
4719 else
4720 if test -w $cache_file; then
4721 echo "updating cache $cache_file"
4722 cat confcache > $cache_file
4723 else
4724 echo "not updating unwritable cache $cache_file"
4725 fi
4726 fi
4727 rm -f confcache
4728
4729 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4730
4731 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4732 # Let make expand exec_prefix.
4733 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4734
4735 # Any assignment to VPATH causes Sun make to only execute
4736 # the first set of double-colon rules, so remove it if not needed.
4737 # If there is a colon in the path, we need to keep it.
4738 if test "x$srcdir" = x.; then
4739 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4740 fi
4741
4742 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4743
4744 DEFS=-DHAVE_CONFIG_H
4745
4746 # Without the "./", some shells look in PATH for config.status.
4747 : ${CONFIG_STATUS=./config.status}
4748
4749 echo creating $CONFIG_STATUS
4750 rm -f $CONFIG_STATUS
4751 cat > $CONFIG_STATUS <<EOF
4752 #! /bin/sh
4753 # Generated automatically by configure.
4754 # Run this file to recreate the current configuration.
4755 # This directory was configured as follows,
4756 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4757 #
4758 # $0 $ac_configure_args
4759 #
4760 # Compiler output produced by configure, useful for debugging
4761 # configure, is in ./config.log if it exists.
4762
4763 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4764 for ac_option
4765 do
4766 case "\$ac_option" in
4767 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4768 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4769 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4770 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4771 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4772 exit 0 ;;
4773 -help | --help | --hel | --he | --h)
4774 echo "\$ac_cs_usage"; exit 0 ;;
4775 *) echo "\$ac_cs_usage"; exit 1 ;;
4776 esac
4777 done
4778
4779 ac_given_srcdir=$srcdir
4780 ac_given_INSTALL="$INSTALL"
4781
4782 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4783 EOF
4784 cat >> $CONFIG_STATUS <<EOF
4785
4786 # Protect against being on the right side of a sed subst in config.status.
4787 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4788 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4789 $ac_vpsub
4790 $extrasub
4791 s%@SHELL@%$SHELL%g
4792 s%@CFLAGS@%$CFLAGS%g
4793 s%@CPPFLAGS@%$CPPFLAGS%g
4794 s%@CXXFLAGS@%$CXXFLAGS%g
4795 s%@FFLAGS@%$FFLAGS%g
4796 s%@DEFS@%$DEFS%g
4797 s%@LDFLAGS@%$LDFLAGS%g
4798 s%@LIBS@%$LIBS%g
4799 s%@exec_prefix@%$exec_prefix%g
4800 s%@prefix@%$prefix%g
4801 s%@program_transform_name@%$program_transform_name%g
4802 s%@bindir@%$bindir%g
4803 s%@sbindir@%$sbindir%g
4804 s%@libexecdir@%$libexecdir%g
4805 s%@datadir@%$datadir%g
4806 s%@sysconfdir@%$sysconfdir%g
4807 s%@sharedstatedir@%$sharedstatedir%g
4808 s%@localstatedir@%$localstatedir%g
4809 s%@libdir@%$libdir%g
4810 s%@includedir@%$includedir%g
4811 s%@oldincludedir@%$oldincludedir%g
4812 s%@infodir@%$infodir%g
4813 s%@mandir@%$mandir%g
4814 s%@host@%$host%g
4815 s%@host_alias@%$host_alias%g
4816 s%@host_cpu@%$host_cpu%g
4817 s%@host_vendor@%$host_vendor%g
4818 s%@host_os@%$host_os%g
4819 s%@SHLICC2@%$SHLICC2%g
4820 s%@CC@%$CC%g
4821 s%@CPP@%$CPP%g
4822 s%@LIBOBJS@%$LIBOBJS%g
4823 s%@V_CCOPT@%$V_CCOPT%g
4824 s%@V_GROUP@%$V_GROUP%g
4825 s%@V_INCLS@%$V_INCLS%g
4826 s%@V_PCAPDEP@%$V_PCAPDEP%g
4827 s%@LOCALSRC@%$LOCALSRC%g
4828 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4829 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4830 s%@INSTALL_DATA@%$INSTALL_DATA%g
4831
4832 CEOF
4833 EOF
4834
4835 cat >> $CONFIG_STATUS <<\EOF
4836
4837 # Split the substitutions into bite-sized pieces for seds with
4838 # small command number limits, like on Digital OSF/1 and HP-UX.
4839 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4840 ac_file=1 # Number of current file.
4841 ac_beg=1 # First line for current file.
4842 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4843 ac_more_lines=:
4844 ac_sed_cmds=""
4845 while $ac_more_lines; do
4846 if test $ac_beg -gt 1; then
4847 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4848 else
4849 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4850 fi
4851 if test ! -s conftest.s$ac_file; then
4852 ac_more_lines=false
4853 rm -f conftest.s$ac_file
4854 else
4855 if test -z "$ac_sed_cmds"; then
4856 ac_sed_cmds="sed -f conftest.s$ac_file"
4857 else
4858 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4859 fi
4860 ac_file=`expr $ac_file + 1`
4861 ac_beg=$ac_end
4862 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4863 fi
4864 done
4865 if test -z "$ac_sed_cmds"; then
4866 ac_sed_cmds=cat
4867 fi
4868 EOF
4869
4870 cat >> $CONFIG_STATUS <<EOF
4871
4872 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4873 EOF
4874 cat >> $CONFIG_STATUS <<\EOF
4875 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4876 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4877 case "$ac_file" in
4878 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4879 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4880 *) ac_file_in="${ac_file}.in" ;;
4881 esac
4882
4883 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4884
4885 # Remove last slash and all that follows it. Not all systems have dirname.
4886 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4887 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4888 # The file is in a subdirectory.
4889 test ! -d "$ac_dir" && mkdir "$ac_dir"
4890 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4891 # A "../" for each directory in $ac_dir_suffix.
4892 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4893 else
4894 ac_dir_suffix= ac_dots=
4895 fi
4896
4897 case "$ac_given_srcdir" in
4898 .) srcdir=.
4899 if test -z "$ac_dots"; then top_srcdir=.
4900 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4901 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4902 *) # Relative path.
4903 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4904 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4905 esac
4906
4907 case "$ac_given_INSTALL" in
4908 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4909 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4910 esac
4911
4912 echo creating "$ac_file"
4913 rm -f "$ac_file"
4914 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4915 case "$ac_file" in
4916 *Makefile*) ac_comsub="1i\\
4917 # $configure_input" ;;
4918 *) ac_comsub= ;;
4919 esac
4920
4921 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4922 sed -e "$ac_comsub
4923 s%@configure_input@%$configure_input%g
4924 s%@srcdir@%$srcdir%g
4925 s%@top_srcdir@%$top_srcdir%g
4926 s%@INSTALL@%$INSTALL%g
4927 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4928 fi; done
4929 rm -f conftest.s*
4930
4931 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4932 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4933 #
4934 # ac_d sets the value in "#define NAME VALUE" lines.
4935 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4936 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4937 ac_dC='\3'
4938 ac_dD='%g'
4939 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4940 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4941 ac_uB='\([ ]\)%\1#\2define\3'
4942 ac_uC=' '
4943 ac_uD='\4%g'
4944 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4945 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4946 ac_eB='$%\1#\2define\3'
4947 ac_eC=' '
4948 ac_eD='%g'
4949
4950 if test "${CONFIG_HEADERS+set}" != set; then
4951 EOF
4952 cat >> $CONFIG_STATUS <<EOF
4953 CONFIG_HEADERS="config.h"
4954 EOF
4955 cat >> $CONFIG_STATUS <<\EOF
4956 fi
4957 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4958 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4959 case "$ac_file" in
4960 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4961 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4962 *) ac_file_in="${ac_file}.in" ;;
4963 esac
4964
4965 echo creating $ac_file
4966
4967 rm -f conftest.frag conftest.in conftest.out
4968 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4969 cat $ac_file_inputs > conftest.in
4970
4971 EOF
4972
4973 # Transform confdefs.h into a sed script conftest.vals that substitutes
4974 # the proper values into config.h.in to produce config.h. And first:
4975 # Protect against being on the right side of a sed subst in config.status.
4976 # Protect against being in an unquoted here document in config.status.
4977 rm -f conftest.vals
4978 cat > conftest.hdr <<\EOF
4979 s/[\\&%]/\\&/g
4980 s%[\\$`]%\\&%g
4981 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4982 s%ac_d%ac_u%gp
4983 s%ac_u%ac_e%gp
4984 EOF
4985 sed -n -f conftest.hdr confdefs.h > conftest.vals
4986 rm -f conftest.hdr
4987
4988 # This sed command replaces #undef with comments. This is necessary, for
4989 # example, in the case of _POSIX_SOURCE, which is predefined and required
4990 # on some systems where configure will not decide to define it.
4991 cat >> conftest.vals <<\EOF
4992 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4993 EOF
4994
4995 # Break up conftest.vals because some shells have a limit on
4996 # the size of here documents, and old seds have small limits too.
4997
4998 rm -f conftest.tail
4999 while :
5000 do
5001 ac_lines=`grep -c . conftest.vals`
5002 # grep -c gives empty output for an empty file on some AIX systems.
5003 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5004 # Write a limited-size here document to conftest.frag.
5005 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5006 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5007 echo 'CEOF
5008 sed -f conftest.frag conftest.in > conftest.out
5009 rm -f conftest.in
5010 mv conftest.out conftest.in
5011 ' >> $CONFIG_STATUS
5012 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5013 rm -f conftest.vals
5014 mv conftest.tail conftest.vals
5015 done
5016 rm -f conftest.vals
5017
5018 cat >> $CONFIG_STATUS <<\EOF
5019 rm -f conftest.frag conftest.h
5020 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5021 cat conftest.in >> conftest.h
5022 rm -f conftest.in
5023 if cmp -s $ac_file conftest.h 2>/dev/null; then
5024 echo "$ac_file is unchanged"
5025 rm -f conftest.h
5026 else
5027 # Remove last slash and all that follows it. Not all systems have dirname.
5028 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5029 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5030 # The file is in a subdirectory.
5031 test ! -d "$ac_dir" && mkdir "$ac_dir"
5032 fi
5033 rm -f $ac_file
5034 mv conftest.h $ac_file
5035 fi
5036 fi; done
5037
5038 EOF
5039 cat >> $CONFIG_STATUS <<EOF
5040
5041
5042 EOF
5043 cat >> $CONFIG_STATUS <<\EOF
5044 if test -f .devel; then
5045 echo timestamp > stamp-h
5046 cat Makefile-devel-adds >> Makefile
5047 make depend
5048 fi
5049
5050 exit 0
5051 EOF
5052 chmod +x $CONFIG_STATUS
5053 rm -fr confdefs* $ac_clean_files
5054 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5055
5056 exit 0