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