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