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