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