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