]> The Tcpdump Group git mirrors - tcpdump/blob - configure
(__attribute__): define to nothing if not supported by cc/gcc
[tcpdump] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.110
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 echo $ac_n "checking for getrpcbynumber in -lnsl""... $ac_c" 1>&6
3082 echo "configure:3083: checking for getrpcbynumber in -lnsl" >&5
3083 ac_lib_var=`echo nsl'_'getrpcbynumber | sed 'y%./+-%__p_%'`
3084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3085 echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087 ac_save_LIBS="$LIBS"
3088 LIBS="-lnsl $LIBS"
3089 cat > conftest.$ac_ext <<EOF
3090 #line 3091 "configure"
3091 #include "confdefs.h"
3092 /* Override any gcc2 internal prototype to avoid an error. */
3093 /* We use char because int might match the return type of a gcc2
3094 builtin and then its argument prototype would still apply. */
3095 char getrpcbynumber();
3096
3097 int main() {
3098 getrpcbynumber()
3099 ; return 0; }
3100 EOF
3101 if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3102 rm -rf conftest*
3103 eval "ac_cv_lib_$ac_lib_var=yes"
3104 else
3105 echo "configure: failed program was:" >&5
3106 cat conftest.$ac_ext >&5
3107 rm -rf conftest*
3108 eval "ac_cv_lib_$ac_lib_var=no"
3109 fi
3110 rm -f conftest*
3111 LIBS="$ac_save_LIBS"
3112
3113 fi
3114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3115 echo "$ac_t""yes" 1>&6
3116 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3117 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3118 cat >> confdefs.h <<EOF
3119 #define $ac_tr_lib 1
3120 EOF
3121
3122 LIBS="-lnsl $LIBS"
3123
3124 else
3125 echo "$ac_t""no" 1>&6
3126 fi
3127
3128
3129
3130 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3131 echo "configure:3132: checking return type of signal handlers" >&5
3132 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3133 echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135 cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #include <sys/types.h>
3139 #include <signal.h>
3140 #ifdef signal
3141 #undef signal
3142 #endif
3143 #ifdef __cplusplus
3144 extern "C" void (*signal (int, void (*)(int)))(int);
3145 #else
3146 void (*signal ()) ();
3147 #endif
3148
3149 int main() {
3150 int i;
3151 ; return 0; }
3152 EOF
3153 if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3154 rm -rf conftest*
3155 ac_cv_type_signal=void
3156 else
3157 echo "configure: failed program was:" >&5
3158 cat conftest.$ac_ext >&5
3159 rm -rf conftest*
3160 ac_cv_type_signal=int
3161 fi
3162 rm -f conftest*
3163 fi
3164
3165 echo "$ac_t""$ac_cv_type_signal" 1>&6
3166 cat >> confdefs.h <<EOF
3167 #define RETSIGTYPE $ac_cv_type_signal
3168 EOF
3169
3170
3171 if test "$ac_cv_type_signal" = void ; then
3172 cat >> confdefs.h <<\EOF
3173 #define RETSIGVAL
3174 EOF
3175
3176 else
3177 cat >> confdefs.h <<\EOF
3178 #define RETSIGVAL (0)
3179 EOF
3180
3181 fi
3182 case "$target_os" in
3183
3184 irix*)
3185 cat >> confdefs.h <<\EOF
3186 #define _BSD_SIGNALS 1
3187 EOF
3188
3189 ;;
3190
3191 *)
3192 for ac_func in sigset
3193 do
3194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3195 echo "configure:3196: checking for $ac_func" >&5
3196 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3197 echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199 cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 /* System header to define __stub macros and hopefully few prototypes,
3203 which can conflict with char $ac_func(); below. */
3204 #include <assert.h>
3205 /* Override any gcc2 internal prototype to avoid an error. */
3206 /* We use char because int might match the return type of a gcc2
3207 builtin and then its argument prototype would still apply. */
3208 char $ac_func();
3209
3210 int main() {
3211
3212 /* The GNU C library defines this for functions which it implements
3213 to always fail with ENOSYS. Some functions are actually named
3214 something starting with __ and the normal name is an alias. */
3215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3216 choke me
3217 #else
3218 $ac_func();
3219 #endif
3220
3221 ; return 0; }
3222 EOF
3223 if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3224 rm -rf conftest*
3225 eval "ac_cv_func_$ac_func=yes"
3226 else
3227 echo "configure: failed program was:" >&5
3228 cat conftest.$ac_ext >&5
3229 rm -rf conftest*
3230 eval "ac_cv_func_$ac_func=no"
3231 fi
3232 rm -f conftest*
3233 fi
3234
3235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3236 echo "$ac_t""yes" 1>&6
3237 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3238 cat >> confdefs.h <<EOF
3239 #define $ac_tr_func 1
3240 EOF
3241
3242 else
3243 echo "$ac_t""no" 1>&6
3244 fi
3245 done
3246
3247 if test $ac_cv_func_sigset = no ; then
3248 for ac_func in sigaction
3249 do
3250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3251 echo "configure:3252: checking for $ac_func" >&5
3252 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3253 echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255 cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3258 /* System header to define __stub macros and hopefully few prototypes,
3259 which can conflict with char $ac_func(); below. */
3260 #include <assert.h>
3261 /* Override any gcc2 internal prototype to avoid an error. */
3262 /* We use char because int might match the return type of a gcc2
3263 builtin and then its argument prototype would still apply. */
3264 char $ac_func();
3265
3266 int main() {
3267
3268 /* The GNU C library defines this for functions which it implements
3269 to always fail with ENOSYS. Some functions are actually named
3270 something starting with __ and the normal name is an alias. */
3271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3272 choke me
3273 #else
3274 $ac_func();
3275 #endif
3276
3277 ; return 0; }
3278 EOF
3279 if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3280 rm -rf conftest*
3281 eval "ac_cv_func_$ac_func=yes"
3282 else
3283 echo "configure: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3285 rm -rf conftest*
3286 eval "ac_cv_func_$ac_func=no"
3287 fi
3288 rm -f conftest*
3289 fi
3290
3291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3292 echo "$ac_t""yes" 1>&6
3293 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3294 cat >> confdefs.h <<EOF
3295 #define $ac_tr_func 1
3296 EOF
3297
3298 else
3299 echo "$ac_t""no" 1>&6
3300 fi
3301 done
3302
3303 fi
3304 ;;
3305 esac
3306
3307
3308 # Most operating systems have gethostbyname() in the default searched
3309 # libraries (i.e. libc):
3310 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3311 echo "configure:3312: checking for gethostbyname" >&5
3312 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3313 echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315 cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 /* System header to define __stub macros and hopefully few prototypes,
3319 which can conflict with char gethostbyname(); below. */
3320 #include <assert.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
3328 /* The GNU C library defines this for functions which it implements
3329 to always fail with ENOSYS. Some functions are actually named
3330 something starting with __ and the normal name is an alias. */
3331 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3332 choke me
3333 #else
3334 gethostbyname();
3335 #endif
3336
3337 ; return 0; }
3338 EOF
3339 if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3340 rm -rf conftest*
3341 eval "ac_cv_func_gethostbyname=yes"
3342 else
3343 echo "configure: failed program was:" >&5
3344 cat conftest.$ac_ext >&5
3345 rm -rf conftest*
3346 eval "ac_cv_func_gethostbyname=no"
3347 fi
3348 rm -f conftest*
3349 fi
3350
3351 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3352 echo "$ac_t""yes" 1>&6
3353 :
3354 else
3355 echo "$ac_t""no" 1>&6
3356 # Some OSes (eg. Solaris) place it in libnsl:
3357 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3358 echo "configure:3359: checking for gethostbyname in -lnsl" >&5
3359 ac_lib_var=`echo nsl'_'gethostbyname'_' | sed 'y%./+- %__p__%'`
3360 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
3361 echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363 ac_save_LIBS="$LIBS"
3364 LIBS="-lnsl $LIBS"
3365 cat > conftest.$ac_ext <<EOF
3366 #line 3367 "configure"
3367 #include "confdefs.h"
3368 /* Override any gcc2 internal prototype to avoid an error. */
3369 /* We use char because int might match the return type of a gcc2
3370 builtin and then its argument prototype would still apply. */
3371 char gethostbyname();
3372
3373 int main() {
3374 gethostbyname()
3375 ; return 0; }
3376 EOF
3377 if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3378 rm -rf conftest*
3379 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3380 else
3381 echo "configure: failed program was:" >&5
3382 cat conftest.$ac_ext >&5
3383 rm -rf conftest*
3384 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3385 fi
3386 rm -f conftest*
3387 LIBS="$ac_save_LIBS"
3388
3389 fi
3390 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3391 echo "$ac_t""yes" 1>&6
3392 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
3393 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3394 cat >> confdefs.h <<EOF
3395 #define $ac_tr_lib 1
3396 EOF
3397
3398 LIBS="-lnsl $LIBS"
3399
3400 else
3401 echo "$ac_t""no" 1>&6
3402 # Some strange OSes (SINIX) have it in libsocket:
3403 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3404 echo "configure:3405: checking for gethostbyname in -lsocket" >&5
3405 ac_lib_var=`echo socket'_'gethostbyname'_' | sed 'y%./+- %__p__%'`
3406 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
3407 echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409 ac_save_LIBS="$LIBS"
3410 LIBS="-lsocket $LIBS"
3411 cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414 /* Override any gcc2 internal prototype to avoid an error. */
3415 /* We use char because int might match the return type of a gcc2
3416 builtin and then its argument prototype would still apply. */
3417 char gethostbyname();
3418
3419 int main() {
3420 gethostbyname()
3421 ; return 0; }
3422 EOF
3423 if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3424 rm -rf conftest*
3425 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3426 else
3427 echo "configure: failed program was:" >&5
3428 cat conftest.$ac_ext >&5
3429 rm -rf conftest*
3430 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3431 fi
3432 rm -f conftest*
3433 LIBS="$ac_save_LIBS"
3434
3435 fi
3436 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3437 echo "$ac_t""yes" 1>&6
3438 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3439 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3440 cat >> confdefs.h <<EOF
3441 #define $ac_tr_lib 1
3442 EOF
3443
3444 LIBS="-lsocket $LIBS"
3445
3446 else
3447 echo "$ac_t""no" 1>&6
3448 # Unfortunately libsocket sometimes depends on libnsl.
3449 # AC_CHECK_LIB's API is essentially broken so the
3450 # following ugliness is necessary:
3451 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3452 echo "configure:3453: checking for gethostbyname in -lsocket" >&5
3453 ac_lib_var=`echo socket'_'gethostbyname'_'-lnsl | sed 'y%./+- %__p__%'`
3454 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
3455 echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457 ac_save_LIBS="$LIBS"
3458 LIBS="-lsocket -lnsl $LIBS"
3459 cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 /* Override any gcc2 internal prototype to avoid an error. */
3463 /* We use char because int might match the return type of a gcc2
3464 builtin and then its argument prototype would still apply. */
3465 char gethostbyname();
3466
3467 int main() {
3468 gethostbyname()
3469 ; return 0; }
3470 EOF
3471 if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3472 rm -rf conftest*
3473 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3474 else
3475 echo "configure: failed program was:" >&5
3476 cat conftest.$ac_ext >&5
3477 rm -rf conftest*
3478 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3479 fi
3480 rm -f conftest*
3481 LIBS="$ac_save_LIBS"
3482
3483 fi
3484 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3485 echo "$ac_t""yes" 1>&6
3486 LIBS="-lsocket -lnsl $LIBS"
3487 else
3488 echo "$ac_t""no" 1>&6
3489 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
3490 echo "configure:3491: checking for gethostbyname in -lresolv" >&5
3491 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
3492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3493 echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495 ac_save_LIBS="$LIBS"
3496 LIBS="-lresolv $LIBS"
3497 cat > conftest.$ac_ext <<EOF
3498 #line 3499 "configure"
3499 #include "confdefs.h"
3500 /* Override any gcc2 internal prototype to avoid an error. */
3501 /* We use char because int might match the return type of a gcc2
3502 builtin and then its argument prototype would still apply. */
3503 char gethostbyname();
3504
3505 int main() {
3506 gethostbyname()
3507 ; return 0; }
3508 EOF
3509 if { (eval echo configure:3510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3510 rm -rf conftest*
3511 eval "ac_cv_lib_$ac_lib_var=yes"
3512 else
3513 echo "configure: failed program was:" >&5
3514 cat conftest.$ac_ext >&5
3515 rm -rf conftest*
3516 eval "ac_cv_lib_$ac_lib_var=no"
3517 fi
3518 rm -f conftest*
3519 LIBS="$ac_save_LIBS"
3520
3521 fi
3522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3523 echo "$ac_t""yes" 1>&6
3524 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3525 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3526 cat >> confdefs.h <<EOF
3527 #define $ac_tr_lib 1
3528 EOF
3529
3530 LIBS="-lresolv $LIBS"
3531
3532 else
3533 echo "$ac_t""no" 1>&6
3534 fi
3535
3536 fi
3537
3538 fi
3539
3540 fi
3541
3542 fi
3543
3544 echo $ac_n "checking for socket""... $ac_c" 1>&6
3545 echo "configure:3546: checking for socket" >&5
3546 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3547 echo $ac_n "(cached) $ac_c" 1>&6
3548 else
3549 cat > conftest.$ac_ext <<EOF
3550 #line 3551 "configure"
3551 #include "confdefs.h"
3552 /* System header to define __stub macros and hopefully few prototypes,
3553 which can conflict with char socket(); below. */
3554 #include <assert.h>
3555 /* Override any gcc2 internal prototype to avoid an error. */
3556 /* We use char because int might match the return type of a gcc2
3557 builtin and then its argument prototype would still apply. */
3558 char socket();
3559
3560 int main() {
3561
3562 /* The GNU C library defines this for functions which it implements
3563 to always fail with ENOSYS. Some functions are actually named
3564 something starting with __ and the normal name is an alias. */
3565 #if defined (__stub_socket) || defined (__stub___socket)
3566 choke me
3567 #else
3568 socket();
3569 #endif
3570
3571 ; return 0; }
3572 EOF
3573 if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3574 rm -rf conftest*
3575 eval "ac_cv_func_socket=yes"
3576 else
3577 echo "configure: failed program was:" >&5
3578 cat conftest.$ac_ext >&5
3579 rm -rf conftest*
3580 eval "ac_cv_func_socket=no"
3581 fi
3582 rm -f conftest*
3583 fi
3584
3585 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3586 echo "$ac_t""yes" 1>&6
3587 :
3588 else
3589 echo "$ac_t""no" 1>&6
3590 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3591 echo "configure:3592: checking for socket in -lsocket" >&5
3592 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3594 echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596 ac_save_LIBS="$LIBS"
3597 LIBS="-lsocket $LIBS"
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 /* Override any gcc2 internal prototype to avoid an error. */
3602 /* We use char because int might match the return type of a gcc2
3603 builtin and then its argument prototype would still apply. */
3604 char socket();
3605
3606 int main() {
3607 socket()
3608 ; return 0; }
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3611 rm -rf conftest*
3612 eval "ac_cv_lib_$ac_lib_var=yes"
3613 else
3614 echo "configure: failed program was:" >&5
3615 cat conftest.$ac_ext >&5
3616 rm -rf conftest*
3617 eval "ac_cv_lib_$ac_lib_var=no"
3618 fi
3619 rm -f conftest*
3620 LIBS="$ac_save_LIBS"
3621
3622 fi
3623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3624 echo "$ac_t""yes" 1>&6
3625 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3626 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3627 cat >> confdefs.h <<EOF
3628 #define $ac_tr_lib 1
3629 EOF
3630
3631 LIBS="-lsocket $LIBS"
3632
3633 else
3634 echo "$ac_t""no" 1>&6
3635 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3636 echo "configure:3637: checking for socket in -lsocket" >&5
3637 ac_lib_var=`echo socket'_'socket'_'-lnsl | sed 'y%./+- %__p__%'`
3638 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
3639 echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641 ac_save_LIBS="$LIBS"
3642 LIBS="-lsocket -lnsl $LIBS"
3643 cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 /* Override any gcc2 internal prototype to avoid an error. */
3647 /* We use char because int might match the return type of a gcc2
3648 builtin and then its argument prototype would still apply. */
3649 char socket();
3650
3651 int main() {
3652 socket()
3653 ; return 0; }
3654 EOF
3655 if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3656 rm -rf conftest*
3657 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3658 else
3659 echo "configure: failed program was:" >&5
3660 cat conftest.$ac_ext >&5
3661 rm -rf conftest*
3662 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3663 fi
3664 rm -f conftest*
3665 LIBS="$ac_save_LIBS"
3666
3667 fi
3668 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3669 echo "$ac_t""yes" 1>&6
3670 LIBS="-lsocket -lnsl $LIBS"
3671 else
3672 echo "$ac_t""no" 1>&6
3673 fi
3674
3675 fi
3676
3677 fi
3678
3679 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3680 echo $ac_n "checking for putmsg in -lstr""... $ac_c" 1>&6
3681 echo "configure:3682: checking for putmsg in -lstr" >&5
3682 ac_lib_var=`echo str'_'putmsg | sed 'y%./+-%__p_%'`
3683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3684 echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686 ac_save_LIBS="$LIBS"
3687 LIBS="-lstr $LIBS"
3688 cat > conftest.$ac_ext <<EOF
3689 #line 3690 "configure"
3690 #include "confdefs.h"
3691 /* Override any gcc2 internal prototype to avoid an error. */
3692 /* We use char because int might match the return type of a gcc2
3693 builtin and then its argument prototype would still apply. */
3694 char putmsg();
3695
3696 int main() {
3697 putmsg()
3698 ; return 0; }
3699 EOF
3700 if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3701 rm -rf conftest*
3702 eval "ac_cv_lib_$ac_lib_var=yes"
3703 else
3704 echo "configure: failed program was:" >&5
3705 cat conftest.$ac_ext >&5
3706 rm -rf conftest*
3707 eval "ac_cv_lib_$ac_lib_var=no"
3708 fi
3709 rm -f conftest*
3710 LIBS="$ac_save_LIBS"
3711
3712 fi
3713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3714 echo "$ac_t""yes" 1>&6
3715 ac_tr_lib=HAVE_LIB`echo str | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3716 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3717 cat >> confdefs.h <<EOF
3718 #define $ac_tr_lib 1
3719 EOF
3720
3721 LIBS="-lstr $LIBS"
3722
3723 else
3724 echo "$ac_t""no" 1>&6
3725 fi
3726
3727
3728
3729 LBL_LIBS="$LIBS"
3730 pfopen=/usr/examples/packetfilter/pfopen.c
3731 if test -f $pfopen ; then
3732 for ac_func in pfopen
3733 do
3734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3735 echo "configure:3736: checking for $ac_func" >&5
3736 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3737 echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739 cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 /* System header to define __stub macros and hopefully few prototypes,
3743 which can conflict with char $ac_func(); below. */
3744 #include <assert.h>
3745 /* Override any gcc2 internal prototype to avoid an error. */
3746 /* We use char because int might match the return type of a gcc2
3747 builtin and then its argument prototype would still apply. */
3748 char $ac_func();
3749
3750 int main() {
3751
3752 /* The GNU C library defines this for functions which it implements
3753 to always fail with ENOSYS. Some functions are actually named
3754 something starting with __ and the normal name is an alias. */
3755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3756 choke me
3757 #else
3758 $ac_func();
3759 #endif
3760
3761 ; return 0; }
3762 EOF
3763 if { (eval echo configure:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3764 rm -rf conftest*
3765 eval "ac_cv_func_$ac_func=yes"
3766 else
3767 echo "configure: failed program was:" >&5
3768 cat conftest.$ac_ext >&5
3769 rm -rf conftest*
3770 eval "ac_cv_func_$ac_func=no"
3771 fi
3772 rm -f conftest*
3773 fi
3774
3775 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3776 echo "$ac_t""yes" 1>&6
3777 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3778 cat >> confdefs.h <<EOF
3779 #define $ac_tr_func 1
3780 EOF
3781
3782 else
3783 echo "$ac_t""no" 1>&6
3784 fi
3785 done
3786
3787 if test $ac_cv_func_pfopen = "no" ; then
3788 echo "$ac_t""Using $pfopen" 1>&6
3789 LIBS="$LIBS $pfopen"
3790 fi
3791 fi
3792 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3793 echo "configure:3794: checking for local pcap library" >&5
3794 libpcap=FAIL
3795 lastdir=FAIL
3796 places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \
3797 egrep '/libpcap-[0-9]*\.[0-9]*(\.[0-9]*)?([ab][0-9]*)?$'`
3798 for dir in $places ../libpcap libpcap ; do
3799 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3800 if test $lastdir = $basedir ; then
3801 continue;
3802 fi
3803 lastdir=$dir
3804 if test -r $dir/libpcap.a ; then
3805 libpcap=$dir/libpcap.a
3806 d=$dir
3807 fi
3808 done
3809 if test $libpcap = FAIL ; then
3810 echo "$ac_t""not found" 1>&6
3811 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3812 echo "configure:3813: checking for main in -lpcap" >&5
3813 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3814 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3815 echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817 ac_save_LIBS="$LIBS"
3818 LIBS="-lpcap $LIBS"
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822
3823 int main() {
3824 main()
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3828 rm -rf conftest*
3829 eval "ac_cv_lib_$ac_lib_var=yes"
3830 else
3831 echo "configure: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 rm -rf conftest*
3834 eval "ac_cv_lib_$ac_lib_var=no"
3835 fi
3836 rm -f conftest*
3837 LIBS="$ac_save_LIBS"
3838
3839 fi
3840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3841 echo "$ac_t""yes" 1>&6
3842 libpcap="-lpcap"
3843 else
3844 echo "$ac_t""no" 1>&6
3845 fi
3846
3847 if test $libpcap = FAIL ; then
3848 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3849 fi
3850 else
3851 V_PCAPDEP=$libpcap
3852 if test -r $d/pcap.h; then
3853 V_INCLS="-I$d $V_INCLS"
3854 elif test -r $srcdir/../libpcap/pcap.h; then
3855 V_INCLS="-I$d -I$srcdir/../libpcap $V_INCLS"
3856 else
3857 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3858 fi
3859 echo "$ac_t""$libpcap" 1>&6
3860 fi
3861 LIBS="$libpcap $LIBS"
3862 case "$target_os" in
3863
3864 aix*)
3865 pseexe="/lib/pse.exp"
3866 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3867 echo "configure:3868: checking for $pseexe" >&5
3868 if test -f $pseexe ; then
3869 echo "$ac_t""yes" 1>&6
3870 LIBS="$LIBS -I:$pseexe"
3871 fi
3872 ;;
3873 esac
3874
3875 V_GROUP=0
3876 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
3877 V_GROUP=wheel
3878 fi
3879 case "$target_os" in
3880
3881 aix*)
3882 cat >> confdefs.h <<\EOF
3883 #define _SUN 1
3884 EOF
3885
3886 ;;
3887
3888 irix*)
3889 V_GROUP=sys
3890 ;;
3891
3892 linux*)
3893 V_INCLS="$V_INCLS -I\$(srcdir)/linux-include"
3894 ;;
3895
3896 osf*)
3897 V_GROUP=system
3898 cat >> confdefs.h <<\EOF
3899 #define __STDC__ 2
3900 EOF
3901
3902 ;;
3903
3904 solaris*)
3905 V_GROUP=sys
3906 ;;
3907 esac
3908
3909 if test -f /dev/bpf0 ; then
3910 V_GROUP=bpf
3911 fi
3912
3913 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
3914 echo "configure:3915: checking for u_int8_t using $CC" >&5
3915 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
3916 echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921
3922 # include "confdefs.h"
3923 # include <sys/types.h>
3924 # if STDC_HEADERS
3925 # include <stdlib.h>
3926 # include <stddef.h>
3927 # endif
3928 int main() {
3929 u_int8_t i
3930 ; return 0; }
3931 EOF
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933 rm -rf conftest*
3934 ac_cv_lbl_have_u_int8_t=yes
3935 else
3936 echo "configure: failed program was:" >&5
3937 cat conftest.$ac_ext >&5
3938 rm -rf conftest*
3939 ac_cv_lbl_have_u_int8_t=no
3940 fi
3941 rm -f conftest*
3942 fi
3943
3944 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
3945 if test $ac_cv_lbl_have_u_int8_t = no ; then
3946 cat >> confdefs.h <<\EOF
3947 #define u_int8_t u_char
3948 EOF
3949
3950 fi
3951 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
3952 echo "configure:3953: checking for int16_t using $CC" >&5
3953 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
3954 echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956 cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959
3960 # include "confdefs.h"
3961 # include <sys/types.h>
3962 # if STDC_HEADERS
3963 # include <stdlib.h>
3964 # include <stddef.h>
3965 # endif
3966 int main() {
3967 int16_t i
3968 ; return 0; }
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3971 rm -rf conftest*
3972 ac_cv_lbl_have_int16_t=yes
3973 else
3974 echo "configure: failed program was:" >&5
3975 cat conftest.$ac_ext >&5
3976 rm -rf conftest*
3977 ac_cv_lbl_have_int16_t=no
3978 fi
3979 rm -f conftest*
3980 fi
3981
3982 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
3983 if test $ac_cv_lbl_have_int16_t = no ; then
3984 cat >> confdefs.h <<\EOF
3985 #define int16_t short
3986 EOF
3987
3988 fi
3989 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
3990 echo "configure:3991: checking for u_int16_t using $CC" >&5
3991 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
3992 echo $ac_n "(cached) $ac_c" 1>&6
3993 else
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997
3998 # include "confdefs.h"
3999 # include <sys/types.h>
4000 # if STDC_HEADERS
4001 # include <stdlib.h>
4002 # include <stddef.h>
4003 # endif
4004 int main() {
4005 u_int16_t i
4006 ; return 0; }
4007 EOF
4008 if { (eval echo configure:4009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4009 rm -rf conftest*
4010 ac_cv_lbl_have_u_int16_t=yes
4011 else
4012 echo "configure: failed program was:" >&5
4013 cat conftest.$ac_ext >&5
4014 rm -rf conftest*
4015 ac_cv_lbl_have_u_int16_t=no
4016 fi
4017 rm -f conftest*
4018 fi
4019
4020 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
4021 if test $ac_cv_lbl_have_u_int16_t = no ; then
4022 cat >> confdefs.h <<\EOF
4023 #define u_int16_t u_short
4024 EOF
4025
4026 fi
4027 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
4028 echo "configure:4029: checking for int32_t using $CC" >&5
4029 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
4030 echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035
4036 # include "confdefs.h"
4037 # include <sys/types.h>
4038 # if STDC_HEADERS
4039 # include <stdlib.h>
4040 # include <stddef.h>
4041 # endif
4042 int main() {
4043 int32_t i
4044 ; return 0; }
4045 EOF
4046 if { (eval echo configure:4047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4047 rm -rf conftest*
4048 ac_cv_lbl_have_int32_t=yes
4049 else
4050 echo "configure: failed program was:" >&5
4051 cat conftest.$ac_ext >&5
4052 rm -rf conftest*
4053 ac_cv_lbl_have_int32_t=no
4054 fi
4055 rm -f conftest*
4056 fi
4057
4058 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
4059 if test $ac_cv_lbl_have_int32_t = no ; then
4060 cat >> confdefs.h <<\EOF
4061 #define int32_t int
4062 EOF
4063
4064 fi
4065 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
4066 echo "configure:4067: checking for u_int32_t using $CC" >&5
4067 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
4068 echo $ac_n "(cached) $ac_c" 1>&6
4069 else
4070 cat > conftest.$ac_ext <<EOF
4071 #line 4072 "configure"
4072 #include "confdefs.h"
4073
4074 # include "confdefs.h"
4075 # include <sys/types.h>
4076 # if STDC_HEADERS
4077 # include <stdlib.h>
4078 # include <stddef.h>
4079 # endif
4080 int main() {
4081 u_int32_t i
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4085 rm -rf conftest*
4086 ac_cv_lbl_have_u_int32_t=yes
4087 else
4088 echo "configure: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4090 rm -rf conftest*
4091 ac_cv_lbl_have_u_int32_t=no
4092 fi
4093 rm -f conftest*
4094 fi
4095
4096 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
4097 if test $ac_cv_lbl_have_u_int32_t = no ; then
4098 cat >> confdefs.h <<\EOF
4099 #define u_int32_t u_int
4100 EOF
4101
4102 fi
4103
4104 rm -f os-proto.h
4105 if test "${LBL_CFLAGS+set}" = set; then
4106 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
4107 fi
4108 if test -f .devel ; then
4109 if test "$GCC" = yes ; then
4110 if test "${LBL_CFLAGS+set}" != set; then
4111 if test "$ac_cv_prog_cc_g" = yes ; then
4112 V_CCOPT="-g $V_CCOPT"
4113 fi
4114 V_CCOPT="$V_CCOPT -Wall"
4115 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
4116 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
4117 fi
4118 fi
4119 else
4120 case "$target_os" in
4121
4122 irix6*)
4123 V_CCOPT="$V_CCOPT -n32"
4124 ;;
4125
4126 *)
4127 ;;
4128 esac
4129 fi
4130 os=`echo $target_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
4131 name="lbl/os-$os.h"
4132 if test -f $name ; then
4133 ln -s $name os-proto.h
4134 cat >> confdefs.h <<\EOF
4135 #define HAVE_OS_PROTO_H 1
4136 EOF
4137
4138 else
4139 echo "configure: warning: can't find $name" 1>&2
4140 fi
4141 fi
4142
4143 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
4144 echo "configure:4145: checking if sockaddr struct has sa_len member" >&5
4145 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
4146 echo $ac_n "(cached) $ac_c" 1>&6
4147 else
4148 cat > conftest.$ac_ext <<EOF
4149 #line 4150 "configure"
4150 #include "confdefs.h"
4151
4152 # include <sys/types.h>
4153 # include <sys/socket.h>
4154 int main() {
4155 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
4156 ; return 0; }
4157 EOF
4158 if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4159 rm -rf conftest*
4160 ac_cv_lbl_sockaddr_has_sa_len=yes
4161 else
4162 echo "configure: failed program was:" >&5
4163 cat conftest.$ac_ext >&5
4164 rm -rf conftest*
4165 ac_cv_lbl_sockaddr_has_sa_len=no
4166 fi
4167 rm -f conftest*
4168 fi
4169
4170 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
4171 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
4172 cat >> confdefs.h <<\EOF
4173 #define HAVE_SOCKADDR_SA_LEN 1
4174 EOF
4175
4176 fi
4177
4178 echo $ac_n "checking if ether_header uses ether_addr structs""... $ac_c" 1>&6
4179 echo "configure:4180: checking if ether_header uses ether_addr structs" >&5
4180 if eval "test \"`echo '$''{'ac_cv_ether_header_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_header *)0)->ether_dhost.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_header_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_header_has_ea=no
4212 fi
4213 rm -f conftest*
4214 CFLAGS="$LBL_SAVE_CFLAGS"
4215 fi
4216
4217 echo "$ac_t""$ac_cv_ether_header_has_ea" 1>&6
4218 if test $ac_cv_ether_header_has_ea = yes ; then
4219 cat >> confdefs.h <<\EOF
4220 #define ETHER_HEADER_HAS_EA 1
4221 EOF
4222
4223 fi
4224
4225 echo $ac_n "checking if ether_arp uses ether_addr structs""... $ac_c" 1>&6
4226 echo "configure:4227: checking if ether_arp uses ether_addr structs" >&5
4227 if eval "test \"`echo '$''{'ac_cv_ether_arp_has_ea'+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 # if __STDC__
4238 /* osf3 has REALLY good prototyes */
4239 struct mbuf;
4240 struct rtentry;
4241 # endif
4242 # include <sys/socket.h>
4243 # include <net/if.h>
4244 # include <netinet/in.h>
4245 # include <netinet/if_ether.h>
4246 int main() {
4247 u_int i =
4248 sizeof(((struct ether_arp *)0)->arp_sha.ether_addr_octet)
4249 ; return 0; }
4250 EOF
4251 if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4252 rm -rf conftest*
4253 ac_cv_ether_arp_has_ea=yes
4254 else
4255 echo "configure: failed program was:" >&5
4256 cat conftest.$ac_ext >&5
4257 rm -rf conftest*
4258 ac_cv_ether_arp_has_ea=no
4259 fi
4260 rm -f conftest*
4261 CFLAGS="$LBL_SAVE_CFLAGS"
4262 fi
4263
4264 echo "$ac_t""$ac_cv_ether_arp_has_ea" 1>&6
4265 if test $ac_cv_ether_arp_has_ea = yes ; then
4266 cat >> confdefs.h <<\EOF
4267 #define ETHER_ARP_HAS_EA 1
4268 EOF
4269
4270 fi
4271
4272 echo $ac_n "checking if ether_arp uses erp_xsha member""... $ac_c" 1>&6
4273 echo "configure:4274: checking if ether_arp uses erp_xsha member" >&5
4274 if eval "test \"`echo '$''{'ac_cv_struct_ether_arp_x'+set}'`\" = set"; then
4275 echo $ac_n "(cached) $ac_c" 1>&6
4276 else
4277 LBL_SAVE_CFLAGS="$CFLAGS"
4278 CFLAGS="$CFLAGS $V_INCLS"
4279 cat > conftest.$ac_ext <<EOF
4280 #line 4281 "configure"
4281 #include "confdefs.h"
4282
4283 # include <sys/types.h>
4284 # include <sys/socket.h>
4285 # if __STDC__
4286 /* osf3 has REALLY good prototyes */
4287 struct mbuf;
4288 struct rtentry;
4289 # endif
4290 # include <net/if.h>
4291 # include <netinet/in.h>
4292 # include <netinet/if_ether.h>
4293 int main() {
4294 u_int i = sizeof( ((struct ether_arp *)0)->arp_xsha)
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4298 rm -rf conftest*
4299 ac_cv_struct_ether_arp_x=yes
4300 else
4301 echo "configure: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4303 rm -rf conftest*
4304 ac_cv_struct_ether_arp_x=no
4305 fi
4306 rm -f conftest*
4307 CFLAGS="$LBL_SAVE_CFLAGS"
4308 fi
4309
4310 echo "$ac_t""$ac_cv_struct_ether_arp_x" 1>&6
4311 if test $ac_cv_struct_ether_arp_x = yes ; then
4312 cat >> confdefs.h <<\EOF
4313 #define ETHER_ARP_HAS_X 1
4314 EOF
4315
4316 fi
4317
4318 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
4319 echo "configure:4320: checking if unaligned accesses fail" >&5
4320 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323 case "$target_cpu" in
4324
4325 alpha|hp*|mips|sparc)
4326 ac_cv_lbl_unaligned_fail=yes
4327 ;;
4328
4329 *)
4330 cat >conftest.c <<EOF
4331 # include <sys/types.h>
4332 # include <sys/wait.h>
4333 # include <stdio.h>
4334 unsigned char a[5] = { 1, 2, 3, 4, 5 };
4335 main() {
4336 unsigned int i;
4337 pid_t pid;
4338 int status;
4339 /* avoid "core dumped" message */
4340 pid = fork();
4341 if (pid < 0)
4342 exit(2);
4343 if (pid > 0) {
4344 /* parent */
4345 pid = waitpid(pid, &status, 0);
4346 if (pid < 0)
4347 exit(3);
4348 exit(!WIFEXITED(status));
4349 }
4350 /* child */
4351 i = *(unsigned int *)&a[1];
4352 printf("%d\n", i);
4353 exit(0);
4354 }
4355 EOF
4356 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
4357 conftest.c $LIBS >/dev/null 2>&1
4358 if test ! -x conftest ; then
4359 ac_cv_lbl_unaligned_fail=yes
4360 else
4361 ./conftest >conftest.out
4362 if test ! -s conftest.out ; then
4363 ac_cv_lbl_unaligned_fail=yes
4364 else
4365 ac_cv_lbl_unaligned_fail=no
4366 fi
4367 fi
4368 rm -f conftest* core core.conftest
4369 ;;
4370 esac
4371 fi
4372
4373 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
4374 if test $ac_cv_lbl_unaligned_fail = yes ; then
4375 cat >> confdefs.h <<\EOF
4376 #define LBL_ALIGN 1
4377 EOF
4378
4379 fi
4380
4381
4382 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
4383 echo "configure:4384: checking for h_errno" >&5
4384 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
4385 echo $ac_n "(cached) $ac_c" 1>&6
4386 else
4387 cat > conftest.$ac_ext <<EOF
4388 #line 4389 "configure"
4389 #include "confdefs.h"
4390
4391 # include <sys/types.h>
4392 # include <netdb.h>
4393 int main() {
4394 int foo = h_errno;
4395 ; return 0; }
4396 EOF
4397 if { (eval echo configure:4398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4398 rm -rf conftest*
4399 ac_cv_var_h_errno=yes
4400 else
4401 echo "configure: failed program was:" >&5
4402 cat conftest.$ac_ext >&5
4403 rm -rf conftest*
4404 ac_cv_var_h_errno=no
4405 fi
4406 rm -f conftest*
4407 fi
4408
4409 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
4410 if test "$ac_cv_var_h_errno" = "yes"; then
4411 cat >> confdefs.h <<\EOF
4412 #define HAVE_H_ERRNO 1
4413 EOF
4414
4415 fi
4416
4417
4418 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
4419 echo "configure:4420: checking for SSLeay" >&5
4420 ac_cv_ssleay_path=no
4421 incdir=no
4422 for dir in /usr /usr/local /usr/local/ssl /usr/pkg; do
4423 if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then
4424 ac_cv_ssleay_path=$dir
4425 fi
4426 if test -d $dir/include/ssleay -a -f $dir/include/ssleay/des.h; then
4427 incdir="-I$dir/include/ssleay"
4428 elif test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4429 incdir="-I$dir/include -I$dir/include/openssl"
4430 elif test -d $dir/include -a -f $dir/include/des.h; then
4431 incdir="-I$dir/include"
4432 fi
4433 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4434 break;
4435 else
4436 ac_cv_ssleay_path=no
4437 incdir=no
4438 fi
4439 done
4440 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4441 if test "$ac_cv_ssleay_path" != no; then
4442 V_INCLS="$V_INCLS $incdir"
4443 LIBS="$LIBS -L$dir/lib"
4444 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
4445 LIBS="$LIBS -lRSAglue"
4446 fi
4447 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
4448 LIBS="$LIBS -lrsaref"
4449 fi
4450 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4451 echo "configure:4452: checking for des_cbc_encrypt in -lcrypto" >&5
4452 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4453 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4454 echo $ac_n "(cached) $ac_c" 1>&6
4455 else
4456 ac_save_LIBS="$LIBS"
4457 LIBS="-lcrypto $LIBS"
4458 cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 /* Override any gcc2 internal prototype to avoid an error. */
4462 /* We use char because int might match the return type of a gcc2
4463 builtin and then its argument prototype would still apply. */
4464 char des_cbc_encrypt();
4465
4466 int main() {
4467 des_cbc_encrypt()
4468 ; return 0; }
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4471 rm -rf conftest*
4472 eval "ac_cv_lib_$ac_lib_var=yes"
4473 else
4474 echo "configure: failed program was:" >&5
4475 cat conftest.$ac_ext >&5
4476 rm -rf conftest*
4477 eval "ac_cv_lib_$ac_lib_var=no"
4478 fi
4479 rm -f conftest*
4480 LIBS="$ac_save_LIBS"
4481
4482 fi
4483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4484 echo "$ac_t""yes" 1>&6
4485 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4486 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4487 cat >> confdefs.h <<EOF
4488 #define $ac_tr_lib 1
4489 EOF
4490
4491 LIBS="-lcrypto $LIBS"
4492
4493 else
4494 echo "$ac_t""no" 1>&6
4495 fi
4496
4497
4498 bak_CPPFLAGS=$CPPFLAGS
4499 CPPFLAGS="$CPPFLAGS $V_INCLS"
4500 for ac_hdr in cast.h rc5.h
4501 do
4502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4504 echo "configure:4505: checking for $ac_hdr" >&5
4505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4506 echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <$ac_hdr>
4512 EOF
4513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4514 { (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4516 if test -z "$ac_err"; then
4517 rm -rf conftest*
4518 eval "ac_cv_header_$ac_safe=yes"
4519 else
4520 echo "$ac_err" >&5
4521 echo "configure: failed program was:" >&5
4522 cat conftest.$ac_ext >&5
4523 rm -rf conftest*
4524 eval "ac_cv_header_$ac_safe=no"
4525 fi
4526 rm -f conftest*
4527 fi
4528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4529 echo "$ac_t""yes" 1>&6
4530 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4531 cat >> confdefs.h <<EOF
4532 #define $ac_tr_hdr 1
4533 EOF
4534
4535 else
4536 echo "$ac_t""no" 1>&6
4537 fi
4538 done
4539
4540
4541 if test "$ac_cv_header_cast_h" = "yes"; then
4542 echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
4543 echo "configure:4544: checking for buggy CAST128" >&5
4544 if test "$cross_compiling" = yes; then
4545 buggy_cast128="cross-compiling, assume yes"
4546 else
4547 cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550
4551 #include <cast.h>
4552 main()
4553 {
4554 unsigned char key[] = {0x01,0x23,0x45,0x67,0x12};
4555 unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
4556 unsigned char out[sizeof(in)];
4557 unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E};
4558 CAST_KEY ks;
4559 CAST_set_key(&ks, sizeof(key), key);
4560 CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT);
4561 if (memcmp(out, ok, sizeof(ok)) != 0)
4562 return 0;
4563 else
4564 return 1;
4565 }
4566 EOF
4567 if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4568 then
4569 buggy_cast128=yes
4570 else
4571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 rm -fr conftest*
4574 buggy_cast128=no
4575 fi
4576 rm -fr conftest*
4577 fi
4578
4579 echo "$ac_t""$buggy_cast128" 1>&6
4580 if test "$buggy_cast128" != no; then
4581 echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine."
4582 echo "disabling CAST128 support."
4583 cat >> confdefs.h <<\EOF
4584 #define HAVE_BUGGY_CAST128 1
4585 EOF
4586
4587 fi
4588 fi
4589
4590 CPPFLAGS=$bak_CPPFLAGS
4591 fi
4592
4593 if test -r ${srcdir}/lbl/gnuc.h ; then
4594 rm -f gnuc.h
4595 ln -s ${srcdir}/lbl/gnuc.h gnuc.h
4596 fi
4597
4598
4599
4600
4601
4602
4603
4604 # Find a good install program. We prefer a C program (faster),
4605 # so one script is as good as another. But avoid the broken or
4606 # incompatible versions:
4607 # SysV /etc/install, /usr/sbin/install
4608 # SunOS /usr/etc/install
4609 # IRIX /sbin/install
4610 # AIX /bin/install
4611 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4612 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4613 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4614 # ./install, which can be erroneously created by make from ./install.sh.
4615 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4616 echo "configure:4617: checking for a BSD compatible install" >&5
4617 if test -z "$INSTALL"; then
4618 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4619 echo $ac_n "(cached) $ac_c" 1>&6
4620 else
4621 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4622 for ac_dir in $PATH; do
4623 # Account for people who put trailing slashes in PATH elements.
4624 case "$ac_dir/" in
4625 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4626 *)
4627 # OSF1 and SCO ODT 3.0 have their own names for install.
4628 # Don't use installbsd from OSF since it installs stuff as root
4629 # by default.
4630 for ac_prog in ginstall scoinst install; do
4631 if test -f $ac_dir/$ac_prog; then
4632 if test $ac_prog = install &&
4633 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4634 # AIX install. It has an incompatible calling convention.
4635 :
4636 else
4637 ac_cv_path_install="$ac_dir/$ac_prog -c"
4638 break 2
4639 fi
4640 fi
4641 done
4642 ;;
4643 esac
4644 done
4645 IFS="$ac_save_IFS"
4646
4647 fi
4648 if test "${ac_cv_path_install+set}" = set; then
4649 INSTALL="$ac_cv_path_install"
4650 else
4651 # As a last resort, use the slow shell script. We don't cache a
4652 # path for INSTALL within a source directory, because that will
4653 # break other packages using the cache if that directory is
4654 # removed, or if the path is relative.
4655 INSTALL="$ac_install_sh"
4656 fi
4657 fi
4658 echo "$ac_t""$INSTALL" 1>&6
4659
4660 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4661 # It thinks the first close brace ends the variable substitution.
4662 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4663
4664 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4665
4666 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4667
4668
4669
4670
4671
4672 trap '' 1 2 15
4673 cat > confcache <<\EOF
4674 # This file is a shell script that caches the results of configure
4675 # tests run on this system so they can be shared between configure
4676 # scripts and configure runs. It is not useful on other systems.
4677 # If it contains results you don't want to keep, you may remove or edit it.
4678 #
4679 # By default, configure uses ./config.cache as the cache file,
4680 # creating it if it does not exist already. You can give configure
4681 # the --cache-file=FILE option to use a different cache file; that is
4682 # what configure does when it calls configure scripts in
4683 # subdirectories, so they share the cache.
4684 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4685 # config.status only pays attention to the cache file if you give it the
4686 # --recheck option to rerun configure.
4687 #
4688 EOF
4689 # The following way of writing the cache mishandles newlines in values,
4690 # but we know of no workaround that is simple, portable, and efficient.
4691 # So, don't put newlines in cache variables' values.
4692 # Ultrix sh set writes to stderr and can't be redirected directly,
4693 # and sets the high bit in the cache file unless we assign to the vars.
4694 (set) 2>&1 |
4695 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4696 *ac_space=\ *)
4697 # `set' does not quote correctly, so add quotes (double-quote substitution
4698 # turns \\\\ into \\, and sed turns \\ into \).
4699 sed -n \
4700 -e "s/'/'\\\\''/g" \
4701 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4702 ;;
4703 *)
4704 # `set' quotes correctly as required by POSIX, so do not add quotes.
4705 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4706 ;;
4707 esac >> confcache
4708 if cmp -s $cache_file confcache; then
4709 :
4710 else
4711 if test -w $cache_file; then
4712 echo "updating cache $cache_file"
4713 cat confcache > $cache_file
4714 else
4715 echo "not updating unwritable cache $cache_file"
4716 fi
4717 fi
4718 rm -f confcache
4719
4720 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4721
4722 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4723 # Let make expand exec_prefix.
4724 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4725
4726 # Any assignment to VPATH causes Sun make to only execute
4727 # the first set of double-colon rules, so remove it if not needed.
4728 # If there is a colon in the path, we need to keep it.
4729 if test "x$srcdir" = x.; then
4730 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4731 fi
4732
4733 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4734
4735 DEFS=-DHAVE_CONFIG_H
4736
4737 # Without the "./", some shells look in PATH for config.status.
4738 : ${CONFIG_STATUS=./config.status}
4739
4740 echo creating $CONFIG_STATUS
4741 rm -f $CONFIG_STATUS
4742 cat > $CONFIG_STATUS <<EOF
4743 #! /bin/sh
4744 # Generated automatically by configure.
4745 # Run this file to recreate the current configuration.
4746 # This directory was configured as follows,
4747 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4748 #
4749 # $0 $ac_configure_args
4750 #
4751 # Compiler output produced by configure, useful for debugging
4752 # configure, is in ./config.log if it exists.
4753
4754 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4755 for ac_option
4756 do
4757 case "\$ac_option" in
4758 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4759 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4760 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4761 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4762 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4763 exit 0 ;;
4764 -help | --help | --hel | --he | --h)
4765 echo "\$ac_cs_usage"; exit 0 ;;
4766 *) echo "\$ac_cs_usage"; exit 1 ;;
4767 esac
4768 done
4769
4770 ac_given_srcdir=$srcdir
4771 ac_given_INSTALL="$INSTALL"
4772
4773 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4774 EOF
4775 cat >> $CONFIG_STATUS <<EOF
4776
4777 # Protect against being on the right side of a sed subst in config.status.
4778 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4779 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4780 $ac_vpsub
4781 $extrasub
4782 s%@SHELL@%$SHELL%g
4783 s%@CFLAGS@%$CFLAGS%g
4784 s%@CPPFLAGS@%$CPPFLAGS%g
4785 s%@CXXFLAGS@%$CXXFLAGS%g
4786 s%@FFLAGS@%$FFLAGS%g
4787 s%@DEFS@%$DEFS%g
4788 s%@LDFLAGS@%$LDFLAGS%g
4789 s%@LIBS@%$LIBS%g
4790 s%@exec_prefix@%$exec_prefix%g
4791 s%@prefix@%$prefix%g
4792 s%@program_transform_name@%$program_transform_name%g
4793 s%@bindir@%$bindir%g
4794 s%@sbindir@%$sbindir%g
4795 s%@libexecdir@%$libexecdir%g
4796 s%@datadir@%$datadir%g
4797 s%@sysconfdir@%$sysconfdir%g
4798 s%@sharedstatedir@%$sharedstatedir%g
4799 s%@localstatedir@%$localstatedir%g
4800 s%@libdir@%$libdir%g
4801 s%@includedir@%$includedir%g
4802 s%@oldincludedir@%$oldincludedir%g
4803 s%@infodir@%$infodir%g
4804 s%@mandir@%$mandir%g
4805 s%@host@%$host%g
4806 s%@host_alias@%$host_alias%g
4807 s%@host_cpu@%$host_cpu%g
4808 s%@host_vendor@%$host_vendor%g
4809 s%@host_os@%$host_os%g
4810 s%@target@%$target%g
4811 s%@target_alias@%$target_alias%g
4812 s%@target_cpu@%$target_cpu%g
4813 s%@target_vendor@%$target_vendor%g
4814 s%@target_os@%$target_os%g
4815 s%@build@%$build%g
4816 s%@build_alias@%$build_alias%g
4817 s%@build_cpu@%$build_cpu%g
4818 s%@build_vendor@%$build_vendor%g
4819 s%@build_os@%$build_os%g
4820 s%@SHLICC2@%$SHLICC2%g
4821 s%@CC@%$CC%g
4822 s%@CPP@%$CPP%g
4823 s%@LIBOBJS@%$LIBOBJS%g
4824 s%@V_CCOPT@%$V_CCOPT%g
4825 s%@V_GROUP@%$V_GROUP%g
4826 s%@V_INCLS@%$V_INCLS%g
4827 s%@V_PCAPDEP@%$V_PCAPDEP%g
4828 s%@LOCALSRC@%$LOCALSRC%g
4829 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4830 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4831 s%@INSTALL_DATA@%$INSTALL_DATA%g
4832
4833 CEOF
4834 EOF
4835
4836 cat >> $CONFIG_STATUS <<\EOF
4837
4838 # Split the substitutions into bite-sized pieces for seds with
4839 # small command number limits, like on Digital OSF/1 and HP-UX.
4840 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4841 ac_file=1 # Number of current file.
4842 ac_beg=1 # First line for current file.
4843 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4844 ac_more_lines=:
4845 ac_sed_cmds=""
4846 while $ac_more_lines; do
4847 if test $ac_beg -gt 1; then
4848 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4849 else
4850 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4851 fi
4852 if test ! -s conftest.s$ac_file; then
4853 ac_more_lines=false
4854 rm -f conftest.s$ac_file
4855 else
4856 if test -z "$ac_sed_cmds"; then
4857 ac_sed_cmds="sed -f conftest.s$ac_file"
4858 else
4859 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4860 fi
4861 ac_file=`expr $ac_file + 1`
4862 ac_beg=$ac_end
4863 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4864 fi
4865 done
4866 if test -z "$ac_sed_cmds"; then
4867 ac_sed_cmds=cat
4868 fi
4869 EOF
4870
4871 cat >> $CONFIG_STATUS <<EOF
4872
4873 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4874 EOF
4875 cat >> $CONFIG_STATUS <<\EOF
4876 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4877 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4878 case "$ac_file" in
4879 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4880 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4881 *) ac_file_in="${ac_file}.in" ;;
4882 esac
4883
4884 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4885
4886 # Remove last slash and all that follows it. Not all systems have dirname.
4887 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4888 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4889 # The file is in a subdirectory.
4890 test ! -d "$ac_dir" && mkdir "$ac_dir"
4891 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4892 # A "../" for each directory in $ac_dir_suffix.
4893 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4894 else
4895 ac_dir_suffix= ac_dots=
4896 fi
4897
4898 case "$ac_given_srcdir" in
4899 .) srcdir=.
4900 if test -z "$ac_dots"; then top_srcdir=.
4901 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4902 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4903 *) # Relative path.
4904 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4905 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4906 esac
4907
4908 case "$ac_given_INSTALL" in
4909 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4910 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4911 esac
4912
4913 echo creating "$ac_file"
4914 rm -f "$ac_file"
4915 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4916 case "$ac_file" in
4917 *Makefile*) ac_comsub="1i\\
4918 # $configure_input" ;;
4919 *) ac_comsub= ;;
4920 esac
4921
4922 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4923 sed -e "$ac_comsub
4924 s%@configure_input@%$configure_input%g
4925 s%@srcdir@%$srcdir%g
4926 s%@top_srcdir@%$top_srcdir%g
4927 s%@INSTALL@%$INSTALL%g
4928 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4929 fi; done
4930 rm -f conftest.s*
4931
4932 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4933 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4934 #
4935 # ac_d sets the value in "#define NAME VALUE" lines.
4936 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4937 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4938 ac_dC='\3'
4939 ac_dD='%g'
4940 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4941 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4942 ac_uB='\([ ]\)%\1#\2define\3'
4943 ac_uC=' '
4944 ac_uD='\4%g'
4945 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4946 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4947 ac_eB='$%\1#\2define\3'
4948 ac_eC=' '
4949 ac_eD='%g'
4950
4951 if test "${CONFIG_HEADERS+set}" != set; then
4952 EOF
4953 cat >> $CONFIG_STATUS <<EOF
4954 CONFIG_HEADERS="config.h"
4955 EOF
4956 cat >> $CONFIG_STATUS <<\EOF
4957 fi
4958 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4959 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4960 case "$ac_file" in
4961 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4962 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4963 *) ac_file_in="${ac_file}.in" ;;
4964 esac
4965
4966 echo creating $ac_file
4967
4968 rm -f conftest.frag conftest.in conftest.out
4969 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4970 cat $ac_file_inputs > conftest.in
4971
4972 EOF
4973
4974 # Transform confdefs.h into a sed script conftest.vals that substitutes
4975 # the proper values into config.h.in to produce config.h. And first:
4976 # Protect against being on the right side of a sed subst in config.status.
4977 # Protect against being in an unquoted here document in config.status.
4978 rm -f conftest.vals
4979 cat > conftest.hdr <<\EOF
4980 s/[\\&%]/\\&/g
4981 s%[\\$`]%\\&%g
4982 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4983 s%ac_d%ac_u%gp
4984 s%ac_u%ac_e%gp
4985 EOF
4986 sed -n -f conftest.hdr confdefs.h > conftest.vals
4987 rm -f conftest.hdr
4988
4989 # This sed command replaces #undef with comments. This is necessary, for
4990 # example, in the case of _POSIX_SOURCE, which is predefined and required
4991 # on some systems where configure will not decide to define it.
4992 cat >> conftest.vals <<\EOF
4993 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4994 EOF
4995
4996 # Break up conftest.vals because some shells have a limit on
4997 # the size of here documents, and old seds have small limits too.
4998
4999 rm -f conftest.tail
5000 while :
5001 do
5002 ac_lines=`grep -c . conftest.vals`
5003 # grep -c gives empty output for an empty file on some AIX systems.
5004 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5005 # Write a limited-size here document to conftest.frag.
5006 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5007 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5008 echo 'CEOF
5009 sed -f conftest.frag conftest.in > conftest.out
5010 rm -f conftest.in
5011 mv conftest.out conftest.in
5012 ' >> $CONFIG_STATUS
5013 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5014 rm -f conftest.vals
5015 mv conftest.tail conftest.vals
5016 done
5017 rm -f conftest.vals
5018
5019 cat >> $CONFIG_STATUS <<\EOF
5020 rm -f conftest.frag conftest.h
5021 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5022 cat conftest.in >> conftest.h
5023 rm -f conftest.in
5024 if cmp -s $ac_file conftest.h 2>/dev/null; then
5025 echo "$ac_file is unchanged"
5026 rm -f conftest.h
5027 else
5028 # Remove last slash and all that follows it. Not all systems have dirname.
5029 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5030 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5031 # The file is in a subdirectory.
5032 test ! -d "$ac_dir" && mkdir "$ac_dir"
5033 fi
5034 rm -f $ac_file
5035 mv conftest.h $ac_file
5036 fi
5037 fi; done
5038
5039 EOF
5040 cat >> $CONFIG_STATUS <<EOF
5041
5042
5043 EOF
5044 cat >> $CONFIG_STATUS <<\EOF
5045 if test -f .devel; then
5046 echo timestamp > stamp-h
5047 cat Makefile-devel-adds >> Makefile
5048 make depend
5049 fi
5050
5051 exit 0
5052 EOF
5053 chmod +x $CONFIG_STATUS
5054 rm -fr confdefs* $ac_clean_files
5055 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5056
5057 exit 0