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