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