]> The Tcpdump Group git mirrors - tcpdump/blob - configure
- Print the IP source and destination if the TCP header is truncated before
[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 echo $ac_n "checking for inline""... $ac_c" 1>&6
1079 echo "configure:1080: checking for inline" >&5
1080 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
1082 else
1083 ac_cv_c_inline=no
1084 for ac_kw in inline __inline__ __inline; do
1085 cat > conftest.$ac_ext <<EOF
1086 #line 1087 "configure"
1087 #include "confdefs.h"
1088
1089 int main() {
1090 } $ac_kw foo() {
1091 ; return 0; }
1092 EOF
1093 if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1094 rm -rf conftest*
1095 ac_cv_c_inline=$ac_kw; break
1096 else
1097 echo "configure: failed program was:" >&5
1098 cat conftest.$ac_ext >&5
1099 fi
1100 rm -f conftest*
1101 done
1102
1103 fi
1104
1105 echo "$ac_t""$ac_cv_c_inline" 1>&6
1106 case "$ac_cv_c_inline" in
1107 inline | yes) ;;
1108 no) cat >> confdefs.h <<\EOF
1109 #define inline
1110 EOF
1111 ;;
1112 *) cat >> confdefs.h <<EOF
1113 #define inline $ac_cv_c_inline
1114 EOF
1115 ;;
1116 esac
1117
1118
1119 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1120 echo "configure:1121: checking how to run the C preprocessor" >&5
1121 # On Suns, sometimes $CPP names a directory.
1122 if test -n "$CPP" && test -d "$CPP"; then
1123 CPP=
1124 fi
1125 if test -z "$CPP"; then
1126 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1127 echo $ac_n "(cached) $ac_c" 1>&6
1128 else
1129 # This must be in double quotes, not single quotes, because CPP may get
1130 # substituted into the Makefile and "${CC-cc}" will confuse make.
1131 CPP="${CC-cc} -E"
1132 # On the NeXT, cc -E runs the code through the compiler's parser,
1133 # not just through cpp.
1134 cat > conftest.$ac_ext <<EOF
1135 #line 1136 "configure"
1136 #include "confdefs.h"
1137 #include <assert.h>
1138 Syntax Error
1139 EOF
1140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1141 { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1143 if test -z "$ac_err"; then
1144 :
1145 else
1146 echo "$ac_err" >&5
1147 echo "configure: failed program was:" >&5
1148 cat conftest.$ac_ext >&5
1149 rm -rf conftest*
1150 CPP="${CC-cc} -E -traditional-cpp"
1151 cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1154 #include <assert.h>
1155 Syntax Error
1156 EOF
1157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1158 { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1160 if test -z "$ac_err"; then
1161 :
1162 else
1163 echo "$ac_err" >&5
1164 echo "configure: failed program was:" >&5
1165 cat conftest.$ac_ext >&5
1166 rm -rf conftest*
1167 CPP="${CC-cc} -nologo -E"
1168 cat > conftest.$ac_ext <<EOF
1169 #line 1170 "configure"
1170 #include "confdefs.h"
1171 #include <assert.h>
1172 Syntax Error
1173 EOF
1174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1175 { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1177 if test -z "$ac_err"; then
1178 :
1179 else
1180 echo "$ac_err" >&5
1181 echo "configure: failed program was:" >&5
1182 cat conftest.$ac_ext >&5
1183 rm -rf conftest*
1184 CPP=/lib/cpp
1185 fi
1186 rm -f conftest*
1187 fi
1188 rm -f conftest*
1189 fi
1190 rm -f conftest*
1191 ac_cv_prog_CPP="$CPP"
1192 fi
1193 CPP="$ac_cv_prog_CPP"
1194 else
1195 ac_cv_prog_CPP="$CPP"
1196 fi
1197 echo "$ac_t""$CPP" 1>&6
1198
1199 for ac_hdr in fcntl.h malloc.h memory.h rpc/rpcent.h
1200 do
1201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1203 echo "configure:1204: checking for $ac_hdr" >&5
1204 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1205 echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207 cat > conftest.$ac_ext <<EOF
1208 #line 1209 "configure"
1209 #include "confdefs.h"
1210 #include <$ac_hdr>
1211 EOF
1212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1213 { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1215 if test -z "$ac_err"; then
1216 rm -rf conftest*
1217 eval "ac_cv_header_$ac_safe=yes"
1218 else
1219 echo "$ac_err" >&5
1220 echo "configure: failed program was:" >&5
1221 cat conftest.$ac_ext >&5
1222 rm -rf conftest*
1223 eval "ac_cv_header_$ac_safe=no"
1224 fi
1225 rm -f conftest*
1226 fi
1227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1228 echo "$ac_t""yes" 1>&6
1229 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1230 cat >> confdefs.h <<EOF
1231 #define $ac_tr_hdr 1
1232 EOF
1233
1234 else
1235 echo "$ac_t""no" 1>&6
1236 fi
1237 done
1238
1239 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1240 echo "configure:1241: checking whether time.h and sys/time.h may both be included" >&5
1241 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1242 echo $ac_n "(cached) $ac_c" 1>&6
1243 else
1244 cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1247 #include <sys/types.h>
1248 #include <sys/time.h>
1249 #include <time.h>
1250 int main() {
1251 struct tm *tp;
1252 ; return 0; }
1253 EOF
1254 if { (eval echo configure:1255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1255 rm -rf conftest*
1256 ac_cv_header_time=yes
1257 else
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1260 rm -rf conftest*
1261 ac_cv_header_time=no
1262 fi
1263 rm -f conftest*
1264 fi
1265
1266 echo "$ac_t""$ac_cv_header_time" 1>&6
1267 if test $ac_cv_header_time = yes; then
1268 cat >> confdefs.h <<\EOF
1269 #define TIME_WITH_SYS_TIME 1
1270 EOF
1271
1272 fi
1273
1274
1275 case "$target_os" in
1276
1277 linux*)
1278 echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1279 echo "configure:1280: checking Linux kernel version" >&5
1280 if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1281 echo $ac_n "(cached) $ac_c" 1>&6
1282 else
1283 ac_cv_linux_vers=`uname -r 2>&1 | \
1284 sed -n -e '$s/.* //' -e '$s/\..*//p'`
1285 fi
1286
1287 echo "$ac_t""$ac_cv_linux_vers" 1>&6
1288 if test $ac_cv_linux_vers -lt 2 ; then
1289 { echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
1290 fi
1291 cat >> confdefs.h <<\EOF
1292 #define HAVE_NET_SLIP_H 1
1293 EOF
1294
1295 ;;
1296
1297 *)
1298 for ac_hdr in net/slip.h
1299 do
1300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1302 echo "configure:1303: checking for $ac_hdr" >&5
1303 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306 cat > conftest.$ac_ext <<EOF
1307 #line 1308 "configure"
1308 #include "confdefs.h"
1309 #include <$ac_hdr>
1310 EOF
1311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1312 { (eval echo configure:1313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1314 if test -z "$ac_err"; then
1315 rm -rf conftest*
1316 eval "ac_cv_header_$ac_safe=yes"
1317 else
1318 echo "$ac_err" >&5
1319 echo "configure: failed program was:" >&5
1320 cat conftest.$ac_ext >&5
1321 rm -rf conftest*
1322 eval "ac_cv_header_$ac_safe=no"
1323 fi
1324 rm -f conftest*
1325 fi
1326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1327 echo "$ac_t""yes" 1>&6
1328 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1329 cat >> confdefs.h <<EOF
1330 #define $ac_tr_hdr 1
1331 EOF
1332
1333 else
1334 echo "$ac_t""no" 1>&6
1335 fi
1336 done
1337
1338 ;;
1339 esac
1340
1341 CFLAGS="$CFLAGS -Dss_family=__ss_family -Dss_len=__ss_len"
1342 echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
1343 echo "configure:1344: checking whether to enable ipv6" >&5
1344 # Check whether --enable-ipv6 or --disable-ipv6 was given.
1345 if test "${enable_ipv6+set}" = set; then
1346 enableval="$enable_ipv6"
1347 case "$enableval" in
1348 yes) 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 ;;
1360 *)
1361 echo "$ac_t""no" 1>&6
1362 ipv6=no
1363 ;;
1364 esac
1365 else
1366 if test "$cross_compiling" = yes; then
1367 echo "$ac_t""no" 1>&6
1368 ipv6=no
1369
1370 else
1371 cat > conftest.$ac_ext <<EOF
1372 #line 1373 "configure"
1373 #include "confdefs.h"
1374 /* AF_INET6 avalable check */
1375 #include <sys/types.h>
1376 #include <sys/socket.h>
1377 main()
1378 {
1379 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1380 exit(1);
1381 else
1382 exit(0);
1383 }
1384
1385 EOF
1386 if { (eval echo configure:1387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1387 then
1388 echo "$ac_t""yes" 1>&6
1389 cat >> confdefs.h <<\EOF
1390 #define ENABLE_IPV6 1
1391 EOF
1392
1393 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"
1394 cat >> confdefs.h <<\EOF
1395 #define INET6 1
1396 EOF
1397
1398 ipv6=yes
1399 else
1400 echo "configure: failed program was:" >&5
1401 cat conftest.$ac_ext >&5
1402 rm -fr conftest*
1403 echo "$ac_t""no" 1>&6
1404 ipv6=no
1405 fi
1406 rm -fr conftest*
1407 fi
1408
1409 fi
1410
1411
1412 ipv6type=unknown
1413 ipv6lib=none
1414 ipv6trylibc=no
1415
1416 if test "$ipv6" = "yes"; then
1417 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
1418 echo "configure:1419: checking ipv6 stack type" >&5
1419 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
1420 case $i in
1421 inria)
1422 cat > conftest.$ac_ext <<EOF
1423 #line 1424 "configure"
1424 #include "confdefs.h"
1425 dnl
1426 #include <netinet/in.h>
1427 #ifdef IPV6_INRIA_VERSION
1428 yes
1429 #endif
1430 EOF
1431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1432 egrep "yes" >/dev/null 2>&1; then
1433 rm -rf conftest*
1434 ipv6type=$i;
1435 CFLAGS="-DINET6 $CFLAGS"
1436 fi
1437 rm -f conftest*
1438
1439 ;;
1440 kame)
1441 cat > conftest.$ac_ext <<EOF
1442 #line 1443 "configure"
1443 #include "confdefs.h"
1444 dnl
1445 #include <netinet/in.h>
1446 #ifdef __KAME__
1447 yes
1448 #endif
1449 EOF
1450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1451 egrep "yes" >/dev/null 2>&1; then
1452 rm -rf conftest*
1453 ipv6type=$i;
1454 ipv6lib=inet6;
1455 ipv6libdir=/usr/local/v6/lib;
1456 ipv6trylibc=yes;
1457 CFLAGS="-DINET6 $CFLAGS"
1458 fi
1459 rm -f conftest*
1460
1461 ;;
1462 linux-glibc)
1463 cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1466 dnl
1467 #include <features.h>
1468 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
1469 yes
1470 #endif
1471 EOF
1472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1473 egrep "yes" >/dev/null 2>&1; then
1474 rm -rf conftest*
1475 ipv6type=$i;
1476 CFLAGS="-DINET6 $CFLAGS"
1477 fi
1478 rm -f conftest*
1479
1480 ;;
1481 linux-libinet6)
1482 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
1483 ipv6type=$i
1484 ipv6lib=inet6
1485 ipv6libdir=/usr/inet6/lib
1486 ipv6trylibc=yes;
1487 CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
1488 fi
1489 ;;
1490 toshiba)
1491 cat > conftest.$ac_ext <<EOF
1492 #line 1493 "configure"
1493 #include "confdefs.h"
1494 dnl
1495 #include <sys/param.h>
1496 #ifdef _TOSHIBA_INET6
1497 yes
1498 #endif
1499 EOF
1500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1501 egrep "yes" >/dev/null 2>&1; then
1502 rm -rf conftest*
1503 ipv6type=$i;
1504 ipv6lib=inet6;
1505 ipv6libdir=/usr/local/v6/lib;
1506 CFLAGS="-DINET6 $CFLAGS"
1507 fi
1508 rm -f conftest*
1509
1510 ;;
1511 v6d)
1512 cat > conftest.$ac_ext <<EOF
1513 #line 1514 "configure"
1514 #include "confdefs.h"
1515 dnl
1516 #include </usr/local/v6/include/sys/v6config.h>
1517 #ifdef __V6D__
1518 yes
1519 #endif
1520 EOF
1521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1522 egrep "yes" >/dev/null 2>&1; then
1523 rm -rf conftest*
1524 ipv6type=$i;
1525 ipv6lib=v6;
1526 ipv6libdir=/usr/local/v6/lib;
1527 CFLAGS="-I/usr/local/v6/include $CFLAGS"
1528 fi
1529 rm -f conftest*
1530
1531 ;;
1532 zeta)
1533 cat > conftest.$ac_ext <<EOF
1534 #line 1535 "configure"
1535 #include "confdefs.h"
1536 dnl
1537 #include <sys/param.h>
1538 #ifdef _ZETA_MINAMI_INET6
1539 yes
1540 #endif
1541 EOF
1542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1543 egrep "yes" >/dev/null 2>&1; then
1544 rm -rf conftest*
1545 ipv6type=$i;
1546 ipv6lib=inet6;
1547 ipv6libdir=/usr/local/v6/lib;
1548 CFLAGS="-DINET6 $CFLAGS"
1549 fi
1550 rm -f conftest*
1551
1552 ;;
1553 esac
1554 if test "$ipv6type" != "unknown"; then
1555 break
1556 fi
1557 done
1558 echo "$ac_t""$ipv6type" 1>&6
1559 fi
1560
1561 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1562 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1563 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1564 echo "You have $ipv6lib library, using it"
1565 else
1566 if test "$ipv6trylibc" = "yes"; then
1567 echo "You do not have $ipv6lib library, using libc"
1568 else
1569 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1570 echo "You need to fetch lib$ipv6lib.a from appropriate"
1571 echo 'ipv6 kit and compile beforehand.'
1572 exit 1
1573 fi
1574 fi
1575 fi
1576
1577
1578 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
1579 echo "configure:1580: checking getaddrinfo bug" >&5
1580 if test "$cross_compiling" = yes; then
1581 echo "$ac_t""buggy" 1>&6
1582 buggygetaddrinfo=yes
1583 else
1584 cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587
1588 #include <sys/types.h>
1589 #include <netdb.h>
1590 #include <string.h>
1591 #include <sys/socket.h>
1592 #include <netinet/in.h>
1593
1594 main()
1595 {
1596 int passive, gaierr, inet4 = 0, inet6 = 0;
1597 struct addrinfo hints, *ai, *aitop;
1598 char straddr[INET6_ADDRSTRLEN], strport[16];
1599
1600 for (passive = 0; passive <= 1; passive++) {
1601 memset(&hints, 0, sizeof(hints));
1602 hints.ai_family = AF_UNSPEC;
1603 hints.ai_flags = passive ? AI_PASSIVE : 0;
1604 hints.ai_socktype = SOCK_STREAM;
1605 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
1606 (void)gai_strerror(gaierr);
1607 goto bad;
1608 }
1609 for (ai = aitop; ai; ai = ai->ai_next) {
1610 if (ai->ai_addr == NULL ||
1611 ai->ai_addrlen == 0 ||
1612 getnameinfo(ai->ai_addr, ai->ai_addrlen,
1613 straddr, sizeof(straddr), strport, sizeof(strport),
1614 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
1615 goto bad;
1616 }
1617 switch (ai->ai_family) {
1618 case AF_INET:
1619 if (strcmp(strport, "54321") != 0) {
1620 goto bad;
1621 }
1622 if (passive) {
1623 if (strcmp(straddr, "0.0.0.0") != 0) {
1624 goto bad;
1625 }
1626 } else {
1627 if (strcmp(straddr, "127.0.0.1") != 0) {
1628 goto bad;
1629 }
1630 }
1631 inet4++;
1632 break;
1633 case AF_INET6:
1634 if (strcmp(strport, "54321") != 0) {
1635 goto bad;
1636 }
1637 if (passive) {
1638 if (strcmp(straddr, "::") != 0) {
1639 goto bad;
1640 }
1641 } else {
1642 if (strcmp(straddr, "::1") != 0) {
1643 goto bad;
1644 }
1645 }
1646 inet6++;
1647 break;
1648 case AF_UNSPEC:
1649 goto bad;
1650 break;
1651 #ifdef AF_UNIX
1652 case AF_UNIX:
1653 #else
1654 #ifdef AF_LOCAL
1655 case AF_LOCAL:
1656 #endif
1657 #endif
1658 default:
1659 /* another family support? */
1660 break;
1661 }
1662 }
1663 }
1664
1665 if (inet6 != 2 || inet4 != 2)
1666 goto bad;
1667
1668 if (aitop)
1669 freeaddrinfo(aitop);
1670 exit(0);
1671
1672 bad:
1673 if (aitop)
1674 freeaddrinfo(aitop);
1675 exit(1);
1676 }
1677
1678 EOF
1679 if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1680 then
1681 echo "$ac_t""good" 1>&6
1682 buggygetaddrinfo=no
1683 else
1684 echo "configure: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 rm -fr conftest*
1687 echo "$ac_t""buggy" 1>&6
1688 buggygetaddrinfo=yes
1689 fi
1690 rm -fr conftest*
1691 fi
1692
1693
1694 if test "$buggygetaddrinfo" = "yes"; then
1695 if test "$ipv6" = "yes" -a "$ipv6type" != "linux"; then
1696 echo 'Fatal: You must get working getaddrinfo() function.'
1697 echo ' or you can specify "--disable-ipv6"'.
1698 exit 1
1699 elif test "$ipv6type" = "linux"; then
1700 echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
1701 echo ' Better upgreade your system library to newest version'
1702 echo ' of GNU C library (aka glibc).'
1703 fi
1704 fi
1705 for ac_func in getaddrinfo getnameinfo inet_ntop inet_pton inet_aton
1706 do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_func" >&5
1709 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 cat > conftest.$ac_ext <<EOF
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715 /* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717 #include <assert.h>
1718 /* Override any gcc2 internal prototype to avoid an error. */
1719 /* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721 char $ac_func();
1722
1723 int main() {
1724
1725 /* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729 choke me
1730 #else
1731 $ac_func();
1732 #endif
1733
1734 ; return 0; }
1735 EOF
1736 if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739 else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744 fi
1745 rm -f conftest*
1746 fi
1747
1748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1751 cat >> confdefs.h <<EOF
1752 #define $ac_tr_func 1
1753 EOF
1754
1755 else
1756 echo "$ac_t""no" 1>&6
1757 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
1758 fi
1759 done
1760
1761
1762
1763
1764 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
1765 echo "configure:1766: checking if sockaddr struct has sa_len member" >&5
1766 if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+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 <sys/types.h>
1774 # include <sys/socket.h>
1775 int main() {
1776 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
1777 ; return 0; }
1778 EOF
1779 if { (eval echo configure:1780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1780 rm -rf conftest*
1781 ac_cv_sockaddr_has_sa_len=yes
1782 else
1783 echo "configure: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1785 rm -rf conftest*
1786 ac_cv_sockaddr_has_sa_len=no
1787 fi
1788 rm -f conftest*
1789 fi
1790
1791 echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
1792 if test $ac_cv_sockaddr_has_sa_len = yes ; then
1793 cat >> confdefs.h <<\EOF
1794 #define HAVE_SOCKADDR_SA_LEN 1
1795 EOF
1796
1797 fi
1798
1799 if test "$ac_cv_sockaddr_has_sa_len" = no; then
1800 missing_includes=yes
1801 fi
1802
1803
1804 echo $ac_n "checking for __P""... $ac_c" 1>&6
1805 echo "configure:1806: checking for __P" >&5
1806 if eval "test \"`echo '$''{'ac_cv_portable_proto'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1808 else
1809 cat > conftest.$ac_ext <<EOF
1810 #line 1811 "configure"
1811 #include "confdefs.h"
1812
1813 # include <unistd.h>
1814 int main() {
1815 int f __P(())
1816 ; return 0; }
1817 EOF
1818 if { (eval echo configure:1819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1819 rm -rf conftest*
1820 ac_cv_portable_proto=yes
1821 else
1822 echo "configure: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1824 rm -rf conftest*
1825 ac_cv_portable_proto=no
1826 fi
1827 rm -f conftest*
1828 fi
1829
1830 echo "$ac_t""$ac_cv_portable_proto" 1>&6
1831 if test $ac_cv_portable_proto = yes; then
1832 cat >> confdefs.h <<\EOF
1833 #define HAVE_PORTABLE_PROTOTYPE 1
1834 EOF
1835
1836 fi
1837
1838 if test "$ac_cv_portable_proto" = no; then
1839 missing_includes=yes
1840 fi
1841
1842 echo $ac_n "checking size of char""... $ac_c" 1>&6
1843 echo "configure:1844: checking size of char" >&5
1844 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847 if test "$cross_compiling" = yes; then
1848 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1849 else
1850 cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853 #include <stdio.h>
1854 main()
1855 {
1856 FILE *f=fopen("conftestval", "w");
1857 if (!f) exit(1);
1858 fprintf(f, "%d\n", sizeof(char));
1859 exit(0);
1860 }
1861 EOF
1862 if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1863 then
1864 ac_cv_sizeof_char=`cat conftestval`
1865 else
1866 echo "configure: failed program was:" >&5
1867 cat conftest.$ac_ext >&5
1868 rm -fr conftest*
1869 ac_cv_sizeof_char=0
1870 fi
1871 rm -fr conftest*
1872 fi
1873
1874 fi
1875 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
1876 cat >> confdefs.h <<EOF
1877 #define SIZEOF_CHAR $ac_cv_sizeof_char
1878 EOF
1879
1880
1881 echo $ac_n "checking size of short""... $ac_c" 1>&6
1882 echo "configure:1883: checking size of short" >&5
1883 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1884 echo $ac_n "(cached) $ac_c" 1>&6
1885 else
1886 if test "$cross_compiling" = yes; then
1887 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1888 else
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892 #include <stdio.h>
1893 main()
1894 {
1895 FILE *f=fopen("conftestval", "w");
1896 if (!f) exit(1);
1897 fprintf(f, "%d\n", sizeof(short));
1898 exit(0);
1899 }
1900 EOF
1901 if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1902 then
1903 ac_cv_sizeof_short=`cat conftestval`
1904 else
1905 echo "configure: failed program was:" >&5
1906 cat conftest.$ac_ext >&5
1907 rm -fr conftest*
1908 ac_cv_sizeof_short=0
1909 fi
1910 rm -fr conftest*
1911 fi
1912
1913 fi
1914 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1915 cat >> confdefs.h <<EOF
1916 #define SIZEOF_SHORT $ac_cv_sizeof_short
1917 EOF
1918
1919
1920 echo $ac_n "checking size of int""... $ac_c" 1>&6
1921 echo "configure:1922: checking size of int" >&5
1922 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1923 echo $ac_n "(cached) $ac_c" 1>&6
1924 else
1925 if test "$cross_compiling" = yes; then
1926 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1927 else
1928 cat > conftest.$ac_ext <<EOF
1929 #line 1930 "configure"
1930 #include "confdefs.h"
1931 #include <stdio.h>
1932 main()
1933 {
1934 FILE *f=fopen("conftestval", "w");
1935 if (!f) exit(1);
1936 fprintf(f, "%d\n", sizeof(int));
1937 exit(0);
1938 }
1939 EOF
1940 if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1941 then
1942 ac_cv_sizeof_int=`cat conftestval`
1943 else
1944 echo "configure: failed program was:" >&5
1945 cat conftest.$ac_ext >&5
1946 rm -fr conftest*
1947 ac_cv_sizeof_int=0
1948 fi
1949 rm -fr conftest*
1950 fi
1951
1952 fi
1953 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1954 cat >> confdefs.h <<EOF
1955 #define SIZEOF_INT $ac_cv_sizeof_int
1956 EOF
1957
1958
1959 echo $ac_n "checking size of long""... $ac_c" 1>&6
1960 echo "configure:1961: checking size of long" >&5
1961 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964 if test "$cross_compiling" = yes; then
1965 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1966 else
1967 cat > conftest.$ac_ext <<EOF
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970 #include <stdio.h>
1971 main()
1972 {
1973 FILE *f=fopen("conftestval", "w");
1974 if (!f) exit(1);
1975 fprintf(f, "%d\n", sizeof(long));
1976 exit(0);
1977 }
1978 EOF
1979 if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1980 then
1981 ac_cv_sizeof_long=`cat conftestval`
1982 else
1983 echo "configure: failed program was:" >&5
1984 cat conftest.$ac_ext >&5
1985 rm -fr conftest*
1986 ac_cv_sizeof_long=0
1987 fi
1988 rm -fr conftest*
1989 fi
1990
1991 fi
1992 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1993 cat >> confdefs.h <<EOF
1994 #define SIZEOF_LONG $ac_cv_sizeof_long
1995 EOF
1996
1997
1998
1999
2000
2001 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
2002 echo "configure:2003: checking for addrinfo" >&5
2003 if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
2004 echo $ac_n "(cached) $ac_c" 1>&6
2005 else
2006 cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009
2010 # include <netdb.h>
2011 int main() {
2012 struct addrinfo a
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_addrinfo=yes
2018 else
2019 echo "configure: failed program was:" >&5
2020 cat conftest.$ac_ext >&5
2021 rm -rf conftest*
2022 ac_cv_addrinfo=no
2023 fi
2024 rm -f conftest*
2025 fi
2026
2027 echo "$ac_t""$ac_cv_addrinfo" 1>&6
2028 if test $ac_cv_addrinfo = yes; then
2029 cat >> confdefs.h <<\EOF
2030 #define HAVE_ADDRINFO 1
2031 EOF
2032
2033 fi
2034
2035 if test "$ac_cv_addrinfo" = no; then
2036 missing_includes=yes
2037 fi
2038
2039
2040 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
2041 echo "configure:2042: checking for sockaddr_storage" >&5
2042 if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
2043 echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048
2049 # include <sys/types.h>
2050 # include <sys/socket.h>
2051 int main() {
2052 struct sockaddr_storage s
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_sa_storage=yes
2058 else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 ac_cv_sa_storage=no
2063 fi
2064 rm -f conftest*
2065 fi
2066
2067 echo "$ac_t""$ac_cv_sa_storage" 1>&6
2068 if test $ac_cv_sa_storage = yes; then
2069 cat >> confdefs.h <<\EOF
2070 #define HAVE_SOCKADDR_STORAGE 1
2071 EOF
2072
2073 fi
2074
2075 if test "$ac_cv_sa_storage" = no; then
2076 missing_includes=yes
2077 fi
2078
2079
2080 ac_cv_addrsz=yes
2081 echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
2082 echo "configure:2083: checking for INADDRSZ" >&5
2083 if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
2084 echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086 cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089
2090 # include <arpa/nameser.h>
2091 int main() {
2092 int a = INADDRSZ
2093 ; return 0; }
2094 EOF
2095 if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2096 rm -rf conftest*
2097 ac_cv_inaddrsz=yes
2098 else
2099 echo "configure: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 rm -rf conftest*
2102 ac_cv_inaddrsz=no
2103 fi
2104 rm -f conftest*
2105 fi
2106
2107 echo "$ac_t""$ac_cv_inaddrsz" 1>&6
2108 if test $ac_cv_inaddrsz = yes; then
2109 cat >> confdefs.h <<\EOF
2110 #define HAVE_INADDRSZ 1
2111 EOF
2112
2113 else
2114 ac_cv_addrsz=no
2115 fi
2116 echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
2117 echo "configure:2118: checking for IN6ADDRSZ" >&5
2118 if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
2119 echo $ac_n "(cached) $ac_c" 1>&6
2120 else
2121 cat > conftest.$ac_ext <<EOF
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124
2125 # include <arpa/nameser.h>
2126 int main() {
2127 int a = IN6ADDRSZ
2128 ; return 0; }
2129 EOF
2130 if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2131 rm -rf conftest*
2132 ac_cv_in6addrsz=yes
2133 else
2134 echo "configure: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2136 rm -rf conftest*
2137 ac_cv_in6addrsz=no
2138 fi
2139 rm -f conftest*
2140 fi
2141
2142 echo "$ac_t""$ac_cv_in6addrsz" 1>&6
2143 if test $ac_cv_in6addrsz = yes; then
2144 cat >> confdefs.h <<\EOF
2145 #define HAVE_IN6ADDRSZ 1
2146 EOF
2147
2148 else
2149 ac_cv_addrsz=no
2150 fi
2151
2152 if test "$ac_cv_addrsz" = no; then
2153 missing_includes=yes
2154 fi
2155
2156
2157 echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
2158 echo "configure:2159: checking for RES_USE_INET6" >&5
2159 if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
2160 echo $ac_n "(cached) $ac_c" 1>&6
2161 else
2162 cat > conftest.$ac_ext <<EOF
2163 #line 2164 "configure"
2164 #include "confdefs.h"
2165
2166 # include <sys/types.h>
2167 # include <netinet/in.h>
2168 # include <resolv.h>
2169 int main() {
2170 int a = RES_USE_INET6
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_res_inet6=yes
2176 else
2177 echo "configure: failed program was:" >&5
2178 cat conftest.$ac_ext >&5
2179 rm -rf conftest*
2180 ac_cv_res_inet6=no
2181 fi
2182 rm -f conftest*
2183 fi
2184
2185 echo "$ac_t""$ac_cv_res_inet6" 1>&6
2186 if test $ac_cv_res_inet6 = yes; then
2187 cat >> confdefs.h <<\EOF
2188 #define HAVE_RES_USE_INET6 1
2189 EOF
2190
2191 fi
2192
2193 if test "$ac_cv_res_inet6" = no; then
2194 missing_includes=yes
2195 fi
2196
2197
2198 echo $ac_n "checking for AAAA""... $ac_c" 1>&6
2199 echo "configure:2200: checking for AAAA" >&5
2200 if eval "test \"`echo '$''{'ac_cv_aaaa'+set}'`\" = set"; then
2201 echo $ac_n "(cached) $ac_c" 1>&6
2202 else
2203 cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206
2207 # include <sys/types.h>
2208 # include <arpa/nameser.h>
2209 int main() {
2210 int a = T_AAAA
2211 ; return 0; }
2212 EOF
2213 if { (eval echo configure:2214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2214 rm -rf conftest*
2215 ac_cv_aaaa=yes
2216 else
2217 echo "configure: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
2219 rm -rf conftest*
2220 ac_cv_aaaa=no
2221 fi
2222 rm -f conftest*
2223 fi
2224
2225 echo "$ac_t""$ac_cv_aaaa" 1>&6
2226 if test $ac_cv_aaaa = yes; then
2227 cat >> confdefs.h <<\EOF
2228 #define HAVE_AAAA 1
2229 EOF
2230
2231 fi
2232
2233 if test "$ac_cv_aaaa" = no; then
2234 cat >> confdefs.h <<\EOF
2235 #define T_AAAA 28
2236 EOF
2237
2238 fi
2239
2240
2241 echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
2242 echo "configure:2243: checking for res_state_ext" >&5
2243 if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245 else
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249
2250 # include <sys/types.h>
2251 # include <netinet/in.h>
2252 # include <netinet6/in6.h>
2253 # include <resolv.h>
2254 int main() {
2255 struct __res_state_ext e
2256 ; return 0; }
2257 EOF
2258 if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2259 rm -rf conftest*
2260 ac_cv_res_state_ext=yes
2261 else
2262 echo "configure: failed program was:" >&5
2263 cat conftest.$ac_ext >&5
2264 rm -rf conftest*
2265 ac_cv_res_state_ext=no
2266 fi
2267 rm -f conftest*
2268 fi
2269
2270 echo "$ac_t""$ac_cv_res_state_ext" 1>&6
2271 if test $ac_cv_res_state_ext = yes; then
2272 cat >> confdefs.h <<\EOF
2273 #define HAVE_RES_STATE_EXT 1
2274 EOF
2275
2276 fi
2277
2278 if test "$ac_cv_res_state_ext" = no; then
2279 missing_includes=yes
2280 fi
2281
2282
2283 echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
2284 echo "configure:2285: checking for nsort in res_state" >&5
2285 if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287 else
2288 cat > conftest.$ac_ext <<EOF
2289 #line 2290 "configure"
2290 #include "confdefs.h"
2291
2292 # include <sys/types.h>
2293 # include <netinet/in.h>
2294 # include <netinet6/in6.h>
2295 # include <resolv.h>
2296 int main() {
2297 struct __res_state e; e.nsort = 0
2298 ; return 0; }
2299 EOF
2300 if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2301 rm -rf conftest*
2302 ac_cv_res_state=yes
2303 else
2304 echo "configure: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
2306 rm -rf conftest*
2307 ac_cv_res_state=no
2308 fi
2309 rm -f conftest*
2310 fi
2311
2312 echo "$ac_t""$ac_cv_res_state" 1>&6
2313 if test $ac_cv_res_state = yes; then
2314 cat >> confdefs.h <<\EOF
2315 #define HAVE_NEW_RES_STATE 1
2316 EOF
2317
2318 fi
2319
2320
2321 if test "$missing_includes" = "yes"; then
2322 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
2323 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
2324 fi
2325
2326
2327 for ac_func in vfprintf strcasecmp
2328 do
2329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2330 echo "configure:2331: checking for $ac_func" >&5
2331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333 else
2334 cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 /* System header to define __stub macros and hopefully few prototypes,
2338 which can conflict with char $ac_func(); below. */
2339 #include <assert.h>
2340 /* Override any gcc2 internal prototype to avoid an error. */
2341 /* We use char because int might match the return type of a gcc2
2342 builtin and then its argument prototype would still apply. */
2343 char $ac_func();
2344
2345 int main() {
2346
2347 /* The GNU C library defines this for functions which it implements
2348 to always fail with ENOSYS. Some functions are actually named
2349 something starting with __ and the normal name is an alias. */
2350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2351 choke me
2352 #else
2353 $ac_func();
2354 #endif
2355
2356 ; return 0; }
2357 EOF
2358 if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2359 rm -rf conftest*
2360 eval "ac_cv_func_$ac_func=yes"
2361 else
2362 echo "configure: failed program was:" >&5
2363 cat conftest.$ac_ext >&5
2364 rm -rf conftest*
2365 eval "ac_cv_func_$ac_func=no"
2366 fi
2367 rm -f conftest*
2368 fi
2369
2370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2371 echo "$ac_t""yes" 1>&6
2372 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2373 cat >> confdefs.h <<EOF
2374 #define $ac_tr_func 1
2375 EOF
2376
2377 else
2378 echo "$ac_t""no" 1>&6
2379 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2380 fi
2381 done
2382
2383
2384 for ac_func in ether_ntohost setlinebuf gethostbyname2
2385 do
2386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2387 echo "configure:2388: checking for $ac_func" >&5
2388 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2389 echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391 cat > conftest.$ac_ext <<EOF
2392 #line 2393 "configure"
2393 #include "confdefs.h"
2394 /* System header to define __stub macros and hopefully few prototypes,
2395 which can conflict with char $ac_func(); below. */
2396 #include <assert.h>
2397 /* Override any gcc2 internal prototype to avoid an error. */
2398 /* We use char because int might match the return type of a gcc2
2399 builtin and then its argument prototype would still apply. */
2400 char $ac_func();
2401
2402 int main() {
2403
2404 /* The GNU C library defines this for functions which it implements
2405 to always fail with ENOSYS. Some functions are actually named
2406 something starting with __ and the normal name is an alias. */
2407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2408 choke me
2409 #else
2410 $ac_func();
2411 #endif
2412
2413 ; return 0; }
2414 EOF
2415 if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2416 rm -rf conftest*
2417 eval "ac_cv_func_$ac_func=yes"
2418 else
2419 echo "configure: failed program was:" >&5
2420 cat conftest.$ac_ext >&5
2421 rm -rf conftest*
2422 eval "ac_cv_func_$ac_func=no"
2423 fi
2424 rm -f conftest*
2425 fi
2426
2427 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2428 echo "$ac_t""yes" 1>&6
2429 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2430 cat >> confdefs.h <<EOF
2431 #define $ac_tr_func 1
2432 EOF
2433
2434 else
2435 echo "$ac_t""no" 1>&6
2436 fi
2437 done
2438
2439
2440 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2441 echo "configure:2442: checking whether byte ordering is bigendian" >&5
2442 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2443 echo $ac_n "(cached) $ac_c" 1>&6
2444 else
2445 ac_cv_c_bigendian=unknown
2446 # See if sys/param.h defines the BYTE_ORDER macro.
2447 cat > conftest.$ac_ext <<EOF
2448 #line 2449 "configure"
2449 #include "confdefs.h"
2450 #include <sys/types.h>
2451 #include <sys/param.h>
2452 int main() {
2453
2454 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2455 bogus endian macros
2456 #endif
2457 ; return 0; }
2458 EOF
2459 if { (eval echo configure:2460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2460 rm -rf conftest*
2461 # It does; now see whether it defined to BIG_ENDIAN or not.
2462 cat > conftest.$ac_ext <<EOF
2463 #line 2464 "configure"
2464 #include "confdefs.h"
2465 #include <sys/types.h>
2466 #include <sys/param.h>
2467 int main() {
2468
2469 #if BYTE_ORDER != BIG_ENDIAN
2470 not big endian
2471 #endif
2472 ; return 0; }
2473 EOF
2474 if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2475 rm -rf conftest*
2476 ac_cv_c_bigendian=yes
2477 else
2478 echo "configure: failed program was:" >&5
2479 cat conftest.$ac_ext >&5
2480 rm -rf conftest*
2481 ac_cv_c_bigendian=no
2482 fi
2483 rm -f conftest*
2484 else
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 fi
2488 rm -f conftest*
2489 if test $ac_cv_c_bigendian = unknown; then
2490 if test "$cross_compiling" = yes; then
2491 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2492 else
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2495 "configure"
2495 #include "confdefs.h"
2496 main () {
2497 /* Are we little or big endian? From Harbison&Steele. */
2498 union
2499 {
2500 long l;
2501 char c[sizeof (long)];
2502 } u;
2503 u.l = 1;
2504 exit (u.c[sizeof (long) - 1] == 1);
2505 }
2506 EOF
2507 if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2508 then
2509 ac_cv_c_bigendian=no
2510 else
2511 echo "configure: failed program was:" >&5
2512 cat conftest.$ac_ext >&5
2513 rm -fr conftest*
2514 ac_cv_c_bigendian=yes
2515 fi
2516 rm -fr conftest*
2517 fi
2518
2519 fi
2520 fi
2521
2522 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2523 if test $ac_cv_c_bigendian = yes; then
2524 cat >> confdefs.h <<\EOF
2525 #define WORDS_BIGENDIAN 1
2526 EOF
2527
2528 fi
2529
2530
2531 echo $ac_n "checking for main in -ldnet""... $ac_c" 1>&6
2532 echo "configure:2533: checking for main in -ldnet" >&5
2533 ac_lib_var=`echo dnet'_'main | sed 'y%./+-%__p_%'`
2534 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537 ac_save_LIBS="$LIBS"
2538 LIBS="-ldnet $LIBS"
2539 cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542
2543 int main() {
2544 main()
2545 ; return 0; }
2546 EOF
2547 if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2548 rm -rf conftest*
2549 eval "ac_cv_lib_$ac_lib_var=yes"
2550 else
2551 echo "configure: failed program was:" >&5
2552 cat conftest.$ac_ext >&5
2553 rm -rf conftest*
2554 eval "ac_cv_lib_$ac_lib_var=no"
2555 fi
2556 rm -f conftest*
2557 LIBS="$ac_save_LIBS"
2558
2559 fi
2560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2561 echo "$ac_t""yes" 1>&6
2562 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2563 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2564 cat >> confdefs.h <<EOF
2565 #define $ac_tr_lib 1
2566 EOF
2567
2568 LIBS="-ldnet $LIBS"
2569
2570 else
2571 echo "$ac_t""no" 1>&6
2572 fi
2573
2574 echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
2575 echo "configure:2576: checking for main in -lrpc" >&5
2576 ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
2577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580 ac_save_LIBS="$LIBS"
2581 LIBS="-lrpc $LIBS"
2582 cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2585
2586 int main() {
2587 main()
2588 ; return 0; }
2589 EOF
2590 if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2591 rm -rf conftest*
2592 eval "ac_cv_lib_$ac_lib_var=yes"
2593 else
2594 echo "configure: failed program was:" >&5
2595 cat conftest.$ac_ext >&5
2596 rm -rf conftest*
2597 eval "ac_cv_lib_$ac_lib_var=no"
2598 fi
2599 rm -f conftest*
2600 LIBS="$ac_save_LIBS"
2601
2602 fi
2603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2604 echo "$ac_t""yes" 1>&6
2605 ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2606 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2607 cat >> confdefs.h <<EOF
2608 #define $ac_tr_lib 1
2609 EOF
2610
2611 LIBS="-lrpc $LIBS"
2612
2613 else
2614 echo "$ac_t""no" 1>&6
2615 fi
2616
2617 echo $ac_n "checking for uncompress in -lz""... $ac_c" 1>&6
2618 echo "configure:2619: checking for uncompress in -lz" >&5
2619 ac_lib_var=`echo z'_'uncompress | sed 'y%./+-%__p_%'`
2620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2621 echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623 ac_save_LIBS="$LIBS"
2624 LIBS="-lz $LIBS"
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628 /* Override any gcc2 internal prototype to avoid an error. */
2629 /* We use char because int might match the return type of a gcc2
2630 builtin and then its argument prototype would still apply. */
2631 char uncompress();
2632
2633 int main() {
2634 uncompress()
2635 ; return 0; }
2636 EOF
2637 if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2638 rm -rf conftest*
2639 eval "ac_cv_lib_$ac_lib_var=yes"
2640 else
2641 echo "configure: failed program was:" >&5
2642 cat conftest.$ac_ext >&5
2643 rm -rf conftest*
2644 eval "ac_cv_lib_$ac_lib_var=no"
2645 fi
2646 rm -f conftest*
2647 LIBS="$ac_save_LIBS"
2648
2649 fi
2650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2651 echo "$ac_t""yes" 1>&6
2652 ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2653 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2654 cat >> confdefs.h <<EOF
2655 #define $ac_tr_lib 1
2656 EOF
2657
2658 LIBS="-lz $LIBS"
2659
2660 else
2661 echo "$ac_t""no" 1>&6
2662 fi
2663
2664 for ac_hdr in zlib.h netinet6/ipcomp.h
2665 do
2666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2668 echo "configure:2669: checking for $ac_hdr" >&5
2669 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2670 echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672 cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 #include <$ac_hdr>
2676 EOF
2677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2678 { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2680 if test -z "$ac_err"; then
2681 rm -rf conftest*
2682 eval "ac_cv_header_$ac_safe=yes"
2683 else
2684 echo "$ac_err" >&5
2685 echo "configure: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
2687 rm -rf conftest*
2688 eval "ac_cv_header_$ac_safe=no"
2689 fi
2690 rm -f conftest*
2691 fi
2692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2693 echo "$ac_t""yes" 1>&6
2694 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2695 cat >> confdefs.h <<EOF
2696 #define $ac_tr_hdr 1
2697 EOF
2698
2699 else
2700 echo "$ac_t""no" 1>&6
2701 fi
2702 done
2703
2704
2705
2706 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2707 echo "configure:2708: checking return type of signal handlers" >&5
2708 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2709 echo $ac_n "(cached) $ac_c" 1>&6
2710 else
2711 cat > conftest.$ac_ext <<EOF
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714 #include <sys/types.h>
2715 #include <signal.h>
2716 #ifdef signal
2717 #undef signal
2718 #endif
2719 #ifdef __cplusplus
2720 extern "C" void (*signal (int, void (*)(int)))(int);
2721 #else
2722 void (*signal ()) ();
2723 #endif
2724
2725 int main() {
2726 int i;
2727 ; return 0; }
2728 EOF
2729 if { (eval echo configure:2730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2730 rm -rf conftest*
2731 ac_cv_type_signal=void
2732 else
2733 echo "configure: failed program was:" >&5
2734 cat conftest.$ac_ext >&5
2735 rm -rf conftest*
2736 ac_cv_type_signal=int
2737 fi
2738 rm -f conftest*
2739 fi
2740
2741 echo "$ac_t""$ac_cv_type_signal" 1>&6
2742 cat >> confdefs.h <<EOF
2743 #define RETSIGTYPE $ac_cv_type_signal
2744 EOF
2745
2746
2747 if test "$ac_cv_type_signal" = void ; then
2748 cat >> confdefs.h <<\EOF
2749 #define RETSIGVAL
2750 EOF
2751
2752 else
2753 cat >> confdefs.h <<\EOF
2754 #define RETSIGVAL (0)
2755 EOF
2756
2757 fi
2758 case "$target_os" in
2759
2760 irix*)
2761 cat >> confdefs.h <<\EOF
2762 #define _BSD_SIGNALS 1
2763 EOF
2764
2765 ;;
2766
2767 *)
2768 for ac_func in sigset
2769 do
2770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2771 echo "configure:2772: checking for $ac_func" >&5
2772 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2773 echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775 cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778 /* System header to define __stub macros and hopefully few prototypes,
2779 which can conflict with char $ac_func(); below. */
2780 #include <assert.h>
2781 /* Override any gcc2 internal prototype to avoid an error. */
2782 /* We use char because int might match the return type of a gcc2
2783 builtin and then its argument prototype would still apply. */
2784 char $ac_func();
2785
2786 int main() {
2787
2788 /* The GNU C library defines this for functions which it implements
2789 to always fail with ENOSYS. Some functions are actually named
2790 something starting with __ and the normal name is an alias. */
2791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2792 choke me
2793 #else
2794 $ac_func();
2795 #endif
2796
2797 ; return 0; }
2798 EOF
2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2800 rm -rf conftest*
2801 eval "ac_cv_func_$ac_func=yes"
2802 else
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2805 rm -rf conftest*
2806 eval "ac_cv_func_$ac_func=no"
2807 fi
2808 rm -f conftest*
2809 fi
2810
2811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2812 echo "$ac_t""yes" 1>&6
2813 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2814 cat >> confdefs.h <<EOF
2815 #define $ac_tr_func 1
2816 EOF
2817
2818 else
2819 echo "$ac_t""no" 1>&6
2820 fi
2821 done
2822
2823 if test $ac_cv_func_sigset = no ; then
2824 for ac_func in sigaction
2825 do
2826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2827 echo "configure:2828: checking for $ac_func" >&5
2828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2829 echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831 cat > conftest.$ac_ext <<EOF
2832 #line 2833 "configure"
2833 #include "confdefs.h"
2834 /* System header to define __stub macros and hopefully few prototypes,
2835 which can conflict with char $ac_func(); below. */
2836 #include <assert.h>
2837 /* Override any gcc2 internal prototype to avoid an error. */
2838 /* We use char because int might match the return type of a gcc2
2839 builtin and then its argument prototype would still apply. */
2840 char $ac_func();
2841
2842 int main() {
2843
2844 /* The GNU C library defines this for functions which it implements
2845 to always fail with ENOSYS. Some functions are actually named
2846 something starting with __ and the normal name is an alias. */
2847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2848 choke me
2849 #else
2850 $ac_func();
2851 #endif
2852
2853 ; return 0; }
2854 EOF
2855 if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2856 rm -rf conftest*
2857 eval "ac_cv_func_$ac_func=yes"
2858 else
2859 echo "configure: failed program was:" >&5
2860 cat conftest.$ac_ext >&5
2861 rm -rf conftest*
2862 eval "ac_cv_func_$ac_func=no"
2863 fi
2864 rm -f conftest*
2865 fi
2866
2867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2868 echo "$ac_t""yes" 1>&6
2869 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2870 cat >> confdefs.h <<EOF
2871 #define $ac_tr_func 1
2872 EOF
2873
2874 else
2875 echo "$ac_t""no" 1>&6
2876 fi
2877 done
2878
2879 fi
2880 ;;
2881 esac
2882
2883
2884 # Most operating systems have gethostbyname() in the default searched
2885 # libraries (i.e. libc):
2886 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2887 echo "configure:2888: checking for gethostbyname" >&5
2888 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2889 echo $ac_n "(cached) $ac_c" 1>&6
2890 else
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2893 "configure"
2893 #include "confdefs.h"
2894 /* System header to define __stub macros and hopefully few prototypes,
2895 which can conflict with char gethostbyname(); below. */
2896 #include <assert.h>
2897 /* Override any gcc2 internal prototype to avoid an error. */
2898 /* We use char because int might match the return type of a gcc2
2899 builtin and then its argument prototype would still apply. */
2900 char gethostbyname();
2901
2902 int main() {
2903
2904 /* The GNU C library defines this for functions which it implements
2905 to always fail with ENOSYS. Some functions are actually named
2906 something starting with __ and the normal name is an alias. */
2907 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2908 choke me
2909 #else
2910 gethostbyname();
2911 #endif
2912
2913 ; return 0; }
2914 EOF
2915 if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2916 rm -rf conftest*
2917 eval "ac_cv_func_gethostbyname=yes"
2918 else
2919 echo "configure: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 rm -rf conftest*
2922 eval "ac_cv_func_gethostbyname=no"
2923 fi
2924 rm -f conftest*
2925 fi
2926
2927 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2928 echo "$ac_t""yes" 1>&6
2929 :
2930 else
2931 echo "$ac_t""no" 1>&6
2932 # Some OSes (eg. Solaris) place it in libnsl:
2933 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2934 echo "configure:2935: checking for gethostbyname in -lnsl" >&5
2935 ac_lib_var=`echo nsl'_'gethostbyname'_' | sed 'y%./+- %__p__%'`
2936 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
2937 echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939 ac_save_LIBS="$LIBS"
2940 LIBS="-lnsl $LIBS"
2941 cat > conftest.$ac_ext <<EOF
2942 #line 2943 "configure"
2943 #include "confdefs.h"
2944 /* Override any gcc2 internal prototype to avoid an error. */
2945 /* We use char because int might match the return type of a gcc2
2946 builtin and then its argument prototype would still apply. */
2947 char gethostbyname();
2948
2949 int main() {
2950 gethostbyname()
2951 ; return 0; }
2952 EOF
2953 if { (eval echo configure:2954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2954 rm -rf conftest*
2955 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
2956 else
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 rm -rf conftest*
2960 eval "ac_cv_lbl_lib_$ac_lib_var=no"
2961 fi
2962 rm -f conftest*
2963 LIBS="$ac_save_LIBS"
2964
2965 fi
2966 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
2967 echo "$ac_t""yes" 1>&6
2968 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
2969 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2970 cat >> confdefs.h <<EOF
2971 #define $ac_tr_lib 1
2972 EOF
2973
2974 LIBS="-lnsl $LIBS"
2975
2976 else
2977 echo "$ac_t""no" 1>&6
2978 # Some strange OSes (SINIX) have it in libsocket:
2979 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
2980 echo "configure:2981: checking for gethostbyname in -lsocket" >&5
2981 ac_lib_var=`echo socket'_'gethostbyname'_' | sed 'y%./+- %__p__%'`
2982 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
2983 echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985 ac_save_LIBS="$LIBS"
2986 LIBS="-lsocket $LIBS"
2987 cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 /* Override any gcc2 internal prototype to avoid an error. */
2991 /* We use char because int might match the return type of a gcc2
2992 builtin and then its argument prototype would still apply. */
2993 char gethostbyname();
2994
2995 int main() {
2996 gethostbyname()
2997 ; return 0; }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3000 rm -rf conftest*
3001 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3002 else
3003 echo "configure: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 rm -rf conftest*
3006 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3007 fi
3008 rm -f conftest*
3009 LIBS="$ac_save_LIBS"
3010
3011 fi
3012 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3013 echo "$ac_t""yes" 1>&6
3014 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3015 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3016 cat >> confdefs.h <<EOF
3017 #define $ac_tr_lib 1
3018 EOF
3019
3020 LIBS="-lsocket $LIBS"
3021
3022 else
3023 echo "$ac_t""no" 1>&6
3024 # Unfortunately libsocket sometimes depends on libnsl.
3025 # AC_CHECK_LIB's API is essentially broken so the
3026 # following ugliness is necessary:
3027 echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
3028 echo "configure:3029: checking for gethostbyname in -lsocket" >&5
3029 ac_lib_var=`echo socket'_'gethostbyname'_'-lnsl | sed 'y%./+- %__p__%'`
3030 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
3031 echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033 ac_save_LIBS="$LIBS"
3034 LIBS="-lsocket -lnsl $LIBS"
3035 cat > conftest.$ac_ext <<EOF
3036 #line 3037 "configure"
3037 #include "confdefs.h"
3038 /* Override any gcc2 internal prototype to avoid an error. */
3039 /* We use char because int might match the return type of a gcc2
3040 builtin and then its argument prototype would still apply. */
3041 char gethostbyname();
3042
3043 int main() {
3044 gethostbyname()
3045 ; return 0; }
3046 EOF
3047 if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3048 rm -rf conftest*
3049 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3050 else
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3053 rm -rf conftest*
3054 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3055 fi
3056 rm -f conftest*
3057 LIBS="$ac_save_LIBS"
3058
3059 fi
3060 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3061 echo "$ac_t""yes" 1>&6
3062 LIBS="-lsocket -lnsl $LIBS"
3063 else
3064 echo "$ac_t""no" 1>&6
3065 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
3066 echo "configure:3067: checking for gethostbyname in -lresolv" >&5
3067 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
3068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3069 echo $ac_n "(cached) $ac_c" 1>&6
3070 else
3071 ac_save_LIBS="$LIBS"
3072 LIBS="-lresolv $LIBS"
3073 cat > conftest.$ac_ext <<EOF
3074 #line 3075 "configure"
3075 #include "confdefs.h"
3076 /* Override any gcc2 internal prototype to avoid an error. */
3077 /* We use char because int might match the return type of a gcc2
3078 builtin and then its argument prototype would still apply. */
3079 char gethostbyname();
3080
3081 int main() {
3082 gethostbyname()
3083 ; return 0; }
3084 EOF
3085 if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3086 rm -rf conftest*
3087 eval "ac_cv_lib_$ac_lib_var=yes"
3088 else
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091 rm -rf conftest*
3092 eval "ac_cv_lib_$ac_lib_var=no"
3093 fi
3094 rm -f conftest*
3095 LIBS="$ac_save_LIBS"
3096
3097 fi
3098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3099 echo "$ac_t""yes" 1>&6
3100 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3101 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3102 cat >> confdefs.h <<EOF
3103 #define $ac_tr_lib 1
3104 EOF
3105
3106 LIBS="-lresolv $LIBS"
3107
3108 else
3109 echo "$ac_t""no" 1>&6
3110 fi
3111
3112 fi
3113
3114 fi
3115
3116 fi
3117
3118 fi
3119
3120 echo $ac_n "checking for socket""... $ac_c" 1>&6
3121 echo "configure:3122: checking for socket" >&5
3122 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3123 echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128 /* System header to define __stub macros and hopefully few prototypes,
3129 which can conflict with char socket(); below. */
3130 #include <assert.h>
3131 /* Override any gcc2 internal prototype to avoid an error. */
3132 /* We use char because int might match the return type of a gcc2
3133 builtin and then its argument prototype would still apply. */
3134 char socket();
3135
3136 int main() {
3137
3138 /* The GNU C library defines this for functions which it implements
3139 to always fail with ENOSYS. Some functions are actually named
3140 something starting with __ and the normal name is an alias. */
3141 #if defined (__stub_socket) || defined (__stub___socket)
3142 choke me
3143 #else
3144 socket();
3145 #endif
3146
3147 ; return 0; }
3148 EOF
3149 if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3150 rm -rf conftest*
3151 eval "ac_cv_func_socket=yes"
3152 else
3153 echo "configure: failed program was:" >&5
3154 cat conftest.$ac_ext >&5
3155 rm -rf conftest*
3156 eval "ac_cv_func_socket=no"
3157 fi
3158 rm -f conftest*
3159 fi
3160
3161 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3162 echo "$ac_t""yes" 1>&6
3163 :
3164 else
3165 echo "$ac_t""no" 1>&6
3166 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3167 echo "configure:3168: checking for socket in -lsocket" >&5
3168 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3169 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3170 echo $ac_n "(cached) $ac_c" 1>&6
3171 else
3172 ac_save_LIBS="$LIBS"
3173 LIBS="-lsocket $LIBS"
3174 cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 /* Override any gcc2 internal prototype to avoid an error. */
3178 /* We use char because int might match the return type of a gcc2
3179 builtin and then its argument prototype would still apply. */
3180 char socket();
3181
3182 int main() {
3183 socket()
3184 ; return 0; }
3185 EOF
3186 if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3187 rm -rf conftest*
3188 eval "ac_cv_lib_$ac_lib_var=yes"
3189 else
3190 echo "configure: failed program was:" >&5
3191 cat conftest.$ac_ext >&5
3192 rm -rf conftest*
3193 eval "ac_cv_lib_$ac_lib_var=no"
3194 fi
3195 rm -f conftest*
3196 LIBS="$ac_save_LIBS"
3197
3198 fi
3199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3200 echo "$ac_t""yes" 1>&6
3201 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3202 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3203 cat >> confdefs.h <<EOF
3204 #define $ac_tr_lib 1
3205 EOF
3206
3207 LIBS="-lsocket $LIBS"
3208
3209 else
3210 echo "$ac_t""no" 1>&6
3211 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3212 echo "configure:3213: checking for socket in -lsocket" >&5
3213 ac_lib_var=`echo socket'_'socket'_'-lnsl | sed 'y%./+- %__p__%'`
3214 if eval "test \"`echo '$''{'ac_cv_lbl_lib_$ac_lib_var'+set}'`\" = set"; then
3215 echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217 ac_save_LIBS="$LIBS"
3218 LIBS="-lsocket -lnsl $LIBS"
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 /* Override any gcc2 internal prototype to avoid an error. */
3223 /* We use char because int might match the return type of a gcc2
3224 builtin and then its argument prototype would still apply. */
3225 char socket();
3226
3227 int main() {
3228 socket()
3229 ; return 0; }
3230 EOF
3231 if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3232 rm -rf conftest*
3233 eval "ac_cv_lbl_lib_$ac_lib_var=yes"
3234 else
3235 echo "configure: failed program was:" >&5
3236 cat conftest.$ac_ext >&5
3237 rm -rf conftest*
3238 eval "ac_cv_lbl_lib_$ac_lib_var=no"
3239 fi
3240 rm -f conftest*
3241 LIBS="$ac_save_LIBS"
3242
3243 fi
3244 if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
3245 echo "$ac_t""yes" 1>&6
3246 LIBS="-lsocket -lnsl $LIBS"
3247 else
3248 echo "$ac_t""no" 1>&6
3249 fi
3250
3251 fi
3252
3253 fi
3254
3255 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
3256 echo $ac_n "checking for putmsg in -lstr""... $ac_c" 1>&6
3257 echo "configure:3258: checking for putmsg in -lstr" >&5
3258 ac_lib_var=`echo str'_'putmsg | sed 'y%./+-%__p_%'`
3259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3260 echo $ac_n "(cached) $ac_c" 1>&6
3261 else
3262 ac_save_LIBS="$LIBS"
3263 LIBS="-lstr $LIBS"
3264 cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 /* Override any gcc2 internal prototype to avoid an error. */
3268 /* We use char because int might match the return type of a gcc2
3269 builtin and then its argument prototype would still apply. */
3270 char putmsg();
3271
3272 int main() {
3273 putmsg()
3274 ; return 0; }
3275 EOF
3276 if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3277 rm -rf conftest*
3278 eval "ac_cv_lib_$ac_lib_var=yes"
3279 else
3280 echo "configure: failed program was:" >&5
3281 cat conftest.$ac_ext >&5
3282 rm -rf conftest*
3283 eval "ac_cv_lib_$ac_lib_var=no"
3284 fi
3285 rm -f conftest*
3286 LIBS="$ac_save_LIBS"
3287
3288 fi
3289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3290 echo "$ac_t""yes" 1>&6
3291 ac_tr_lib=HAVE_LIB`echo str | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3292 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3293 cat >> confdefs.h <<EOF
3294 #define $ac_tr_lib 1
3295 EOF
3296
3297 LIBS="-lstr $LIBS"
3298
3299 else
3300 echo "$ac_t""no" 1>&6
3301 fi
3302
3303
3304
3305 LBL_LIBS="$LIBS"
3306 pfopen=/usr/examples/packetfilter/pfopen.c
3307 if test -f $pfopen ; then
3308 for ac_func in pfopen
3309 do
3310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3311 echo "configure:3312: checking for $ac_func" >&5
3312 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3313 echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315 cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 /* System header to define __stub macros and hopefully few prototypes,
3319 which can conflict with char $ac_func(); below. */
3320 #include <assert.h>
3321 /* Override any gcc2 internal prototype to avoid an error. */
3322 /* We use char because int might match the return type of a gcc2
3323 builtin and then its argument prototype would still apply. */
3324 char $ac_func();
3325
3326 int main() {
3327
3328 /* The GNU C library defines this for functions which it implements
3329 to always fail with ENOSYS. Some functions are actually named
3330 something starting with __ and the normal name is an alias. */
3331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3332 choke me
3333 #else
3334 $ac_func();
3335 #endif
3336
3337 ; return 0; }
3338 EOF
3339 if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3340 rm -rf conftest*
3341 eval "ac_cv_func_$ac_func=yes"
3342 else
3343 echo "configure: failed program was:" >&5
3344 cat conftest.$ac_ext >&5
3345 rm -rf conftest*
3346 eval "ac_cv_func_$ac_func=no"
3347 fi
3348 rm -f conftest*
3349 fi
3350
3351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3352 echo "$ac_t""yes" 1>&6
3353 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3354 cat >> confdefs.h <<EOF
3355 #define $ac_tr_func 1
3356 EOF
3357
3358 else
3359 echo "$ac_t""no" 1>&6
3360 fi
3361 done
3362
3363 if test $ac_cv_func_pfopen = "no" ; then
3364 echo "$ac_t""Using $pfopen" 1>&6
3365 LIBS="$LIBS $pfopen"
3366 fi
3367 fi
3368 echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
3369 echo "configure:3370: checking for local pcap library" >&5
3370 libpcap=FAIL
3371 lastdir=FAIL
3372 places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \
3373 egrep '/libpcap-[0-9]*\.[0-9]*(\.[0-9]*)?([ab][0-9]*)?$'`
3374 for dir in $places ../libpcap libpcap ; do
3375 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
3376 if test $lastdir = $basedir ; then
3377 continue;
3378 fi
3379 lastdir=$dir
3380 if test -r $dir/libpcap.a ; then
3381 libpcap=$dir/libpcap.a
3382 d=$dir
3383 fi
3384 done
3385 if test $libpcap = FAIL ; then
3386 echo "$ac_t""not found" 1>&6
3387 echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
3388 echo "configure:3389: checking for main in -lpcap" >&5
3389 ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
3390 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3391 echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393 ac_save_LIBS="$LIBS"
3394 LIBS="-lpcap $LIBS"
3395 cat > conftest.$ac_ext <<EOF
3396 #line 3397 "configure"
3397 #include "confdefs.h"
3398
3399 int main() {
3400 main()
3401 ; return 0; }
3402 EOF
3403 if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3404 rm -rf conftest*
3405 eval "ac_cv_lib_$ac_lib_var=yes"
3406 else
3407 echo "configure: failed program was:" >&5
3408 cat conftest.$ac_ext >&5
3409 rm -rf conftest*
3410 eval "ac_cv_lib_$ac_lib_var=no"
3411 fi
3412 rm -f conftest*
3413 LIBS="$ac_save_LIBS"
3414
3415 fi
3416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3417 echo "$ac_t""yes" 1>&6
3418 libpcap="-lpcap"
3419 else
3420 echo "$ac_t""no" 1>&6
3421 fi
3422
3423 if test $libpcap = FAIL ; then
3424 { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
3425 fi
3426 else
3427 V_PCAPDEP=$libpcap
3428 if test -r $d/pcap.h; then
3429 V_INCLS="-I$d $V_INCLS"
3430 elif test -r $srcdir/../libpcap/pcap.h; then
3431 V_INCLS="-I$d -I$srcdir/../libpcap $V_INCLS"
3432 else
3433 { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
3434 fi
3435 echo "$ac_t""$libpcap" 1>&6
3436 fi
3437 LIBS="$libpcap $LIBS"
3438 case "$target_os" in
3439
3440 aix*)
3441 pseexe="/lib/pse.exp"
3442 echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
3443 echo "configure:3444: checking for $pseexe" >&5
3444 if test -f $pseexe ; then
3445 echo "$ac_t""yes" 1>&6
3446 LIBS="$LIBS -I:$pseexe"
3447 fi
3448 ;;
3449 esac
3450
3451 V_GROUP=0
3452 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
3453 V_GROUP=wheel
3454 fi
3455 case "$target_os" in
3456
3457 aix*)
3458 cat >> confdefs.h <<\EOF
3459 #define _SUN 1
3460 EOF
3461
3462 ;;
3463
3464 irix*)
3465 V_GROUP=sys
3466 ;;
3467
3468 linux*)
3469 V_INCLS="$V_INCLS -I\$(srcdir)/linux-include"
3470 ;;
3471
3472 osf*)
3473 V_GROUP=system
3474 cat >> confdefs.h <<\EOF
3475 #define __STDC__ 2
3476 EOF
3477
3478 ;;
3479
3480 solaris*)
3481 V_GROUP=sys
3482 ;;
3483 esac
3484
3485 if test -f /dev/bpf0 ; then
3486 V_GROUP=bpf
3487 fi
3488
3489 echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
3490 echo "configure:3491: checking for u_int8_t using $CC" >&5
3491 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
3492 echo $ac_n "(cached) $ac_c" 1>&6
3493 else
3494 cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497
3498 # include "confdefs.h"
3499 # include <sys/types.h>
3500 # if STDC_HEADERS
3501 # include <stdlib.h>
3502 # include <stddef.h>
3503 # endif
3504 int main() {
3505 u_int8_t i
3506 ; return 0; }
3507 EOF
3508 if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3509 rm -rf conftest*
3510 ac_cv_lbl_have_u_int8_t=yes
3511 else
3512 echo "configure: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
3514 rm -rf conftest*
3515 ac_cv_lbl_have_u_int8_t=no
3516 fi
3517 rm -f conftest*
3518 fi
3519
3520 echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
3521 if test $ac_cv_lbl_have_u_int8_t = no ; then
3522 cat >> confdefs.h <<\EOF
3523 #define u_int8_t u_char
3524 EOF
3525
3526 fi
3527 echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
3528 echo "configure:3529: checking for int16_t using $CC" >&5
3529 if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535
3536 # include "confdefs.h"
3537 # include <sys/types.h>
3538 # if STDC_HEADERS
3539 # include <stdlib.h>
3540 # include <stddef.h>
3541 # endif
3542 int main() {
3543 int16_t i
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3547 rm -rf conftest*
3548 ac_cv_lbl_have_int16_t=yes
3549 else
3550 echo "configure: failed program was:" >&5
3551 cat conftest.$ac_ext >&5
3552 rm -rf conftest*
3553 ac_cv_lbl_have_int16_t=no
3554 fi
3555 rm -f conftest*
3556 fi
3557
3558 echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
3559 if test $ac_cv_lbl_have_int16_t = no ; then
3560 cat >> confdefs.h <<\EOF
3561 #define int16_t u_short
3562 EOF
3563
3564 fi
3565 echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
3566 echo "configure:3567: checking for u_int16_t using $CC" >&5
3567 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
3568 echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570 cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573
3574 # include "confdefs.h"
3575 # include <sys/types.h>
3576 # if STDC_HEADERS
3577 # include <stdlib.h>
3578 # include <stddef.h>
3579 # endif
3580 int main() {
3581 u_int16_t i
3582 ; return 0; }
3583 EOF
3584 if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3585 rm -rf conftest*
3586 ac_cv_lbl_have_u_int16_t=yes
3587 else
3588 echo "configure: failed program was:" >&5
3589 cat conftest.$ac_ext >&5
3590 rm -rf conftest*
3591 ac_cv_lbl_have_u_int16_t=no
3592 fi
3593 rm -f conftest*
3594 fi
3595
3596 echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
3597 if test $ac_cv_lbl_have_u_int16_t = no ; then
3598 cat >> confdefs.h <<\EOF
3599 #define u_int16_t short
3600 EOF
3601
3602 fi
3603 echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
3604 echo "configure:3605: checking for int32_t using $CC" >&5
3605 if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
3606 echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608 cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611
3612 # include "confdefs.h"
3613 # include <sys/types.h>
3614 # if STDC_HEADERS
3615 # include <stdlib.h>
3616 # include <stddef.h>
3617 # endif
3618 int main() {
3619 int32_t i
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3623 rm -rf conftest*
3624 ac_cv_lbl_have_int32_t=yes
3625 else
3626 echo "configure: failed program was:" >&5
3627 cat conftest.$ac_ext >&5
3628 rm -rf conftest*
3629 ac_cv_lbl_have_int32_t=no
3630 fi
3631 rm -f conftest*
3632 fi
3633
3634 echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
3635 if test $ac_cv_lbl_have_int32_t = no ; then
3636 cat >> confdefs.h <<\EOF
3637 #define int32_t int
3638 EOF
3639
3640 fi
3641 echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
3642 echo "configure:3643: checking for u_int32_t using $CC" >&5
3643 if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646 cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649
3650 # include "confdefs.h"
3651 # include <sys/types.h>
3652 # if STDC_HEADERS
3653 # include <stdlib.h>
3654 # include <stddef.h>
3655 # endif
3656 int main() {
3657 u_int32_t i
3658 ; return 0; }
3659 EOF
3660 if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3661 rm -rf conftest*
3662 ac_cv_lbl_have_u_int32_t=yes
3663 else
3664 echo "configure: failed program was:" >&5
3665 cat conftest.$ac_ext >&5
3666 rm -rf conftest*
3667 ac_cv_lbl_have_u_int32_t=no
3668 fi
3669 rm -f conftest*
3670 fi
3671
3672 echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
3673 if test $ac_cv_lbl_have_u_int32_t = no ; then
3674 cat >> confdefs.h <<\EOF
3675 #define u_int32_t u_int
3676 EOF
3677
3678 fi
3679
3680 rm -f os-proto.h
3681 if test "${LBL_CFLAGS+set}" = set; then
3682 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
3683 fi
3684 if test -f .devel ; then
3685 if test "$GCC" = yes ; then
3686 if test "${LBL_CFLAGS+set}" != set; then
3687 if test "$ac_cv_prog_cc_g" = yes ; then
3688 V_CCOPT="-g $V_CCOPT"
3689 fi
3690 V_CCOPT="$V_CCOPT -Wall"
3691 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
3692 V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
3693 fi
3694 fi
3695 else
3696 case "$target_os" in
3697
3698 irix6*)
3699 V_CCOPT="$V_CCOPT -n32"
3700 ;;
3701
3702 *)
3703 ;;
3704 esac
3705 fi
3706 os=`echo $target_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
3707 name="lbl/os-$os.h"
3708 if test -f $name ; then
3709 ln -s $name os-proto.h
3710 cat >> confdefs.h <<\EOF
3711 #define HAVE_OS_PROTO_H 1
3712 EOF
3713
3714 else
3715 echo "configure: warning: can't find $name" 1>&2
3716 fi
3717 fi
3718
3719 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
3720 echo "configure:3721: checking if sockaddr struct has sa_len member" >&5
3721 if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
3722 echo $ac_n "(cached) $ac_c" 1>&6
3723 else
3724 cat > conftest.$ac_ext <<EOF
3725 #line 3726 "configure"
3726 #include "confdefs.h"
3727
3728 # include <sys/types.h>
3729 # include <sys/socket.h>
3730 int main() {
3731 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
3732 ; return 0; }
3733 EOF
3734 if { (eval echo configure:3735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3735 rm -rf conftest*
3736 ac_cv_lbl_sockaddr_has_sa_len=yes
3737 else
3738 echo "configure: failed program was:" >&5
3739 cat conftest.$ac_ext >&5
3740 rm -rf conftest*
3741 ac_cv_lbl_sockaddr_has_sa_len=no
3742 fi
3743 rm -f conftest*
3744 fi
3745
3746 echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
3747 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
3748 cat >> confdefs.h <<\EOF
3749 #define HAVE_SOCKADDR_SA_LEN 1
3750 EOF
3751
3752 fi
3753
3754 echo $ac_n "checking if ether_header uses ether_addr structs""... $ac_c" 1>&6
3755 echo "configure:3756: checking if ether_header uses ether_addr structs" >&5
3756 if eval "test \"`echo '$''{'ac_cv_ether_header_has_ea'+set}'`\" = set"; then
3757 echo $ac_n "(cached) $ac_c" 1>&6
3758 else
3759 LBL_SAVE_CFLAGS="$CFLAGS"
3760 CFLAGS="$CFLAGS $V_INCLS"
3761 cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764
3765 # include <sys/types.h>
3766 # if __STDC__
3767 /* osf3 has REALLY good prototyes */
3768 struct mbuf;
3769 struct rtentry;
3770 # endif
3771 # include <sys/socket.h>
3772 # include <net/if.h>
3773 # include <netinet/in.h>
3774 # include <netinet/if_ether.h>
3775 int main() {
3776 u_int i =
3777 sizeof(((struct ether_header *)0)->ether_dhost.ether_addr_octet)
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3781 rm -rf conftest*
3782 ac_cv_ether_header_has_ea=yes
3783 else
3784 echo "configure: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3786 rm -rf conftest*
3787 ac_cv_ether_header_has_ea=no
3788 fi
3789 rm -f conftest*
3790 CFLAGS="$LBL_SAVE_CFLAGS"
3791 fi
3792
3793 echo "$ac_t""$ac_cv_ether_header_has_ea" 1>&6
3794 if test $ac_cv_ether_header_has_ea = yes ; then
3795 cat >> confdefs.h <<\EOF
3796 #define ETHER_HEADER_HAS_EA 1
3797 EOF
3798
3799 fi
3800
3801 echo $ac_n "checking if ether_arp uses ether_addr structs""... $ac_c" 1>&6
3802 echo "configure:3803: checking if ether_arp uses ether_addr structs" >&5
3803 if eval "test \"`echo '$''{'ac_cv_ether_arp_has_ea'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805 else
3806 LBL_SAVE_CFLAGS="$CFLAGS"
3807 CFLAGS="$CFLAGS $V_INCLS"
3808 cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811
3812 # include <sys/types.h>
3813 # if __STDC__
3814 /* osf3 has REALLY good prototyes */
3815 struct mbuf;
3816 struct rtentry;
3817 # endif
3818 # include <sys/socket.h>
3819 # include <net/if.h>
3820 # include <netinet/in.h>
3821 # include <netinet/if_ether.h>
3822 int main() {
3823 u_int i =
3824 sizeof(((struct ether_arp *)0)->arp_sha.ether_addr_octet)
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3828 rm -rf conftest*
3829 ac_cv_ether_arp_has_ea=yes
3830 else
3831 echo "configure: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 rm -rf conftest*
3834 ac_cv_ether_arp_has_ea=no
3835 fi
3836 rm -f conftest*
3837 CFLAGS="$LBL_SAVE_CFLAGS"
3838 fi
3839
3840 echo "$ac_t""$ac_cv_ether_arp_has_ea" 1>&6
3841 if test $ac_cv_ether_arp_has_ea = yes ; then
3842 cat >> confdefs.h <<\EOF
3843 #define ETHER_ARP_HAS_EA 1
3844 EOF
3845
3846 fi
3847
3848 echo $ac_n "checking if ether_arp uses erp_xsha member""... $ac_c" 1>&6
3849 echo "configure:3850: checking if ether_arp uses erp_xsha member" >&5
3850 if eval "test \"`echo '$''{'ac_cv_struct_ether_arp_x'+set}'`\" = set"; then
3851 echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853 LBL_SAVE_CFLAGS="$CFLAGS"
3854 CFLAGS="$CFLAGS $V_INCLS"
3855 cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858
3859 # include <sys/types.h>
3860 # include <sys/socket.h>
3861 # if __STDC__
3862 /* osf3 has REALLY good prototyes */
3863 struct mbuf;
3864 struct rtentry;
3865 # endif
3866 # include <net/if.h>
3867 # include <netinet/in.h>
3868 # include <netinet/if_ether.h>
3869 int main() {
3870 u_int i = sizeof( ((struct ether_arp *)0)->arp_xsha)
3871 ; return 0; }
3872 EOF
3873 if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3874 rm -rf conftest*
3875 ac_cv_struct_ether_arp_x=yes
3876 else
3877 echo "configure: failed program was:" >&5
3878 cat conftest.$ac_ext >&5
3879 rm -rf conftest*
3880 ac_cv_struct_ether_arp_x=no
3881 fi
3882 rm -f conftest*
3883 CFLAGS="$LBL_SAVE_CFLAGS"
3884 fi
3885
3886 echo "$ac_t""$ac_cv_struct_ether_arp_x" 1>&6
3887 if test $ac_cv_struct_ether_arp_x = yes ; then
3888 cat >> confdefs.h <<\EOF
3889 #define ETHER_ARP_HAS_X 1
3890 EOF
3891
3892 fi
3893
3894 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
3895 echo "configure:3896: checking if unaligned accesses fail" >&5
3896 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
3898 else
3899 case "$target_cpu" in
3900
3901 alpha|hp*|mips|sparc)
3902 ac_cv_lbl_unaligned_fail=yes
3903 ;;
3904
3905 *)
3906 cat >conftest.c <<EOF
3907 # include <sys/types.h>
3908 # include <sys/wait.h>
3909 # include <stdio.h>
3910 unsigned char a[5] = { 1, 2, 3, 4, 5 };
3911 main() {
3912 unsigned int i;
3913 pid_t pid;
3914 int status;
3915 /* avoid "core dumped" message */
3916 pid = fork();
3917 if (pid < 0)
3918 exit(2);
3919 if (pid > 0) {
3920 /* parent */
3921 pid = waitpid(pid, &status, 0);
3922 if (pid < 0)
3923 exit(3);
3924 exit(!WIFEXITED(status));
3925 }
3926 /* child */
3927 i = *(unsigned int *)&a[1];
3928 printf("%d\n", i);
3929 exit(0);
3930 }
3931 EOF
3932 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
3933 conftest.c $LIBS >/dev/null 2>&1
3934 if test ! -x conftest ; then
3935 ac_cv_lbl_unaligned_fail=yes
3936 else
3937 ./conftest >conftest.out
3938 if test ! -s conftest.out ; then
3939 ac_cv_lbl_unaligned_fail=yes
3940 else
3941 ac_cv_lbl_unaligned_fail=no
3942 fi
3943 fi
3944 rm -f conftest* core core.conftest
3945 ;;
3946 esac
3947 fi
3948
3949 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
3950 if test $ac_cv_lbl_unaligned_fail = yes ; then
3951 cat >> confdefs.h <<\EOF
3952 #define LBL_ALIGN 1
3953 EOF
3954
3955 fi
3956
3957
3958 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
3959 echo "configure:3960: checking for h_errno" >&5
3960 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
3961 echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963 cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966
3967 # include <sys/types.h>
3968 # include <netdb.h>
3969 int main() {
3970 int foo = h_errno;
3971 ; return 0; }
3972 EOF
3973 if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3974 rm -rf conftest*
3975 ac_cv_var_h_errno=yes
3976 else
3977 echo "configure: failed program was:" >&5
3978 cat conftest.$ac_ext >&5
3979 rm -rf conftest*
3980 ac_cv_var_h_errno=no
3981 fi
3982 rm -f conftest*
3983 fi
3984
3985 echo "$ac_t""$ac_cv_var_h_errno" 1>&6
3986 if test "$ac_cv_var_h_errno" = "yes"; then
3987 cat >> confdefs.h <<\EOF
3988 #define HAVE_H_ERRNO 1
3989 EOF
3990
3991 fi
3992
3993
3994 echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
3995 echo "configure:3996: checking for SSLeay" >&5
3996 ac_cv_ssleay_path=no
3997 incdir=no
3998 for dir in /usr/local /usr/local/ssl /usr/pkg; do
3999 if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then
4000 ac_cv_ssleay_path=$dir
4001 fi
4002 if test -d $dir/include -a -f $dir/include/des.h; then
4003 incdir="-I$dir/include"
4004 else
4005 if test -d $dir/include/ssleay -a -f $dir/include/ssleay/des.h; then
4006 incdir="-I$dir/include/ssleay"
4007 elif test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
4008 incdir="-I$dir/include -I$dir/include/openssl"
4009 fi
4010 fi
4011 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
4012 break;
4013 else
4014 ac_cv_ssleay_path=no
4015 incdir=no
4016 fi
4017 done
4018 echo "$ac_t""$ac_cv_ssleay_path" 1>&6
4019 if test "$ac_cv_ssleay_path" != no; then
4020 V_INCLS="$V_INCLS $incdir"
4021 LIBS="$LIBS -L$dir/lib"
4022 echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
4023 echo "configure:4024: checking for des_cbc_encrypt in -lcrypto" >&5
4024 ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
4025 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4026 echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028 ac_save_LIBS="$LIBS"
4029 LIBS="-lcrypto $LIBS"
4030 cat > conftest.$ac_ext <<EOF
4031 #line 4032 "configure"
4032 #include "confdefs.h"
4033 /* Override any gcc2 internal prototype to avoid an error. */
4034 /* We use char because int might match the return type of a gcc2
4035 builtin and then its argument prototype would still apply. */
4036 char des_cbc_encrypt();
4037
4038 int main() {
4039 des_cbc_encrypt()
4040 ; return 0; }
4041 EOF
4042 if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4043 rm -rf conftest*
4044 eval "ac_cv_lib_$ac_lib_var=yes"
4045 else
4046 echo "configure: failed program was:" >&5
4047 cat conftest.$ac_ext >&5
4048 rm -rf conftest*
4049 eval "ac_cv_lib_$ac_lib_var=no"
4050 fi
4051 rm -f conftest*
4052 LIBS="$ac_save_LIBS"
4053
4054 fi
4055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4056 echo "$ac_t""yes" 1>&6
4057 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4058 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4059 cat >> confdefs.h <<EOF
4060 #define $ac_tr_lib 1
4061 EOF
4062
4063 LIBS="-lcrypto $LIBS"
4064
4065 else
4066 echo "$ac_t""no" 1>&6
4067 fi
4068
4069 cat >> confdefs.h <<\EOF
4070 #define CRYPTO 1
4071 EOF
4072
4073
4074 bak_CPPFLAGS=$CPPFLAGS
4075 CPPFLAGS="$CPPFLAGS $V_INCLS"
4076 for ac_hdr in cast.h rc5.h
4077 do
4078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4080 echo "configure:4081: checking for $ac_hdr" >&5
4081 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4082 echo $ac_n "(cached) $ac_c" 1>&6
4083 else
4084 cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 #include <$ac_hdr>
4088 EOF
4089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4090 { (eval echo configure:4091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4092 if test -z "$ac_err"; then
4093 rm -rf conftest*
4094 eval "ac_cv_header_$ac_safe=yes"
4095 else
4096 echo "$ac_err" >&5
4097 echo "configure: failed program was:" >&5
4098 cat conftest.$ac_ext >&5
4099 rm -rf conftest*
4100 eval "ac_cv_header_$ac_safe=no"
4101 fi
4102 rm -f conftest*
4103 fi
4104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4105 echo "$ac_t""yes" 1>&6
4106 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4107 cat >> confdefs.h <<EOF
4108 #define $ac_tr_hdr 1
4109 EOF
4110
4111 else
4112 echo "$ac_t""no" 1>&6
4113 fi
4114 done
4115
4116
4117 if test "$ac_cv_header_cast_h" = "yes"; then
4118 echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
4119 echo "configure:4120: checking for buggy CAST128" >&5
4120 if test "$cross_compiling" = yes; then
4121 buggy_cast128="cross-compiling, assume yes"
4122 else
4123 cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126
4127 #include <cast.h>
4128 main()
4129 {
4130 unsigned char key[] = {0x01,0x23,0x45,0x67,0x12};
4131 unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
4132 unsigned char out[sizeof(in)];
4133 unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E};
4134 CAST_KEY ks;
4135 CAST_set_key(&ks, sizeof(key), key);
4136 CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT);
4137 if (memcmp(out, ok, sizeof(ok)) != 0)
4138 return 0;
4139 else
4140 return 1;
4141 }
4142 EOF
4143 if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4144 then
4145 buggy_cast128=yes
4146 else
4147 echo "configure: failed program was:" >&5
4148 cat conftest.$ac_ext >&5
4149 rm -fr conftest*
4150 buggy_cast128=no
4151 fi
4152 rm -fr conftest*
4153 fi
4154
4155 echo "$ac_t""$buggy_cast128" 1>&6
4156 if test "$buggy_cast128" != no; then
4157 echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine."
4158 echo "disabling CAST128 support."
4159 cat >> confdefs.h <<\EOF
4160 #define HAVE_BUGGY_CAST128 1
4161 EOF
4162
4163 fi
4164 fi
4165
4166 CPPFLAGS=$bak_CPPFLAGS
4167 fi
4168
4169 if test -r ${srcdir}/lbl/gnuc.h ; then
4170 rm -f gnuc.h
4171 ln -s ${srcdir}/lbl/gnuc.h gnuc.h
4172 fi
4173
4174
4175
4176
4177
4178
4179
4180 # Find a good install program. We prefer a C program (faster),
4181 # so one script is as good as another. But avoid the broken or
4182 # incompatible versions:
4183 # SysV /etc/install, /usr/sbin/install
4184 # SunOS /usr/etc/install
4185 # IRIX /sbin/install
4186 # AIX /bin/install
4187 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4188 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4189 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4190 # ./install, which can be erroneously created by make from ./install.sh.
4191 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4192 echo "configure:4193: checking for a BSD compatible install" >&5
4193 if test -z "$INSTALL"; then
4194 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4195 echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4198 for ac_dir in $PATH; do
4199 # Account for people who put trailing slashes in PATH elements.
4200 case "$ac_dir/" in
4201 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4202 *)
4203 # OSF1 and SCO ODT 3.0 have their own names for install.
4204 # Don't use installbsd from OSF since it installs stuff as root
4205 # by default.
4206 for ac_prog in ginstall scoinst install; do
4207 if test -f $ac_dir/$ac_prog; then
4208 if test $ac_prog = install &&
4209 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4210 # AIX install. It has an incompatible calling convention.
4211 :
4212 else
4213 ac_cv_path_install="$ac_dir/$ac_prog -c"
4214 break 2
4215 fi
4216 fi
4217 done
4218 ;;
4219 esac
4220 done
4221 IFS="$ac_save_IFS"
4222
4223 fi
4224 if test "${ac_cv_path_install+set}" = set; then
4225 INSTALL="$ac_cv_path_install"
4226 else
4227 # As a last resort, use the slow shell script. We don't cache a
4228 # path for INSTALL within a source directory, because that will
4229 # break other packages using the cache if that directory is
4230 # removed, or if the path is relative.
4231 INSTALL="$ac_install_sh"
4232 fi
4233 fi
4234 echo "$ac_t""$INSTALL" 1>&6
4235
4236 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4237 # It thinks the first close brace ends the variable substitution.
4238 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4239
4240 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4241
4242 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4243
4244
4245
4246
4247 trap '' 1 2 15
4248 cat > confcache <<\EOF
4249 # This file is a shell script that caches the results of configure
4250 # tests run on this system so they can be shared between configure
4251 # scripts and configure runs. It is not useful on other systems.
4252 # If it contains results you don't want to keep, you may remove or edit it.
4253 #
4254 # By default, configure uses ./config.cache as the cache file,
4255 # creating it if it does not exist already. You can give configure
4256 # the --cache-file=FILE option to use a different cache file; that is
4257 # what configure does when it calls configure scripts in
4258 # subdirectories, so they share the cache.
4259 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4260 # config.status only pays attention to the cache file if you give it the
4261 # --recheck option to rerun configure.
4262 #
4263 EOF
4264 # The following way of writing the cache mishandles newlines in values,
4265 # but we know of no workaround that is simple, portable, and efficient.
4266 # So, don't put newlines in cache variables' values.
4267 # Ultrix sh set writes to stderr and can't be redirected directly,
4268 # and sets the high bit in the cache file unless we assign to the vars.
4269 (set) 2>&1 |
4270 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4271 *ac_space=\ *)
4272 # `set' does not quote correctly, so add quotes (double-quote substitution
4273 # turns \\\\ into \\, and sed turns \\ into \).
4274 sed -n \
4275 -e "s/'/'\\\\''/g" \
4276 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4277 ;;
4278 *)
4279 # `set' quotes correctly as required by POSIX, so do not add quotes.
4280 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4281 ;;
4282 esac >> confcache
4283 if cmp -s $cache_file confcache; then
4284 :
4285 else
4286 if test -w $cache_file; then
4287 echo "updating cache $cache_file"
4288 cat confcache > $cache_file
4289 else
4290 echo "not updating unwritable cache $cache_file"
4291 fi
4292 fi
4293 rm -f confcache
4294
4295 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4296
4297 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4298 # Let make expand exec_prefix.
4299 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4300
4301 # Any assignment to VPATH causes Sun make to only execute
4302 # the first set of double-colon rules, so remove it if not needed.
4303 # If there is a colon in the path, we need to keep it.
4304 if test "x$srcdir" = x.; then
4305 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4306 fi
4307
4308 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4309
4310 DEFS=-DHAVE_CONFIG_H
4311
4312 # Without the "./", some shells look in PATH for config.status.
4313 : ${CONFIG_STATUS=./config.status}
4314
4315 echo creating $CONFIG_STATUS
4316 rm -f $CONFIG_STATUS
4317 cat > $CONFIG_STATUS <<EOF
4318 #! /bin/sh
4319 # Generated automatically by configure.
4320 # Run this file to recreate the current configuration.
4321 # This directory was configured as follows,
4322 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4323 #
4324 # $0 $ac_configure_args
4325 #
4326 # Compiler output produced by configure, useful for debugging
4327 # configure, is in ./config.log if it exists.
4328
4329 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4330 for ac_option
4331 do
4332 case "\$ac_option" in
4333 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4334 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4335 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4336 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4337 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4338 exit 0 ;;
4339 -help | --help | --hel | --he | --h)
4340 echo "\$ac_cs_usage"; exit 0 ;;
4341 *) echo "\$ac_cs_usage"; exit 1 ;;
4342 esac
4343 done
4344
4345 ac_given_srcdir=$srcdir
4346 ac_given_INSTALL="$INSTALL"
4347
4348 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4349 EOF
4350 cat >> $CONFIG_STATUS <<EOF
4351
4352 # Protect against being on the right side of a sed subst in config.status.
4353 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4354 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4355 $ac_vpsub
4356 $extrasub
4357 s%@SHELL@%$SHELL%g
4358 s%@CFLAGS@%$CFLAGS%g
4359 s%@CPPFLAGS@%$CPPFLAGS%g
4360 s%@CXXFLAGS@%$CXXFLAGS%g
4361 s%@FFLAGS@%$FFLAGS%g
4362 s%@DEFS@%$DEFS%g
4363 s%@LDFLAGS@%$LDFLAGS%g
4364 s%@LIBS@%$LIBS%g
4365 s%@exec_prefix@%$exec_prefix%g
4366 s%@prefix@%$prefix%g
4367 s%@program_transform_name@%$program_transform_name%g
4368 s%@bindir@%$bindir%g
4369 s%@sbindir@%$sbindir%g
4370 s%@libexecdir@%$libexecdir%g
4371 s%@datadir@%$datadir%g
4372 s%@sysconfdir@%$sysconfdir%g
4373 s%@sharedstatedir@%$sharedstatedir%g
4374 s%@localstatedir@%$localstatedir%g
4375 s%@libdir@%$libdir%g
4376 s%@includedir@%$includedir%g
4377 s%@oldincludedir@%$oldincludedir%g
4378 s%@infodir@%$infodir%g
4379 s%@mandir@%$mandir%g
4380 s%@host@%$host%g
4381 s%@host_alias@%$host_alias%g
4382 s%@host_cpu@%$host_cpu%g
4383 s%@host_vendor@%$host_vendor%g
4384 s%@host_os@%$host_os%g
4385 s%@target@%$target%g
4386 s%@target_alias@%$target_alias%g
4387 s%@target_cpu@%$target_cpu%g
4388 s%@target_vendor@%$target_vendor%g
4389 s%@target_os@%$target_os%g
4390 s%@build@%$build%g
4391 s%@build_alias@%$build_alias%g
4392 s%@build_cpu@%$build_cpu%g
4393 s%@build_vendor@%$build_vendor%g
4394 s%@build_os@%$build_os%g
4395 s%@SHLICC2@%$SHLICC2%g
4396 s%@CC@%$CC%g
4397 s%@CPP@%$CPP%g
4398 s%@LIBOBJS@%$LIBOBJS%g
4399 s%@V_CCOPT@%$V_CCOPT%g
4400 s%@V_GROUP@%$V_GROUP%g
4401 s%@V_INCLS@%$V_INCLS%g
4402 s%@V_PCAPDEP@%$V_PCAPDEP%g
4403 s%@LOCALSRC@%$LOCALSRC%g
4404 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4405 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4406 s%@INSTALL_DATA@%$INSTALL_DATA%g
4407
4408 CEOF
4409 EOF
4410
4411 cat >> $CONFIG_STATUS <<\EOF
4412
4413 # Split the substitutions into bite-sized pieces for seds with
4414 # small command number limits, like on Digital OSF/1 and HP-UX.
4415 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4416 ac_file=1 # Number of current file.
4417 ac_beg=1 # First line for current file.
4418 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4419 ac_more_lines=:
4420 ac_sed_cmds=""
4421 while $ac_more_lines; do
4422 if test $ac_beg -gt 1; then
4423 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4424 else
4425 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4426 fi
4427 if test ! -s conftest.s$ac_file; then
4428 ac_more_lines=false
4429 rm -f conftest.s$ac_file
4430 else
4431 if test -z "$ac_sed_cmds"; then
4432 ac_sed_cmds="sed -f conftest.s$ac_file"
4433 else
4434 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4435 fi
4436 ac_file=`expr $ac_file + 1`
4437 ac_beg=$ac_end
4438 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4439 fi
4440 done
4441 if test -z "$ac_sed_cmds"; then
4442 ac_sed_cmds=cat
4443 fi
4444 EOF
4445
4446 cat >> $CONFIG_STATUS <<EOF
4447
4448 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4449 EOF
4450 cat >> $CONFIG_STATUS <<\EOF
4451 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4452 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4453 case "$ac_file" in
4454 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4455 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4456 *) ac_file_in="${ac_file}.in" ;;
4457 esac
4458
4459 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4460
4461 # Remove last slash and all that follows it. Not all systems have dirname.
4462 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4463 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4464 # The file is in a subdirectory.
4465 test ! -d "$ac_dir" && mkdir "$ac_dir"
4466 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4467 # A "../" for each directory in $ac_dir_suffix.
4468 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4469 else
4470 ac_dir_suffix= ac_dots=
4471 fi
4472
4473 case "$ac_given_srcdir" in
4474 .) srcdir=.
4475 if test -z "$ac_dots"; then top_srcdir=.
4476 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4477 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4478 *) # Relative path.
4479 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4480 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4481 esac
4482
4483 case "$ac_given_INSTALL" in
4484 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4485 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4486 esac
4487
4488 echo creating "$ac_file"
4489 rm -f "$ac_file"
4490 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4491 case "$ac_file" in
4492 *Makefile*) ac_comsub="1i\\
4493 # $configure_input" ;;
4494 *) ac_comsub= ;;
4495 esac
4496
4497 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4498 sed -e "$ac_comsub
4499 s%@configure_input@%$configure_input%g
4500 s%@srcdir@%$srcdir%g
4501 s%@top_srcdir@%$top_srcdir%g
4502 s%@INSTALL@%$INSTALL%g
4503 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4504 fi; done
4505 rm -f conftest.s*
4506
4507 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4508 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4509 #
4510 # ac_d sets the value in "#define NAME VALUE" lines.
4511 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4512 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4513 ac_dC='\3'
4514 ac_dD='%g'
4515 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4516 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4517 ac_uB='\([ ]\)%\1#\2define\3'
4518 ac_uC=' '
4519 ac_uD='\4%g'
4520 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4521 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4522 ac_eB='$%\1#\2define\3'
4523 ac_eC=' '
4524 ac_eD='%g'
4525
4526 if test "${CONFIG_HEADERS+set}" != set; then
4527 EOF
4528 cat >> $CONFIG_STATUS <<EOF
4529 CONFIG_HEADERS="config.h"
4530 EOF
4531 cat >> $CONFIG_STATUS <<\EOF
4532 fi
4533 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4534 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4535 case "$ac_file" in
4536 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4537 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4538 *) ac_file_in="${ac_file}.in" ;;
4539 esac
4540
4541 echo creating $ac_file
4542
4543 rm -f conftest.frag conftest.in conftest.out
4544 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4545 cat $ac_file_inputs > conftest.in
4546
4547 EOF
4548
4549 # Transform confdefs.h into a sed script conftest.vals that substitutes
4550 # the proper values into config.h.in to produce config.h. And first:
4551 # Protect against being on the right side of a sed subst in config.status.
4552 # Protect against being in an unquoted here document in config.status.
4553 rm -f conftest.vals
4554 cat > conftest.hdr <<\EOF
4555 s/[\\&%]/\\&/g
4556 s%[\\$`]%\\&%g
4557 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4558 s%ac_d%ac_u%gp
4559 s%ac_u%ac_e%gp
4560 EOF
4561 sed -n -f conftest.hdr confdefs.h > conftest.vals
4562 rm -f conftest.hdr
4563
4564 # This sed command replaces #undef with comments. This is necessary, for
4565 # example, in the case of _POSIX_SOURCE, which is predefined and required
4566 # on some systems where configure will not decide to define it.
4567 cat >> conftest.vals <<\EOF
4568 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4569 EOF
4570
4571 # Break up conftest.vals because some shells have a limit on
4572 # the size of here documents, and old seds have small limits too.
4573
4574 rm -f conftest.tail
4575 while :
4576 do
4577 ac_lines=`grep -c . conftest.vals`
4578 # grep -c gives empty output for an empty file on some AIX systems.
4579 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4580 # Write a limited-size here document to conftest.frag.
4581 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4582 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4583 echo 'CEOF
4584 sed -f conftest.frag conftest.in > conftest.out
4585 rm -f conftest.in
4586 mv conftest.out conftest.in
4587 ' >> $CONFIG_STATUS
4588 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4589 rm -f conftest.vals
4590 mv conftest.tail conftest.vals
4591 done
4592 rm -f conftest.vals
4593
4594 cat >> $CONFIG_STATUS <<\EOF
4595 rm -f conftest.frag conftest.h
4596 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4597 cat conftest.in >> conftest.h
4598 rm -f conftest.in
4599 if cmp -s $ac_file conftest.h 2>/dev/null; then
4600 echo "$ac_file is unchanged"
4601 rm -f conftest.h
4602 else
4603 # Remove last slash and all that follows it. Not all systems have dirname.
4604 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4605 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4606 # The file is in a subdirectory.
4607 test ! -d "$ac_dir" && mkdir "$ac_dir"
4608 fi
4609 rm -f $ac_file
4610 mv conftest.h $ac_file
4611 fi
4612 fi; done
4613
4614 EOF
4615 cat >> $CONFIG_STATUS <<EOF
4616
4617 EOF
4618 cat >> $CONFIG_STATUS <<\EOF
4619
4620 exit 0
4621 EOF
4622 chmod +x $CONFIG_STATUS
4623 rm -fr confdefs* $ac_clean_files
4624 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4625
4626
4627 if test -f .devel ; then
4628 make depend
4629 fi
4630 exit 0