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