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