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