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