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