]> The Tcpdump Group git mirrors - libpcap/blob - configure
Remove some workarounds for old compilers.
[libpcap] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for pcap 1.10.0-PRE-GIT.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='pcap'
579 PACKAGE_TARNAME='pcap'
580 PACKAGE_VERSION='1.10.0-PRE-GIT'
581 PACKAGE_STRING='pcap 1.10.0-PRE-GIT'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="pcap.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_subst_vars='LTLIBOBJS
623 INSTALL_DATA
624 INSTALL_SCRIPT
625 INSTALL_PROGRAM
626 PCAP_SUPPORT_RDMASNIFF
627 PCAP_SUPPORT_DBUS
628 PCAP_SUPPORT_BT
629 PCAP_SUPPORT_DPDK
630 PCAP_SUPPORT_NETMAP
631 PCAP_SUPPORT_NETFILTER
632 PCAP_SUPPORT_USB
633 EXTRA_NETWORK_LIBS
634 RPCAPD_LIBS
635 INSTALL_RPCAPD
636 BUILD_RPCAPD
637 PTHREAD_LIBS
638 MAN_ADMIN_COMMANDS
639 MAN_MISC_INFO
640 MAN_FILE_FORMATS
641 MAN_DEVICES
642 DYEXT
643 REMOTE_C_SRC
644 MODULE_C_SRC
645 PLATFORM_CXX_SRC
646 PLATFORM_C_SRC
647 ADDLARCHIVEOBJS
648 ADDLOBJS
649 V_YACC
650 V_RPATH_OPT
651 V_SONAME_OPT
652 V_SHLIB_OPT
653 V_SHLIB_CMD
654 V_SHLIB_CCOPT
655 V_LEX
656 V_INCLS
657 V_DEFS
658 V_PROG_LDFLAGS_FAT
659 V_PROG_CCOPT_FAT
660 V_LIB_LDFLAGS_FAT
661 V_LIB_CCOPT_FAT
662 V_CCOPT
663 MKDEP
664 DEPENDENCY_CFLAG
665 LN_S
666 AR
667 RANLIB
668 YFLAGS
669 YACC
670 LEXLIB
671 LEX_OUTPUT_ROOT
672 LEX
673 PKGCONFIG
674 PCAP_SUPPORT_PACKET_RING
675 VALGRINDTEST_SRC
676 LIBOBJS
677 EGREP
678 GREP
679 CPP
680 ac_ct_CXX
681 CXXFLAGS
682 CXX
683 OBJEXT
684 EXEEXT
685 ac_ct_CC
686 CPPFLAGS
687 LDFLAGS
688 CFLAGS
689 CC
690 SHLICC2
691 target_os
692 target_vendor
693 target_cpu
694 target
695 host_os
696 host_vendor
697 host_cpu
698 host
699 build_os
700 build_vendor
701 build_cpu
702 build
703 target_alias
704 host_alias
705 build_alias
706 LIBS
707 ECHO_T
708 ECHO_N
709 ECHO_C
710 DEFS
711 mandir
712 localedir
713 libdir
714 psdir
715 pdfdir
716 dvidir
717 htmldir
718 infodir
719 docdir
720 oldincludedir
721 includedir
722 localstatedir
723 sharedstatedir
724 sysconfdir
725 datadir
726 datarootdir
727 libexecdir
728 sbindir
729 bindir
730 program_transform_name
731 prefix
732 exec_prefix
733 PACKAGE_URL
734 PACKAGE_BUGREPORT
735 PACKAGE_STRING
736 PACKAGE_VERSION
737 PACKAGE_TARNAME
738 PACKAGE_NAME
739 PATH_SEPARATOR
740 SHELL'
741 ac_subst_files=''
742 ac_user_opts='
743 enable_option_checking
744 with_gcc
745 enable_largefile
746 enable_protochain
747 with_pcap
748 with_libnl
749 enable_packet_ring
750 enable_ipv6
751 with_dag
752 with_dag_includes
753 with_dag_libraries
754 with_septel
755 with_snf
756 with_snf_includes
757 with_snf_libraries
758 with_turbocap
759 enable_remote
760 enable_optimizer_dbg
761 enable_yydebug
762 enable_universal
763 enable_shared
764 enable_usb
765 enable_netmap
766 with_dpdk
767 enable_bluetooth
768 enable_dbus
769 enable_rdma
770 '
771 ac_precious_vars='build_alias
772 host_alias
773 target_alias
774 CC
775 CFLAGS
776 LDFLAGS
777 LIBS
778 CPPFLAGS
779 CXX
780 CXXFLAGS
781 CCC
782 CPP
783 YACC
784 YFLAGS'
785
786
787 # Initialize some variables set by options.
788 ac_init_help=
789 ac_init_version=false
790 ac_unrecognized_opts=
791 ac_unrecognized_sep=
792 # The variables have the same names as the options, with
793 # dashes changed to underlines.
794 cache_file=/dev/null
795 exec_prefix=NONE
796 no_create=
797 no_recursion=
798 prefix=NONE
799 program_prefix=NONE
800 program_suffix=NONE
801 program_transform_name=s,x,x,
802 silent=
803 site=
804 srcdir=
805 verbose=
806 x_includes=NONE
807 x_libraries=NONE
808
809 # Installation directory options.
810 # These are left unexpanded so users can "make install exec_prefix=/foo"
811 # and all the variables that are supposed to be based on exec_prefix
812 # by default will actually change.
813 # Use braces instead of parens because sh, perl, etc. also accept them.
814 # (The list follows the same order as the GNU Coding Standards.)
815 bindir='${exec_prefix}/bin'
816 sbindir='${exec_prefix}/sbin'
817 libexecdir='${exec_prefix}/libexec'
818 datarootdir='${prefix}/share'
819 datadir='${datarootdir}'
820 sysconfdir='${prefix}/etc'
821 sharedstatedir='${prefix}/com'
822 localstatedir='${prefix}/var'
823 includedir='${prefix}/include'
824 oldincludedir='/usr/include'
825 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
826 infodir='${datarootdir}/info'
827 htmldir='${docdir}'
828 dvidir='${docdir}'
829 pdfdir='${docdir}'
830 psdir='${docdir}'
831 libdir='${exec_prefix}/lib'
832 localedir='${datarootdir}/locale'
833 mandir='${datarootdir}/man'
834
835 ac_prev=
836 ac_dashdash=
837 for ac_option
838 do
839 # If the previous option needs an argument, assign it.
840 if test -n "$ac_prev"; then
841 eval $ac_prev=\$ac_option
842 ac_prev=
843 continue
844 fi
845
846 case $ac_option in
847 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
848 *=) ac_optarg= ;;
849 *) ac_optarg=yes ;;
850 esac
851
852 # Accept the important Cygnus configure options, so we can diagnose typos.
853
854 case $ac_dashdash$ac_option in
855 --)
856 ac_dashdash=yes ;;
857
858 -bindir | --bindir | --bindi | --bind | --bin | --bi)
859 ac_prev=bindir ;;
860 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
861 bindir=$ac_optarg ;;
862
863 -build | --build | --buil | --bui | --bu)
864 ac_prev=build_alias ;;
865 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
866 build_alias=$ac_optarg ;;
867
868 -cache-file | --cache-file | --cache-fil | --cache-fi \
869 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
870 ac_prev=cache_file ;;
871 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
872 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
873 cache_file=$ac_optarg ;;
874
875 --config-cache | -C)
876 cache_file=config.cache ;;
877
878 -datadir | --datadir | --datadi | --datad)
879 ac_prev=datadir ;;
880 -datadir=* | --datadir=* | --datadi=* | --datad=*)
881 datadir=$ac_optarg ;;
882
883 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
884 | --dataroo | --dataro | --datar)
885 ac_prev=datarootdir ;;
886 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
887 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
888 datarootdir=$ac_optarg ;;
889
890 -disable-* | --disable-*)
891 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
892 # Reject names that are not valid shell variable names.
893 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
894 as_fn_error $? "invalid feature name: $ac_useropt"
895 ac_useropt_orig=$ac_useropt
896 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
897 case $ac_user_opts in
898 *"
899 "enable_$ac_useropt"
900 "*) ;;
901 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
902 ac_unrecognized_sep=', ';;
903 esac
904 eval enable_$ac_useropt=no ;;
905
906 -docdir | --docdir | --docdi | --doc | --do)
907 ac_prev=docdir ;;
908 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909 docdir=$ac_optarg ;;
910
911 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912 ac_prev=dvidir ;;
913 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914 dvidir=$ac_optarg ;;
915
916 -enable-* | --enable-*)
917 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
918 # Reject names that are not valid shell variable names.
919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
920 as_fn_error $? "invalid feature name: $ac_useropt"
921 ac_useropt_orig=$ac_useropt
922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923 case $ac_user_opts in
924 *"
925 "enable_$ac_useropt"
926 "*) ;;
927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
928 ac_unrecognized_sep=', ';;
929 esac
930 eval enable_$ac_useropt=\$ac_optarg ;;
931
932 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
933 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
934 | --exec | --exe | --ex)
935 ac_prev=exec_prefix ;;
936 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
937 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
938 | --exec=* | --exe=* | --ex=*)
939 exec_prefix=$ac_optarg ;;
940
941 -gas | --gas | --ga | --g)
942 # Obsolete; use --with-gas.
943 with_gas=yes ;;
944
945 -help | --help | --hel | --he | -h)
946 ac_init_help=long ;;
947 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
948 ac_init_help=recursive ;;
949 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
950 ac_init_help=short ;;
951
952 -host | --host | --hos | --ho)
953 ac_prev=host_alias ;;
954 -host=* | --host=* | --hos=* | --ho=*)
955 host_alias=$ac_optarg ;;
956
957 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
958 ac_prev=htmldir ;;
959 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
960 | --ht=*)
961 htmldir=$ac_optarg ;;
962
963 -includedir | --includedir | --includedi | --included | --include \
964 | --includ | --inclu | --incl | --inc)
965 ac_prev=includedir ;;
966 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
967 | --includ=* | --inclu=* | --incl=* | --inc=*)
968 includedir=$ac_optarg ;;
969
970 -infodir | --infodir | --infodi | --infod | --info | --inf)
971 ac_prev=infodir ;;
972 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
973 infodir=$ac_optarg ;;
974
975 -libdir | --libdir | --libdi | --libd)
976 ac_prev=libdir ;;
977 -libdir=* | --libdir=* | --libdi=* | --libd=*)
978 libdir=$ac_optarg ;;
979
980 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
981 | --libexe | --libex | --libe)
982 ac_prev=libexecdir ;;
983 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
984 | --libexe=* | --libex=* | --libe=*)
985 libexecdir=$ac_optarg ;;
986
987 -localedir | --localedir | --localedi | --localed | --locale)
988 ac_prev=localedir ;;
989 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
990 localedir=$ac_optarg ;;
991
992 -localstatedir | --localstatedir | --localstatedi | --localstated \
993 | --localstate | --localstat | --localsta | --localst | --locals)
994 ac_prev=localstatedir ;;
995 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
996 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
997 localstatedir=$ac_optarg ;;
998
999 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1000 ac_prev=mandir ;;
1001 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1002 mandir=$ac_optarg ;;
1003
1004 -nfp | --nfp | --nf)
1005 # Obsolete; use --without-fp.
1006 with_fp=no ;;
1007
1008 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1009 | --no-cr | --no-c | -n)
1010 no_create=yes ;;
1011
1012 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1013 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1014 no_recursion=yes ;;
1015
1016 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1017 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1018 | --oldin | --oldi | --old | --ol | --o)
1019 ac_prev=oldincludedir ;;
1020 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1021 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1022 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1023 oldincludedir=$ac_optarg ;;
1024
1025 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1026 ac_prev=prefix ;;
1027 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1028 prefix=$ac_optarg ;;
1029
1030 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1031 | --program-pre | --program-pr | --program-p)
1032 ac_prev=program_prefix ;;
1033 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1034 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1035 program_prefix=$ac_optarg ;;
1036
1037 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1038 | --program-suf | --program-su | --program-s)
1039 ac_prev=program_suffix ;;
1040 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1041 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1042 program_suffix=$ac_optarg ;;
1043
1044 -program-transform-name | --program-transform-name \
1045 | --program-transform-nam | --program-transform-na \
1046 | --program-transform-n | --program-transform- \
1047 | --program-transform | --program-transfor \
1048 | --program-transfo | --program-transf \
1049 | --program-trans | --program-tran \
1050 | --progr-tra | --program-tr | --program-t)
1051 ac_prev=program_transform_name ;;
1052 -program-transform-name=* | --program-transform-name=* \
1053 | --program-transform-nam=* | --program-transform-na=* \
1054 | --program-transform-n=* | --program-transform-=* \
1055 | --program-transform=* | --program-transfor=* \
1056 | --program-transfo=* | --program-transf=* \
1057 | --program-trans=* | --program-tran=* \
1058 | --progr-tra=* | --program-tr=* | --program-t=*)
1059 program_transform_name=$ac_optarg ;;
1060
1061 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1062 ac_prev=pdfdir ;;
1063 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1064 pdfdir=$ac_optarg ;;
1065
1066 -psdir | --psdir | --psdi | --psd | --ps)
1067 ac_prev=psdir ;;
1068 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1069 psdir=$ac_optarg ;;
1070
1071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072 | -silent | --silent | --silen | --sile | --sil)
1073 silent=yes ;;
1074
1075 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1076 ac_prev=sbindir ;;
1077 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1078 | --sbi=* | --sb=*)
1079 sbindir=$ac_optarg ;;
1080
1081 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1082 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1083 | --sharedst | --shareds | --shared | --share | --shar \
1084 | --sha | --sh)
1085 ac_prev=sharedstatedir ;;
1086 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1087 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1088 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1089 | --sha=* | --sh=*)
1090 sharedstatedir=$ac_optarg ;;
1091
1092 -site | --site | --sit)
1093 ac_prev=site ;;
1094 -site=* | --site=* | --sit=*)
1095 site=$ac_optarg ;;
1096
1097 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1098 ac_prev=srcdir ;;
1099 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1100 srcdir=$ac_optarg ;;
1101
1102 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1103 | --syscon | --sysco | --sysc | --sys | --sy)
1104 ac_prev=sysconfdir ;;
1105 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1106 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1107 sysconfdir=$ac_optarg ;;
1108
1109 -target | --target | --targe | --targ | --tar | --ta | --t)
1110 ac_prev=target_alias ;;
1111 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1112 target_alias=$ac_optarg ;;
1113
1114 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1115 verbose=yes ;;
1116
1117 -version | --version | --versio | --versi | --vers | -V)
1118 ac_init_version=: ;;
1119
1120 -with-* | --with-*)
1121 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1122 # Reject names that are not valid shell variable names.
1123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1124 as_fn_error $? "invalid package name: $ac_useropt"
1125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129 "with_$ac_useropt"
1130 "*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=\$ac_optarg ;;
1135
1136 -without-* | --without-*)
1137 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1138 # Reject names that are not valid shell variable names.
1139 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1140 as_fn_error $? "invalid package name: $ac_useropt"
1141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145 "with_$ac_useropt"
1146 "*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
1149 esac
1150 eval with_$ac_useropt=no ;;
1151
1152 --x)
1153 # Obsolete; use --with-x.
1154 with_x=yes ;;
1155
1156 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1157 | --x-incl | --x-inc | --x-in | --x-i)
1158 ac_prev=x_includes ;;
1159 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1160 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1161 x_includes=$ac_optarg ;;
1162
1163 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1164 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1165 ac_prev=x_libraries ;;
1166 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1167 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1168 x_libraries=$ac_optarg ;;
1169
1170 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1171 Try \`$0 --help' for more information"
1172 ;;
1173
1174 *=*)
1175 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1176 # Reject names that are not valid shell variable names.
1177 case $ac_envvar in #(
1178 '' | [0-9]* | *[!_$as_cr_alnum]* )
1179 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1180 esac
1181 eval $ac_envvar=\$ac_optarg
1182 export $ac_envvar ;;
1183
1184 *)
1185 # FIXME: should be removed in autoconf 3.0.
1186 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1187 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1188 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1189 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1190 ;;
1191
1192 esac
1193 done
1194
1195 if test -n "$ac_prev"; then
1196 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1197 as_fn_error $? "missing argument to $ac_option"
1198 fi
1199
1200 if test -n "$ac_unrecognized_opts"; then
1201 case $enable_option_checking in
1202 no) ;;
1203 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1204 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1205 esac
1206 fi
1207
1208 # Check all directory arguments for consistency.
1209 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1210 datadir sysconfdir sharedstatedir localstatedir includedir \
1211 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1212 libdir localedir mandir
1213 do
1214 eval ac_val=\$$ac_var
1215 # Remove trailing slashes.
1216 case $ac_val in
1217 */ )
1218 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1219 eval $ac_var=\$ac_val;;
1220 esac
1221 # Be sure to have absolute directory names.
1222 case $ac_val in
1223 [\\/$]* | ?:[\\/]* ) continue;;
1224 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1225 esac
1226 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1227 done
1228
1229 # There might be people who depend on the old broken behavior: `$host'
1230 # used to hold the argument of --host etc.
1231 # FIXME: To remove some day.
1232 build=$build_alias
1233 host=$host_alias
1234 target=$target_alias
1235
1236 # FIXME: To remove some day.
1237 if test "x$host_alias" != x; then
1238 if test "x$build_alias" = x; then
1239 cross_compiling=maybe
1240 elif test "x$build_alias" != "x$host_alias"; then
1241 cross_compiling=yes
1242 fi
1243 fi
1244
1245 ac_tool_prefix=
1246 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1247
1248 test "$silent" = yes && exec 6>/dev/null
1249
1250
1251 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1252 ac_ls_di=`ls -di .` &&
1253 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1254 as_fn_error $? "working directory cannot be determined"
1255 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1256 as_fn_error $? "pwd does not report name of working directory"
1257
1258
1259 # Find the source files, if location was not specified.
1260 if test -z "$srcdir"; then
1261 ac_srcdir_defaulted=yes
1262 # Try the directory containing this script, then the parent directory.
1263 ac_confdir=`$as_dirname -- "$as_myself" ||
1264 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1265 X"$as_myself" : 'X\(//\)[^/]' \| \
1266 X"$as_myself" : 'X\(//\)$' \| \
1267 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1268 $as_echo X"$as_myself" |
1269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1270 s//\1/
1271 q
1272 }
1273 /^X\(\/\/\)[^/].*/{
1274 s//\1/
1275 q
1276 }
1277 /^X\(\/\/\)$/{
1278 s//\1/
1279 q
1280 }
1281 /^X\(\/\).*/{
1282 s//\1/
1283 q
1284 }
1285 s/.*/./; q'`
1286 srcdir=$ac_confdir
1287 if test ! -r "$srcdir/$ac_unique_file"; then
1288 srcdir=..
1289 fi
1290 else
1291 ac_srcdir_defaulted=no
1292 fi
1293 if test ! -r "$srcdir/$ac_unique_file"; then
1294 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1295 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1296 fi
1297 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1298 ac_abs_confdir=`(
1299 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1300 pwd)`
1301 # When building in place, set srcdir=.
1302 if test "$ac_abs_confdir" = "$ac_pwd"; then
1303 srcdir=.
1304 fi
1305 # Remove unnecessary trailing slashes from srcdir.
1306 # Double slashes in file names in object file debugging info
1307 # mess up M-x gdb in Emacs.
1308 case $srcdir in
1309 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1310 esac
1311 for ac_var in $ac_precious_vars; do
1312 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_env_${ac_var}_value=\$${ac_var}
1314 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1315 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1316 done
1317
1318 #
1319 # Report the --help message.
1320 #
1321 if test "$ac_init_help" = "long"; then
1322 # Omit some internal or obsolete options to make the list less imposing.
1323 # This message is too long to be a string in the A/UX 3.1 sh.
1324 cat <<_ACEOF
1325 \`configure' configures pcap 1.10.0-PRE-GIT to adapt to many kinds of systems.
1326
1327 Usage: $0 [OPTION]... [VAR=VALUE]...
1328
1329 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1330 VAR=VALUE. See below for descriptions of some of the useful variables.
1331
1332 Defaults for the options are specified in brackets.
1333
1334 Configuration:
1335 -h, --help display this help and exit
1336 --help=short display options specific to this package
1337 --help=recursive display the short help of all the included packages
1338 -V, --version display version information and exit
1339 -q, --quiet, --silent do not print \`checking ...' messages
1340 --cache-file=FILE cache test results in FILE [disabled]
1341 -C, --config-cache alias for \`--cache-file=config.cache'
1342 -n, --no-create do not create output files
1343 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1344
1345 Installation directories:
1346 --prefix=PREFIX install architecture-independent files in PREFIX
1347 [$ac_default_prefix]
1348 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1349 [PREFIX]
1350
1351 By default, \`make install' will install all the files in
1352 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1353 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1354 for instance \`--prefix=\$HOME'.
1355
1356 For better control, use the options below.
1357
1358 Fine tuning of the installation directories:
1359 --bindir=DIR user executables [EPREFIX/bin]
1360 --sbindir=DIR system admin executables [EPREFIX/sbin]
1361 --libexecdir=DIR program executables [EPREFIX/libexec]
1362 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1363 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1364 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1365 --libdir=DIR object code libraries [EPREFIX/lib]
1366 --includedir=DIR C header files [PREFIX/include]
1367 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1368 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1369 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1370 --infodir=DIR info documentation [DATAROOTDIR/info]
1371 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1372 --mandir=DIR man documentation [DATAROOTDIR/man]
1373 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap]
1374 --htmldir=DIR html documentation [DOCDIR]
1375 --dvidir=DIR dvi documentation [DOCDIR]
1376 --pdfdir=DIR pdf documentation [DOCDIR]
1377 --psdir=DIR ps documentation [DOCDIR]
1378 _ACEOF
1379
1380 cat <<\_ACEOF
1381
1382 System types:
1383 --build=BUILD configure for building on BUILD [guessed]
1384 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1385 --target=TARGET configure for building compilers for TARGET [HOST]
1386 _ACEOF
1387 fi
1388
1389 if test -n "$ac_init_help"; then
1390 case $ac_init_help in
1391 short | recursive ) echo "Configuration of pcap 1.10.0-PRE-GIT:";;
1392 esac
1393 cat <<\_ACEOF
1394
1395 Optional Features:
1396 --disable-option-checking ignore unrecognized --enable/--with options
1397 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1398 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1399 --disable-largefile omit support for large files
1400 --disable-protochain disable \"protochain\" insn
1401 --enable-packet-ring enable packet ring support on Linux [default=yes]
1402 --enable-ipv6 build IPv6-capable version [default=yes]
1403 --enable-remote enable remote packet capture [default=no]
1404 --disable-remote disable remote packet capture
1405 --enable-optimizer-dbg build optimizer debugging code
1406 --enable-yydebug build parser debugging code
1407 --disable-universal don't build universal on macOS
1408 --enable-shared build shared libraries [default=yes, if support
1409 available]
1410 --enable-usb enable USB capture support [default=yes, if support
1411 available]
1412 --enable-netmap enable netmap support [default=yes, if support
1413 available]
1414 --enable-bluetooth enable Bluetooth support [default=yes, if support
1415 available]
1416 --enable-dbus enable D-Bus capture support [default=yes, if
1417 support available]
1418 --enable-rdma enable RDMA capture support [default=yes, if support
1419 available]
1420
1421 Optional Packages:
1422 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1423 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1424 --without-gcc don't use gcc
1425 --with-pcap=TYPE use packet capture TYPE
1426 --without-libnl disable libnl support [default=yes, on Linux, if
1427 present]
1428 --with-dag[=DIR] include Endace DAG support (located in directory
1429 DIR, if supplied). [default=yes, if present]
1430 --with-dag-includes=IDIR
1431 Endace DAG include directory, if not DIR/include
1432 --with-dag-libraries=LDIR
1433 Endace DAG library directory, if not DIR/lib
1434 --with-septel[=DIR] include Septel support (located in directory DIR, if
1435 supplied). [default=yes, if present]
1436 --with-snf[=DIR] include Myricom SNF support (located in directory
1437 DIR, if supplied). [default=yes, if present]
1438 --with-snf-includes=IDIR
1439 Myricom SNF include directory, if not DIR/include
1440 --with-snf-libraries=LDIR
1441 Myricom SNF library directory, if not DIR/lib
1442 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1443 directory DIR, if supplied). [default=yes, if
1444 present]
1445 --with-dpdk[=DIR] include DPDK support (located in directory DIR, if
1446 supplied). [default=yes, if present]
1447
1448 Some influential environment variables:
1449 CC C compiler command
1450 CFLAGS C compiler flags
1451 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1452 nonstandard directory <lib dir>
1453 LIBS libraries to pass to the linker, e.g. -l<library>
1454 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1455 you have headers in a nonstandard directory <include dir>
1456 CXX C++ compiler command
1457 CXXFLAGS C++ compiler flags
1458 CPP C preprocessor
1459 YACC The `Yet Another Compiler Compiler' implementation to use.
1460 Defaults to the first program found out of: `bison -y', `byacc',
1461 `yacc'.
1462 YFLAGS The list of arguments that will be passed by default to $YACC.
1463 This script will default YFLAGS to the empty string to avoid a
1464 default value of `-d' given by some make applications.
1465
1466 Use these variables to override the choices made by `configure' or to help
1467 it to find libraries and programs with nonstandard names/locations.
1468
1469 Report bugs to the package provider.
1470 _ACEOF
1471 ac_status=$?
1472 fi
1473
1474 if test "$ac_init_help" = "recursive"; then
1475 # If there are subdirs, report their specific --help.
1476 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1477 test -d "$ac_dir" ||
1478 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1479 continue
1480 ac_builddir=.
1481
1482 case "$ac_dir" in
1483 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484 *)
1485 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1486 # A ".." for each directory in $ac_dir_suffix.
1487 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1488 case $ac_top_builddir_sub in
1489 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1491 esac ;;
1492 esac
1493 ac_abs_top_builddir=$ac_pwd
1494 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1495 # for backward compatibility:
1496 ac_top_builddir=$ac_top_build_prefix
1497
1498 case $srcdir in
1499 .) # We are building in place.
1500 ac_srcdir=.
1501 ac_top_srcdir=$ac_top_builddir_sub
1502 ac_abs_top_srcdir=$ac_pwd ;;
1503 [\\/]* | ?:[\\/]* ) # Absolute name.
1504 ac_srcdir=$srcdir$ac_dir_suffix;
1505 ac_top_srcdir=$srcdir
1506 ac_abs_top_srcdir=$srcdir ;;
1507 *) # Relative name.
1508 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1509 ac_top_srcdir=$ac_top_build_prefix$srcdir
1510 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1511 esac
1512 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1513
1514 cd "$ac_dir" || { ac_status=$?; continue; }
1515 # Check for guested configure.
1516 if test -f "$ac_srcdir/configure.gnu"; then
1517 echo &&
1518 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1519 elif test -f "$ac_srcdir/configure"; then
1520 echo &&
1521 $SHELL "$ac_srcdir/configure" --help=recursive
1522 else
1523 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1524 fi || ac_status=$?
1525 cd "$ac_pwd" || { ac_status=$?; break; }
1526 done
1527 fi
1528
1529 test -n "$ac_init_help" && exit $ac_status
1530 if $ac_init_version; then
1531 cat <<\_ACEOF
1532 pcap configure 1.10.0-PRE-GIT
1533 generated by GNU Autoconf 2.69
1534
1535 Copyright (C) 2012 Free Software Foundation, Inc.
1536 This configure script is free software; the Free Software Foundation
1537 gives unlimited permission to copy, distribute and modify it.
1538 _ACEOF
1539 exit
1540 fi
1541
1542 ## ------------------------ ##
1543 ## Autoconf initialization. ##
1544 ## ------------------------ ##
1545
1546 # ac_fn_c_try_compile LINENO
1547 # --------------------------
1548 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1549 ac_fn_c_try_compile ()
1550 {
1551 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1552 rm -f conftest.$ac_objext
1553 if { { ac_try="$ac_compile"
1554 case "(($ac_try" in
1555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1556 *) ac_try_echo=$ac_try;;
1557 esac
1558 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1559 $as_echo "$ac_try_echo"; } >&5
1560 (eval "$ac_compile") 2>conftest.err
1561 ac_status=$?
1562 if test -s conftest.err; then
1563 grep -v '^ *+' conftest.err >conftest.er1
1564 cat conftest.er1 >&5
1565 mv -f conftest.er1 conftest.err
1566 fi
1567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1568 test $ac_status = 0; } && {
1569 test -z "$ac_c_werror_flag" ||
1570 test ! -s conftest.err
1571 } && test -s conftest.$ac_objext; then :
1572 ac_retval=0
1573 else
1574 $as_echo "$as_me: failed program was:" >&5
1575 sed 's/^/| /' conftest.$ac_ext >&5
1576
1577 ac_retval=1
1578 fi
1579 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1580 as_fn_set_status $ac_retval
1581
1582 } # ac_fn_c_try_compile
1583
1584 # ac_fn_cxx_try_compile LINENO
1585 # ----------------------------
1586 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1587 ac_fn_cxx_try_compile ()
1588 {
1589 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1590 rm -f conftest.$ac_objext
1591 if { { ac_try="$ac_compile"
1592 case "(($ac_try" in
1593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1594 *) ac_try_echo=$ac_try;;
1595 esac
1596 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1597 $as_echo "$ac_try_echo"; } >&5
1598 (eval "$ac_compile") 2>conftest.err
1599 ac_status=$?
1600 if test -s conftest.err; then
1601 grep -v '^ *+' conftest.err >conftest.er1
1602 cat conftest.er1 >&5
1603 mv -f conftest.er1 conftest.err
1604 fi
1605 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1606 test $ac_status = 0; } && {
1607 test -z "$ac_cxx_werror_flag" ||
1608 test ! -s conftest.err
1609 } && test -s conftest.$ac_objext; then :
1610 ac_retval=0
1611 else
1612 $as_echo "$as_me: failed program was:" >&5
1613 sed 's/^/| /' conftest.$ac_ext >&5
1614
1615 ac_retval=1
1616 fi
1617 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1618 as_fn_set_status $ac_retval
1619
1620 } # ac_fn_cxx_try_compile
1621
1622 # ac_fn_c_try_link LINENO
1623 # -----------------------
1624 # Try to link conftest.$ac_ext, and return whether this succeeded.
1625 ac_fn_c_try_link ()
1626 {
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 rm -f conftest.$ac_objext conftest$ac_exeext
1629 if { { ac_try="$ac_link"
1630 case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633 esac
1634 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635 $as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_link") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644 test $ac_status = 0; } && {
1645 test -z "$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 } && test -s conftest$ac_exeext && {
1648 test "$cross_compiling" = yes ||
1649 test -x conftest$ac_exeext
1650 }; then :
1651 ac_retval=0
1652 else
1653 $as_echo "$as_me: failed program was:" >&5
1654 sed 's/^/| /' conftest.$ac_ext >&5
1655
1656 ac_retval=1
1657 fi
1658 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1659 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1660 # interfere with the next link command; also delete a directory that is
1661 # left behind by Apple's compiler. We do this before executing the actions.
1662 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1663 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1664 as_fn_set_status $ac_retval
1665
1666 } # ac_fn_c_try_link
1667
1668 # ac_fn_c_try_cpp LINENO
1669 # ----------------------
1670 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1671 ac_fn_c_try_cpp ()
1672 {
1673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1674 if { { ac_try="$ac_cpp conftest.$ac_ext"
1675 case "(($ac_try" in
1676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1677 *) ac_try_echo=$ac_try;;
1678 esac
1679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1680 $as_echo "$ac_try_echo"; } >&5
1681 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1682 ac_status=$?
1683 if test -s conftest.err; then
1684 grep -v '^ *+' conftest.err >conftest.er1
1685 cat conftest.er1 >&5
1686 mv -f conftest.er1 conftest.err
1687 fi
1688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1689 test $ac_status = 0; } > conftest.i && {
1690 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1691 test ! -s conftest.err
1692 }; then :
1693 ac_retval=0
1694 else
1695 $as_echo "$as_me: failed program was:" >&5
1696 sed 's/^/| /' conftest.$ac_ext >&5
1697
1698 ac_retval=1
1699 fi
1700 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1701 as_fn_set_status $ac_retval
1702
1703 } # ac_fn_c_try_cpp
1704
1705 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1706 # -------------------------------------------------------
1707 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1708 # the include files in INCLUDES and setting the cache variable VAR
1709 # accordingly.
1710 ac_fn_c_check_header_mongrel ()
1711 {
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1713 if eval \${$3+:} false; then :
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1715 $as_echo_n "checking for $2... " >&6; }
1716 if eval \${$3+:} false; then :
1717 $as_echo_n "(cached) " >&6
1718 fi
1719 eval ac_res=\$$3
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1721 $as_echo "$ac_res" >&6; }
1722 else
1723 # Is the header compilable?
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1725 $as_echo_n "checking $2 usability... " >&6; }
1726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1727 /* end confdefs.h. */
1728 $4
1729 #include <$2>
1730 _ACEOF
1731 if ac_fn_c_try_compile "$LINENO"; then :
1732 ac_header_compiler=yes
1733 else
1734 ac_header_compiler=no
1735 fi
1736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1738 $as_echo "$ac_header_compiler" >&6; }
1739
1740 # Is the header present?
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1742 $as_echo_n "checking $2 presence... " >&6; }
1743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744 /* end confdefs.h. */
1745 #include <$2>
1746 _ACEOF
1747 if ac_fn_c_try_cpp "$LINENO"; then :
1748 ac_header_preproc=yes
1749 else
1750 ac_header_preproc=no
1751 fi
1752 rm -f conftest.err conftest.i conftest.$ac_ext
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1754 $as_echo "$ac_header_preproc" >&6; }
1755
1756 # So? What about this header?
1757 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1758 yes:no: )
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1760 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1762 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1763 ;;
1764 no:yes:* )
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1766 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1768 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1770 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1772 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1774 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1775 ;;
1776 esac
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778 $as_echo_n "checking for $2... " >&6; }
1779 if eval \${$3+:} false; then :
1780 $as_echo_n "(cached) " >&6
1781 else
1782 eval "$3=\$ac_header_compiler"
1783 fi
1784 eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786 $as_echo "$ac_res" >&6; }
1787 fi
1788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1789
1790 } # ac_fn_c_check_header_mongrel
1791
1792 # ac_fn_c_try_run LINENO
1793 # ----------------------
1794 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1795 # that executables *can* be run.
1796 ac_fn_c_try_run ()
1797 {
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 if { { ac_try="$ac_link"
1800 case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803 esac
1804 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805 $as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_link") 2>&5
1807 ac_status=$?
1808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1809 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1810 { { case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813 esac
1814 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815 $as_echo "$ac_try_echo"; } >&5
1816 (eval "$ac_try") 2>&5
1817 ac_status=$?
1818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819 test $ac_status = 0; }; }; then :
1820 ac_retval=0
1821 else
1822 $as_echo "$as_me: program exited with status $ac_status" >&5
1823 $as_echo "$as_me: failed program was:" >&5
1824 sed 's/^/| /' conftest.$ac_ext >&5
1825
1826 ac_retval=$ac_status
1827 fi
1828 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1829 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1830 as_fn_set_status $ac_retval
1831
1832 } # ac_fn_c_try_run
1833
1834 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1835 # -------------------------------------------------------
1836 # Tests whether HEADER exists and can be compiled using the include files in
1837 # INCLUDES, setting the cache variable VAR accordingly.
1838 ac_fn_c_check_header_compile ()
1839 {
1840 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842 $as_echo_n "checking for $2... " >&6; }
1843 if eval \${$3+:} false; then :
1844 $as_echo_n "(cached) " >&6
1845 else
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847 /* end confdefs.h. */
1848 $4
1849 #include <$2>
1850 _ACEOF
1851 if ac_fn_c_try_compile "$LINENO"; then :
1852 eval "$3=yes"
1853 else
1854 eval "$3=no"
1855 fi
1856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857 fi
1858 eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1862
1863 } # ac_fn_c_check_header_compile
1864
1865 # ac_fn_c_check_func LINENO FUNC VAR
1866 # ----------------------------------
1867 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1868 ac_fn_c_check_func ()
1869 {
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1872 $as_echo_n "checking for $2... " >&6; }
1873 if eval \${$3+:} false; then :
1874 $as_echo_n "(cached) " >&6
1875 else
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877 /* end confdefs.h. */
1878 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1879 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1880 #define $2 innocuous_$2
1881
1882 /* System header to define __stub macros and hopefully few prototypes,
1883 which can conflict with char $2 (); below.
1884 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1885 <limits.h> exists even on freestanding compilers. */
1886
1887 #ifdef __STDC__
1888 # include <limits.h>
1889 #else
1890 # include <assert.h>
1891 #endif
1892
1893 #undef $2
1894
1895 /* Override any GCC internal prototype to avoid an error.
1896 Use char because int might match the return type of a GCC
1897 builtin and then its argument prototype would still apply. */
1898 #ifdef __cplusplus
1899 extern "C"
1900 #endif
1901 char $2 ();
1902 /* The GNU C library defines this for functions which it implements
1903 to always fail with ENOSYS. Some functions are actually named
1904 something starting with __ and the normal name is an alias. */
1905 #if defined __stub_$2 || defined __stub___$2
1906 choke me
1907 #endif
1908
1909 int
1910 main ()
1911 {
1912 return $2 ();
1913 ;
1914 return 0;
1915 }
1916 _ACEOF
1917 if ac_fn_c_try_link "$LINENO"; then :
1918 eval "$3=yes"
1919 else
1920 eval "$3=no"
1921 fi
1922 rm -f core conftest.err conftest.$ac_objext \
1923 conftest$ac_exeext conftest.$ac_ext
1924 fi
1925 eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927 $as_echo "$ac_res" >&6; }
1928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1929
1930 } # ac_fn_c_check_func
1931
1932 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1933 # ---------------------------------------------
1934 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1935 # accordingly.
1936 ac_fn_c_check_decl ()
1937 {
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 as_decl_name=`echo $2|sed 's/ *(.*//'`
1940 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1942 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1943 if eval \${$3+:} false; then :
1944 $as_echo_n "(cached) " >&6
1945 else
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947 /* end confdefs.h. */
1948 $4
1949 int
1950 main ()
1951 {
1952 #ifndef $as_decl_name
1953 #ifdef __cplusplus
1954 (void) $as_decl_use;
1955 #else
1956 (void) $as_decl_name;
1957 #endif
1958 #endif
1959
1960 ;
1961 return 0;
1962 }
1963 _ACEOF
1964 if ac_fn_c_try_compile "$LINENO"; then :
1965 eval "$3=yes"
1966 else
1967 eval "$3=no"
1968 fi
1969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973 $as_echo "$ac_res" >&6; }
1974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975
1976 } # ac_fn_c_check_decl
1977
1978 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1979 # -------------------------------------------
1980 # Tests whether TYPE exists after having included INCLUDES, setting cache
1981 # variable VAR accordingly.
1982 ac_fn_c_check_type ()
1983 {
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986 $as_echo_n "checking for $2... " >&6; }
1987 if eval \${$3+:} false; then :
1988 $as_echo_n "(cached) " >&6
1989 else
1990 eval "$3=no"
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992 /* end confdefs.h. */
1993 $4
1994 int
1995 main ()
1996 {
1997 if (sizeof ($2))
1998 return 0;
1999 ;
2000 return 0;
2001 }
2002 _ACEOF
2003 if ac_fn_c_try_compile "$LINENO"; then :
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005 /* end confdefs.h. */
2006 $4
2007 int
2008 main ()
2009 {
2010 if (sizeof (($2)))
2011 return 0;
2012 ;
2013 return 0;
2014 }
2015 _ACEOF
2016 if ac_fn_c_try_compile "$LINENO"; then :
2017
2018 else
2019 eval "$3=yes"
2020 fi
2021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 fi
2023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 fi
2025 eval ac_res=\$$3
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027 $as_echo "$ac_res" >&6; }
2028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029
2030 } # ac_fn_c_check_type
2031
2032 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2033 # ----------------------------------------------------
2034 # Tries to find if the field MEMBER exists in type AGGR, after including
2035 # INCLUDES, setting cache variable VAR accordingly.
2036 ac_fn_c_check_member ()
2037 {
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2040 $as_echo_n "checking for $2.$3... " >&6; }
2041 if eval \${$4+:} false; then :
2042 $as_echo_n "(cached) " >&6
2043 else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h. */
2046 $5
2047 int
2048 main ()
2049 {
2050 static $2 ac_aggr;
2051 if (ac_aggr.$3)
2052 return 0;
2053 ;
2054 return 0;
2055 }
2056 _ACEOF
2057 if ac_fn_c_try_compile "$LINENO"; then :
2058 eval "$4=yes"
2059 else
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h. */
2062 $5
2063 int
2064 main ()
2065 {
2066 static $2 ac_aggr;
2067 if (sizeof ac_aggr.$3)
2068 return 0;
2069 ;
2070 return 0;
2071 }
2072 _ACEOF
2073 if ac_fn_c_try_compile "$LINENO"; then :
2074 eval "$4=yes"
2075 else
2076 eval "$4=no"
2077 fi
2078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 fi
2080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 fi
2082 eval ac_res=\$$4
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2084 $as_echo "$ac_res" >&6; }
2085 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2086
2087 } # ac_fn_c_check_member
2088 cat >config.log <<_ACEOF
2089 This file contains any messages produced by compilers while
2090 running configure, to aid debugging if configure makes a mistake.
2091
2092 It was created by pcap $as_me 1.10.0-PRE-GIT, which was
2093 generated by GNU Autoconf 2.69. Invocation command line was
2094
2095 $ $0 $@
2096
2097 _ACEOF
2098 exec 5>>config.log
2099 {
2100 cat <<_ASUNAME
2101 ## --------- ##
2102 ## Platform. ##
2103 ## --------- ##
2104
2105 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2106 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2107 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2108 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2109 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2110
2111 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2112 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2113
2114 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2115 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2116 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2117 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2118 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2119 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2120 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2121
2122 _ASUNAME
2123
2124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2125 for as_dir in $PATH
2126 do
2127 IFS=$as_save_IFS
2128 test -z "$as_dir" && as_dir=.
2129 $as_echo "PATH: $as_dir"
2130 done
2131 IFS=$as_save_IFS
2132
2133 } >&5
2134
2135 cat >&5 <<_ACEOF
2136
2137
2138 ## ----------- ##
2139 ## Core tests. ##
2140 ## ----------- ##
2141
2142 _ACEOF
2143
2144
2145 # Keep a trace of the command line.
2146 # Strip out --no-create and --no-recursion so they do not pile up.
2147 # Strip out --silent because we don't want to record it for future runs.
2148 # Also quote any args containing shell meta-characters.
2149 # Make two passes to allow for proper duplicate-argument suppression.
2150 ac_configure_args=
2151 ac_configure_args0=
2152 ac_configure_args1=
2153 ac_must_keep_next=false
2154 for ac_pass in 1 2
2155 do
2156 for ac_arg
2157 do
2158 case $ac_arg in
2159 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2160 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2161 | -silent | --silent | --silen | --sile | --sil)
2162 continue ;;
2163 *\'*)
2164 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2165 esac
2166 case $ac_pass in
2167 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2168 2)
2169 as_fn_append ac_configure_args1 " '$ac_arg'"
2170 if test $ac_must_keep_next = true; then
2171 ac_must_keep_next=false # Got value, back to normal.
2172 else
2173 case $ac_arg in
2174 *=* | --config-cache | -C | -disable-* | --disable-* \
2175 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2176 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2177 | -with-* | --with-* | -without-* | --without-* | --x)
2178 case "$ac_configure_args0 " in
2179 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2180 esac
2181 ;;
2182 -* ) ac_must_keep_next=true ;;
2183 esac
2184 fi
2185 as_fn_append ac_configure_args " '$ac_arg'"
2186 ;;
2187 esac
2188 done
2189 done
2190 { ac_configure_args0=; unset ac_configure_args0;}
2191 { ac_configure_args1=; unset ac_configure_args1;}
2192
2193 # When interrupted or exit'd, cleanup temporary files, and complete
2194 # config.log. We remove comments because anyway the quotes in there
2195 # would cause problems or look ugly.
2196 # WARNING: Use '\'' to represent an apostrophe within the trap.
2197 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2198 trap 'exit_status=$?
2199 # Save into config.log some information that might help in debugging.
2200 {
2201 echo
2202
2203 $as_echo "## ---------------- ##
2204 ## Cache variables. ##
2205 ## ---------------- ##"
2206 echo
2207 # The following way of writing the cache mishandles newlines in values,
2208 (
2209 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2210 eval ac_val=\$$ac_var
2211 case $ac_val in #(
2212 *${as_nl}*)
2213 case $ac_var in #(
2214 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2215 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2216 esac
2217 case $ac_var in #(
2218 _ | IFS | as_nl) ;; #(
2219 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2220 *) { eval $ac_var=; unset $ac_var;} ;;
2221 esac ;;
2222 esac
2223 done
2224 (set) 2>&1 |
2225 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2226 *${as_nl}ac_space=\ *)
2227 sed -n \
2228 "s/'\''/'\''\\\\'\'''\''/g;
2229 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2230 ;; #(
2231 *)
2232 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2233 ;;
2234 esac |
2235 sort
2236 )
2237 echo
2238
2239 $as_echo "## ----------------- ##
2240 ## Output variables. ##
2241 ## ----------------- ##"
2242 echo
2243 for ac_var in $ac_subst_vars
2244 do
2245 eval ac_val=\$$ac_var
2246 case $ac_val in
2247 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2248 esac
2249 $as_echo "$ac_var='\''$ac_val'\''"
2250 done | sort
2251 echo
2252
2253 if test -n "$ac_subst_files"; then
2254 $as_echo "## ------------------- ##
2255 ## File substitutions. ##
2256 ## ------------------- ##"
2257 echo
2258 for ac_var in $ac_subst_files
2259 do
2260 eval ac_val=\$$ac_var
2261 case $ac_val in
2262 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2263 esac
2264 $as_echo "$ac_var='\''$ac_val'\''"
2265 done | sort
2266 echo
2267 fi
2268
2269 if test -s confdefs.h; then
2270 $as_echo "## ----------- ##
2271 ## confdefs.h. ##
2272 ## ----------- ##"
2273 echo
2274 cat confdefs.h
2275 echo
2276 fi
2277 test "$ac_signal" != 0 &&
2278 $as_echo "$as_me: caught signal $ac_signal"
2279 $as_echo "$as_me: exit $exit_status"
2280 } >&5
2281 rm -f core *.core core.conftest.* &&
2282 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2283 exit $exit_status
2284 ' 0
2285 for ac_signal in 1 2 13 15; do
2286 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2287 done
2288 ac_signal=0
2289
2290 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2291 rm -f -r conftest* confdefs.h
2292
2293 $as_echo "/* confdefs.h */" > confdefs.h
2294
2295 # Predefined preprocessor variables.
2296
2297 cat >>confdefs.h <<_ACEOF
2298 #define PACKAGE_NAME "$PACKAGE_NAME"
2299 _ACEOF
2300
2301 cat >>confdefs.h <<_ACEOF
2302 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2303 _ACEOF
2304
2305 cat >>confdefs.h <<_ACEOF
2306 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2307 _ACEOF
2308
2309 cat >>confdefs.h <<_ACEOF
2310 #define PACKAGE_STRING "$PACKAGE_STRING"
2311 _ACEOF
2312
2313 cat >>confdefs.h <<_ACEOF
2314 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2315 _ACEOF
2316
2317 cat >>confdefs.h <<_ACEOF
2318 #define PACKAGE_URL "$PACKAGE_URL"
2319 _ACEOF
2320
2321
2322 # Let the site file select an alternate cache file if it wants to.
2323 # Prefer an explicitly selected file to automatically selected ones.
2324 ac_site_file1=NONE
2325 ac_site_file2=NONE
2326 if test -n "$CONFIG_SITE"; then
2327 # We do not want a PATH search for config.site.
2328 case $CONFIG_SITE in #((
2329 -*) ac_site_file1=./$CONFIG_SITE;;
2330 */*) ac_site_file1=$CONFIG_SITE;;
2331 *) ac_site_file1=./$CONFIG_SITE;;
2332 esac
2333 elif test "x$prefix" != xNONE; then
2334 ac_site_file1=$prefix/share/config.site
2335 ac_site_file2=$prefix/etc/config.site
2336 else
2337 ac_site_file1=$ac_default_prefix/share/config.site
2338 ac_site_file2=$ac_default_prefix/etc/config.site
2339 fi
2340 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2341 do
2342 test "x$ac_site_file" = xNONE && continue
2343 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2345 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2346 sed 's/^/| /' "$ac_site_file" >&5
2347 . "$ac_site_file" \
2348 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2350 as_fn_error $? "failed to load site script $ac_site_file
2351 See \`config.log' for more details" "$LINENO" 5; }
2352 fi
2353 done
2354
2355 if test -r "$cache_file"; then
2356 # Some versions of bash will fail to source /dev/null (special files
2357 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2358 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2360 $as_echo "$as_me: loading cache $cache_file" >&6;}
2361 case $cache_file in
2362 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2363 *) . "./$cache_file";;
2364 esac
2365 fi
2366 else
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2368 $as_echo "$as_me: creating cache $cache_file" >&6;}
2369 >$cache_file
2370 fi
2371
2372 # Check that the precious variables saved in the cache have kept the same
2373 # value.
2374 ac_cache_corrupted=false
2375 for ac_var in $ac_precious_vars; do
2376 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2377 eval ac_new_set=\$ac_env_${ac_var}_set
2378 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2379 eval ac_new_val=\$ac_env_${ac_var}_value
2380 case $ac_old_set,$ac_new_set in
2381 set,)
2382 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2383 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2384 ac_cache_corrupted=: ;;
2385 ,set)
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2387 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2388 ac_cache_corrupted=: ;;
2389 ,);;
2390 *)
2391 if test "x$ac_old_val" != "x$ac_new_val"; then
2392 # differences in whitespace do not lead to failure.
2393 ac_old_val_w=`echo x $ac_old_val`
2394 ac_new_val_w=`echo x $ac_new_val`
2395 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2397 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2398 ac_cache_corrupted=:
2399 else
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2401 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2402 eval $ac_var=\$ac_old_val
2403 fi
2404 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2405 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2406 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2407 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2408 fi;;
2409 esac
2410 # Pass precious variables to config.status.
2411 if test "$ac_new_set" = set; then
2412 case $ac_new_val in
2413 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2414 *) ac_arg=$ac_var=$ac_new_val ;;
2415 esac
2416 case " $ac_configure_args " in
2417 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2418 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2419 esac
2420 fi
2421 done
2422 if $ac_cache_corrupted; then
2423 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2424 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2426 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2427 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2428 fi
2429 ## -------------------- ##
2430 ## Main body of script. ##
2431 ## -------------------- ##
2432
2433 ac_ext=c
2434 ac_cpp='$CPP $CPPFLAGS'
2435 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2436 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2437 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2438
2439
2440
2441
2442
2443 ac_aux_dir=
2444 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2445 if test -f "$ac_dir/install-sh"; then
2446 ac_aux_dir=$ac_dir
2447 ac_install_sh="$ac_aux_dir/install-sh -c"
2448 break
2449 elif test -f "$ac_dir/install.sh"; then
2450 ac_aux_dir=$ac_dir
2451 ac_install_sh="$ac_aux_dir/install.sh -c"
2452 break
2453 elif test -f "$ac_dir/shtool"; then
2454 ac_aux_dir=$ac_dir
2455 ac_install_sh="$ac_aux_dir/shtool install -c"
2456 break
2457 fi
2458 done
2459 if test -z "$ac_aux_dir"; then
2460 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2461 fi
2462
2463 # These three variables are undocumented and unsupported,
2464 # and are intended to be withdrawn in a future Autoconf release.
2465 # They can cause serious problems if a builder's source tree is in a directory
2466 # whose full name contains unusual characters.
2467 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2468 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2469 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2470
2471
2472 # Make sure we can run config.sub.
2473 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2474 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2475
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2477 $as_echo_n "checking build system type... " >&6; }
2478 if ${ac_cv_build+:} false; then :
2479 $as_echo_n "(cached) " >&6
2480 else
2481 ac_build_alias=$build_alias
2482 test "x$ac_build_alias" = x &&
2483 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2484 test "x$ac_build_alias" = x &&
2485 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2486 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2487 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2488
2489 fi
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2491 $as_echo "$ac_cv_build" >&6; }
2492 case $ac_cv_build in
2493 *-*-*) ;;
2494 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2495 esac
2496 build=$ac_cv_build
2497 ac_save_IFS=$IFS; IFS='-'
2498 set x $ac_cv_build
2499 shift
2500 build_cpu=$1
2501 build_vendor=$2
2502 shift; shift
2503 # Remember, the first character of IFS is used to create $*,
2504 # except with old shells:
2505 build_os=$*
2506 IFS=$ac_save_IFS
2507 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2508
2509
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2511 $as_echo_n "checking host system type... " >&6; }
2512 if ${ac_cv_host+:} false; then :
2513 $as_echo_n "(cached) " >&6
2514 else
2515 if test "x$host_alias" = x; then
2516 ac_cv_host=$ac_cv_build
2517 else
2518 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2519 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2520 fi
2521
2522 fi
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2524 $as_echo "$ac_cv_host" >&6; }
2525 case $ac_cv_host in
2526 *-*-*) ;;
2527 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2528 esac
2529 host=$ac_cv_host
2530 ac_save_IFS=$IFS; IFS='-'
2531 set x $ac_cv_host
2532 shift
2533 host_cpu=$1
2534 host_vendor=$2
2535 shift; shift
2536 # Remember, the first character of IFS is used to create $*,
2537 # except with old shells:
2538 host_os=$*
2539 IFS=$ac_save_IFS
2540 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2541
2542
2543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2544 $as_echo_n "checking target system type... " >&6; }
2545 if ${ac_cv_target+:} false; then :
2546 $as_echo_n "(cached) " >&6
2547 else
2548 if test "x$target_alias" = x; then
2549 ac_cv_target=$ac_cv_host
2550 else
2551 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2552 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2553 fi
2554
2555 fi
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2557 $as_echo "$ac_cv_target" >&6; }
2558 case $ac_cv_target in
2559 *-*-*) ;;
2560 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2561 esac
2562 target=$ac_cv_target
2563 ac_save_IFS=$IFS; IFS='-'
2564 set x $ac_cv_target
2565 shift
2566 target_cpu=$1
2567 target_vendor=$2
2568 shift; shift
2569 # Remember, the first character of IFS is used to create $*,
2570 # except with old shells:
2571 target_os=$*
2572 IFS=$ac_save_IFS
2573 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2574
2575
2576 # The aliases save the names the user supplied, while $host etc.
2577 # will get canonicalized.
2578 test -n "$target_alias" &&
2579 test "$program_prefix$program_suffix$program_transform_name" = \
2580 NONENONEs,x,x, &&
2581 program_prefix=${target_alias}-
2582
2583
2584
2585
2586
2587
2588
2589
2590 # Check whether --with-gcc was given.
2591 if test "${with_gcc+set}" = set; then :
2592 withval=$with_gcc;
2593 fi
2594
2595 V_CCOPT=""
2596 if test "${srcdir}" != "." ; then
2597 V_CCOPT="-I\$(srcdir)"
2598 fi
2599 if test "${CFLAGS+set}" = set; then
2600 LBL_CFLAGS="$CFLAGS"
2601 fi
2602 if test -z "$CC" ; then
2603 case "$host_os" in
2604
2605 bsdi*)
2606 # Extract the first word of "shlicc2", so it can be a program name with args.
2607 set dummy shlicc2; ac_word=$2
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2609 $as_echo_n "checking for $ac_word... " >&6; }
2610 if ${ac_cv_prog_SHLICC2+:} false; then :
2611 $as_echo_n "(cached) " >&6
2612 else
2613 if test -n "$SHLICC2"; then
2614 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2615 else
2616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2617 for as_dir in $PATH
2618 do
2619 IFS=$as_save_IFS
2620 test -z "$as_dir" && as_dir=.
2621 for ac_exec_ext in '' $ac_executable_extensions; do
2622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2623 ac_cv_prog_SHLICC2="yes"
2624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2625 break 2
2626 fi
2627 done
2628 done
2629 IFS=$as_save_IFS
2630
2631 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2632 fi
2633 fi
2634 SHLICC2=$ac_cv_prog_SHLICC2
2635 if test -n "$SHLICC2"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2637 $as_echo "$SHLICC2" >&6; }
2638 else
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2640 $as_echo "no" >&6; }
2641 fi
2642
2643
2644 if test $SHLICC2 = yes ; then
2645 CC=shlicc2
2646 export CC
2647 fi
2648 ;;
2649 esac
2650 fi
2651 if test -z "$CC" -a "$with_gcc" = no ; then
2652 CC=cc
2653 export CC
2654 fi
2655
2656 #
2657 # Try to enable as many C99 features as we can.
2658 # At minimum, we want C++/C99-style // comments.
2659 #
2660 ac_ext=c
2661 ac_cpp='$CPP $CPPFLAGS'
2662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2665 if test -n "$ac_tool_prefix"; then
2666 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2667 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2669 $as_echo_n "checking for $ac_word... " >&6; }
2670 if ${ac_cv_prog_CC+:} false; then :
2671 $as_echo_n "(cached) " >&6
2672 else
2673 if test -n "$CC"; then
2674 ac_cv_prog_CC="$CC" # Let the user override the test.
2675 else
2676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2677 for as_dir in $PATH
2678 do
2679 IFS=$as_save_IFS
2680 test -z "$as_dir" && as_dir=.
2681 for ac_exec_ext in '' $ac_executable_extensions; do
2682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2683 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2685 break 2
2686 fi
2687 done
2688 done
2689 IFS=$as_save_IFS
2690
2691 fi
2692 fi
2693 CC=$ac_cv_prog_CC
2694 if test -n "$CC"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2696 $as_echo "$CC" >&6; }
2697 else
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2699 $as_echo "no" >&6; }
2700 fi
2701
2702
2703 fi
2704 if test -z "$ac_cv_prog_CC"; then
2705 ac_ct_CC=$CC
2706 # Extract the first word of "gcc", so it can be a program name with args.
2707 set dummy gcc; ac_word=$2
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2709 $as_echo_n "checking for $ac_word... " >&6; }
2710 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2711 $as_echo_n "(cached) " >&6
2712 else
2713 if test -n "$ac_ct_CC"; then
2714 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2715 else
2716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2717 for as_dir in $PATH
2718 do
2719 IFS=$as_save_IFS
2720 test -z "$as_dir" && as_dir=.
2721 for ac_exec_ext in '' $ac_executable_extensions; do
2722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2723 ac_cv_prog_ac_ct_CC="gcc"
2724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2725 break 2
2726 fi
2727 done
2728 done
2729 IFS=$as_save_IFS
2730
2731 fi
2732 fi
2733 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2734 if test -n "$ac_ct_CC"; then
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2736 $as_echo "$ac_ct_CC" >&6; }
2737 else
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2739 $as_echo "no" >&6; }
2740 fi
2741
2742 if test "x$ac_ct_CC" = x; then
2743 CC=""
2744 else
2745 case $cross_compiling:$ac_tool_warned in
2746 yes:)
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2748 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2749 ac_tool_warned=yes ;;
2750 esac
2751 CC=$ac_ct_CC
2752 fi
2753 else
2754 CC="$ac_cv_prog_CC"
2755 fi
2756
2757 if test -z "$CC"; then
2758 if test -n "$ac_tool_prefix"; then
2759 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2760 set dummy ${ac_tool_prefix}cc; ac_word=$2
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2762 $as_echo_n "checking for $ac_word... " >&6; }
2763 if ${ac_cv_prog_CC+:} false; then :
2764 $as_echo_n "(cached) " >&6
2765 else
2766 if test -n "$CC"; then
2767 ac_cv_prog_CC="$CC" # Let the user override the test.
2768 else
2769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2770 for as_dir in $PATH
2771 do
2772 IFS=$as_save_IFS
2773 test -z "$as_dir" && as_dir=.
2774 for ac_exec_ext in '' $ac_executable_extensions; do
2775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2776 ac_cv_prog_CC="${ac_tool_prefix}cc"
2777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2778 break 2
2779 fi
2780 done
2781 done
2782 IFS=$as_save_IFS
2783
2784 fi
2785 fi
2786 CC=$ac_cv_prog_CC
2787 if test -n "$CC"; then
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2789 $as_echo "$CC" >&6; }
2790 else
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2792 $as_echo "no" >&6; }
2793 fi
2794
2795
2796 fi
2797 fi
2798 if test -z "$CC"; then
2799 # Extract the first word of "cc", so it can be a program name with args.
2800 set dummy cc; ac_word=$2
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2802 $as_echo_n "checking for $ac_word... " >&6; }
2803 if ${ac_cv_prog_CC+:} false; then :
2804 $as_echo_n "(cached) " >&6
2805 else
2806 if test -n "$CC"; then
2807 ac_cv_prog_CC="$CC" # Let the user override the test.
2808 else
2809 ac_prog_rejected=no
2810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2811 for as_dir in $PATH
2812 do
2813 IFS=$as_save_IFS
2814 test -z "$as_dir" && as_dir=.
2815 for ac_exec_ext in '' $ac_executable_extensions; do
2816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2817 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2818 ac_prog_rejected=yes
2819 continue
2820 fi
2821 ac_cv_prog_CC="cc"
2822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2823 break 2
2824 fi
2825 done
2826 done
2827 IFS=$as_save_IFS
2828
2829 if test $ac_prog_rejected = yes; then
2830 # We found a bogon in the path, so make sure we never use it.
2831 set dummy $ac_cv_prog_CC
2832 shift
2833 if test $# != 0; then
2834 # We chose a different compiler from the bogus one.
2835 # However, it has the same basename, so the bogon will be chosen
2836 # first if we set CC to just the basename; use the full file name.
2837 shift
2838 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2839 fi
2840 fi
2841 fi
2842 fi
2843 CC=$ac_cv_prog_CC
2844 if test -n "$CC"; then
2845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2846 $as_echo "$CC" >&6; }
2847 else
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2849 $as_echo "no" >&6; }
2850 fi
2851
2852
2853 fi
2854 if test -z "$CC"; then
2855 if test -n "$ac_tool_prefix"; then
2856 for ac_prog in cl.exe
2857 do
2858 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2859 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2861 $as_echo_n "checking for $ac_word... " >&6; }
2862 if ${ac_cv_prog_CC+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864 else
2865 if test -n "$CC"; then
2866 ac_cv_prog_CC="$CC" # Let the user override the test.
2867 else
2868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2869 for as_dir in $PATH
2870 do
2871 IFS=$as_save_IFS
2872 test -z "$as_dir" && as_dir=.
2873 for ac_exec_ext in '' $ac_executable_extensions; do
2874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2875 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2877 break 2
2878 fi
2879 done
2880 done
2881 IFS=$as_save_IFS
2882
2883 fi
2884 fi
2885 CC=$ac_cv_prog_CC
2886 if test -n "$CC"; then
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2888 $as_echo "$CC" >&6; }
2889 else
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2891 $as_echo "no" >&6; }
2892 fi
2893
2894
2895 test -n "$CC" && break
2896 done
2897 fi
2898 if test -z "$CC"; then
2899 ac_ct_CC=$CC
2900 for ac_prog in cl.exe
2901 do
2902 # Extract the first word of "$ac_prog", so it can be a program name with args.
2903 set dummy $ac_prog; ac_word=$2
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2905 $as_echo_n "checking for $ac_word... " >&6; }
2906 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2907 $as_echo_n "(cached) " >&6
2908 else
2909 if test -n "$ac_ct_CC"; then
2910 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2911 else
2912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2913 for as_dir in $PATH
2914 do
2915 IFS=$as_save_IFS
2916 test -z "$as_dir" && as_dir=.
2917 for ac_exec_ext in '' $ac_executable_extensions; do
2918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2919 ac_cv_prog_ac_ct_CC="$ac_prog"
2920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2921 break 2
2922 fi
2923 done
2924 done
2925 IFS=$as_save_IFS
2926
2927 fi
2928 fi
2929 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2930 if test -n "$ac_ct_CC"; then
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2932 $as_echo "$ac_ct_CC" >&6; }
2933 else
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2935 $as_echo "no" >&6; }
2936 fi
2937
2938
2939 test -n "$ac_ct_CC" && break
2940 done
2941
2942 if test "x$ac_ct_CC" = x; then
2943 CC=""
2944 else
2945 case $cross_compiling:$ac_tool_warned in
2946 yes:)
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2948 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2949 ac_tool_warned=yes ;;
2950 esac
2951 CC=$ac_ct_CC
2952 fi
2953 fi
2954
2955 fi
2956
2957
2958 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2960 as_fn_error $? "no acceptable C compiler found in \$PATH
2961 See \`config.log' for more details" "$LINENO" 5; }
2962
2963 # Provide some information about the compiler.
2964 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2965 set X $ac_compile
2966 ac_compiler=$2
2967 for ac_option in --version -v -V -qversion; do
2968 { { ac_try="$ac_compiler $ac_option >&5"
2969 case "(($ac_try" in
2970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2971 *) ac_try_echo=$ac_try;;
2972 esac
2973 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2974 $as_echo "$ac_try_echo"; } >&5
2975 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2976 ac_status=$?
2977 if test -s conftest.err; then
2978 sed '10a\
2979 ... rest of stderr output deleted ...
2980 10q' conftest.err >conftest.er1
2981 cat conftest.er1 >&5
2982 fi
2983 rm -f conftest.er1 conftest.err
2984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2985 test $ac_status = 0; }
2986 done
2987
2988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2989 /* end confdefs.h. */
2990
2991 int
2992 main ()
2993 {
2994
2995 ;
2996 return 0;
2997 }
2998 _ACEOF
2999 ac_clean_files_save=$ac_clean_files
3000 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3001 # Try to create an executable without -o first, disregard a.out.
3002 # It will help us diagnose broken compilers, and finding out an intuition
3003 # of exeext.
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3005 $as_echo_n "checking whether the C compiler works... " >&6; }
3006 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3007
3008 # The possible output files:
3009 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3010
3011 ac_rmfiles=
3012 for ac_file in $ac_files
3013 do
3014 case $ac_file in
3015 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3016 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3017 esac
3018 done
3019 rm -f $ac_rmfiles
3020
3021 if { { ac_try="$ac_link_default"
3022 case "(($ac_try" in
3023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3024 *) ac_try_echo=$ac_try;;
3025 esac
3026 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3027 $as_echo "$ac_try_echo"; } >&5
3028 (eval "$ac_link_default") 2>&5
3029 ac_status=$?
3030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3031 test $ac_status = 0; }; then :
3032 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3033 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3034 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3035 # so that the user can short-circuit this test for compilers unknown to
3036 # Autoconf.
3037 for ac_file in $ac_files ''
3038 do
3039 test -f "$ac_file" || continue
3040 case $ac_file in
3041 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3042 ;;
3043 [ab].out )
3044 # We found the default executable, but exeext='' is most
3045 # certainly right.
3046 break;;
3047 *.* )
3048 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3049 then :; else
3050 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3051 fi
3052 # We set ac_cv_exeext here because the later test for it is not
3053 # safe: cross compilers may not add the suffix if given an `-o'
3054 # argument, so we may need to know it at that point already.
3055 # Even if this section looks crufty: it has the advantage of
3056 # actually working.
3057 break;;
3058 * )
3059 break;;
3060 esac
3061 done
3062 test "$ac_cv_exeext" = no && ac_cv_exeext=
3063
3064 else
3065 ac_file=''
3066 fi
3067 if test -z "$ac_file"; then :
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3069 $as_echo "no" >&6; }
3070 $as_echo "$as_me: failed program was:" >&5
3071 sed 's/^/| /' conftest.$ac_ext >&5
3072
3073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3074 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3075 as_fn_error 77 "C compiler cannot create executables
3076 See \`config.log' for more details" "$LINENO" 5; }
3077 else
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3079 $as_echo "yes" >&6; }
3080 fi
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3082 $as_echo_n "checking for C compiler default output file name... " >&6; }
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3084 $as_echo "$ac_file" >&6; }
3085 ac_exeext=$ac_cv_exeext
3086
3087 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3088 ac_clean_files=$ac_clean_files_save
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3090 $as_echo_n "checking for suffix of executables... " >&6; }
3091 if { { ac_try="$ac_link"
3092 case "(($ac_try" in
3093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3094 *) ac_try_echo=$ac_try;;
3095 esac
3096 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3097 $as_echo "$ac_try_echo"; } >&5
3098 (eval "$ac_link") 2>&5
3099 ac_status=$?
3100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3101 test $ac_status = 0; }; then :
3102 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3103 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3104 # work properly (i.e., refer to `conftest.exe'), while it won't with
3105 # `rm'.
3106 for ac_file in conftest.exe conftest conftest.*; do
3107 test -f "$ac_file" || continue
3108 case $ac_file in
3109 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3110 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3111 break;;
3112 * ) break;;
3113 esac
3114 done
3115 else
3116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3117 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3118 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3119 See \`config.log' for more details" "$LINENO" 5; }
3120 fi
3121 rm -f conftest conftest$ac_cv_exeext
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3123 $as_echo "$ac_cv_exeext" >&6; }
3124
3125 rm -f conftest.$ac_ext
3126 EXEEXT=$ac_cv_exeext
3127 ac_exeext=$EXEEXT
3128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3129 /* end confdefs.h. */
3130 #include <stdio.h>
3131 int
3132 main ()
3133 {
3134 FILE *f = fopen ("conftest.out", "w");
3135 return ferror (f) || fclose (f) != 0;
3136
3137 ;
3138 return 0;
3139 }
3140 _ACEOF
3141 ac_clean_files="$ac_clean_files conftest.out"
3142 # Check that the compiler produces executables we can run. If not, either
3143 # the compiler is broken, or we cross compile.
3144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3145 $as_echo_n "checking whether we are cross compiling... " >&6; }
3146 if test "$cross_compiling" != yes; then
3147 { { ac_try="$ac_link"
3148 case "(($ac_try" in
3149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3150 *) ac_try_echo=$ac_try;;
3151 esac
3152 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3153 $as_echo "$ac_try_echo"; } >&5
3154 (eval "$ac_link") 2>&5
3155 ac_status=$?
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }
3158 if { ac_try='./conftest$ac_cv_exeext'
3159 { { case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162 esac
3163 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164 $as_echo "$ac_try_echo"; } >&5
3165 (eval "$ac_try") 2>&5
3166 ac_status=$?
3167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168 test $ac_status = 0; }; }; then
3169 cross_compiling=no
3170 else
3171 if test "$cross_compiling" = maybe; then
3172 cross_compiling=yes
3173 else
3174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3175 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3176 as_fn_error $? "cannot run C compiled programs.
3177 If you meant to cross compile, use \`--host'.
3178 See \`config.log' for more details" "$LINENO" 5; }
3179 fi
3180 fi
3181 fi
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3183 $as_echo "$cross_compiling" >&6; }
3184
3185 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3186 ac_clean_files=$ac_clean_files_save
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3188 $as_echo_n "checking for suffix of object files... " >&6; }
3189 if ${ac_cv_objext+:} false; then :
3190 $as_echo_n "(cached) " >&6
3191 else
3192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3193 /* end confdefs.h. */
3194
3195 int
3196 main ()
3197 {
3198
3199 ;
3200 return 0;
3201 }
3202 _ACEOF
3203 rm -f conftest.o conftest.obj
3204 if { { ac_try="$ac_compile"
3205 case "(($ac_try" in
3206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3207 *) ac_try_echo=$ac_try;;
3208 esac
3209 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3210 $as_echo "$ac_try_echo"; } >&5
3211 (eval "$ac_compile") 2>&5
3212 ac_status=$?
3213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3214 test $ac_status = 0; }; then :
3215 for ac_file in conftest.o conftest.obj conftest.*; do
3216 test -f "$ac_file" || continue;
3217 case $ac_file in
3218 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3219 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3220 break;;
3221 esac
3222 done
3223 else
3224 $as_echo "$as_me: failed program was:" >&5
3225 sed 's/^/| /' conftest.$ac_ext >&5
3226
3227 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3228 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3229 as_fn_error $? "cannot compute suffix of object files: cannot compile
3230 See \`config.log' for more details" "$LINENO" 5; }
3231 fi
3232 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3233 fi
3234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3235 $as_echo "$ac_cv_objext" >&6; }
3236 OBJEXT=$ac_cv_objext
3237 ac_objext=$OBJEXT
3238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3239 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3240 if ${ac_cv_c_compiler_gnu+:} false; then :
3241 $as_echo_n "(cached) " >&6
3242 else
3243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3244 /* end confdefs.h. */
3245
3246 int
3247 main ()
3248 {
3249 #ifndef __GNUC__
3250 choke me
3251 #endif
3252
3253 ;
3254 return 0;
3255 }
3256 _ACEOF
3257 if ac_fn_c_try_compile "$LINENO"; then :
3258 ac_compiler_gnu=yes
3259 else
3260 ac_compiler_gnu=no
3261 fi
3262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3263 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3264
3265 fi
3266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3267 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3268 if test $ac_compiler_gnu = yes; then
3269 GCC=yes
3270 else
3271 GCC=
3272 fi
3273 ac_test_CFLAGS=${CFLAGS+set}
3274 ac_save_CFLAGS=$CFLAGS
3275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3276 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3277 if ${ac_cv_prog_cc_g+:} false; then :
3278 $as_echo_n "(cached) " >&6
3279 else
3280 ac_save_c_werror_flag=$ac_c_werror_flag
3281 ac_c_werror_flag=yes
3282 ac_cv_prog_cc_g=no
3283 CFLAGS="-g"
3284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3285 /* end confdefs.h. */
3286
3287 int
3288 main ()
3289 {
3290
3291 ;
3292 return 0;
3293 }
3294 _ACEOF
3295 if ac_fn_c_try_compile "$LINENO"; then :
3296 ac_cv_prog_cc_g=yes
3297 else
3298 CFLAGS=""
3299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3300 /* end confdefs.h. */
3301
3302 int
3303 main ()
3304 {
3305
3306 ;
3307 return 0;
3308 }
3309 _ACEOF
3310 if ac_fn_c_try_compile "$LINENO"; then :
3311
3312 else
3313 ac_c_werror_flag=$ac_save_c_werror_flag
3314 CFLAGS="-g"
3315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3316 /* end confdefs.h. */
3317
3318 int
3319 main ()
3320 {
3321
3322 ;
3323 return 0;
3324 }
3325 _ACEOF
3326 if ac_fn_c_try_compile "$LINENO"; then :
3327 ac_cv_prog_cc_g=yes
3328 fi
3329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3330 fi
3331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3332 fi
3333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3334 ac_c_werror_flag=$ac_save_c_werror_flag
3335 fi
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3337 $as_echo "$ac_cv_prog_cc_g" >&6; }
3338 if test "$ac_test_CFLAGS" = set; then
3339 CFLAGS=$ac_save_CFLAGS
3340 elif test $ac_cv_prog_cc_g = yes; then
3341 if test "$GCC" = yes; then
3342 CFLAGS="-g -O2"
3343 else
3344 CFLAGS="-g"
3345 fi
3346 else
3347 if test "$GCC" = yes; then
3348 CFLAGS="-O2"
3349 else
3350 CFLAGS=
3351 fi
3352 fi
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3354 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3355 if ${ac_cv_prog_cc_c89+:} false; then :
3356 $as_echo_n "(cached) " >&6
3357 else
3358 ac_cv_prog_cc_c89=no
3359 ac_save_CC=$CC
3360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3361 /* end confdefs.h. */
3362 #include <stdarg.h>
3363 #include <stdio.h>
3364 struct stat;
3365 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3366 struct buf { int x; };
3367 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3368 static char *e (p, i)
3369 char **p;
3370 int i;
3371 {
3372 return p[i];
3373 }
3374 static char *f (char * (*g) (char **, int), char **p, ...)
3375 {
3376 char *s;
3377 va_list v;
3378 va_start (v,p);
3379 s = g (p, va_arg (v,int));
3380 va_end (v);
3381 return s;
3382 }
3383
3384 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3385 function prototypes and stuff, but not '\xHH' hex character constants.
3386 These don't provoke an error unfortunately, instead are silently treated
3387 as 'x'. The following induces an error, until -std is added to get
3388 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3389 array size at least. It's necessary to write '\x00'==0 to get something
3390 that's true only with -std. */
3391 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3392
3393 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3394 inside strings and character constants. */
3395 #define FOO(x) 'x'
3396 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3397
3398 int test (int i, double x);
3399 struct s1 {int (*f) (int a);};
3400 struct s2 {int (*f) (double a);};
3401 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3402 int argc;
3403 char **argv;
3404 int
3405 main ()
3406 {
3407 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3408 ;
3409 return 0;
3410 }
3411 _ACEOF
3412 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3413 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3414 do
3415 CC="$ac_save_CC $ac_arg"
3416 if ac_fn_c_try_compile "$LINENO"; then :
3417 ac_cv_prog_cc_c89=$ac_arg
3418 fi
3419 rm -f core conftest.err conftest.$ac_objext
3420 test "x$ac_cv_prog_cc_c89" != "xno" && break
3421 done
3422 rm -f conftest.$ac_ext
3423 CC=$ac_save_CC
3424
3425 fi
3426 # AC_CACHE_VAL
3427 case "x$ac_cv_prog_cc_c89" in
3428 x)
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3430 $as_echo "none needed" >&6; } ;;
3431 xno)
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3433 $as_echo "unsupported" >&6; } ;;
3434 *)
3435 CC="$CC $ac_cv_prog_cc_c89"
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3437 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3438 esac
3439 if test "x$ac_cv_prog_cc_c89" != xno; then :
3440
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3450 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3451 if ${ac_cv_prog_cc_c99+:} false; then :
3452 $as_echo_n "(cached) " >&6
3453 else
3454 ac_cv_prog_cc_c99=no
3455 ac_save_CC=$CC
3456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3457 /* end confdefs.h. */
3458 #include <stdarg.h>
3459 #include <stdbool.h>
3460 #include <stdlib.h>
3461 #include <wchar.h>
3462 #include <stdio.h>
3463
3464 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3465 #define debug(...) fprintf (stderr, __VA_ARGS__)
3466 #define showlist(...) puts (#__VA_ARGS__)
3467 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3468 static void
3469 test_varargs_macros (void)
3470 {
3471 int x = 1234;
3472 int y = 5678;
3473 debug ("Flag");
3474 debug ("X = %d\n", x);
3475 showlist (The first, second, and third items.);
3476 report (x>y, "x is %d but y is %d", x, y);
3477 }
3478
3479 // Check long long types.
3480 #define BIG64 18446744073709551615ull
3481 #define BIG32 4294967295ul
3482 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3483 #if !BIG_OK
3484 your preprocessor is broken;
3485 #endif
3486 #if BIG_OK
3487 #else
3488 your preprocessor is broken;
3489 #endif
3490 static long long int bignum = -9223372036854775807LL;
3491 static unsigned long long int ubignum = BIG64;
3492
3493 struct incomplete_array
3494 {
3495 int datasize;
3496 double data[];
3497 };
3498
3499 struct named_init {
3500 int number;
3501 const wchar_t *name;
3502 double average;
3503 };
3504
3505 typedef const char *ccp;
3506
3507 static inline int
3508 test_restrict (ccp restrict text)
3509 {
3510 // See if C++-style comments work.
3511 // Iterate through items via the restricted pointer.
3512 // Also check for declarations in for loops.
3513 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3514 continue;
3515 return 0;
3516 }
3517
3518 // Check varargs and va_copy.
3519 static void
3520 test_varargs (const char *format, ...)
3521 {
3522 va_list args;
3523 va_start (args, format);
3524 va_list args_copy;
3525 va_copy (args_copy, args);
3526
3527 const char *str;
3528 int number;
3529 float fnumber;
3530
3531 while (*format)
3532 {
3533 switch (*format++)
3534 {
3535 case 's': // string
3536 str = va_arg (args_copy, const char *);
3537 break;
3538 case 'd': // int
3539 number = va_arg (args_copy, int);
3540 break;
3541 case 'f': // float
3542 fnumber = va_arg (args_copy, double);
3543 break;
3544 default:
3545 break;
3546 }
3547 }
3548 va_end (args_copy);
3549 va_end (args);
3550 }
3551
3552 int
3553 main ()
3554 {
3555
3556 // Check bool.
3557 _Bool success = false;
3558
3559 // Check restrict.
3560 if (test_restrict ("String literal") == 0)
3561 success = true;
3562 char *restrict newvar = "Another string";
3563
3564 // Check varargs.
3565 test_varargs ("s, d' f .", "string", 65, 34.234);
3566 test_varargs_macros ();
3567
3568 // Check flexible array members.
3569 struct incomplete_array *ia =
3570 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3571 ia->datasize = 10;
3572 for (int i = 0; i < ia->datasize; ++i)
3573 ia->data[i] = i * 1.234;
3574
3575 // Check named initializers.
3576 struct named_init ni = {
3577 .number = 34,
3578 .name = L"Test wide string",
3579 .average = 543.34343,
3580 };
3581
3582 ni.number = 58;
3583
3584 int dynamic_array[ni.number];
3585 dynamic_array[ni.number - 1] = 543;
3586
3587 // work around unused variable warnings
3588 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3589 || dynamic_array[ni.number - 1] != 543);
3590
3591 ;
3592 return 0;
3593 }
3594 _ACEOF
3595 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3596 do
3597 CC="$ac_save_CC $ac_arg"
3598 if ac_fn_c_try_compile "$LINENO"; then :
3599 ac_cv_prog_cc_c99=$ac_arg
3600 fi
3601 rm -f core conftest.err conftest.$ac_objext
3602 test "x$ac_cv_prog_cc_c99" != "xno" && break
3603 done
3604 rm -f conftest.$ac_ext
3605 CC=$ac_save_CC
3606
3607 fi
3608 # AC_CACHE_VAL
3609 case "x$ac_cv_prog_cc_c99" in
3610 x)
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3612 $as_echo "none needed" >&6; } ;;
3613 xno)
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3615 $as_echo "unsupported" >&6; } ;;
3616 *)
3617 CC="$CC $ac_cv_prog_cc_c99"
3618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3619 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3620 esac
3621 if test "x$ac_cv_prog_cc_c99" != xno; then :
3622
3623 fi
3624
3625
3626 if test "$ac_cv_prog_cc_c99" = "no"; then
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
3628 $as_echo "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
3629 fi
3630 case "$host_os" in
3631 haiku*)
3632 #
3633 # Haiku's platform file is in C++.
3634 #
3635 ac_ext=cpp
3636 ac_cpp='$CXXCPP $CPPFLAGS'
3637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3638 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3640 if test -z "$CXX"; then
3641 if test -n "$CCC"; then
3642 CXX=$CCC
3643 else
3644 if test -n "$ac_tool_prefix"; then
3645 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3646 do
3647 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3648 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3650 $as_echo_n "checking for $ac_word... " >&6; }
3651 if ${ac_cv_prog_CXX+:} false; then :
3652 $as_echo_n "(cached) " >&6
3653 else
3654 if test -n "$CXX"; then
3655 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3656 else
3657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658 for as_dir in $PATH
3659 do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_exec_ext in '' $ac_executable_extensions; do
3663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3664 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3666 break 2
3667 fi
3668 done
3669 done
3670 IFS=$as_save_IFS
3671
3672 fi
3673 fi
3674 CXX=$ac_cv_prog_CXX
3675 if test -n "$CXX"; then
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3677 $as_echo "$CXX" >&6; }
3678 else
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3680 $as_echo "no" >&6; }
3681 fi
3682
3683
3684 test -n "$CXX" && break
3685 done
3686 fi
3687 if test -z "$CXX"; then
3688 ac_ct_CXX=$CXX
3689 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3690 do
3691 # Extract the first word of "$ac_prog", so it can be a program name with args.
3692 set dummy $ac_prog; ac_word=$2
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694 $as_echo_n "checking for $ac_word... " >&6; }
3695 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3696 $as_echo_n "(cached) " >&6
3697 else
3698 if test -n "$ac_ct_CXX"; then
3699 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3700 else
3701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702 for as_dir in $PATH
3703 do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
3706 for ac_exec_ext in '' $ac_executable_extensions; do
3707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3708 ac_cv_prog_ac_ct_CXX="$ac_prog"
3709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3710 break 2
3711 fi
3712 done
3713 done
3714 IFS=$as_save_IFS
3715
3716 fi
3717 fi
3718 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3719 if test -n "$ac_ct_CXX"; then
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3721 $as_echo "$ac_ct_CXX" >&6; }
3722 else
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724 $as_echo "no" >&6; }
3725 fi
3726
3727
3728 test -n "$ac_ct_CXX" && break
3729 done
3730
3731 if test "x$ac_ct_CXX" = x; then
3732 CXX="g++"
3733 else
3734 case $cross_compiling:$ac_tool_warned in
3735 yes:)
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3738 ac_tool_warned=yes ;;
3739 esac
3740 CXX=$ac_ct_CXX
3741 fi
3742 fi
3743
3744 fi
3745 fi
3746 # Provide some information about the compiler.
3747 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3748 set X $ac_compile
3749 ac_compiler=$2
3750 for ac_option in --version -v -V -qversion; do
3751 { { ac_try="$ac_compiler $ac_option >&5"
3752 case "(($ac_try" in
3753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3754 *) ac_try_echo=$ac_try;;
3755 esac
3756 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3757 $as_echo "$ac_try_echo"; } >&5
3758 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3759 ac_status=$?
3760 if test -s conftest.err; then
3761 sed '10a\
3762 ... rest of stderr output deleted ...
3763 10q' conftest.err >conftest.er1
3764 cat conftest.er1 >&5
3765 fi
3766 rm -f conftest.er1 conftest.err
3767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3768 test $ac_status = 0; }
3769 done
3770
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3772 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3773 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3774 $as_echo_n "(cached) " >&6
3775 else
3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3777 /* end confdefs.h. */
3778
3779 int
3780 main ()
3781 {
3782 #ifndef __GNUC__
3783 choke me
3784 #endif
3785
3786 ;
3787 return 0;
3788 }
3789 _ACEOF
3790 if ac_fn_cxx_try_compile "$LINENO"; then :
3791 ac_compiler_gnu=yes
3792 else
3793 ac_compiler_gnu=no
3794 fi
3795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3796 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3797
3798 fi
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3800 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3801 if test $ac_compiler_gnu = yes; then
3802 GXX=yes
3803 else
3804 GXX=
3805 fi
3806 ac_test_CXXFLAGS=${CXXFLAGS+set}
3807 ac_save_CXXFLAGS=$CXXFLAGS
3808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3809 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3810 if ${ac_cv_prog_cxx_g+:} false; then :
3811 $as_echo_n "(cached) " >&6
3812 else
3813 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3814 ac_cxx_werror_flag=yes
3815 ac_cv_prog_cxx_g=no
3816 CXXFLAGS="-g"
3817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3818 /* end confdefs.h. */
3819
3820 int
3821 main ()
3822 {
3823
3824 ;
3825 return 0;
3826 }
3827 _ACEOF
3828 if ac_fn_cxx_try_compile "$LINENO"; then :
3829 ac_cv_prog_cxx_g=yes
3830 else
3831 CXXFLAGS=""
3832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3833 /* end confdefs.h. */
3834
3835 int
3836 main ()
3837 {
3838
3839 ;
3840 return 0;
3841 }
3842 _ACEOF
3843 if ac_fn_cxx_try_compile "$LINENO"; then :
3844
3845 else
3846 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3847 CXXFLAGS="-g"
3848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3849 /* end confdefs.h. */
3850
3851 int
3852 main ()
3853 {
3854
3855 ;
3856 return 0;
3857 }
3858 _ACEOF
3859 if ac_fn_cxx_try_compile "$LINENO"; then :
3860 ac_cv_prog_cxx_g=yes
3861 fi
3862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3863 fi
3864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3865 fi
3866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3867 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3868 fi
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3870 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3871 if test "$ac_test_CXXFLAGS" = set; then
3872 CXXFLAGS=$ac_save_CXXFLAGS
3873 elif test $ac_cv_prog_cxx_g = yes; then
3874 if test "$GXX" = yes; then
3875 CXXFLAGS="-g -O2"
3876 else
3877 CXXFLAGS="-g"
3878 fi
3879 else
3880 if test "$GXX" = yes; then
3881 CXXFLAGS="-O2"
3882 else
3883 CXXFLAGS=
3884 fi
3885 fi
3886 ac_ext=c
3887 ac_cpp='$CPP $CPPFLAGS'
3888 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3889 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3890 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3891
3892 ;;
3893 esac
3894
3895
3896
3897
3898
3899
3900 if test "$GCC" = yes ; then
3901 #
3902 # -Werror forces warnings to be errors.
3903 #
3904 ac_lbl_cc_force_warning_errors=-Werror
3905
3906 #
3907 # Try to have the compiler default to hiding symbols,
3908 # so that only symbols explicitly exported with
3909 # PCAP_API will be visible outside (shared) libraries.
3910 #
3911
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3913 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3914 save_CFLAGS="$CFLAGS"
3915 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3916 then
3917 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3918 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3919 then
3920 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3921 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3922 then
3923 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3924 else
3925 CFLAGS="$CFLAGS -fvisibility=hidden"
3926 fi
3927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3928 /* end confdefs.h. */
3929
3930 int
3931 main ()
3932 {
3933 return 0
3934 ;
3935 return 0;
3936 }
3937 _ACEOF
3938 if ac_fn_c_try_compile "$LINENO"; then :
3939
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3941 $as_echo "yes" >&6; }
3942 can_add_to_cflags=yes
3943 #
3944 # The compile supports this; do we have some C code for
3945 # which the warning should *not* appear?
3946 # We test the fourth argument because the third argument
3947 # could contain quotes, breaking the test.
3948 #
3949 if test "x" != "x"
3950 then
3951 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3953 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955 /* end confdefs.h. */
3956
3957 _ACEOF
3958 if ac_fn_c_try_compile "$LINENO"; then :
3959
3960 #
3961 # Not a problem.
3962 #
3963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3964 $as_echo "no" >&6; }
3965
3966 else
3967
3968 #
3969 # A problem.
3970 #
3971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3972 $as_echo "yes" >&6; }
3973 can_add_to_cflags=no
3974
3975 fi
3976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3977 fi
3978 CFLAGS="$save_CFLAGS"
3979 if test x"$can_add_to_cflags" = "xyes"
3980 then
3981 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3982 fi
3983
3984 else
3985
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3987 $as_echo "no" >&6; }
3988 CFLAGS="$save_CFLAGS"
3989
3990 fi
3991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3992
3993 else
3994 V_INCLS="$V_INCLS -I/usr/local/include"
3995 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3996
3997 case "$host_os" in
3998
3999 darwin*)
4000 #
4001 # This is assumed either to be GCC or clang, both
4002 # of which use -Werror to force warnings to be errors.
4003 #
4004 ac_lbl_cc_force_warning_errors=-Werror
4005
4006 #
4007 # Try to have the compiler default to hiding symbols,
4008 # so that only symbols explicitly exported with
4009 # PCAP_API will be visible outside (shared) libraries.
4010 #
4011
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
4013 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
4014 save_CFLAGS="$CFLAGS"
4015 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
4016 then
4017 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
4018 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
4019 then
4020 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
4021 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
4022 then
4023 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
4024 else
4025 CFLAGS="$CFLAGS -fvisibility=hidden"
4026 fi
4027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4028 /* end confdefs.h. */
4029
4030 int
4031 main ()
4032 {
4033 return 0
4034 ;
4035 return 0;
4036 }
4037 _ACEOF
4038 if ac_fn_c_try_compile "$LINENO"; then :
4039
4040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4041 $as_echo "yes" >&6; }
4042 can_add_to_cflags=yes
4043 #
4044 # The compile supports this; do we have some C code for
4045 # which the warning should *not* appear?
4046 # We test the fourth argument because the third argument
4047 # could contain quotes, breaking the test.
4048 #
4049 if test "x" != "x"
4050 then
4051 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4053 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
4054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055 /* end confdefs.h. */
4056
4057 _ACEOF
4058 if ac_fn_c_try_compile "$LINENO"; then :
4059
4060 #
4061 # Not a problem.
4062 #
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4064 $as_echo "no" >&6; }
4065
4066 else
4067
4068 #
4069 # A problem.
4070 #
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072 $as_echo "yes" >&6; }
4073 can_add_to_cflags=no
4074
4075 fi
4076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4077 fi
4078 CFLAGS="$save_CFLAGS"
4079 if test x"$can_add_to_cflags" = "xyes"
4080 then
4081 V_CCOPT="$V_CCOPT -fvisibility=hidden"
4082 fi
4083
4084 else
4085
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4087 $as_echo "no" >&6; }
4088 CFLAGS="$save_CFLAGS"
4089
4090 fi
4091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4092
4093 ;;
4094
4095 hpux*)
4096 #
4097 # HP C, which is what we presume we're using, doesn't
4098 # exit with a non-zero exit status if we hand it an
4099 # invalid -W flag, can't be forced to do so even with
4100 # +We, and doesn't handle GCC-style -W flags, so we
4101 # don't want to try using GCC-style -W flags.
4102 #
4103 ac_lbl_cc_dont_try_gcc_dashW=yes
4104 ;;
4105
4106 irix*)
4107 #
4108 # MIPS C, which is what we presume we're using, doesn't
4109 # necessarily exit with a non-zero exit status if we
4110 # hand it an invalid -W flag, can't be forced to do
4111 # so, and doesn't handle GCC-style -W flags, so we
4112 # don't want to try using GCC-style -W flags.
4113 #
4114 ac_lbl_cc_dont_try_gcc_dashW=yes
4115 #
4116 # It also, apparently, defaults to "char" being
4117 # unsigned, unlike most other C implementations;
4118 # I suppose we could say "signed char" whenever
4119 # we want to guarantee a signed "char", but let's
4120 # just force signed chars.
4121 #
4122 # -xansi is normally the default, but the
4123 # configure script was setting it; perhaps -cckr
4124 # was the default in the Old Days. (Then again,
4125 # that would probably be for backwards compatibility
4126 # in the days when ANSI C was Shiny and New, i.e.
4127 # 1989 and the early '90's, so maybe we can just
4128 # drop support for those compilers.)
4129 #
4130 # -g is equivalent to -g2, which turns off
4131 # optimization; we choose -g3, which generates
4132 # debugging information but doesn't turn off
4133 # optimization (even if the optimization would
4134 # cause inaccuracies in debugging).
4135 #
4136 V_CCOPT="$V_CCOPT -xansi -signed -g3"
4137 ;;
4138
4139 osf*)
4140 #
4141 # Presumed to be DEC OSF/1, Digital UNIX, or
4142 # Tru64 UNIX.
4143 #
4144 # The DEC C compiler, which is what we presume we're
4145 # using, doesn't exit with a non-zero exit status if we
4146 # hand it an invalid -W flag, can't be forced to do
4147 # so, and doesn't handle GCC-style -W flags, so we
4148 # don't want to try using GCC-style -W flags.
4149 #
4150 ac_lbl_cc_dont_try_gcc_dashW=yes
4151 #
4152 # -g is equivalent to -g2, which turns off
4153 # optimization; we choose -g3, which generates
4154 # debugging information but doesn't turn off
4155 # optimization (even if the optimization would
4156 # cause inaccuracies in debugging).
4157 #
4158 V_CCOPT="$V_CCOPT -g3"
4159 ;;
4160
4161 solaris*)
4162 #
4163 # Assumed to be Sun C, which requires -errwarn to force
4164 # warnings to be treated as errors.
4165 #
4166 ac_lbl_cc_force_warning_errors=-errwarn
4167
4168 #
4169 # Try to have the compiler default to hiding symbols,
4170 # so that only symbols explicitly exported with
4171 # PCAP_API will be visible outside (shared) libraries.
4172 #
4173
4174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
4175 $as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
4176 save_CFLAGS="$CFLAGS"
4177 if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
4178 then
4179 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
4180 elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
4181 then
4182 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
4183 elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
4184 then
4185 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
4186 else
4187 CFLAGS="$CFLAGS -xldscope=hidden"
4188 fi
4189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4190 /* end confdefs.h. */
4191
4192 int
4193 main ()
4194 {
4195 return 0
4196 ;
4197 return 0;
4198 }
4199 _ACEOF
4200 if ac_fn_c_try_compile "$LINENO"; then :
4201
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4203 $as_echo "yes" >&6; }
4204 can_add_to_cflags=yes
4205 #
4206 # The compile supports this; do we have some C code for
4207 # which the warning should *not* appear?
4208 # We test the fourth argument because the third argument
4209 # could contain quotes, breaking the test.
4210 #
4211 if test "x" != "x"
4212 then
4213 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
4215 $as_echo_n "checking whether -xldscope=hidden ... " >&6; }
4216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4217 /* end confdefs.h. */
4218
4219 _ACEOF
4220 if ac_fn_c_try_compile "$LINENO"; then :
4221
4222 #
4223 # Not a problem.
4224 #
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4226 $as_echo "no" >&6; }
4227
4228 else
4229
4230 #
4231 # A problem.
4232 #
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4234 $as_echo "yes" >&6; }
4235 can_add_to_cflags=no
4236
4237 fi
4238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4239 fi
4240 CFLAGS="$save_CFLAGS"
4241 if test x"$can_add_to_cflags" = "xyes"
4242 then
4243 V_CCOPT="$V_CCOPT -xldscope=hidden"
4244 fi
4245
4246 else
4247
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249 $as_echo "no" >&6; }
4250 CFLAGS="$save_CFLAGS"
4251
4252 fi
4253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254
4255 ;;
4256
4257 ultrix*)
4258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
4259 $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
4260 if ${ac_cv_lbl_cc_const_proto+:} false; then :
4261 $as_echo_n "(cached) " >&6
4262 else
4263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h. */
4265 #include <sys/types.h>
4266 int
4267 main ()
4268 {
4269 struct a { int b; };
4270 void c(const struct a *)
4271 ;
4272 return 0;
4273 }
4274 _ACEOF
4275 if ac_fn_c_try_compile "$LINENO"; then :
4276 ac_cv_lbl_cc_const_proto=yes
4277 else
4278 ac_cv_lbl_cc_const_proto=no
4279 fi
4280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4281 fi
4282
4283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
4284 $as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
4285 if test $ac_cv_lbl_cc_const_proto = no ; then
4286
4287 $as_echo "#define const /**/" >>confdefs.h
4288
4289 fi
4290 ;;
4291 esac
4292 V_CCOPT="$V_CCOPT -O"
4293 fi
4294
4295
4296 if test "$GCC" = yes ; then
4297 #
4298 # On platforms where we build a shared library:
4299 #
4300 # add options to generate position-independent code,
4301 # if necessary (it's the default in AIX and Darwin/macOS);
4302 #
4303 # define option to set the soname of the shared library,
4304 # if the OS supports that;
4305 #
4306 # add options to specify, at link time, a directory to
4307 # add to the run-time search path, if that's necessary.
4308 #
4309 V_SHLIB_CMD="\$(CC)"
4310 V_SHLIB_OPT="-shared"
4311 case "$host_os" in
4312
4313 aix*)
4314 ;;
4315
4316 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
4317 #
4318 # Platforms where the linker is the GNU linker
4319 # or accepts command-line arguments like
4320 # those the GNU linker accepts.
4321 #
4322 # Some instruction sets require -fPIC on some
4323 # operating systems. Check for them. If you
4324 # have a combination that requires it, add it
4325 # here.
4326 #
4327 PIC_OPT=-fpic
4328 case "$host_cpu" in
4329
4330 sparc64*)
4331 case "$host_os" in
4332
4333 freebsd*|openbsd*)
4334 PIC_OPT=-fPIC
4335 ;;
4336 esac
4337 ;;
4338 esac
4339 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
4340 V_SONAME_OPT="-Wl,-soname,"
4341 V_RPATH_OPT="-Wl,-rpath,"
4342 ;;
4343
4344 hpux*)
4345 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4346 #
4347 # XXX - this assumes GCC is using the HP linker,
4348 # rather than the GNU linker, and that the "+h"
4349 # option is used on all HP-UX platforms, both .sl
4350 # and .so.
4351 #
4352 V_SONAME_OPT="-Wl,+h,"
4353 #
4354 # By default, directories specifed with -L
4355 # are added to the run-time search path, so
4356 # we don't add them in pcap-config.
4357 #
4358 ;;
4359
4360 solaris*)
4361 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4362 #
4363 # XXX - this assumes GCC is using the Sun linker,
4364 # rather than the GNU linker.
4365 #
4366 V_SONAME_OPT="-Wl,-h,"
4367 V_RPATH_OPT="-Wl,-R,"
4368 ;;
4369 esac
4370 else
4371 #
4372 # Set the appropriate compiler flags and, on platforms
4373 # where we build a shared library:
4374 #
4375 # add options to generate position-independent code,
4376 # if necessary (it's the default in Darwin/macOS);
4377 #
4378 # if we generate ".so" shared libraries, define the
4379 # appropriate options for building the shared library;
4380 #
4381 # add options to specify, at link time, a directory to
4382 # add to the run-time search path, if that's necessary.
4383 #
4384 # Note: spaces after V_SONAME_OPT are significant; on
4385 # some platforms the soname is passed with a GCC-like
4386 # "-Wl,-soname,{soname}" option, with the soname part
4387 # of the option, while on other platforms the C compiler
4388 # driver takes it as a regular option with the soname
4389 # following the option. The same applies to V_RPATH_OPT.
4390 #
4391 case "$host_os" in
4392
4393 aix*)
4394 V_SHLIB_CMD="\$(CC)"
4395 V_SHLIB_OPT="-G -bnoentry -bexpall"
4396 ;;
4397
4398 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
4399 #
4400 # "cc" is GCC.
4401 #
4402 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4403 V_SHLIB_CMD="\$(CC)"
4404 V_SHLIB_OPT="-shared"
4405 V_SONAME_OPT="-Wl,-soname,"
4406 V_RPATH_OPT="-Wl,-rpath,"
4407 ;;
4408
4409 hpux*)
4410 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
4411 V_SHLIB_CMD="\$(LD)"
4412 V_SHLIB_OPT="-b"
4413 V_SONAME_OPT="+h "
4414 #
4415 # By default, directories specifed with -L
4416 # are added to the run-time search path, so
4417 # we don't add them in pcap-config.
4418 #
4419 ;;
4420
4421 osf*)
4422 #
4423 # Presumed to be DEC OSF/1, Digital UNIX, or
4424 # Tru64 UNIX.
4425 #
4426 V_SHLIB_CMD="\$(CC)"
4427 V_SHLIB_OPT="-shared"
4428 V_SONAME_OPT="-soname "
4429 V_RPATH_OPT="-rpath "
4430 ;;
4431
4432 solaris*)
4433 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
4434 V_SHLIB_CMD="\$(CC)"
4435 V_SHLIB_OPT="-G"
4436 V_SONAME_OPT="-h "
4437 V_RPATH_OPT="-R"
4438 ;;
4439 esac
4440 fi
4441
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4443 $as_echo_n "checking for inline... " >&6; }
4444 save_CFLAGS="$CFLAGS"
4445 CFLAGS="$V_CCOPT"
4446 if ${ac_cv_lbl_inline+:} false; then :
4447 $as_echo_n "(cached) " >&6
4448 else
4449
4450 ac_cv_lbl_inline=""
4451 ac_lbl_cc_inline=no
4452 for ac_lbl_inline in inline __inline__ __inline
4453 do
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455 /* end confdefs.h. */
4456 #define inline $ac_lbl_inline
4457 static inline struct iltest *foo(void);
4458 struct iltest {
4459 int iltest1;
4460 int iltest2;
4461 };
4462
4463 static inline struct iltest *
4464 foo()
4465 {
4466 static struct iltest xxx;
4467
4468 return &xxx;
4469 }
4470 int
4471 main ()
4472 {
4473
4474 ;
4475 return 0;
4476 }
4477 _ACEOF
4478 if ac_fn_c_try_compile "$LINENO"; then :
4479 ac_lbl_cc_inline=yes
4480 fi
4481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482 if test "$ac_lbl_cc_inline" = yes ; then
4483 break;
4484 fi
4485 done
4486 if test "$ac_lbl_cc_inline" = yes ; then
4487 ac_cv_lbl_inline=$ac_lbl_inline
4488 fi
4489 fi
4490
4491 CFLAGS="$save_CFLAGS"
4492 if test ! -z "$ac_cv_lbl_inline" ; then
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4494 $as_echo "$ac_cv_lbl_inline" >&6; }
4495 else
4496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4497 $as_echo "no" >&6; }
4498 fi
4499
4500 cat >>confdefs.h <<_ACEOF
4501 #define inline $ac_cv_lbl_inline
4502 _ACEOF
4503
4504
4505 #
4506 # Try to arrange for large file support.
4507 #
4508 # Check whether --enable-largefile was given.
4509 if test "${enable_largefile+set}" = set; then :
4510 enableval=$enable_largefile;
4511 fi
4512
4513 if test "$enable_largefile" != no; then
4514
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4516 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4517 if ${ac_cv_sys_largefile_CC+:} false; then :
4518 $as_echo_n "(cached) " >&6
4519 else
4520 ac_cv_sys_largefile_CC=no
4521 if test "$GCC" != yes; then
4522 ac_save_CC=$CC
4523 while :; do
4524 # IRIX 6.2 and later do not support large files by default,
4525 # so use the C compiler's -n32 option if that helps.
4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4527 /* end confdefs.h. */
4528 #include <sys/types.h>
4529 /* Check that off_t can represent 2**63 - 1 correctly.
4530 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4531 since some C++ compilers masquerading as C compilers
4532 incorrectly reject 9223372036854775807. */
4533 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4534 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4535 && LARGE_OFF_T % 2147483647 == 1)
4536 ? 1 : -1];
4537 int
4538 main ()
4539 {
4540
4541 ;
4542 return 0;
4543 }
4544 _ACEOF
4545 if ac_fn_c_try_compile "$LINENO"; then :
4546 break
4547 fi
4548 rm -f core conftest.err conftest.$ac_objext
4549 CC="$CC -n32"
4550 if ac_fn_c_try_compile "$LINENO"; then :
4551 ac_cv_sys_largefile_CC=' -n32'; break
4552 fi
4553 rm -f core conftest.err conftest.$ac_objext
4554 break
4555 done
4556 CC=$ac_save_CC
4557 rm -f conftest.$ac_ext
4558 fi
4559 fi
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4561 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4562 if test "$ac_cv_sys_largefile_CC" != no; then
4563 CC=$CC$ac_cv_sys_largefile_CC
4564 fi
4565
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4567 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4568 if ${ac_cv_sys_file_offset_bits+:} false; then :
4569 $as_echo_n "(cached) " >&6
4570 else
4571 while :; do
4572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4573 /* end confdefs.h. */
4574 #include <sys/types.h>
4575 /* Check that off_t can represent 2**63 - 1 correctly.
4576 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4577 since some C++ compilers masquerading as C compilers
4578 incorrectly reject 9223372036854775807. */
4579 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4580 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4581 && LARGE_OFF_T % 2147483647 == 1)
4582 ? 1 : -1];
4583 int
4584 main ()
4585 {
4586
4587 ;
4588 return 0;
4589 }
4590 _ACEOF
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_sys_file_offset_bits=no; break
4593 fi
4594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596 /* end confdefs.h. */
4597 #define _FILE_OFFSET_BITS 64
4598 #include <sys/types.h>
4599 /* Check that off_t can represent 2**63 - 1 correctly.
4600 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4601 since some C++ compilers masquerading as C compilers
4602 incorrectly reject 9223372036854775807. */
4603 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4604 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4605 && LARGE_OFF_T % 2147483647 == 1)
4606 ? 1 : -1];
4607 int
4608 main ()
4609 {
4610
4611 ;
4612 return 0;
4613 }
4614 _ACEOF
4615 if ac_fn_c_try_compile "$LINENO"; then :
4616 ac_cv_sys_file_offset_bits=64; break
4617 fi
4618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4619 ac_cv_sys_file_offset_bits=unknown
4620 break
4621 done
4622 fi
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4624 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4625 case $ac_cv_sys_file_offset_bits in #(
4626 no | unknown) ;;
4627 *)
4628 cat >>confdefs.h <<_ACEOF
4629 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4630 _ACEOF
4631 ;;
4632 esac
4633 rm -rf conftest*
4634 if test $ac_cv_sys_file_offset_bits = unknown; then
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4636 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4637 if ${ac_cv_sys_large_files+:} false; then :
4638 $as_echo_n "(cached) " >&6
4639 else
4640 while :; do
4641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4642 /* end confdefs.h. */
4643 #include <sys/types.h>
4644 /* Check that off_t can represent 2**63 - 1 correctly.
4645 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4646 since some C++ compilers masquerading as C compilers
4647 incorrectly reject 9223372036854775807. */
4648 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4649 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4650 && LARGE_OFF_T % 2147483647 == 1)
4651 ? 1 : -1];
4652 int
4653 main ()
4654 {
4655
4656 ;
4657 return 0;
4658 }
4659 _ACEOF
4660 if ac_fn_c_try_compile "$LINENO"; then :
4661 ac_cv_sys_large_files=no; break
4662 fi
4663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4665 /* end confdefs.h. */
4666 #define _LARGE_FILES 1
4667 #include <sys/types.h>
4668 /* Check that off_t can represent 2**63 - 1 correctly.
4669 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4670 since some C++ compilers masquerading as C compilers
4671 incorrectly reject 9223372036854775807. */
4672 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4673 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4674 && LARGE_OFF_T % 2147483647 == 1)
4675 ? 1 : -1];
4676 int
4677 main ()
4678 {
4679
4680 ;
4681 return 0;
4682 }
4683 _ACEOF
4684 if ac_fn_c_try_compile "$LINENO"; then :
4685 ac_cv_sys_large_files=1; break
4686 fi
4687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4688 ac_cv_sys_large_files=unknown
4689 break
4690 done
4691 fi
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4693 $as_echo "$ac_cv_sys_large_files" >&6; }
4694 case $ac_cv_sys_large_files in #(
4695 no | unknown) ;;
4696 *)
4697 cat >>confdefs.h <<_ACEOF
4698 #define _LARGE_FILES $ac_cv_sys_large_files
4699 _ACEOF
4700 ;;
4701 esac
4702 rm -rf conftest*
4703 fi
4704
4705
4706 fi
4707
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4709 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4710 if ${ac_cv_sys_largefile_source+:} false; then :
4711 $as_echo_n "(cached) " >&6
4712 else
4713 while :; do
4714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4715 /* end confdefs.h. */
4716 #include <sys/types.h> /* for off_t */
4717 #include <stdio.h>
4718 int
4719 main ()
4720 {
4721 int (*fp) (FILE *, off_t, int) = fseeko;
4722 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4723 ;
4724 return 0;
4725 }
4726 _ACEOF
4727 if ac_fn_c_try_link "$LINENO"; then :
4728 ac_cv_sys_largefile_source=no; break
4729 fi
4730 rm -f core conftest.err conftest.$ac_objext \
4731 conftest$ac_exeext conftest.$ac_ext
4732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4733 /* end confdefs.h. */
4734 #define _LARGEFILE_SOURCE 1
4735 #include <sys/types.h> /* for off_t */
4736 #include <stdio.h>
4737 int
4738 main ()
4739 {
4740 int (*fp) (FILE *, off_t, int) = fseeko;
4741 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4742 ;
4743 return 0;
4744 }
4745 _ACEOF
4746 if ac_fn_c_try_link "$LINENO"; then :
4747 ac_cv_sys_largefile_source=1; break
4748 fi
4749 rm -f core conftest.err conftest.$ac_objext \
4750 conftest$ac_exeext conftest.$ac_ext
4751 ac_cv_sys_largefile_source=unknown
4752 break
4753 done
4754 fi
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4756 $as_echo "$ac_cv_sys_largefile_source" >&6; }
4757 case $ac_cv_sys_largefile_source in #(
4758 no | unknown) ;;
4759 *)
4760 cat >>confdefs.h <<_ACEOF
4761 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4762 _ACEOF
4763 ;;
4764 esac
4765 rm -rf conftest*
4766
4767 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4768 # in glibc 2.1.3, but that breaks too many other things.
4769 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4770 if test $ac_cv_sys_largefile_source != unknown; then
4771
4772 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
4773
4774 fi
4775
4776
4777 ac_ext=c
4778 ac_cpp='$CPP $CPPFLAGS'
4779 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4780 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4781 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4783 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4784 # On Suns, sometimes $CPP names a directory.
4785 if test -n "$CPP" && test -d "$CPP"; then
4786 CPP=
4787 fi
4788 if test -z "$CPP"; then
4789 if ${ac_cv_prog_CPP+:} false; then :
4790 $as_echo_n "(cached) " >&6
4791 else
4792 # Double quotes because CPP needs to be expanded
4793 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4794 do
4795 ac_preproc_ok=false
4796 for ac_c_preproc_warn_flag in '' yes
4797 do
4798 # Use a header file that comes with gcc, so configuring glibc
4799 # with a fresh cross-compiler works.
4800 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4801 # <limits.h> exists even on freestanding compilers.
4802 # On the NeXT, cc -E runs the code through the compiler's parser,
4803 # not just through cpp. "Syntax error" is here to catch this case.
4804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4805 /* end confdefs.h. */
4806 #ifdef __STDC__
4807 # include <limits.h>
4808 #else
4809 # include <assert.h>
4810 #endif
4811 Syntax error
4812 _ACEOF
4813 if ac_fn_c_try_cpp "$LINENO"; then :
4814
4815 else
4816 # Broken: fails on valid input.
4817 continue
4818 fi
4819 rm -f conftest.err conftest.i conftest.$ac_ext
4820
4821 # OK, works on sane cases. Now check whether nonexistent headers
4822 # can be detected and how.
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4825 #include <ac_nonexistent.h>
4826 _ACEOF
4827 if ac_fn_c_try_cpp "$LINENO"; then :
4828 # Broken: success on invalid input.
4829 continue
4830 else
4831 # Passes both tests.
4832 ac_preproc_ok=:
4833 break
4834 fi
4835 rm -f conftest.err conftest.i conftest.$ac_ext
4836
4837 done
4838 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4839 rm -f conftest.i conftest.err conftest.$ac_ext
4840 if $ac_preproc_ok; then :
4841 break
4842 fi
4843
4844 done
4845 ac_cv_prog_CPP=$CPP
4846
4847 fi
4848 CPP=$ac_cv_prog_CPP
4849 else
4850 ac_cv_prog_CPP=$CPP
4851 fi
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4853 $as_echo "$CPP" >&6; }
4854 ac_preproc_ok=false
4855 for ac_c_preproc_warn_flag in '' yes
4856 do
4857 # Use a header file that comes with gcc, so configuring glibc
4858 # with a fresh cross-compiler works.
4859 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4860 # <limits.h> exists even on freestanding compilers.
4861 # On the NeXT, cc -E runs the code through the compiler's parser,
4862 # not just through cpp. "Syntax error" is here to catch this case.
4863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4864 /* end confdefs.h. */
4865 #ifdef __STDC__
4866 # include <limits.h>
4867 #else
4868 # include <assert.h>
4869 #endif
4870 Syntax error
4871 _ACEOF
4872 if ac_fn_c_try_cpp "$LINENO"; then :
4873
4874 else
4875 # Broken: fails on valid input.
4876 continue
4877 fi
4878 rm -f conftest.err conftest.i conftest.$ac_ext
4879
4880 # OK, works on sane cases. Now check whether nonexistent headers
4881 # can be detected and how.
4882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883 /* end confdefs.h. */
4884 #include <ac_nonexistent.h>
4885 _ACEOF
4886 if ac_fn_c_try_cpp "$LINENO"; then :
4887 # Broken: success on invalid input.
4888 continue
4889 else
4890 # Passes both tests.
4891 ac_preproc_ok=:
4892 break
4893 fi
4894 rm -f conftest.err conftest.i conftest.$ac_ext
4895
4896 done
4897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4898 rm -f conftest.i conftest.err conftest.$ac_ext
4899 if $ac_preproc_ok; then :
4900
4901 else
4902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4903 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4904 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4905 See \`config.log' for more details" "$LINENO" 5; }
4906 fi
4907
4908 ac_ext=c
4909 ac_cpp='$CPP $CPPFLAGS'
4910 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4911 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4912 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4913
4914
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4916 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4917 if ${ac_cv_path_GREP+:} false; then :
4918 $as_echo_n "(cached) " >&6
4919 else
4920 if test -z "$GREP"; then
4921 ac_path_GREP_found=false
4922 # Loop through the user's path and test for each of PROGNAME-LIST
4923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4925 do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_prog in grep ggrep; do
4929 for ac_exec_ext in '' $ac_executable_extensions; do
4930 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4931 as_fn_executable_p "$ac_path_GREP" || continue
4932 # Check for GNU ac_path_GREP and select it if it is found.
4933 # Check for GNU $ac_path_GREP
4934 case `"$ac_path_GREP" --version 2>&1` in
4935 *GNU*)
4936 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4937 *)
4938 ac_count=0
4939 $as_echo_n 0123456789 >"conftest.in"
4940 while :
4941 do
4942 cat "conftest.in" "conftest.in" >"conftest.tmp"
4943 mv "conftest.tmp" "conftest.in"
4944 cp "conftest.in" "conftest.nl"
4945 $as_echo 'GREP' >> "conftest.nl"
4946 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4947 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4948 as_fn_arith $ac_count + 1 && ac_count=$as_val
4949 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4950 # Best one so far, save it but keep looking for a better one
4951 ac_cv_path_GREP="$ac_path_GREP"
4952 ac_path_GREP_max=$ac_count
4953 fi
4954 # 10*(2^10) chars as input seems more than enough
4955 test $ac_count -gt 10 && break
4956 done
4957 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4958 esac
4959
4960 $ac_path_GREP_found && break 3
4961 done
4962 done
4963 done
4964 IFS=$as_save_IFS
4965 if test -z "$ac_cv_path_GREP"; then
4966 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4967 fi
4968 else
4969 ac_cv_path_GREP=$GREP
4970 fi
4971
4972 fi
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4974 $as_echo "$ac_cv_path_GREP" >&6; }
4975 GREP="$ac_cv_path_GREP"
4976
4977
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4979 $as_echo_n "checking for egrep... " >&6; }
4980 if ${ac_cv_path_EGREP+:} false; then :
4981 $as_echo_n "(cached) " >&6
4982 else
4983 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4984 then ac_cv_path_EGREP="$GREP -E"
4985 else
4986 if test -z "$EGREP"; then
4987 ac_path_EGREP_found=false
4988 # Loop through the user's path and test for each of PROGNAME-LIST
4989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4991 do
4992 IFS=$as_save_IFS
4993 test -z "$as_dir" && as_dir=.
4994 for ac_prog in egrep; do
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4997 as_fn_executable_p "$ac_path_EGREP" || continue
4998 # Check for GNU ac_path_EGREP and select it if it is found.
4999 # Check for GNU $ac_path_EGREP
5000 case `"$ac_path_EGREP" --version 2>&1` in
5001 *GNU*)
5002 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5003 *)
5004 ac_count=0
5005 $as_echo_n 0123456789 >"conftest.in"
5006 while :
5007 do
5008 cat "conftest.in" "conftest.in" >"conftest.tmp"
5009 mv "conftest.tmp" "conftest.in"
5010 cp "conftest.in" "conftest.nl"
5011 $as_echo 'EGREP' >> "conftest.nl"
5012 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5013 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5014 as_fn_arith $ac_count + 1 && ac_count=$as_val
5015 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5016 # Best one so far, save it but keep looking for a better one
5017 ac_cv_path_EGREP="$ac_path_EGREP"
5018 ac_path_EGREP_max=$ac_count
5019 fi
5020 # 10*(2^10) chars as input seems more than enough
5021 test $ac_count -gt 10 && break
5022 done
5023 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5024 esac
5025
5026 $ac_path_EGREP_found && break 3
5027 done
5028 done
5029 done
5030 IFS=$as_save_IFS
5031 if test -z "$ac_cv_path_EGREP"; then
5032 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5033 fi
5034 else
5035 ac_cv_path_EGREP=$EGREP
5036 fi
5037
5038 fi
5039 fi
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5041 $as_echo "$ac_cv_path_EGREP" >&6; }
5042 EGREP="$ac_cv_path_EGREP"
5043
5044
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5046 $as_echo_n "checking for ANSI C header files... " >&6; }
5047 if ${ac_cv_header_stdc+:} false; then :
5048 $as_echo_n "(cached) " >&6
5049 else
5050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5051 /* end confdefs.h. */
5052 #include <stdlib.h>
5053 #include <stdarg.h>
5054 #include <string.h>
5055 #include <float.h>
5056
5057 int
5058 main ()
5059 {
5060
5061 ;
5062 return 0;
5063 }
5064 _ACEOF
5065 if ac_fn_c_try_compile "$LINENO"; then :
5066 ac_cv_header_stdc=yes
5067 else
5068 ac_cv_header_stdc=no
5069 fi
5070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5071
5072 if test $ac_cv_header_stdc = yes; then
5073 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075 /* end confdefs.h. */
5076 #include <string.h>
5077
5078 _ACEOF
5079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5080 $EGREP "memchr" >/dev/null 2>&1; then :
5081
5082 else
5083 ac_cv_header_stdc=no
5084 fi
5085 rm -f conftest*
5086
5087 fi
5088
5089 if test $ac_cv_header_stdc = yes; then
5090 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092 /* end confdefs.h. */
5093 #include <stdlib.h>
5094
5095 _ACEOF
5096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5097 $EGREP "free" >/dev/null 2>&1; then :
5098
5099 else
5100 ac_cv_header_stdc=no
5101 fi
5102 rm -f conftest*
5103
5104 fi
5105
5106 if test $ac_cv_header_stdc = yes; then
5107 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5108 if test "$cross_compiling" = yes; then :
5109 :
5110 else
5111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5112 /* end confdefs.h. */
5113 #include <ctype.h>
5114 #include <stdlib.h>
5115 #if ((' ' & 0x0FF) == 0x020)
5116 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5117 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5118 #else
5119 # define ISLOWER(c) \
5120 (('a' <= (c) && (c) <= 'i') \
5121 || ('j' <= (c) && (c) <= 'r') \
5122 || ('s' <= (c) && (c) <= 'z'))
5123 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5124 #endif
5125
5126 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5127 int
5128 main ()
5129 {
5130 int i;
5131 for (i = 0; i < 256; i++)
5132 if (XOR (islower (i), ISLOWER (i))
5133 || toupper (i) != TOUPPER (i))
5134 return 2;
5135 return 0;
5136 }
5137 _ACEOF
5138 if ac_fn_c_try_run "$LINENO"; then :
5139
5140 else
5141 ac_cv_header_stdc=no
5142 fi
5143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5144 conftest.$ac_objext conftest.beam conftest.$ac_ext
5145 fi
5146
5147 fi
5148 fi
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5150 $as_echo "$ac_cv_header_stdc" >&6; }
5151 if test $ac_cv_header_stdc = yes; then
5152
5153 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5154
5155 fi
5156
5157 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5158 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5159 inttypes.h stdint.h unistd.h
5160 do :
5161 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5162 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5163 "
5164 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5165 cat >>confdefs.h <<_ACEOF
5166 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5167 _ACEOF
5168
5169 fi
5170
5171 done
5172
5173
5174 for ac_header in sys/ioccom.h sys/sockio.h
5175 do :
5176 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5177 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5178 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5179 cat >>confdefs.h <<_ACEOF
5180 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5181 _ACEOF
5182
5183 fi
5184
5185 done
5186
5187 for ac_header in netpacket/packet.h
5188 do :
5189 ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5190 if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
5191 cat >>confdefs.h <<_ACEOF
5192 #define HAVE_NETPACKET_PACKET_H 1
5193 _ACEOF
5194
5195 fi
5196
5197 done
5198
5199 for ac_header in net/pfvar.h
5200 do :
5201 ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
5202 #include <sys/socket.h>
5203 #include <net/if.h>
5204 "
5205 if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
5206 cat >>confdefs.h <<_ACEOF
5207 #define HAVE_NET_PFVAR_H 1
5208 _ACEOF
5209
5210 fi
5211
5212 done
5213
5214 if test "$ac_cv_header_net_pfvar_h" = yes; then
5215 #
5216 # Check for various PF actions.
5217 #
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
5219 $as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
5220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5221 /* end confdefs.h. */
5222 #include <sys/types.h>
5223 #include <sys/socket.h>
5224 #include <net/if.h>
5225 #include <net/pfvar.h>
5226 int
5227 main ()
5228 {
5229 return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
5230 ;
5231 return 0;
5232 }
5233 _ACEOF
5234 if ac_fn_c_try_compile "$LINENO"; then :
5235
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5237 $as_echo "yes" >&6; }
5238
5239 $as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
5240
5241
5242 else
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5244 $as_echo "no" >&6; }
5245 fi
5246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5247 fi
5248
5249 case "$host_os" in
5250 linux*|uclinux*)
5251 #
5252 # linux/if_bonding.h requires sys/socket.h.
5253 #
5254 for ac_header in linux/sockios.h linux/if_bonding.h
5255 do :
5256 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5257 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
5258 #include <sys/socket.h>
5259 #include <linux/if.h>
5260
5261 "
5262 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5263 cat >>confdefs.h <<_ACEOF
5264 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5265 _ACEOF
5266
5267 fi
5268
5269 done
5270
5271
5272 #
5273 # Check for the eventfd header.
5274 #
5275 for ac_header in sys/eventfd.h
5276 do :
5277 ac_fn_c_check_header_mongrel "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
5278 if test "x$ac_cv_header_sys_eventfd_h" = xyes; then :
5279 cat >>confdefs.h <<_ACEOF
5280 #define HAVE_SYS_EVENTFD_H 1
5281 _ACEOF
5282
5283 fi
5284
5285 done
5286
5287 ;;
5288
5289 haiku*)
5290 #
5291 # Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
5292 #
5293 CFLAGS="$CFLAGS -D_BSD_SOURCE"
5294 ;;
5295 esac
5296
5297 if test "$GCC" = yes ; then
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
5299 $as_echo_n "checking for ANSI ioctl definitions... " >&6; }
5300 if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
5301 $as_echo_n "(cached) " >&6
5302 else
5303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5304 /* end confdefs.h. */
5305 /*
5306 * This generates a "duplicate case value" when fixincludes
5307 * has not be run.
5308 */
5309 # include <sys/types.h>
5310 # include <sys/time.h>
5311 # include <sys/ioctl.h>
5312 # ifdef HAVE_SYS_IOCCOM_H
5313 # include <sys/ioccom.h>
5314 # endif
5315 int
5316 main ()
5317 {
5318 switch (0) {
5319 case _IO('A', 1):;
5320 case _IO('B', 1):;
5321 }
5322 ;
5323 return 0;
5324 }
5325 _ACEOF
5326 if ac_fn_c_try_compile "$LINENO"; then :
5327 ac_cv_lbl_gcc_fixincludes=yes
5328 else
5329 ac_cv_lbl_gcc_fixincludes=no
5330 fi
5331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5332 fi
5333
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
5335 $as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
5336 if test $ac_cv_lbl_gcc_fixincludes = no ; then
5337 # Don't cache failure
5338 unset ac_cv_lbl_gcc_fixincludes
5339 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
5340 fi
5341 fi
5342
5343 for ac_func in strerror
5344 do :
5345 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
5346 if test "x$ac_cv_func_strerror" = xyes; then :
5347 cat >>confdefs.h <<_ACEOF
5348 #define HAVE_STRERROR 1
5349 _ACEOF
5350
5351 fi
5352 done
5353
5354 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
5355 if test "x$ac_cv_func_strerror_r" = xyes; then :
5356
5357 #
5358 # We have strerror_r; if we define _GNU_SOURCE, is it a
5359 # POSIX-compliant strerror_r() or a GNU strerror_r()?
5360 #
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
5362 $as_echo_n "checking whether strerror_r is GNU-style... " >&6; }
5363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5364 /* end confdefs.h. */
5365
5366 #define _GNU_SOURCE
5367 #include <string.h>
5368
5369 /* Define it GNU-style; that will cause an error if it's not GNU-style */
5370 extern char *strerror_r(int, char *, size_t);
5371
5372 int
5373 main(void)
5374 {
5375 return 0;
5376 }
5377
5378
5379 _ACEOF
5380 if ac_fn_c_try_compile "$LINENO"; then :
5381
5382 # GNU-style
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5384 $as_echo "yes" >&6; }
5385
5386 $as_echo "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
5387
5388
5389 else
5390
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392 $as_echo "no" >&6; }
5393
5394 $as_echo "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
5395
5396
5397 fi
5398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5399
5400 else
5401
5402 #
5403 # We don't have strerror_r; do we have strerror_s?
5404 #
5405 for ac_func in strerror_s
5406 do :
5407 ac_fn_c_check_func "$LINENO" "strerror_s" "ac_cv_func_strerror_s"
5408 if test "x$ac_cv_func_strerror_s" = xyes; then :
5409 cat >>confdefs.h <<_ACEOF
5410 #define HAVE_STRERROR_S 1
5411 _ACEOF
5412
5413 fi
5414 done
5415
5416
5417 fi
5418
5419
5420 #
5421 # Thanks, IBM, for not providing vsyslog() in AIX!
5422 #
5423 for ac_func in vsyslog
5424 do :
5425 ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5426 if test "x$ac_cv_func_vsyslog" = xyes; then :
5427 cat >>confdefs.h <<_ACEOF
5428 #define HAVE_VSYSLOG 1
5429 _ACEOF
5430
5431 fi
5432 done
5433
5434
5435 #
5436 # Make sure we have vsnprintf() and snprintf(); we require them.
5437 #
5438 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5439 if test "x$ac_cv_func_vsnprintf" = xyes; then :
5440
5441 else
5442 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5443 fi
5444
5445 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5446 if test "x$ac_cv_func_snprintf" = xyes; then :
5447
5448 else
5449 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5450 fi
5451
5452
5453 needasprintf=no
5454 for ac_func in vasprintf asprintf
5455 do :
5456 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5457 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5458 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5459 cat >>confdefs.h <<_ACEOF
5460 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5461 _ACEOF
5462
5463 else
5464 needasprintf=yes
5465 fi
5466 done
5467
5468 if test $needasprintf = yes; then
5469 case " $LIBOBJS " in
5470 *" asprintf.$ac_objext "* ) ;;
5471 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5472 ;;
5473 esac
5474
5475 fi
5476
5477 needstrlcat=no
5478 for ac_func in strlcat
5479 do :
5480 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5481 if test "x$ac_cv_func_strlcat" = xyes; then :
5482 cat >>confdefs.h <<_ACEOF
5483 #define HAVE_STRLCAT 1
5484 _ACEOF
5485
5486 else
5487 needstrlcat=yes
5488 fi
5489 done
5490
5491 if test $needstrlcat = yes; then
5492 case " $LIBOBJS " in
5493 *" strlcat.$ac_objext "* ) ;;
5494 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5495 ;;
5496 esac
5497
5498 fi
5499
5500 needstrlcpy=no
5501 for ac_func in strlcpy
5502 do :
5503 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5504 if test "x$ac_cv_func_strlcpy" = xyes; then :
5505 cat >>confdefs.h <<_ACEOF
5506 #define HAVE_STRLCPY 1
5507 _ACEOF
5508
5509 else
5510 needstrlcpy=yes
5511 fi
5512 done
5513
5514 if test $needstrlcpy = yes; then
5515 case " $LIBOBJS " in
5516 *" strlcpy.$ac_objext "* ) ;;
5517 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5518 ;;
5519 esac
5520
5521 fi
5522
5523 needstrtok_r=no
5524 for ac_func in strtok_r
5525 do :
5526 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5527 if test "x$ac_cv_func_strtok_r" = xyes; then :
5528 cat >>confdefs.h <<_ACEOF
5529 #define HAVE_STRTOK_R 1
5530 _ACEOF
5531
5532 else
5533 needstrtok_r=yes
5534 fi
5535 done
5536
5537 if test $needstrtok_r = yes; then
5538 case " $LIBOBJS " in
5539 *" strtok_r.$ac_objext "* ) ;;
5540 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5541 ;;
5542 esac
5543
5544 fi
5545
5546 #
5547 # Do we have ffs(), and is it declared in <strings.h>?
5548 #
5549 for ac_func in ffs
5550 do :
5551 ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5552 if test "x$ac_cv_func_ffs" = xyes; then :
5553 cat >>confdefs.h <<_ACEOF
5554 #define HAVE_FFS 1
5555 _ACEOF
5556
5557 fi
5558 done
5559
5560 if test "$ac_cv_func_ffs" = yes; then
5561 #
5562 # We have ffs(); is it declared in <strings.h>?
5563 #
5564 # This test fails if we don't have <strings.h> or if we do
5565 # but it doesn't declare ffs().
5566 #
5567 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5568 #include <strings.h>
5569
5570 "
5571 if test "x$ac_cv_have_decl_ffs" = xyes; then :
5572
5573
5574 $as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5575
5576
5577 fi
5578
5579 fi
5580
5581 #
5582 # Do this before checking for ether_hostton(), as it's a
5583 # "getaddrinfo()-ish function".
5584 #
5585
5586 #
5587 # Most operating systems have getaddrinfo() in the default searched
5588 # libraries (i.e. libc). Check there first.
5589 #
5590 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5591 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5592
5593 else
5594
5595 #
5596 # Not found in the standard system libraries.
5597 # Try libsocket, which requires libnsl.
5598 #
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5600 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
5601 if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
5602 $as_echo_n "(cached) " >&6
5603 else
5604 ac_check_lib_save_LIBS=$LIBS
5605 LIBS="-lsocket -lnsl $LIBS"
5606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607 /* end confdefs.h. */
5608
5609 /* Override any GCC internal prototype to avoid an error.
5610 Use char because int might match the return type of a GCC
5611 builtin and then its argument prototype would still apply. */
5612 #ifdef __cplusplus
5613 extern "C"
5614 #endif
5615 char getaddrinfo ();
5616 int
5617 main ()
5618 {
5619 return getaddrinfo ();
5620 ;
5621 return 0;
5622 }
5623 _ACEOF
5624 if ac_fn_c_try_link "$LINENO"; then :
5625 ac_cv_lib_socket_getaddrinfo=yes
5626 else
5627 ac_cv_lib_socket_getaddrinfo=no
5628 fi
5629 rm -f core conftest.err conftest.$ac_objext \
5630 conftest$ac_exeext conftest.$ac_ext
5631 LIBS=$ac_check_lib_save_LIBS
5632 fi
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5634 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
5635 if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
5636
5637 #
5638 # OK, we found it in libsocket.
5639 #
5640 LIBS="-lsocket -lnsl $LIBS"
5641
5642 else
5643
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
5645 $as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
5646 if ${ac_cv_lib_network_getaddrinfo+:} false; then :
5647 $as_echo_n "(cached) " >&6
5648 else
5649 ac_check_lib_save_LIBS=$LIBS
5650 LIBS="-lnetwork $LIBS"
5651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5652 /* end confdefs.h. */
5653
5654 /* Override any GCC internal prototype to avoid an error.
5655 Use char because int might match the return type of a GCC
5656 builtin and then its argument prototype would still apply. */
5657 #ifdef __cplusplus
5658 extern "C"
5659 #endif
5660 char getaddrinfo ();
5661 int
5662 main ()
5663 {
5664 return getaddrinfo ();
5665 ;
5666 return 0;
5667 }
5668 _ACEOF
5669 if ac_fn_c_try_link "$LINENO"; then :
5670 ac_cv_lib_network_getaddrinfo=yes
5671 else
5672 ac_cv_lib_network_getaddrinfo=no
5673 fi
5674 rm -f core conftest.err conftest.$ac_objext \
5675 conftest$ac_exeext conftest.$ac_ext
5676 LIBS=$ac_check_lib_save_LIBS
5677 fi
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
5679 $as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
5680 if test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
5681
5682 #
5683 # OK, we found it in libnetwork on Haiku.
5684 #
5685 LIBS="-lnetwork $LIBS"
5686
5687 else
5688
5689 #
5690 # We didn't find it.
5691 #
5692 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5693
5694 fi
5695
5696
5697 fi
5698
5699
5700 #
5701 # OK, do we have recvmsg() in libxnet?
5702 # We also link with libsocket and libnsl.
5703 #
5704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5705 $as_echo_n "checking for recvmsg in -lxnet... " >&6; }
5706 if ${ac_cv_lib_xnet_recvmsg+:} false; then :
5707 $as_echo_n "(cached) " >&6
5708 else
5709 ac_check_lib_save_LIBS=$LIBS
5710 LIBS="-lxnet -lsocket -lnsl $LIBS"
5711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5712 /* end confdefs.h. */
5713
5714 /* Override any GCC internal prototype to avoid an error.
5715 Use char because int might match the return type of a GCC
5716 builtin and then its argument prototype would still apply. */
5717 #ifdef __cplusplus
5718 extern "C"
5719 #endif
5720 char recvmsg ();
5721 int
5722 main ()
5723 {
5724 return recvmsg ();
5725 ;
5726 return 0;
5727 }
5728 _ACEOF
5729 if ac_fn_c_try_link "$LINENO"; then :
5730 ac_cv_lib_xnet_recvmsg=yes
5731 else
5732 ac_cv_lib_xnet_recvmsg=no
5733 fi
5734 rm -f core conftest.err conftest.$ac_objext \
5735 conftest$ac_exeext conftest.$ac_ext
5736 LIBS=$ac_check_lib_save_LIBS
5737 fi
5738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
5739 $as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
5740 if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
5741
5742 #
5743 # Yes - link with it as well.
5744 #
5745 LIBS="-lxnet $LIBS"
5746
5747 fi
5748
5749
5750 fi
5751
5752 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5754 $as_echo_n "checking for library containing putmsg... " >&6; }
5755 if ${ac_cv_search_putmsg+:} false; then :
5756 $as_echo_n "(cached) " >&6
5757 else
5758 ac_func_search_save_LIBS=$LIBS
5759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5760 /* end confdefs.h. */
5761
5762 /* Override any GCC internal prototype to avoid an error.
5763 Use char because int might match the return type of a GCC
5764 builtin and then its argument prototype would still apply. */
5765 #ifdef __cplusplus
5766 extern "C"
5767 #endif
5768 char putmsg ();
5769 int
5770 main ()
5771 {
5772 return putmsg ();
5773 ;
5774 return 0;
5775 }
5776 _ACEOF
5777 for ac_lib in '' str; do
5778 if test -z "$ac_lib"; then
5779 ac_res="none required"
5780 else
5781 ac_res=-l$ac_lib
5782 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5783 fi
5784 if ac_fn_c_try_link "$LINENO"; then :
5785 ac_cv_search_putmsg=$ac_res
5786 fi
5787 rm -f core conftest.err conftest.$ac_objext \
5788 conftest$ac_exeext
5789 if ${ac_cv_search_putmsg+:} false; then :
5790 break
5791 fi
5792 done
5793 if ${ac_cv_search_putmsg+:} false; then :
5794
5795 else
5796 ac_cv_search_putmsg=no
5797 fi
5798 rm conftest.$ac_ext
5799 LIBS=$ac_func_search_save_LIBS
5800 fi
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5802 $as_echo "$ac_cv_search_putmsg" >&6; }
5803 ac_res=$ac_cv_search_putmsg
5804 if test "$ac_res" != no; then :
5805 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5806
5807 fi
5808
5809
5810
5811 #
5812 # Check for reentrant versions of getnetbyname_r(), as provided by
5813 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5814 # If we don't find one, we just use getnetbyname(), which uses
5815 # thread-specific data on many platforms, but doesn't use it on
5816 # NetBSD or OpenBSD, and may not use it on older versions of other
5817 # platforms.
5818 #
5819 # Only do the check if we have a declaration of getnetbyname_r();
5820 # without it, we can't check which API it has. (We assume that
5821 # if there's a declaration, it has a prototype, so that the API
5822 # can be checked.)
5823 #
5824 ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
5825 "
5826 if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
5827
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
5829 $as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
5830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5831 /* end confdefs.h. */
5832 #include <netdb.h>
5833 int
5834 main ()
5835 {
5836
5837 struct netent netent_buf;
5838 char buf[1024];
5839 struct netent *resultp;
5840 int h_errnoval;
5841
5842 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
5843
5844 ;
5845 return 0;
5846 }
5847 _ACEOF
5848 if ac_fn_c_try_link "$LINENO"; then :
5849
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5851 $as_echo "yes" >&6; }
5852
5853 $as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
5854
5855
5856 else
5857
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859 $as_echo "no" >&6; }
5860
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
5862 $as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
5863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5864 /* end confdefs.h. */
5865 #include <netdb.h>
5866 int
5867 main ()
5868 {
5869
5870 struct netent netent_buf;
5871 char buf[1024];
5872
5873 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
5874
5875 ;
5876 return 0;
5877 }
5878 _ACEOF
5879 if ac_fn_c_try_link "$LINENO"; then :
5880
5881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5882 $as_echo "yes" >&6; }
5883
5884 $as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
5885
5886
5887 else
5888
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890 $as_echo "no" >&6; }
5891
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
5893 $as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
5894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5895 /* end confdefs.h. */
5896 #include <netdb.h>
5897 int
5898 main ()
5899 {
5900
5901 struct netent netent_buf;
5902 struct netent_data net_data;
5903
5904 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
5905
5906 ;
5907 return 0;
5908 }
5909 _ACEOF
5910 if ac_fn_c_try_link "$LINENO"; then :
5911
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5913 $as_echo "yes" >&6; }
5914
5915 $as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
5916
5917
5918 else
5919
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921 $as_echo "no" >&6; }
5922
5923 fi
5924 rm -f core conftest.err conftest.$ac_objext \
5925 conftest$ac_exeext conftest.$ac_ext
5926
5927 fi
5928 rm -f core conftest.err conftest.$ac_objext \
5929 conftest$ac_exeext conftest.$ac_ext
5930
5931 fi
5932 rm -f core conftest.err conftest.$ac_objext \
5933 conftest$ac_exeext conftest.$ac_ext
5934
5935 fi
5936
5937
5938 #
5939 # Check for reentrant versions of getprotobyname_r(), as provided by
5940 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5941 # If we don't find one, we just use getprotobyname(), which uses
5942 # thread-specific data on many platforms, but doesn't use it on
5943 # NetBSD or OpenBSD, and may not use it on older versions of other
5944 # platforms.
5945 #
5946 # Only do the check if we have a declaration of getprotobyname_r();
5947 # without it, we can't check which API it has. (We assume that
5948 # if there's a declaration, it has a prototype, so that the API
5949 # can be checked.)
5950 #
5951 ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
5952 "
5953 if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
5954
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
5956 $as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
5957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958 /* end confdefs.h. */
5959 #include <netdb.h>
5960 int
5961 main ()
5962 {
5963
5964 struct protoent protoent_buf;
5965 char buf[1024];
5966 struct protoent *resultp;
5967
5968 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
5969
5970 ;
5971 return 0;
5972 }
5973 _ACEOF
5974 if ac_fn_c_try_link "$LINENO"; then :
5975
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5977 $as_echo "yes" >&6; }
5978
5979 $as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
5980
5981
5982 else
5983
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985 $as_echo "no" >&6; }
5986
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
5988 $as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
5989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5990 /* end confdefs.h. */
5991 #include <netdb.h>
5992 int
5993 main ()
5994 {
5995
5996 struct protoent protoent_buf;
5997 char buf[1024];
5998
5999 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
6000
6001 ;
6002 return 0;
6003 }
6004 _ACEOF
6005 if ac_fn_c_try_link "$LINENO"; then :
6006
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6008 $as_echo "yes" >&6; }
6009
6010 $as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
6011
6012
6013 else
6014
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016 $as_echo "no" >&6; }
6017
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
6019 $as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
6020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6021 /* end confdefs.h. */
6022 #include <netdb.h>
6023 int
6024 main ()
6025 {
6026
6027 struct protoent protoent_buf;
6028 struct protoent_data proto_data;
6029
6030 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
6031
6032 ;
6033 return 0;
6034 }
6035 _ACEOF
6036 if ac_fn_c_try_link "$LINENO"; then :
6037
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6039 $as_echo "yes" >&6; }
6040
6041 $as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6042
6043
6044 else
6045
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047 $as_echo "no" >&6; }
6048
6049 fi
6050 rm -f core conftest.err conftest.$ac_objext \
6051 conftest$ac_exeext conftest.$ac_ext
6052
6053 fi
6054 rm -f core conftest.err conftest.$ac_objext \
6055 conftest$ac_exeext conftest.$ac_ext
6056
6057 fi
6058 rm -f core conftest.err conftest.$ac_objext \
6059 conftest$ac_exeext conftest.$ac_ext
6060
6061 fi
6062
6063
6064 #
6065 # You are in a twisty little maze of UN*Xes, all different.
6066 # Some might not have ether_hostton().
6067 # Some might have it and declare it in <net/ethernet.h>.
6068 # Some might have it and declare it in <netinet/ether.h>
6069 # Some might have it and declare it in <sys/ethernet.h>.
6070 # Some might have it and declare it in <arpa/inet.h>.
6071 # Some might have it and declare it in <netinet/if_ether.h>.
6072 # Some might have it and not declare it in any header file.
6073 #
6074 # Before you is a C compiler.
6075 #
6076 for ac_func in ether_hostton
6077 do :
6078 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6079 if test "x$ac_cv_func_ether_hostton" = xyes; then :
6080 cat >>confdefs.h <<_ACEOF
6081 #define HAVE_ETHER_HOSTTON 1
6082 _ACEOF
6083
6084 fi
6085 done
6086
6087 if test "$ac_cv_func_ether_hostton" = yes; then
6088 #
6089 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
6090 #
6091 # This test fails if we don't have <net/ethernet.h> or if we do
6092 # but it doesn't declare ether_hostton().
6093 #
6094 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6095 #include <net/ethernet.h>
6096
6097 "
6098 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6099
6100
6101 $as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6102
6103
6104 fi
6105
6106 #
6107 # Did that succeed?
6108 #
6109 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6110 #
6111 # No, how about <netinet/ether.h>, as on Linux?
6112 #
6113 # This test fails if we don't have <netinet/ether.h>
6114 # or if we do but it doesn't declare ether_hostton().
6115 #
6116 # Unset ac_cv_have_decl_ether_hostton so we don't
6117 # treat the previous failure as a cached value and
6118 # suppress the next test.
6119 #
6120 unset ac_cv_have_decl_ether_hostton
6121 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6122 #include <netinet/ether.h>
6123
6124 "
6125 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6126
6127
6128 $as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6129
6130
6131 fi
6132
6133 fi
6134 #
6135 # Did that succeed?
6136 #
6137 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6138 #
6139 # No, how about <sys/ethernet.h>, as on Solaris 10
6140 # and later?
6141 #
6142 # This test fails if we don't have <sys/ethernet.h>
6143 # or if we do but it doesn't declare ether_hostton().
6144 #
6145 # Unset ac_cv_have_decl_ether_hostton so we don't
6146 # treat the previous failure as a cached value and
6147 # suppress the next test.
6148 #
6149 unset ac_cv_have_decl_ether_hostton
6150 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6151 #include <sys/ethernet.h>
6152
6153 "
6154 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6155
6156
6157 $as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6158
6159
6160 fi
6161
6162 fi
6163 #
6164 # Did that succeed?
6165 #
6166 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6167 #
6168 # No, how about <arpa/inet.h>, as in AIX?
6169 #
6170 # This test fails if we don't have <arpa/inet.h>
6171 # (if we have ether_hostton(), we should have
6172 # networking, and if we have networking, we should
6173 # have <arapa/inet.h>) or if we do but it doesn't
6174 # declare ether_hostton().
6175 #
6176 # Unset ac_cv_have_decl_ether_hostton so we don't
6177 # treat the previous failure as a cached value and
6178 # suppress the next test.
6179 #
6180 unset ac_cv_have_decl_ether_hostton
6181 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6182 #include <arpa/inet.h>
6183
6184 "
6185 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6186
6187
6188 $as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6189
6190
6191 fi
6192
6193 fi
6194 #
6195 # Did that succeed?
6196 #
6197 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6198 #
6199 # No, how about <netinet/if_ether.h>?
6200 # On some platforms, it requires <net/if.h> and
6201 # <netinet/in.h>, and we always include it with
6202 # both of them, so test it with both of them.
6203 #
6204 # This test fails if we don't have <netinet/if_ether.h>
6205 # and the headers we include before it, or if we do but
6206 # <netinet/if_ether.h> doesn't declare ether_hostton().
6207 #
6208 # Unset ac_cv_have_decl_ether_hostton so we don't
6209 # treat the previous failure as a cached value and
6210 # suppress the next test.
6211 #
6212 unset ac_cv_have_decl_ether_hostton
6213 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6214 #include <sys/types.h>
6215 #include <sys/socket.h>
6216 #include <net/if.h>
6217 #include <netinet/in.h>
6218 #include <netinet/if_ether.h>
6219
6220 "
6221 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6222
6223
6224 $as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6225
6226
6227 fi
6228
6229 fi
6230 #
6231 # After all that, is ether_hostton() declared?
6232 #
6233 if test "$ac_cv_have_decl_ether_hostton" = yes; then
6234 #
6235 # Yes.
6236 #
6237
6238 $as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6239
6240 else
6241 #
6242 # No, we'll have to declare it ourselves.
6243 # Do we have "struct ether_addr" if we include
6244 # <netinet/if_ether.h>?
6245 #
6246 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6247 #include <sys/types.h>
6248 #include <sys/socket.h>
6249 #include <net/if.h>
6250 #include <netinet/in.h>
6251 #include <netinet/if_ether.h>
6252
6253 "
6254 if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6255
6256 cat >>confdefs.h <<_ACEOF
6257 #define HAVE_STRUCT_ETHER_ADDR 1
6258 _ACEOF
6259
6260
6261 fi
6262
6263 fi
6264 fi
6265
6266 #
6267 # For various things that might use pthreads.
6268 #
6269 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6270 if test "x$ac_cv_header_pthread_h" = xyes; then :
6271
6272 #
6273 # OK, we have pthread.h. Do we have pthread_create in the
6274 # system libraries?
6275 #
6276 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
6277 if test "x$ac_cv_func_pthread_create" = xyes; then :
6278
6279 #
6280 # Yes.
6281 #
6282 ac_lbl_have_pthreads="found"
6283
6284 else
6285
6286 #
6287 # No - do we have it in -lpthreads?
6288 #
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
6290 $as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
6291 if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
6292 $as_echo_n "(cached) " >&6
6293 else
6294 ac_check_lib_save_LIBS=$LIBS
6295 LIBS="-lpthreads $LIBS"
6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6297 /* end confdefs.h. */
6298
6299 /* Override any GCC internal prototype to avoid an error.
6300 Use char because int might match the return type of a GCC
6301 builtin and then its argument prototype would still apply. */
6302 #ifdef __cplusplus
6303 extern "C"
6304 #endif
6305 char pthread_create ();
6306 int
6307 main ()
6308 {
6309 return pthread_create ();
6310 ;
6311 return 0;
6312 }
6313 _ACEOF
6314 if ac_fn_c_try_link "$LINENO"; then :
6315 ac_cv_lib_pthreads_pthread_create=yes
6316 else
6317 ac_cv_lib_pthreads_pthread_create=no
6318 fi
6319 rm -f core conftest.err conftest.$ac_objext \
6320 conftest$ac_exeext conftest.$ac_ext
6321 LIBS=$ac_check_lib_save_LIBS
6322 fi
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
6324 $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
6325 if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
6326
6327 #
6328 # Yes - add -lpthreads.
6329 #
6330 ac_lbl_have_pthreads="found"
6331 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
6332
6333 else
6334
6335 #
6336 # No - do we have it in -lpthread?
6337 #
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6339 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6340 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6341 $as_echo_n "(cached) " >&6
6342 else
6343 ac_check_lib_save_LIBS=$LIBS
6344 LIBS="-lpthread $LIBS"
6345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6346 /* end confdefs.h. */
6347
6348 /* Override any GCC internal prototype to avoid an error.
6349 Use char because int might match the return type of a GCC
6350 builtin and then its argument prototype would still apply. */
6351 #ifdef __cplusplus
6352 extern "C"
6353 #endif
6354 char pthread_create ();
6355 int
6356 main ()
6357 {
6358 return pthread_create ();
6359 ;
6360 return 0;
6361 }
6362 _ACEOF
6363 if ac_fn_c_try_link "$LINENO"; then :
6364 ac_cv_lib_pthread_pthread_create=yes
6365 else
6366 ac_cv_lib_pthread_pthread_create=no
6367 fi
6368 rm -f core conftest.err conftest.$ac_objext \
6369 conftest$ac_exeext conftest.$ac_ext
6370 LIBS=$ac_check_lib_save_LIBS
6371 fi
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6373 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6374 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6375
6376 #
6377 # Yes - add -lpthread.
6378 #
6379 ac_lbl_have_pthreads="found"
6380 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
6381
6382 else
6383
6384 #
6385 # No.
6386 #
6387 ac_lbl_have_pthreads="not found"
6388
6389 fi
6390
6391
6392 fi
6393
6394
6395 fi
6396
6397
6398 else
6399
6400 #
6401 # We didn't find pthread.h.
6402 #
6403 ac_lbl_have_pthreads="not found"
6404
6405
6406 fi
6407
6408
6409
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
6411 $as_echo_n "checking if --disable-protochain option is specified... " >&6; }
6412 # Check whether --enable-protochain was given.
6413 if test "${enable_protochain+set}" = set; then :
6414 enableval=$enable_protochain;
6415 fi
6416
6417 case "x$enable_protochain" in
6418 xyes) enable_protochain=enabled ;;
6419 xno) enable_protochain=disabled ;;
6420 x) enable_protochain=enabled ;;
6421 esac
6422
6423 if test "$enable_protochain" = "disabled"; then
6424
6425 $as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
6426
6427 fi
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
6429 $as_echo "${enable_protochain}" >&6; }
6430
6431 #
6432 # valgrindtest directly uses the native capture mechanism, but
6433 # only tests with BPF and PF_PACKET sockets; only enable it if
6434 # we have BPF or PF_PACKET sockets.
6435 #
6436 VALGRINDTEST_SRC=
6437
6438
6439 # Check whether --with-pcap was given.
6440 if test "${with_pcap+set}" = set; then :
6441 withval=$with_pcap;
6442 fi
6443
6444 if test ! -z "$with_pcap" ; then
6445 V_PCAP="$withval"
6446 else
6447 #
6448 # Check for a bunch of headers for various packet
6449 # capture mechanisms.
6450 #
6451 for ac_header in net/bpf.h
6452 do :
6453 ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
6454 if test "x$ac_cv_header_net_bpf_h" = xyes; then :
6455 cat >>confdefs.h <<_ACEOF
6456 #define HAVE_NET_BPF_H 1
6457 _ACEOF
6458
6459 fi
6460
6461 done
6462
6463 if test "$ac_cv_header_net_bpf_h" = yes; then
6464 #
6465 # Does it define BIOCSETIF?
6466 # I.e., is it a header for an LBL/BSD-style capture
6467 # mechanism, or is it just a header for a BPF filter
6468 # engine? Some versions of Arch Linux, for example,
6469 # have a net/bpf.h that doesn't define BIOCSETIF;
6470 # as it's a Linux, it should use packet sockets,
6471 # instead.
6472 #
6473 # We need:
6474 #
6475 # sys/types.h, because FreeBSD 10's net/bpf.h
6476 # requires that various BSD-style integer types
6477 # be defined;
6478 #
6479 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
6480 # doesn't include it but does use struct timeval
6481 # in ioctl definitions;
6482 #
6483 # sys/ioctl.h and, if we have it, sys/ioccom.h,
6484 # because net/bpf.h defines ioctls;
6485 #
6486 # net/if.h, because it defines some structures
6487 # used in ioctls defined by net/bpf.h;
6488 #
6489 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
6490 # defines some structure fields as being
6491 # struct sockaddrs;
6492 #
6493 # and net/bpf.h doesn't necessarily include all
6494 # of those headers itself.
6495 #
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
6497 $as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
6498 if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
6499 $as_echo_n "(cached) " >&6
6500 else
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502 /* end confdefs.h. */
6503
6504 #include <sys/types.h>
6505 #include <sys/time.h>
6506 #include <sys/ioctl.h>
6507 #include <sys/socket.h>
6508 #ifdef HAVE_SYS_IOCCOM_H
6509 #include <sys/ioccom.h>
6510 #endif
6511 #include <net/bpf.h>
6512 #include <net/if.h>
6513
6514 int
6515 main ()
6516 {
6517 u_int i = BIOCSETIF;
6518 ;
6519 return 0;
6520 }
6521 _ACEOF
6522 if ac_fn_c_try_compile "$LINENO"; then :
6523 ac_cv_lbl_bpf_h_defines_biocsetif=yes
6524 else
6525 ac_cv_lbl_bpf_h_defines_biocsetif=no
6526 fi
6527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6528 fi
6529
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6531 $as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6532 fi
6533 for ac_header in net/pfilt.h net/enet.h
6534 do :
6535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6536 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6537 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6538 cat >>confdefs.h <<_ACEOF
6539 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6540 _ACEOF
6541
6542 fi
6543
6544 done
6545
6546 for ac_header in net/nit.h sys/net/nit.h
6547 do :
6548 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6549 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6550 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6551 cat >>confdefs.h <<_ACEOF
6552 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6553 _ACEOF
6554
6555 fi
6556
6557 done
6558
6559 for ac_header in linux/socket.h net/raw.h sys/dlpi.h
6560 do :
6561 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6562 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6563 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6564 cat >>confdefs.h <<_ACEOF
6565 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6566 _ACEOF
6567
6568 fi
6569
6570 done
6571
6572 for ac_header in config/HaikuConfig.h
6573 do :
6574 ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
6575 if test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
6576 cat >>confdefs.h <<_ACEOF
6577 #define HAVE_CONFIG_HAIKUCONFIG_H 1
6578 _ACEOF
6579
6580 fi
6581
6582 done
6583
6584
6585 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6586 #
6587 # BPF.
6588 # Check this before DLPI, so that we pick BPF on
6589 # Solaris 11 and later.
6590 #
6591 V_PCAP=bpf
6592
6593 #
6594 # We have BPF, so build valgrindtest with "make test"
6595 # on macOS and FreeBSD (add your OS once there's a
6596 # valgrind for it).
6597 #
6598 case "$host_os" in
6599
6600 freebsd*|darwin*|linux*)
6601 VALGRINDTEST_SRC=valgrindtest.c
6602 ;;
6603 esac
6604 elif test "$ac_cv_header_linux_socket_h" = yes; then
6605 #
6606 # No prizes for guessing this one.
6607 #
6608 V_PCAP=linux
6609
6610 #
6611 # XXX - this won't work with older kernels that have
6612 # SOCK_PACKET sockets but not PF_PACKET sockets.
6613 #
6614 VALGRINDTEST_SRC=valgrindtest.c
6615 elif test "$ac_cv_header_net_pfilt_h" = yes; then
6616 #
6617 # DEC OSF/1, Digital UNIX, Tru64 UNIX
6618 #
6619 V_PCAP=pf
6620 elif test "$ac_cv_header_net_enet_h" = yes; then
6621 #
6622 # Stanford Enetfilter.
6623 #
6624 V_PCAP=enet
6625 elif test "$ac_cv_header_net_nit_h" = yes; then
6626 #
6627 # SunOS 4.x STREAMS NIT.
6628 #
6629 V_PCAP=snit
6630 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6631 #
6632 # Pre-SunOS 4.x non-STREAMS NIT.
6633 #
6634 V_PCAP=nit
6635 elif test "$ac_cv_header_net_raw_h" = yes; then
6636 #
6637 # IRIX snoop.
6638 #
6639 V_PCAP=snoop
6640 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6641 #
6642 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6643 #
6644 V_PCAP=dlpi
6645 elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
6646 #
6647 # Haiku.
6648 #
6649 V_PCAP=haiku
6650 else
6651 #
6652 # Nothing we support.
6653 #
6654 V_PCAP=null
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6656 $as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6658 $as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6659 fi
6660 fi
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6662 $as_echo_n "checking packet capture type... " >&6; }
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6664 $as_echo "$V_PCAP" >&6; }
6665
6666
6667 #
6668 # Handle each capture type.
6669 #
6670 case "$V_PCAP" in
6671 dlpi)
6672 #
6673 # Checks for some header files.
6674 #
6675 for ac_header in sys/bufmod.h sys/dlpi_ext.h
6676 do :
6677 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6678 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6679 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6680 cat >>confdefs.h <<_ACEOF
6681 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6682 _ACEOF
6683
6684 fi
6685
6686 done
6687
6688
6689 #
6690 # Checks to see if Solaris has the public libdlpi(3LIB) library.
6691 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
6692 # public libdlpi(3LIB) version. Before libdlpi was made public, a
6693 # private version also existed, which did not have the same APIs.
6694 # Due to a gcc bug, the default search path for 32-bit libraries does
6695 # not include /lib, we add it explicitly here.
6696 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
6697 # Also, due to the bug above applications that link to libpcap with
6698 # libdlpi will have to add "-L/lib" option to "configure".
6699 #
6700 saved_ldflags=$LDFLAGS
6701 LDFLAGS="$LIBS -L/lib"
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6703 $as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
6704 if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
6705 $as_echo_n "(cached) " >&6
6706 else
6707 ac_check_lib_save_LIBS=$LIBS
6708 LIBS="-ldlpi $LIBS"
6709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6710 /* end confdefs.h. */
6711
6712 /* Override any GCC internal prototype to avoid an error.
6713 Use char because int might match the return type of a GCC
6714 builtin and then its argument prototype would still apply. */
6715 #ifdef __cplusplus
6716 extern "C"
6717 #endif
6718 char dlpi_walk ();
6719 int
6720 main ()
6721 {
6722 return dlpi_walk ();
6723 ;
6724 return 0;
6725 }
6726 _ACEOF
6727 if ac_fn_c_try_link "$LINENO"; then :
6728 ac_cv_lib_dlpi_dlpi_walk=yes
6729 else
6730 ac_cv_lib_dlpi_dlpi_walk=no
6731 fi
6732 rm -f core conftest.err conftest.$ac_objext \
6733 conftest$ac_exeext conftest.$ac_ext
6734 LIBS=$ac_check_lib_save_LIBS
6735 fi
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6737 $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6738 if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6739
6740 LIBS="-ldlpi $LIBS"
6741 V_PCAP=libdlpi
6742
6743 #
6744 # Capture module plus common code needed for
6745 # common functions used by pcap-[dlpi,libdlpi].c
6746 #
6747 PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
6748
6749 $as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
6750
6751
6752 else
6753
6754 V_PCAP=dlpi
6755
6756 #
6757 # Capture module plus common code needed for
6758 # common functions used by pcap-[dlpi,libdlpi].c
6759 #
6760 PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
6761
6762 fi
6763
6764 LDFLAGS=$saved_ldflags
6765
6766 #
6767 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
6768 # versions of DLPI.
6769 #
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
6771 $as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
6772 if ${ac_cv_sys_dlpi_usable+:} false; then :
6773 $as_echo_n "(cached) " >&6
6774 else
6775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6776 /* end confdefs.h. */
6777
6778 #include <sys/types.h>
6779 #include <sys/time.h>
6780 #include <sys/dlpi.h>
6781
6782 int
6783 main ()
6784 {
6785 int i = DL_PROMISC_PHYS;
6786 ;
6787 return 0;
6788 }
6789 _ACEOF
6790 if ac_fn_c_try_compile "$LINENO"; then :
6791 ac_cv_sys_dlpi_usable=yes
6792 else
6793 ac_cv_sys_dlpi_usable=no
6794 fi
6795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6796 fi
6797
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
6799 $as_echo "$ac_cv_sys_dlpi_usable" >&6; }
6800 if test $ac_cv_sys_dlpi_usable = no ; then
6801 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
6802 fi
6803
6804 #
6805 # Check to see if Solaris has the dl_passive_req_t struct defined
6806 # in <sys/dlpi.h>.
6807 # This check is for DLPI support for passive modes.
6808 # See dlpi(7P) for more details.
6809 #
6810 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
6811 #include <sys/types.h>
6812 #include <sys/dlpi.h>
6813
6814 "
6815 if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
6816
6817 cat >>confdefs.h <<_ACEOF
6818 #define HAVE_DL_PASSIVE_REQ_T 1
6819 _ACEOF
6820
6821
6822 fi
6823
6824 ;;
6825
6826 enet)
6827 #
6828 # Capture module
6829 #
6830 PLATFORM_C_SRC="pcap-enet.c"
6831 ;;
6832
6833 haiku)
6834 #
6835 # Capture module
6836 #
6837 PLATFORM_CXX_SRC="pcap-haiku.cpp"
6838
6839 #
6840 # Just for the sake of it.
6841 #
6842 for ac_header in net/if.h net/if_dl.h net/if_types.h
6843 do :
6844 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6845 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6846 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6847 cat >>confdefs.h <<_ACEOF
6848 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6849 _ACEOF
6850
6851 fi
6852
6853 done
6854
6855 ;;
6856
6857 linux)
6858 #
6859 # Capture module
6860 #
6861 PLATFORM_C_SRC="pcap-linux.c"
6862
6863 #
6864 # Do we have the wireless extensions?
6865 #
6866 for ac_header in linux/wireless.h
6867 do :
6868 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
6869 #include <sys/socket.h>
6870 #include <linux/if.h>
6871 #include <linux/types.h>
6872
6873 "
6874 if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
6875 cat >>confdefs.h <<_ACEOF
6876 #define HAVE_LINUX_WIRELESS_H 1
6877 _ACEOF
6878
6879 fi
6880
6881 done
6882
6883
6884 #
6885 # Do we have libnl?
6886 #
6887
6888 # Check whether --with-libnl was given.
6889 if test "${with_libnl+set}" = set; then :
6890 withval=$with_libnl; with_libnl=$withval
6891 else
6892 with_libnl=if_available
6893 fi
6894
6895
6896 if test x$with_libnl != xno ; then
6897 have_any_nl="no"
6898
6899 incdir=-I/usr/include/libnl3
6900 libnldir=
6901 case "$with_libnl" in
6902
6903 yes|if_available)
6904 ;;
6905
6906 *)
6907 if test -d $withval; then
6908 libnldir=-L${withval}/lib/.libs
6909 incdir=-I${withval}/include
6910 fi
6911 ;;
6912 esac
6913
6914 #
6915 # Try libnl 3.x first.
6916 #
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
6918 $as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
6919 if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
6920 $as_echo_n "(cached) " >&6
6921 else
6922 ac_check_lib_save_LIBS=$LIBS
6923 LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925 /* end confdefs.h. */
6926
6927 /* Override any GCC internal prototype to avoid an error.
6928 Use char because int might match the return type of a GCC
6929 builtin and then its argument prototype would still apply. */
6930 #ifdef __cplusplus
6931 extern "C"
6932 #endif
6933 char nl_socket_alloc ();
6934 int
6935 main ()
6936 {
6937 return nl_socket_alloc ();
6938 ;
6939 return 0;
6940 }
6941 _ACEOF
6942 if ac_fn_c_try_link "$LINENO"; then :
6943 ac_cv_lib_nl_3_nl_socket_alloc=yes
6944 else
6945 ac_cv_lib_nl_3_nl_socket_alloc=no
6946 fi
6947 rm -f core conftest.err conftest.$ac_objext \
6948 conftest$ac_exeext conftest.$ac_ext
6949 LIBS=$ac_check_lib_save_LIBS
6950 fi
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
6952 $as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
6953 if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
6954
6955 #
6956 # Yes, we have libnl 3.x.
6957 #
6958 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
6959
6960 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6961
6962
6963 $as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h
6964
6965
6966 $as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
6967
6968
6969 $as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
6970
6971 V_INCLS="$V_INCLS ${incdir}"
6972 have_any_nl="yes"
6973
6974 fi
6975
6976
6977 if test x$have_any_nl = xno ; then
6978 #
6979 # Try libnl 2.x
6980 #
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
6982 $as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; }
6983 if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then :
6984 $as_echo_n "(cached) " >&6
6985 else
6986 ac_check_lib_save_LIBS=$LIBS
6987 LIBS="-lnl $LIBS"
6988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6989 /* end confdefs.h. */
6990
6991 /* Override any GCC internal prototype to avoid an error.
6992 Use char because int might match the return type of a GCC
6993 builtin and then its argument prototype would still apply. */
6994 #ifdef __cplusplus
6995 extern "C"
6996 #endif
6997 char nl_socket_alloc ();
6998 int
6999 main ()
7000 {
7001 return nl_socket_alloc ();
7002 ;
7003 return 0;
7004 }
7005 _ACEOF
7006 if ac_fn_c_try_link "$LINENO"; then :
7007 ac_cv_lib_nl_nl_socket_alloc=yes
7008 else
7009 ac_cv_lib_nl_nl_socket_alloc=no
7010 fi
7011 rm -f core conftest.err conftest.$ac_objext \
7012 conftest$ac_exeext conftest.$ac_ext
7013 LIBS=$ac_check_lib_save_LIBS
7014 fi
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_socket_alloc" >&5
7016 $as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; }
7017 if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then :
7018
7019 #
7020 # Yes, we have libnl 2.x.
7021 #
7022 LIBS="${libnldir} -lnl-genl -lnl $LIBS"
7023
7024 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7025
7026
7027 $as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h
7028
7029
7030 $as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
7031
7032
7033 $as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
7034
7035 have_any_nl="yes"
7036
7037 fi
7038
7039 fi
7040
7041 if test x$have_any_nl = xno ; then
7042 #
7043 # No, we don't; do we have libnl 1.x?
7044 #
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_handle_alloc in -lnl" >&5
7046 $as_echo_n "checking for nl_handle_alloc in -lnl... " >&6; }
7047 if ${ac_cv_lib_nl_nl_handle_alloc+:} false; then :
7048 $as_echo_n "(cached) " >&6
7049 else
7050 ac_check_lib_save_LIBS=$LIBS
7051 LIBS="-lnl $LIBS"
7052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7053 /* end confdefs.h. */
7054
7055 /* Override any GCC internal prototype to avoid an error.
7056 Use char because int might match the return type of a GCC
7057 builtin and then its argument prototype would still apply. */
7058 #ifdef __cplusplus
7059 extern "C"
7060 #endif
7061 char nl_handle_alloc ();
7062 int
7063 main ()
7064 {
7065 return nl_handle_alloc ();
7066 ;
7067 return 0;
7068 }
7069 _ACEOF
7070 if ac_fn_c_try_link "$LINENO"; then :
7071 ac_cv_lib_nl_nl_handle_alloc=yes
7072 else
7073 ac_cv_lib_nl_nl_handle_alloc=no
7074 fi
7075 rm -f core conftest.err conftest.$ac_objext \
7076 conftest$ac_exeext conftest.$ac_ext
7077 LIBS=$ac_check_lib_save_LIBS
7078 fi
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_handle_alloc" >&5
7080 $as_echo "$ac_cv_lib_nl_nl_handle_alloc" >&6; }
7081 if test "x$ac_cv_lib_nl_nl_handle_alloc" = xyes; then :
7082
7083 #
7084 # Yes.
7085 #
7086 LIBS="${libnldir} -lnl $LIBS"
7087
7088 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7089
7090 have_any_nl="yes"
7091
7092 fi
7093
7094 fi
7095
7096 if test x$have_any_nl = xno ; then
7097 #
7098 # No, we don't have libnl at all.
7099 #
7100 if test x$with_libnl = xyes ; then
7101 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
7102 fi
7103 fi
7104 fi
7105
7106 for ac_header in linux/ethtool.h
7107 do :
7108 ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "
7109 $ac_includes_default
7110 #include <linux/types.h>
7111
7112 "
7113 if test "x$ac_cv_header_linux_ethtool_h" = xyes; then :
7114 cat >>confdefs.h <<_ACEOF
7115 #define HAVE_LINUX_ETHTOOL_H 1
7116 _ACEOF
7117
7118 fi
7119
7120 done
7121
7122
7123 #
7124 # Check to see if struct tpacket_stats is defined in
7125 # <linux/if_packet.h>. If so, then pcap-linux.c can use this
7126 # to report proper statistics.
7127 #
7128 # -Scott Barron
7129 #
7130 ac_fn_c_check_type "$LINENO" "struct tpacket_stats" "ac_cv_type_struct_tpacket_stats" "
7131 #include <linux/if_packet.h>
7132
7133 "
7134 if test "x$ac_cv_type_struct_tpacket_stats" = xyes; then :
7135
7136 cat >>confdefs.h <<_ACEOF
7137 #define HAVE_STRUCT_TPACKET_STATS 1
7138 _ACEOF
7139
7140
7141 fi
7142
7143
7144 #
7145 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
7146 #
7147 # NOTE: any failure means we conclude that it doesn't have that
7148 # member, so if we don't have tpacket_auxdata, we conclude it
7149 # doesn't have that member (which is OK, as either we won't be
7150 # using code that would use that member, or we wouldn't compile
7151 # in any case).
7152 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
7153 #include <sys/types.h>
7154 #include <linux/if_packet.h>
7155
7156 "
7157 if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
7158
7159 cat >>confdefs.h <<_ACEOF
7160 #define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
7161 _ACEOF
7162
7163
7164 fi
7165
7166 ;;
7167
7168 bpf)
7169 #
7170 # Capture module
7171 #
7172 PLATFORM_C_SRC="pcap-bpf.c"
7173
7174 #
7175 # Check whether we have the *BSD-style ioctls.
7176 #
7177 for ac_header in net/if_media.h
7178 do :
7179 ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
7180 if test "x$ac_cv_header_net_if_media_h" = xyes; then :
7181 cat >>confdefs.h <<_ACEOF
7182 #define HAVE_NET_IF_MEDIA_H 1
7183 _ACEOF
7184
7185 fi
7186
7187 done
7188
7189
7190 #
7191 # Check whether we have struct BPF_TIMEVAL.
7192 #
7193 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
7194 #include <sys/types.h>
7195 #include <sys/ioctl.h>
7196 #ifdef HAVE_SYS_IOCCOM_H
7197 #include <sys/ioccom.h>
7198 #endif
7199 #include <net/bpf.h>
7200
7201 "
7202 if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
7203
7204 cat >>confdefs.h <<_ACEOF
7205 #define HAVE_STRUCT_BPF_TIMEVAL 1
7206 _ACEOF
7207
7208
7209 fi
7210
7211 ;;
7212
7213 pf)
7214 #
7215 # Capture module
7216 #
7217 PLATFORM_C_SRC="pcap-pf.c"
7218 ;;
7219
7220 snit)
7221 #
7222 # Capture module
7223 #
7224 PLATFORM_C_SRC="pcap-snit.c"
7225 ;;
7226
7227 snoop)
7228 #
7229 # Capture module
7230 #
7231 PLATFORM_C_SRC="pcap-snoop.c"
7232 ;;
7233
7234 dag)
7235 #
7236 # --with-pcap=dag is the only way to get here, and it means
7237 # "DAG support but nothing else"
7238 #
7239 V_DEFS="$V_DEFS -DDAG_ONLY"
7240 PLATFORM_C_SRC="pcap-dag.c"
7241 xxx_only=yes
7242 ;;
7243
7244 dpdk)
7245 #
7246 # --with-pcap=dpdk is the only way to get here, and it means
7247 # "DPDK support but nothing else"
7248 #
7249 V_DEFS="$V_DEFS -DDPDK_ONLY"
7250 PLATFORM_C_SRC="pcap-dpdk.c"
7251 xxx_only=yes
7252 ;;
7253
7254 septel)
7255 #
7256 # --with-pcap=septel is the only way to get here, and it means
7257 # "Septel support but nothing else"
7258 #
7259 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
7260 PLATFORM_C_SRC="pcap-septel.c"
7261 xxx_only=yes
7262 ;;
7263
7264 snf)
7265 #
7266 # --with-pcap=snf is the only way to get here, and it means
7267 # "SNF support but nothing else"
7268 #
7269 V_DEFS="$V_DEFS -DSNF_ONLY"
7270 PLATFORM_C_SRC="pcap-snf.c"
7271 xxx_only=yes
7272 ;;
7273
7274 null)
7275 #
7276 # Capture module
7277 #
7278 PLATFORM_C_SRC="pcap-null.c"
7279 ;;
7280
7281 *)
7282 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
7283 ;;
7284 esac
7285
7286 if test "$V_PCAP" != null
7287 then
7288 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
7289 if test "x$ac_cv_func_getifaddrs" = xyes; then :
7290
7291 #
7292 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
7293 # as well, just in case some platform is really weird.
7294 #
7295 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
7296 if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
7297
7298 #
7299 # We have the header, so we use "getifaddrs()" to
7300 # get the list of interfaces.
7301 #
7302 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
7303
7304 else
7305
7306 #
7307 # We don't have the header - give up.
7308 # XXX - we could also fall back on some other
7309 # mechanism, but, for now, this'll catch this
7310 # problem so that we can at least try to figure
7311 # out something to do on systems with "getifaddrs()"
7312 # but without "ifaddrs.h", if there is something
7313 # we can do on those systems.
7314 #
7315 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
7316
7317 fi
7318
7319
7320
7321 else
7322
7323 #
7324 # Well, we don't have "getifaddrs()", at least not with the
7325 # libraries with which we've decided we need to link
7326 # libpcap with, so we have to use some other mechanism.
7327 #
7328 # Note that this may happen on Solaris, which has
7329 # getifaddrs(), but in -lsocket, not in -lxnet, so we
7330 # won't find it if we link with -lxnet, which we want
7331 # to do for other reasons.
7332 #
7333 # For now, we use either the SIOCGIFCONF ioctl or the
7334 # SIOCGLIFCONF ioctl, preferring the latter if we have
7335 # it; the latter is a Solarisism that first appeared
7336 # in Solaris 8. (Solaris's getifaddrs() appears to
7337 # be built atop SIOCGLIFCONF; using it directly
7338 # avoids a not-all-that-useful middleman.)
7339 #
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
7341 $as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
7342 if ${ac_cv_lbl_have_siocglifconf+:} false; then :
7343 $as_echo_n "(cached) " >&6
7344 else
7345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7346 /* end confdefs.h. */
7347 #include <sys/param.h>
7348 #include <sys/file.h>
7349 #include <sys/ioctl.h>
7350 #include <sys/socket.h>
7351 #include <sys/sockio.h>
7352 int
7353 main ()
7354 {
7355 ioctl(0, SIOCGLIFCONF, (char *)0);
7356 ;
7357 return 0;
7358 }
7359 _ACEOF
7360 if ac_fn_c_try_compile "$LINENO"; then :
7361 ac_cv_lbl_have_siocglifconf=yes
7362 else
7363 ac_cv_lbl_have_siocglifconf=no
7364 fi
7365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7366 fi
7367
7368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
7369 $as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
7370 if test $ac_cv_lbl_have_siocglifconf = yes ; then
7371 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
7372 else
7373 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
7374 fi
7375
7376 fi
7377
7378 fi
7379
7380 case "$host_os" in
7381 linux*)
7382 for ac_header in linux/net_tstamp.h
7383 do :
7384 ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
7385 if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
7386 cat >>confdefs.h <<_ACEOF
7387 #define HAVE_LINUX_NET_TSTAMP_H 1
7388 _ACEOF
7389
7390 fi
7391
7392 done
7393
7394 ;;
7395 *)
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
7397 $as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
7398 ;;
7399 esac
7400
7401 # Check whether --enable-packet-ring was given.
7402 if test "${enable_packet_ring+set}" = set; then :
7403 enableval=$enable_packet_ring;
7404 else
7405 enable_packet_ring=yes
7406 fi
7407
7408
7409 if test "x$enable_packet_ring" != "xno" ; then
7410
7411 $as_echo "#define PCAP_SUPPORT_PACKET_RING 1" >>confdefs.h
7412
7413
7414 fi
7415
7416 #
7417 # Check for socklen_t.
7418 #
7419 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
7420 #include <sys/types.h>
7421 #include <sys/socket.h>
7422
7423 "
7424 if test "x$ac_cv_type_socklen_t" = xyes; then :
7425
7426 cat >>confdefs.h <<_ACEOF
7427 #define HAVE_SOCKLEN_T 1
7428 _ACEOF
7429
7430
7431 fi
7432
7433
7434 # Check whether --enable-ipv6 was given.
7435 if test "${enable_ipv6+set}" = set; then :
7436 enableval=$enable_ipv6;
7437 else
7438 enable_ipv6=yes
7439 fi
7440
7441 if test "$enable_ipv6" != "no"; then
7442 #
7443 # We've already made sure we have getaddrinfo above in
7444 # AC_LBL_LIBRARY_NET.
7445 #
7446
7447 $as_echo "#define INET6 1" >>confdefs.h
7448
7449 fi
7450
7451 #
7452 # Do we have pkg-config?
7453 #
7454 # Extract the first word of "pkg-config", so it can be a program name with args.
7455 set dummy pkg-config; ac_word=$2
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7457 $as_echo_n "checking for $ac_word... " >&6; }
7458 if ${ac_cv_prog_PKGCONFIG+:} false; then :
7459 $as_echo_n "(cached) " >&6
7460 else
7461 if test -n "$PKGCONFIG"; then
7462 ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
7463 else
7464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7465 for as_dir in $PATH
7466 do
7467 IFS=$as_save_IFS
7468 test -z "$as_dir" && as_dir=.
7469 for ac_exec_ext in '' $ac_executable_extensions; do
7470 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7471 ac_cv_prog_PKGCONFIG="pkg-config"
7472 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7473 break 2
7474 fi
7475 done
7476 done
7477 IFS=$as_save_IFS
7478
7479 test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
7480 fi
7481 fi
7482 PKGCONFIG=$ac_cv_prog_PKGCONFIG
7483 if test -n "$PKGCONFIG"; then
7484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
7485 $as_echo "$PKGCONFIG" >&6; }
7486 else
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7488 $as_echo "no" >&6; }
7489 fi
7490
7491
7492
7493 # Check for Endace DAG card support.
7494
7495 # Check whether --with-dag was given.
7496 if test "${with_dag+set}" = set; then :
7497 withval=$with_dag;
7498 if test "$withval" = no
7499 then
7500 # User doesn't want DAG support.
7501 want_dag=no
7502 elif test "$withval" = yes
7503 then
7504 # User wants DAG support but hasn't specified a directory.
7505 want_dag=yes
7506 else
7507 # User wants DAG support and has specified a directory, so use the provided value.
7508 want_dag=yes
7509 dag_root=$withval
7510 fi
7511
7512 else
7513
7514 if test "$V_PCAP" = dag; then
7515 # User requested DAG-only libpcap, so we'd better have
7516 # the DAG API.
7517 want_dag=yes
7518 elif test "xxx_only" = yes; then
7519 # User requested something-else-only pcap, so they don't
7520 # want DAG support.
7521 want_dag=no
7522 else
7523 #
7524 # Use DAG API if present, otherwise don't
7525 #
7526 want_dag=ifpresent
7527 fi
7528
7529 fi
7530
7531
7532
7533 # Check whether --with-dag-includes was given.
7534 if test "${with_dag_includes+set}" = set; then :
7535 withval=$with_dag_includes;
7536 # User wants DAG support and has specified a header directory, so use the provided value.
7537 want_dag=yes
7538 dag_include_dir=$withval
7539
7540 fi
7541
7542
7543
7544 # Check whether --with-dag-libraries was given.
7545 if test "${with_dag_libraries+set}" = set; then :
7546 withval=$with_dag_libraries;
7547 # User wants DAG support and has specified a library directory, so use the provided value.
7548 want_dag=yes
7549 dag_lib_dir=$withval
7550
7551 fi
7552
7553
7554 if test "$want_dag" != no; then
7555
7556 # If necessary, set default paths for DAG API headers and libraries.
7557 if test -z "$dag_root"; then
7558 dag_root=/usr/local
7559 fi
7560
7561 if test -z "$dag_include_dir"; then
7562 dag_include_dir="$dag_root/include"
7563 fi
7564
7565 if test -z "$dag_lib_dir"; then
7566 dag_lib_dir="$dag_root/lib"
7567 fi
7568
7569 V_INCLS="$V_INCLS -I$dag_include_dir"
7570
7571 for ac_header in dagapi.h
7572 do :
7573 ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
7574 if test "x$ac_cv_header_dagapi_h" = xyes; then :
7575 cat >>confdefs.h <<_ACEOF
7576 #define HAVE_DAGAPI_H 1
7577 _ACEOF
7578
7579 fi
7580
7581 done
7582
7583
7584 if test "$ac_cv_header_dagapi_h" = yes; then
7585
7586 if test $V_PCAP != dag ; then
7587 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
7588 fi
7589
7590 # Check for various DAG API functions.
7591 # Don't need to save and restore LIBS to prevent -ldag being
7592 # included if there's a found-action (arg 3).
7593 saved_ldflags=$LDFLAGS
7594 LDFLAGS="-L$dag_lib_dir"
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
7596 $as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
7597 if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
7598 $as_echo_n "(cached) " >&6
7599 else
7600 ac_check_lib_save_LIBS=$LIBS
7601 LIBS="-ldag $LIBS"
7602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7603 /* end confdefs.h. */
7604
7605 /* Override any GCC internal prototype to avoid an error.
7606 Use char because int might match the return type of a GCC
7607 builtin and then its argument prototype would still apply. */
7608 #ifdef __cplusplus
7609 extern "C"
7610 #endif
7611 char dag_attach_stream ();
7612 int
7613 main ()
7614 {
7615 return dag_attach_stream ();
7616 ;
7617 return 0;
7618 }
7619 _ACEOF
7620 if ac_fn_c_try_link "$LINENO"; then :
7621 ac_cv_lib_dag_dag_attach_stream=yes
7622 else
7623 ac_cv_lib_dag_dag_attach_stream=no
7624 fi
7625 rm -f core conftest.err conftest.$ac_objext \
7626 conftest$ac_exeext conftest.$ac_ext
7627 LIBS=$ac_check_lib_save_LIBS
7628 fi
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
7630 $as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
7631 if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
7632 cat >>confdefs.h <<_ACEOF
7633 #define HAVE_LIBDAG 1
7634 _ACEOF
7635
7636 LIBS="-ldag $LIBS"
7637
7638 else
7639 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
7640 fi
7641
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
7643 $as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
7644 if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
7645 $as_echo_n "(cached) " >&6
7646 else
7647 ac_check_lib_save_LIBS=$LIBS
7648 LIBS="-ldag $LIBS"
7649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7650 /* end confdefs.h. */
7651
7652 /* Override any GCC internal prototype to avoid an error.
7653 Use char because int might match the return type of a GCC
7654 builtin and then its argument prototype would still apply. */
7655 #ifdef __cplusplus
7656 extern "C"
7657 #endif
7658 char dag_attach_stream64 ();
7659 int
7660 main ()
7661 {
7662 return dag_attach_stream64 ();
7663 ;
7664 return 0;
7665 }
7666 _ACEOF
7667 if ac_fn_c_try_link "$LINENO"; then :
7668 ac_cv_lib_dag_dag_attach_stream64=yes
7669 else
7670 ac_cv_lib_dag_dag_attach_stream64=no
7671 fi
7672 rm -f core conftest.err conftest.$ac_objext \
7673 conftest$ac_exeext conftest.$ac_ext
7674 LIBS=$ac_check_lib_save_LIBS
7675 fi
7676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
7677 $as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
7678 if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
7679 dag_large_streams="1"
7680 else
7681 dag_large_streams="0"
7682 fi
7683
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
7685 $as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
7686 if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
7687 $as_echo_n "(cached) " >&6
7688 else
7689 ac_check_lib_save_LIBS=$LIBS
7690 LIBS="-ldag $LIBS"
7691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7692 /* end confdefs.h. */
7693
7694 /* Override any GCC internal prototype to avoid an error.
7695 Use char because int might match the return type of a GCC
7696 builtin and then its argument prototype would still apply. */
7697 #ifdef __cplusplus
7698 extern "C"
7699 #endif
7700 char dag_get_erf_types ();
7701 int
7702 main ()
7703 {
7704 return dag_get_erf_types ();
7705 ;
7706 return 0;
7707 }
7708 _ACEOF
7709 if ac_fn_c_try_link "$LINENO"; then :
7710 ac_cv_lib_dag_dag_get_erf_types=yes
7711 else
7712 ac_cv_lib_dag_dag_get_erf_types=no
7713 fi
7714 rm -f core conftest.err conftest.$ac_objext \
7715 conftest$ac_exeext conftest.$ac_ext
7716 LIBS=$ac_check_lib_save_LIBS
7717 fi
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
7719 $as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
7720 if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
7721
7722
7723 $as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
7724
7725 fi
7726
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
7728 $as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
7729 if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
7730 $as_echo_n "(cached) " >&6
7731 else
7732 ac_check_lib_save_LIBS=$LIBS
7733 LIBS="-ldag $LIBS"
7734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7735 /* end confdefs.h. */
7736
7737 /* Override any GCC internal prototype to avoid an error.
7738 Use char because int might match the return type of a GCC
7739 builtin and then its argument prototype would still apply. */
7740 #ifdef __cplusplus
7741 extern "C"
7742 #endif
7743 char dag_get_stream_erf_types ();
7744 int
7745 main ()
7746 {
7747 return dag_get_stream_erf_types ();
7748 ;
7749 return 0;
7750 }
7751 _ACEOF
7752 if ac_fn_c_try_link "$LINENO"; then :
7753 ac_cv_lib_dag_dag_get_stream_erf_types=yes
7754 else
7755 ac_cv_lib_dag_dag_get_stream_erf_types=no
7756 fi
7757 rm -f core conftest.err conftest.$ac_objext \
7758 conftest$ac_exeext conftest.$ac_ext
7759 LIBS=$ac_check_lib_save_LIBS
7760 fi
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
7762 $as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
7763 if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
7764
7765
7766 $as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
7767
7768 fi
7769
7770
7771 LDFLAGS=$saved_ldflags
7772
7773 #
7774 # We assume that if we have libdag we have libdagconf,
7775 # as they're installed at the same time from the same
7776 # package.
7777 #
7778 LIBS="$LIBS -ldag -ldagconf"
7779 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
7780
7781 if test "$dag_large_streams" = 1; then
7782
7783 $as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
7784
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
7786 $as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
7787 if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
7788 $as_echo_n "(cached) " >&6
7789 else
7790 ac_check_lib_save_LIBS=$LIBS
7791 LIBS="-lvdag $LIBS"
7792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7793 /* end confdefs.h. */
7794
7795 /* Override any GCC internal prototype to avoid an error.
7796 Use char because int might match the return type of a GCC
7797 builtin and then its argument prototype would still apply. */
7798 #ifdef __cplusplus
7799 extern "C"
7800 #endif
7801 char vdag_set_device_info ();
7802 int
7803 main ()
7804 {
7805 return vdag_set_device_info ();
7806 ;
7807 return 0;
7808 }
7809 _ACEOF
7810 if ac_fn_c_try_link "$LINENO"; then :
7811 ac_cv_lib_vdag_vdag_set_device_info=yes
7812 else
7813 ac_cv_lib_vdag_vdag_set_device_info=no
7814 fi
7815 rm -f core conftest.err conftest.$ac_objext \
7816 conftest$ac_exeext conftest.$ac_ext
7817 LIBS=$ac_check_lib_save_LIBS
7818 fi
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
7820 $as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
7821 if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
7822 ac_dag_have_vdag="1"
7823 else
7824 ac_dag_have_vdag="0"
7825 fi
7826
7827 if test "$ac_dag_have_vdag" = 1; then
7828
7829 $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
7830
7831 if test "$ac_lbl_have_pthreads" != "found"; then
7832 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
7833 fi
7834 LIBS="$LIBS $PTHREAD_LIBS"
7835 fi
7836 fi
7837
7838
7839 $as_echo "#define HAVE_DAG_API 1" >>confdefs.h
7840
7841 else
7842
7843 if test "$V_PCAP" = dag; then
7844 # User requested "dag" capture type but we couldn't
7845 # find the DAG API support.
7846 as_fn_error $? "DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
7847 fi
7848
7849 if test "$want_dag" = yes; then
7850 # User wanted DAG support but we couldn't find it.
7851 as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
7852 fi
7853 fi
7854 fi
7855
7856
7857 # Check whether --with-septel was given.
7858 if test "${with_septel+set}" = set; then :
7859 withval=$with_septel;
7860 if test "$withval" = no
7861 then
7862 want_septel=no
7863 elif test "$withval" = yes
7864 then
7865 want_septel=yes
7866 septel_root=
7867 else
7868 want_septel=yes
7869 septel_root=$withval
7870 fi
7871
7872 else
7873
7874 if test "$V_PCAP" = septel; then
7875 # User requested Septel-only libpcap, so we'd better have
7876 # the Septel API.
7877 want_septel=yes
7878 elif test "xxx_only" = yes; then
7879 # User requested something-else-only pcap, so they don't
7880 # want Septel support.
7881 want_septel=no
7882 else
7883 #
7884 # Use Septel API if present, otherwise don't
7885 #
7886 want_septel=ifpresent
7887 fi
7888
7889 fi
7890
7891
7892 ac_cv_lbl_septel_api=no
7893 if test "$with_septel" != no; then
7894
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
7896 $as_echo_n "checking whether we have Septel API headers... " >&6; }
7897
7898 # If necessary, set default paths for Septel API headers and libraries.
7899 if test -z "$septel_root"; then
7900 septel_root=$srcdir/../septel
7901 fi
7902
7903 septel_tools_dir="$septel_root"
7904 septel_include_dir="$septel_root/INC"
7905
7906 if test -r "$septel_include_dir/msg.h"; then
7907 ac_cv_lbl_septel_api=yes
7908 fi
7909
7910 if test "$ac_cv_lbl_septel_api" = yes; then
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
7912 $as_echo "yes ($septel_include_dir)" >&6; }
7913
7914 V_INCLS="$V_INCLS -I$septel_include_dir"
7915 ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
7916 ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
7917
7918 if test "$V_PCAP" != septel ; then
7919 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
7920 fi
7921
7922
7923 $as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
7924
7925 else
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7927 $as_echo "no" >&6; }
7928
7929 if test "$V_PCAP" = septel; then
7930 # User requested "septel" capture type but
7931 # we couldn't find the Septel API support.
7932 as_fn_error $? "Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
7933 fi
7934
7935 if test "$want_septel" = yes; then
7936 # User wanted Septel support but we couldn't find it.
7937 as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
7938 fi
7939 fi
7940 fi
7941
7942 # Check for Myricom SNF support.
7943
7944 # Check whether --with-snf was given.
7945 if test "${with_snf+set}" = set; then :
7946 withval=$with_snf;
7947 if test "$withval" = no
7948 then
7949 # User explicitly doesn't want SNF
7950 want_snf=no
7951 elif test "$withval" = yes
7952 then
7953 # User wants SNF support but hasn't specified a directory.
7954 want_snf=yes
7955 else
7956 # User wants SNF support with a specified directory.
7957 want_snf=yes
7958 snf_root=$withval
7959 fi
7960
7961 else
7962
7963 if test "$V_PCAP" = snf; then
7964 # User requested Sniffer-only libpcap, so we'd better have
7965 # the Sniffer API.
7966 want_snf=yes
7967 elif test "xxx_only" = yes; then
7968 # User requested something-else-only pcap, so they don't
7969 # want SNF support.
7970 want_snf=no
7971 else
7972 #
7973 # Use Sniffer API if present, otherwise don't
7974 #
7975 want_snf=ifpresent
7976 fi
7977
7978 fi
7979
7980
7981
7982 # Check whether --with-snf-includes was given.
7983 if test "${with_snf_includes+set}" = set; then :
7984 withval=$with_snf_includes;
7985 # User wants SNF with specific header directory
7986 want_snf=yes
7987 snf_include_dir=$withval
7988
7989 fi
7990
7991
7992
7993 # Check whether --with-snf-libraries was given.
7994 if test "${with_snf_libraries+set}" = set; then :
7995 withval=$with_snf_libraries;
7996 # User wants SNF with specific lib directory
7997 want_snf=yes
7998 snf_lib_dir=$withval
7999
8000 fi
8001
8002
8003 ac_cv_lbl_snf_api=no
8004 if test "$with_snf" != no; then
8005
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
8007 $as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
8008
8009 # If necessary, set default paths for Sniffer headers and libraries.
8010 if test -z "$snf_root"; then
8011 snf_root=/opt/snf
8012 fi
8013
8014 if test -z "$snf_include_dir"; then
8015 snf_include_dir="$snf_root/include"
8016 fi
8017
8018 if test -z "$snf_lib_dir"; then
8019 snf_lib_dir="$snf_root/lib"
8020 fi
8021
8022 if test -f "$snf_include_dir/snf.h"; then
8023 # We found a header; make sure we can link with the library
8024 saved_ldflags=$LDFLAGS
8025 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
8027 $as_echo_n "checking for snf_init in -lsnf... " >&6; }
8028 if ${ac_cv_lib_snf_snf_init+:} false; then :
8029 $as_echo_n "(cached) " >&6
8030 else
8031 ac_check_lib_save_LIBS=$LIBS
8032 LIBS="-lsnf $LIBS"
8033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8034 /* end confdefs.h. */
8035
8036 /* Override any GCC internal prototype to avoid an error.
8037 Use char because int might match the return type of a GCC
8038 builtin and then its argument prototype would still apply. */
8039 #ifdef __cplusplus
8040 extern "C"
8041 #endif
8042 char snf_init ();
8043 int
8044 main ()
8045 {
8046 return snf_init ();
8047 ;
8048 return 0;
8049 }
8050 _ACEOF
8051 if ac_fn_c_try_link "$LINENO"; then :
8052 ac_cv_lib_snf_snf_init=yes
8053 else
8054 ac_cv_lib_snf_snf_init=no
8055 fi
8056 rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext conftest.$ac_ext
8058 LIBS=$ac_check_lib_save_LIBS
8059 fi
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
8061 $as_echo "$ac_cv_lib_snf_snf_init" >&6; }
8062 if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
8063 ac_cv_lbl_snf_api="yes"
8064 fi
8065
8066 LDFLAGS="$saved_ldflags"
8067 if test "$ac_cv_lbl_snf_api" = no; then
8068 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
8069 fi
8070 fi
8071
8072 if test "$ac_cv_lbl_snf_api" = yes; then
8073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
8074 $as_echo "yes ($snf_root)" >&6; }
8075
8076 V_INCLS="$V_INCLS -I$snf_include_dir"
8077 LIBS="$LIBS -lsnf"
8078 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
8079
8080 if test "$V_PCAP" != snf ; then
8081 MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
8082 fi
8083
8084
8085 $as_echo "#define HAVE_SNF_API 1" >>confdefs.h
8086
8087 else
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8089 $as_echo "no" >&6; }
8090
8091 if test "$want_snf" = yes; then
8092 # User requested "snf" capture type but
8093 # we couldn't find the Sniffer API support.
8094 as_fn_error $? "Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
8095 fi
8096
8097 if test "$want_snf" = yes; then
8098 as_fn_error $? "Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
8099 fi
8100 fi
8101 fi
8102
8103 # Check for Riverbed TurboCap support.
8104
8105 # Check whether --with-turbocap was given.
8106 if test "${with_turbocap+set}" = set; then :
8107 withval=$with_turbocap;
8108 if test "$withval" = no
8109 then
8110 # User explicitly doesn't want TurboCap
8111 want_turbocap=no
8112 elif test "$withval" = yes
8113 then
8114 # User wants TurboCap support but hasn't specified a directory.
8115 want_turbocap=yes
8116 else
8117 # User wants TurboCap support with a specified directory.
8118 want_turbocap=yes
8119 turbocap_root=$withval
8120 fi
8121
8122 else
8123
8124 if test "xxx_only" = yes; then
8125 # User requested something-else-only pcap, so they don't
8126 # want TurboCap support.
8127 want_turbocap=no
8128 else
8129 #
8130 # Use TurboCap API if present, otherwise don't
8131 #
8132 want_turbocap=ifpresent
8133 fi
8134
8135 fi
8136
8137
8138 ac_cv_lbl_turbocap_api=no
8139 if test "$want_turbocap" != no; then
8140
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
8142 $as_echo_n "checking whether TurboCap is supported... " >&6; }
8143
8144 save_CFLAGS="$CFLAGS"
8145 save_LIBS="$LIBS"
8146 if test ! -z "$turbocap_root"; then
8147 TURBOCAP_CFLAGS="-I$turbocap_root/include"
8148 TURBOCAP_LIBS="-L$turbocap_root/lib"
8149 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
8150 fi
8151
8152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8153 /* end confdefs.h. */
8154
8155 #include <TcApi.h>
8156
8157 int
8158 main ()
8159 {
8160
8161 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
8162 TC_INSTANCE i;
8163 (void)TcInstanceCreateByName("foo", &i);
8164
8165 ;
8166 return 0;
8167 }
8168 _ACEOF
8169 if ac_fn_c_try_compile "$LINENO"; then :
8170 ac_cv_lbl_turbocap_api=yes
8171 fi
8172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8173
8174 CFLAGS="$save_CFLAGS"
8175 if test $ac_cv_lbl_turbocap_api = yes; then
8176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8177 $as_echo "yes" >&6; }
8178
8179 MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
8180 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
8181 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
8182
8183
8184 $as_echo "#define HAVE_TC_API 1" >>confdefs.h
8185
8186 else
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188 $as_echo "no" >&6; }
8189
8190 if test "$want_turbocap" = yes; then
8191 # User wanted Turbo support but we couldn't find it.
8192 as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5
8193 fi
8194 fi
8195 fi
8196
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
8198 $as_echo_n "checking whether to enable remote packet capture... " >&6; }
8199 # Check whether --enable-remote was given.
8200 if test "${enable_remote+set}" = set; then :
8201 enableval=$enable_remote;
8202 else
8203 enableval=no
8204 fi
8205
8206 case "$enableval" in
8207 yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8208 $as_echo "yes" >&6; }
8209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
8210 $as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
8212 $as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
8213 #
8214 # rpcapd requires pthreads on UN*X.
8215 #
8216 if test "$ac_lbl_have_pthreads" != "found"; then
8217 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
8218 fi
8219 #
8220 # It also requires crypt().
8221 # Do we have it in the system libraries?
8222 #
8223 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
8224 if test "x$ac_cv_func_crypt" = xyes; then :
8225
8226 else
8227
8228 #
8229 # No. Do we have it in -lcrypt?
8230 #
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
8232 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
8233 if ${ac_cv_lib_crypt_crypt+:} false; then :
8234 $as_echo_n "(cached) " >&6
8235 else
8236 ac_check_lib_save_LIBS=$LIBS
8237 LIBS="-lcrypt $LIBS"
8238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8239 /* end confdefs.h. */
8240
8241 /* Override any GCC internal prototype to avoid an error.
8242 Use char because int might match the return type of a GCC
8243 builtin and then its argument prototype would still apply. */
8244 #ifdef __cplusplus
8245 extern "C"
8246 #endif
8247 char crypt ();
8248 int
8249 main ()
8250 {
8251 return crypt ();
8252 ;
8253 return 0;
8254 }
8255 _ACEOF
8256 if ac_fn_c_try_link "$LINENO"; then :
8257 ac_cv_lib_crypt_crypt=yes
8258 else
8259 ac_cv_lib_crypt_crypt=no
8260 fi
8261 rm -f core conftest.err conftest.$ac_objext \
8262 conftest$ac_exeext conftest.$ac_ext
8263 LIBS=$ac_check_lib_save_LIBS
8264 fi
8265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
8266 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
8267 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
8268
8269 #
8270 # Yes; add -lcrypt to the libraries for rpcapd.
8271 #
8272 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
8273
8274 else
8275
8276 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
8277
8278 fi
8279
8280
8281 fi
8282
8283
8284 #
8285 # OK, we have crypt(). Do we have getspnam()?
8286 #
8287 for ac_func in getspnam
8288 do :
8289 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8290 if test "x$ac_cv_func_getspnam" = xyes; then :
8291 cat >>confdefs.h <<_ACEOF
8292 #define HAVE_GETSPNAM 1
8293 _ACEOF
8294
8295 fi
8296 done
8297
8298
8299 #
8300 # Check for various members of struct msghdr.
8301 #
8302 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
8303 #include \"ftmacros.h\"
8304 #include <sys/socket.h>
8305
8306 "
8307 if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
8308
8309 cat >>confdefs.h <<_ACEOF
8310 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
8311 _ACEOF
8312
8313
8314 fi
8315
8316 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
8317 #include \"ftmacros.h\"
8318 #include <sys/socket.h>
8319
8320 "
8321 if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
8322
8323 cat >>confdefs.h <<_ACEOF
8324 #define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
8325 _ACEOF
8326
8327
8328 fi
8329
8330
8331 #
8332 # Optionally, we may want to support SSL.
8333 # Check for OpenSSL/libressl.
8334 #
8335 # First, try looking for it as a regular system library.
8336 # Make sure we can find SSL_library_init() using the
8337 # standard headers, just in case we're running a version
8338 # of macOS that ships with the OpenSSL library but not
8339 # the OpenSSL headers, and have also installed another
8340 # version of OpenSSL with headers.
8341 #
8342 save_LIBS="$LIBS"
8343 LIBS="-lssl -lcrypto"
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
8345 $as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347 /* end confdefs.h. */
8348
8349 #include <openssl/ssl.h>
8350
8351 int
8352 main ()
8353 {
8354
8355 SSL_library_init();
8356 return 0;
8357
8358 ;
8359 return 0;
8360 }
8361 _ACEOF
8362 if ac_fn_c_try_link "$LINENO"; then :
8363
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8365 $as_echo "yes" >&6; }
8366 HAVE_OPENSSL=yes
8367 OPENSSL_LIBS="-lssl -lcrypto"
8368
8369 else
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8371 $as_echo "no" >&6; }
8372 fi
8373 rm -f core conftest.err conftest.$ac_objext \
8374 conftest$ac_exeext conftest.$ac_ext
8375 LIBS="$save_LIBS"
8376
8377 #
8378 # If we didn't find it, check for it with pkg-config.
8379 #
8380 if test "x$HAVE_OPENSSL" != "xyes"; then
8381 if test "x$PKGCONFIG" != "xno"; then
8382 #
8383 # We have pkg-config; see if we have OpenSSL/
8384 # libressl installed as a package.
8385 #
8386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL/libressl with pkg-config" >&5
8387 $as_echo_n "checking for OpenSSL/libressl with pkg-config... " >&6; }
8388 if "$PKGCONFIG" openssl; then
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8390 $as_echo "found" >&6; }
8391 HAVE_OPENSSL=yes
8392 OPENSSL_CFLAGS=`"$PKGCONFIG" --cflags openssl`
8393 OPENSSL_LIBS=`"$PKGCONFIG" --libs openssl`
8394 else
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8396 $as_echo "not found" >&6; }
8397 fi
8398 fi
8399 fi
8400
8401 #
8402 # OK, did we find it?
8403 #
8404 if test "x$HAVE_OPENSSL" = "xyes"; then
8405
8406 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
8407
8408 CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
8409 LIBS="$LIBS $OPENSSL_LIBS"
8410 else
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
8412 $as_echo "$as_me: OpenSSL not found" >&6;}
8413 fi
8414
8415
8416 $as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
8417
8418 REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
8419 BUILD_RPCAPD=build-rpcapd
8420 INSTALL_RPCAPD=install-rpcapd
8421 ;;
8422 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423 $as_echo "no" >&6; }
8424 ;;
8425 esac
8426
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
8428 $as_echo_n "checking whether to build optimizer debugging code... " >&6; }
8429 # Check whether --enable-optimizer-dbg was given.
8430 if test "${enable_optimizer_dbg+set}" = set; then :
8431 enableval=$enable_optimizer_dbg;
8432 fi
8433
8434 if test "$enable_optimizer_dbg" = "yes"; then
8435
8436 $as_echo "#define BDEBUG 1" >>confdefs.h
8437
8438 fi
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
8440 $as_echo "${enable_optimizer_dbg-no}" >&6; }
8441
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
8443 $as_echo_n "checking whether to build parser debugging code... " >&6; }
8444 # Check whether --enable-yydebug was given.
8445 if test "${enable_yydebug+set}" = set; then :
8446 enableval=$enable_yydebug;
8447 fi
8448
8449 if test "$enable_yydebug" = "yes"; then
8450
8451 $as_echo "#define YYDEBUG 1" >>confdefs.h
8452
8453 fi
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
8455 $as_echo "${enable_yydebug-no}" >&6; }
8456
8457 #
8458 # Look for {f}lex.
8459 #
8460 for ac_prog in flex lex
8461 do
8462 # Extract the first word of "$ac_prog", so it can be a program name with args.
8463 set dummy $ac_prog; ac_word=$2
8464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8465 $as_echo_n "checking for $ac_word... " >&6; }
8466 if ${ac_cv_prog_LEX+:} false; then :
8467 $as_echo_n "(cached) " >&6
8468 else
8469 if test -n "$LEX"; then
8470 ac_cv_prog_LEX="$LEX" # Let the user override the test.
8471 else
8472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8473 for as_dir in $PATH
8474 do
8475 IFS=$as_save_IFS
8476 test -z "$as_dir" && as_dir=.
8477 for ac_exec_ext in '' $ac_executable_extensions; do
8478 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8479 ac_cv_prog_LEX="$ac_prog"
8480 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8481 break 2
8482 fi
8483 done
8484 done
8485 IFS=$as_save_IFS
8486
8487 fi
8488 fi
8489 LEX=$ac_cv_prog_LEX
8490 if test -n "$LEX"; then
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8492 $as_echo "$LEX" >&6; }
8493 else
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8495 $as_echo "no" >&6; }
8496 fi
8497
8498
8499 test -n "$LEX" && break
8500 done
8501 test -n "$LEX" || LEX=":"
8502
8503 if test "x$LEX" != "x:"; then
8504 cat >conftest.l <<_ACEOF
8505 %%
8506 a { ECHO; }
8507 b { REJECT; }
8508 c { yymore (); }
8509 d { yyless (1); }
8510 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
8511 yyless ((input () != 0)); }
8512 f { unput (yytext[0]); }
8513 . { BEGIN INITIAL; }
8514 %%
8515 #ifdef YYTEXT_POINTER
8516 extern char *yytext;
8517 #endif
8518 int
8519 main (void)
8520 {
8521 return ! yylex () + ! yywrap ();
8522 }
8523 _ACEOF
8524 { { ac_try="$LEX conftest.l"
8525 case "(($ac_try" in
8526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8527 *) ac_try_echo=$ac_try;;
8528 esac
8529 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8530 $as_echo "$ac_try_echo"; } >&5
8531 (eval "$LEX conftest.l") 2>&5
8532 ac_status=$?
8533 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8534 test $ac_status = 0; }
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8536 $as_echo_n "checking lex output file root... " >&6; }
8537 if ${ac_cv_prog_lex_root+:} false; then :
8538 $as_echo_n "(cached) " >&6
8539 else
8540
8541 if test -f lex.yy.c; then
8542 ac_cv_prog_lex_root=lex.yy
8543 elif test -f lexyy.c; then
8544 ac_cv_prog_lex_root=lexyy
8545 else
8546 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8547 fi
8548 fi
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8550 $as_echo "$ac_cv_prog_lex_root" >&6; }
8551 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8552
8553 if test -z "${LEXLIB+set}"; then
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8555 $as_echo_n "checking lex library... " >&6; }
8556 if ${ac_cv_lib_lex+:} false; then :
8557 $as_echo_n "(cached) " >&6
8558 else
8559
8560 ac_save_LIBS=$LIBS
8561 ac_cv_lib_lex='none needed'
8562 for ac_lib in '' -lfl -ll; do
8563 LIBS="$ac_lib $ac_save_LIBS"
8564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8565 /* end confdefs.h. */
8566 `cat $LEX_OUTPUT_ROOT.c`
8567 _ACEOF
8568 if ac_fn_c_try_link "$LINENO"; then :
8569 ac_cv_lib_lex=$ac_lib
8570 fi
8571 rm -f core conftest.err conftest.$ac_objext \
8572 conftest$ac_exeext conftest.$ac_ext
8573 test "$ac_cv_lib_lex" != 'none needed' && break
8574 done
8575 LIBS=$ac_save_LIBS
8576
8577 fi
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8579 $as_echo "$ac_cv_lib_lex" >&6; }
8580 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8581 fi
8582
8583
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8585 $as_echo_n "checking whether yytext is a pointer... " >&6; }
8586 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8587 $as_echo_n "(cached) " >&6
8588 else
8589 # POSIX says lex can declare yytext either as a pointer or an array; the
8590 # default is implementation-dependent. Figure out which it is, since
8591 # not all implementations provide the %pointer and %array declarations.
8592 ac_cv_prog_lex_yytext_pointer=no
8593 ac_save_LIBS=$LIBS
8594 LIBS="$LEXLIB $ac_save_LIBS"
8595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8596 /* end confdefs.h. */
8597
8598 #define YYTEXT_POINTER 1
8599 `cat $LEX_OUTPUT_ROOT.c`
8600 _ACEOF
8601 if ac_fn_c_try_link "$LINENO"; then :
8602 ac_cv_prog_lex_yytext_pointer=yes
8603 fi
8604 rm -f core conftest.err conftest.$ac_objext \
8605 conftest$ac_exeext conftest.$ac_ext
8606 LIBS=$ac_save_LIBS
8607
8608 fi
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8610 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8611 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8612
8613 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8614
8615 fi
8616 rm -f conftest.l $LEX_OUTPUT_ROOT.c
8617
8618 fi
8619 if test "$LEX" = ":"; then
8620 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
8621 fi
8622
8623 #
8624 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
8625 # and supports processing our scanner.l.
8626 #
8627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
8628 $as_echo_n "checking for capable lex... " >&6; }
8629 if ${tcpdump_cv_capable_lex+:} false; then :
8630 $as_echo_n "(cached) " >&6
8631 else
8632 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
8633 tcpdump_cv_capable_lex=yes
8634 else
8635 tcpdump_cv_capable_lex=insufficient
8636 fi
8637 fi
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
8639 $as_echo "$tcpdump_cv_capable_lex" >&6; }
8640 if test $tcpdump_cv_capable_lex = insufficient ; then
8641 as_fn_error $? "$LEX is insufficient to compile libpcap.
8642 libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
8643 fi
8644
8645 #
8646 # Look for yacc/bison/byacc.
8647 #
8648 for ac_prog in 'bison -y' byacc
8649 do
8650 # Extract the first word of "$ac_prog", so it can be a program name with args.
8651 set dummy $ac_prog; ac_word=$2
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8653 $as_echo_n "checking for $ac_word... " >&6; }
8654 if ${ac_cv_prog_YACC+:} false; then :
8655 $as_echo_n "(cached) " >&6
8656 else
8657 if test -n "$YACC"; then
8658 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8659 else
8660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8661 for as_dir in $PATH
8662 do
8663 IFS=$as_save_IFS
8664 test -z "$as_dir" && as_dir=.
8665 for ac_exec_ext in '' $ac_executable_extensions; do
8666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8667 ac_cv_prog_YACC="$ac_prog"
8668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8669 break 2
8670 fi
8671 done
8672 done
8673 IFS=$as_save_IFS
8674
8675 fi
8676 fi
8677 YACC=$ac_cv_prog_YACC
8678 if test -n "$YACC"; then
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8680 $as_echo "$YACC" >&6; }
8681 else
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8683 $as_echo "no" >&6; }
8684 fi
8685
8686
8687 test -n "$YACC" && break
8688 done
8689 test -n "$YACC" || YACC="yacc"
8690
8691
8692 #
8693 # Make sure it supports the -p flag and supports processing our
8694 # grammar.y.
8695 #
8696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5
8697 $as_echo_n "checking for capable yacc/bison... " >&6; }
8698 if ${tcpdump_cv_capable_yacc+:} false; then :
8699 $as_echo_n "(cached) " >&6
8700 else
8701 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
8702 tcpdump_cv_capable_yacc=yes
8703 else
8704 tcpdump_cv_capable_yacc=insufficient
8705 fi
8706 fi
8707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
8708 $as_echo "$tcpdump_cv_capable_yacc" >&6; }
8709 if test $tcpdump_cv_capable_yacc = insufficient ; then
8710 as_fn_error $? "$YACC is insufficient to compile libpcap.
8711 libpcap requires Bison, a newer version of Berkeley YACC with support
8712 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8713 fi
8714
8715 #
8716 # Do various checks for various OSes and versions of those OSes.
8717 #
8718 # Assume, by default, no support for shared libraries and V7/BSD
8719 # convention for man pages (devices in section 4, file formats in
8720 # section 5, miscellaneous info in section 7, administrative commands
8721 # and daemons in section 8). Individual cases can override this.
8722 #
8723 DYEXT="none"
8724 MAN_DEVICES=4
8725 MAN_FILE_FORMATS=5
8726 MAN_MISC_INFO=7
8727 MAN_ADMIN_COMMANDS=8
8728 case "$host_os" in
8729
8730 aix*)
8731
8732 $as_echo "#define _SUN 1" >>confdefs.h
8733
8734
8735 #
8736 # AIX makes it fun to build shared and static libraries,
8737 # because they're *both* ".a" archive libraries. We
8738 # build the static library for the benefit of the traditional
8739 # scheme of building libpcap and tcpdump in subdirectories of
8740 # the same directory, with tcpdump statically linked with the
8741 # libpcap in question, but we also build a shared library as
8742 # "libpcap.shareda" and install *it*, rather than the static
8743 # library, as "libpcap.a".
8744 #
8745 DYEXT="shareda"
8746
8747 case "$V_PCAP" in
8748
8749 dlpi)
8750 #
8751 # If we're using DLPI, applications will need to
8752 # use /lib/pse.exp if present, as we use the
8753 # STREAMS routines.
8754 #
8755 pseexe="/lib/pse.exp"
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
8757 $as_echo_n "checking for $pseexe... " >&6; }
8758 if test -f $pseexe ; then
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8760 $as_echo "yes" >&6; }
8761 LIBS="-I:$pseexe"
8762 fi
8763 ;;
8764
8765 bpf)
8766 #
8767 # If we're using BPF, we need "-lodm" and "-lcfg", as
8768 # we use them to load the BPF module.
8769 #
8770 LIBS="-lodm -lcfg"
8771 ;;
8772 esac
8773 ;;
8774
8775 darwin*)
8776 DYEXT="dylib"
8777 V_CCOPT="$V_CCOPT -fno-common"
8778 # Check whether --enable-universal was given.
8779 if test "${enable_universal+set}" = set; then :
8780 enableval=$enable_universal;
8781 fi
8782
8783 if test "$enable_universal" != "no"; then
8784 case "$host_os" in
8785
8786 darwin[0-7].*)
8787 #
8788 # Pre-Tiger. Build only for 32-bit PowerPC; no
8789 # need for any special compiler or linker flags.
8790 #
8791 ;;
8792
8793 darwin8.[0123]|darwin8.[0123].*)
8794 #
8795 # Tiger, prior to Intel support. Build
8796 # libraries and executables for 32-bit PowerPC
8797 # and 64-bit PowerPC, with 32-bit PowerPC first.
8798 # (I'm guessing that's what Apple does.)
8799 #
8800 # (The double brackets are needed because
8801 # autotools/m4 use brackets as a quoting
8802 # character; the double brackets turn into
8803 # single brackets in the generated configure
8804 # file.)
8805 #
8806 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
8807 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
8808 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
8809 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
8810 ;;
8811
8812 darwin8.[456]|darwin.[456].*)
8813 #
8814 # Tiger, subsequent to Intel support but prior
8815 # to x86-64 support. Build libraries and
8816 # executables for 32-bit PowerPC, 64-bit
8817 # PowerPC, and 32-bit x86, with 32-bit PowerPC
8818 # first. (I'm guessing that's what Apple does.)
8819 #
8820 # (The double brackets are needed because
8821 # autotools/m4 use brackets as a quoting
8822 # character; the double brackets turn into
8823 # single brackets in the generated configure
8824 # file.)
8825 #
8826 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8827 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8828 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8829 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8830 ;;
8831
8832 darwin8.*)
8833 #
8834 # All other Tiger, so subsequent to x86-64
8835 # support. Build libraries and executables for
8836 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
8837 # and x86-64, with 32-bit PowerPC first. (I'm
8838 # guessing that's what Apple does.)
8839 #
8840 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8841 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8842 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8843 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8844 ;;
8845
8846 darwin9.*)
8847 #
8848 # Leopard. Build libraries for 32-bit PowerPC,
8849 # 64-bit PowerPC, 32-bit x86, and x86-64, with
8850 # 32-bit PowerPC first, and build executables
8851 # for 32-bit x86 and 32-bit PowerPC, with 32-bit
8852 # x86 first. (That's what Apple does.)
8853 #
8854 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8855 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8856 V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
8857 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
8858 ;;
8859
8860 darwin10.*)
8861 #
8862 # Snow Leopard. Build libraries for x86-64,
8863 # 32-bit x86, and 32-bit PowerPC, with x86-64
8864 # first, and build executables for x86-64 and
8865 # 32-bit x86, with x86-64 first. (That's what
8866 # Apple does, even though Snow Leopard doesn't
8867 # run on PPC, so PPC libpcap runs under Rosetta,
8868 # and Rosetta doesn't support BPF ioctls, so PPC
8869 # programs can't do live captures.)
8870 #
8871 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
8872 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
8873 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
8874 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
8875 ;;
8876
8877 darwin*)
8878 #
8879 # Post-Snow Leopard. Build libraries for x86-64
8880 # and 32-bit x86, with x86-64 first, and build
8881 # executables only for x86-64. (That's what
8882 # Apple does.) This requires no special flags
8883 # for programs.
8884 # XXX - update if and when Apple drops support
8885 # for 32-bit x86 code and if and when Apple adds
8886 # ARM-based Macs. (You're on your own for iOS
8887 # etc.)
8888 #
8889 # XXX - check whether we *can* build for
8890 # i386 and, if not, suggest that the user
8891 # install the /usr/include headers if they
8892 # want to build fat.
8893 #
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
8895 $as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
8896 save_CFLAGS="$CFLAGS"
8897 CFLAGS="$CFLAGS -arch i386"
8898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8899 /* end confdefs.h. */
8900
8901 int
8902 main ()
8903 {
8904 return 0;
8905 ;
8906 return 0;
8907 }
8908 _ACEOF
8909 if ac_fn_c_try_compile "$LINENO"; then :
8910
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8912 $as_echo "yes" >&6; }
8913 V_LIB_CCOPT_FAT="-arch x86_64"
8914 V_LIB_LDFLAGS_FAT="-arch x86_64"
8915
8916 #
8917 # OpenSSL installation on macOS seems
8918 # to install only the libs for 64-bit
8919 # x86 - at least that's what Brew does:
8920 # only configure 32-bit builds if we
8921 # don't have OpenSSL.
8922 #
8923 if test "$HAVE_OPENSSL" != yes; then
8924 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
8925 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
8926 fi
8927
8928 else
8929
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931 $as_echo "no" >&6; }
8932 V_LIB_CCOPT_FAT="-arch x86_64"
8933 V_LIB_LDFLAGS_FAT="-arch x86_64"
8934 case "$host_os" in
8935
8936 darwin18.*)
8937 #
8938 # Mojave; you need to install the
8939 # /usr/include headers to get
8940 # 32-bit x86 builds to work.
8941 #
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&5
8943 $as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&2;}
8944 ;;
8945
8946 *)
8947 #
8948 # Pre-Mojave; the command-line
8949 # tools should be sufficient to
8950 # enable 32-bit x86 builds.
8951 #
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
8953 $as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
8954 ;;
8955 esac
8956
8957 fi
8958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8959 CFLAGS="$save_CFLAGS"
8960 if test "$HAVE_OPENSSL" = yes; then
8961 #
8962 # If all else fails, look for OpenSSL in
8963 # /usr/local/opt.
8964 #
8965 CFLAGS="$CFLAGS -I/usr/local/opt/openssl/include"
8966 LIBS="$LIBS -L/usr/local/opt/openssl/lib"
8967 fi
8968 ;;
8969 esac
8970 fi
8971 ;;
8972
8973 hpux9*)
8974
8975 $as_echo "#define HAVE_HPUX9 1" >>confdefs.h
8976
8977
8978 #
8979 # Use System V conventions for man pages.
8980 #
8981 MAN_ADMIN_COMMANDS=1m
8982 MAN_FILE_FORMATS=4
8983 MAN_MISC_INFO=5
8984 ;;
8985
8986 hpux10.0*)
8987
8988 #
8989 # Use System V conventions for man pages.
8990 #
8991 MAN_ADMIN_COMMANDS=1m
8992 MAN_FILE_FORMATS=4
8993 MAN_MISC_INFO=5
8994 ;;
8995
8996 hpux10.1*)
8997
8998 #
8999 # Use System V conventions for man pages.
9000 #
9001 MAN_ADMIN_COMMANDS=1m
9002 MAN_FILE_FORMATS=4
9003 MAN_MISC_INFO=5
9004 ;;
9005
9006 hpux*)
9007
9008 $as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
9009
9010 if test "`uname -m`" = "ia64"; then
9011 DYEXT="so"
9012 else
9013 DYEXT="sl"
9014 fi
9015
9016 #
9017 # "-b" builds a shared library; "+h" sets the soname.
9018 #
9019 SHLIB_OPT="-b"
9020 SONAME_OPT="+h"
9021
9022 #
9023 # Use System V conventions for man pages.
9024 #
9025 MAN_FILE_FORMATS=4
9026 MAN_MISC_INFO=5
9027 ;;
9028
9029 irix*)
9030 #
9031 # Use IRIX conventions for man pages; they're the same as the
9032 # System V conventions, except that they use section 8 for
9033 # administrative commands and daemons.
9034 #
9035 MAN_FILE_FORMATS=4
9036 MAN_MISC_INFO=5
9037 ;;
9038
9039 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
9040 DYEXT="so"
9041
9042 #
9043 # Compiler assumed to be GCC; run-time linker may require a -R
9044 # flag.
9045 #
9046 if test "$libdir" != "/usr/lib"; then
9047 V_RFLAGS=-Wl,-R$libdir
9048 fi
9049 ;;
9050
9051 osf*)
9052 DYEXT="so"
9053
9054 #
9055 # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
9056 # Use Tru64 UNIX conventions for man pages; they're the same as
9057 # the System V conventions except that they use section 8 for
9058 # administrative commands and daemons.
9059 #
9060 MAN_FILE_FORMATS=4
9061 MAN_MISC_INFO=5
9062 MAN_DEVICES=7
9063 ;;
9064
9065 sinix*)
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
9067 $as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
9068 if ${ac_cv_cc_sinix_defined+:} false; then :
9069 $as_echo_n "(cached) " >&6
9070 else
9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9072 /* end confdefs.h. */
9073
9074 int
9075 main ()
9076 {
9077 int i = sinix;
9078 ;
9079 return 0;
9080 }
9081 _ACEOF
9082 if ac_fn_c_try_compile "$LINENO"; then :
9083 ac_cv_cc_sinix_defined=yes
9084 else
9085 ac_cv_cc_sinix_defined=no
9086 fi
9087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9088 fi
9089
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
9091 $as_echo "$ac_cv_cc_sinix_defined" >&6; }
9092 if test $ac_cv_cc_sinix_defined = no ; then
9093
9094 $as_echo "#define sinix 1" >>confdefs.h
9095
9096 fi
9097 ;;
9098
9099 solaris*)
9100
9101 $as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
9102
9103
9104 DYEXT="so"
9105
9106 #
9107 # Make sure errno is thread-safe, in case we're called in
9108 # a multithreaded program. We don't guarantee that two
9109 # threads can use the *same* pcap_t safely, but the
9110 # current version does guarantee that you can use different
9111 # pcap_t's in different threads, and even that pcap_compile()
9112 # is thread-safe (it wasn't thread-safe in some older versions).
9113 #
9114 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
9115
9116 case "`uname -r`" in
9117
9118 5.12)
9119 ;;
9120
9121 *)
9122 #
9123 # Use System V conventions for man pages.
9124 #
9125 MAN_ADMIN_COMMANDS=1m
9126 MAN_FILE_FORMATS=4
9127 MAN_MISC_INFO=5
9128 MAN_DEVICES=7D
9129 esac
9130 ;;
9131 esac
9132
9133 # Check whether --enable-shared was given.
9134 if test "${enable_shared+set}" = set; then :
9135 enableval=$enable_shared;
9136 fi
9137
9138 test "x$enable_shared" = "xno" && DYEXT="none"
9139
9140 if test -n "$ac_tool_prefix"; then
9141 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9142 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9144 $as_echo_n "checking for $ac_word... " >&6; }
9145 if ${ac_cv_prog_RANLIB+:} false; then :
9146 $as_echo_n "(cached) " >&6
9147 else
9148 if test -n "$RANLIB"; then
9149 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9150 else
9151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9152 for as_dir in $PATH
9153 do
9154 IFS=$as_save_IFS
9155 test -z "$as_dir" && as_dir=.
9156 for ac_exec_ext in '' $ac_executable_extensions; do
9157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9158 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9160 break 2
9161 fi
9162 done
9163 done
9164 IFS=$as_save_IFS
9165
9166 fi
9167 fi
9168 RANLIB=$ac_cv_prog_RANLIB
9169 if test -n "$RANLIB"; then
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9171 $as_echo "$RANLIB" >&6; }
9172 else
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174 $as_echo "no" >&6; }
9175 fi
9176
9177
9178 fi
9179 if test -z "$ac_cv_prog_RANLIB"; then
9180 ac_ct_RANLIB=$RANLIB
9181 # Extract the first word of "ranlib", so it can be a program name with args.
9182 set dummy ranlib; ac_word=$2
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9184 $as_echo_n "checking for $ac_word... " >&6; }
9185 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9186 $as_echo_n "(cached) " >&6
9187 else
9188 if test -n "$ac_ct_RANLIB"; then
9189 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9190 else
9191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9192 for as_dir in $PATH
9193 do
9194 IFS=$as_save_IFS
9195 test -z "$as_dir" && as_dir=.
9196 for ac_exec_ext in '' $ac_executable_extensions; do
9197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9198 ac_cv_prog_ac_ct_RANLIB="ranlib"
9199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9200 break 2
9201 fi
9202 done
9203 done
9204 IFS=$as_save_IFS
9205
9206 fi
9207 fi
9208 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9209 if test -n "$ac_ct_RANLIB"; then
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9211 $as_echo "$ac_ct_RANLIB" >&6; }
9212 else
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9214 $as_echo "no" >&6; }
9215 fi
9216
9217 if test "x$ac_ct_RANLIB" = x; then
9218 RANLIB=":"
9219 else
9220 case $cross_compiling:$ac_tool_warned in
9221 yes:)
9222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9223 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9224 ac_tool_warned=yes ;;
9225 esac
9226 RANLIB=$ac_ct_RANLIB
9227 fi
9228 else
9229 RANLIB="$ac_cv_prog_RANLIB"
9230 fi
9231
9232 if test -n "$ac_tool_prefix"; then
9233 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9234 set dummy ${ac_tool_prefix}ar; ac_word=$2
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236 $as_echo_n "checking for $ac_word... " >&6; }
9237 if ${ac_cv_prog_AR+:} false; then :
9238 $as_echo_n "(cached) " >&6
9239 else
9240 if test -n "$AR"; then
9241 ac_cv_prog_AR="$AR" # Let the user override the test.
9242 else
9243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9244 for as_dir in $PATH
9245 do
9246 IFS=$as_save_IFS
9247 test -z "$as_dir" && as_dir=.
9248 for ac_exec_ext in '' $ac_executable_extensions; do
9249 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9250 ac_cv_prog_AR="${ac_tool_prefix}ar"
9251 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9252 break 2
9253 fi
9254 done
9255 done
9256 IFS=$as_save_IFS
9257
9258 fi
9259 fi
9260 AR=$ac_cv_prog_AR
9261 if test -n "$AR"; then
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9263 $as_echo "$AR" >&6; }
9264 else
9265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9266 $as_echo "no" >&6; }
9267 fi
9268
9269
9270 fi
9271 if test -z "$ac_cv_prog_AR"; then
9272 ac_ct_AR=$AR
9273 # Extract the first word of "ar", so it can be a program name with args.
9274 set dummy ar; ac_word=$2
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276 $as_echo_n "checking for $ac_word... " >&6; }
9277 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9278 $as_echo_n "(cached) " >&6
9279 else
9280 if test -n "$ac_ct_AR"; then
9281 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9282 else
9283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9284 for as_dir in $PATH
9285 do
9286 IFS=$as_save_IFS
9287 test -z "$as_dir" && as_dir=.
9288 for ac_exec_ext in '' $ac_executable_extensions; do
9289 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9290 ac_cv_prog_ac_ct_AR="ar"
9291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9292 break 2
9293 fi
9294 done
9295 done
9296 IFS=$as_save_IFS
9297
9298 fi
9299 fi
9300 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9301 if test -n "$ac_ct_AR"; then
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9303 $as_echo "$ac_ct_AR" >&6; }
9304 else
9305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9306 $as_echo "no" >&6; }
9307 fi
9308
9309 if test "x$ac_ct_AR" = x; then
9310 AR=""
9311 else
9312 case $cross_compiling:$ac_tool_warned in
9313 yes:)
9314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9315 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9316 ac_tool_warned=yes ;;
9317 esac
9318 AR=$ac_ct_AR
9319 fi
9320 else
9321 AR="$ac_cv_prog_AR"
9322 fi
9323
9324
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9326 $as_echo_n "checking whether ln -s works... " >&6; }
9327 LN_S=$as_ln_s
9328 if test "$LN_S" = "ln -s"; then
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9330 $as_echo "yes" >&6; }
9331 else
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9333 $as_echo "no, using $LN_S" >&6; }
9334 fi
9335
9336
9337
9338 rm -f os-proto.h
9339 if test "${LBL_CFLAGS+set}" = set; then
9340 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
9341 fi
9342 if test -f .devel ; then
9343 #
9344 # Skip all the warning option stuff on some compilers.
9345 #
9346 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
9347
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
9349 $as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
9350 save_CFLAGS="$CFLAGS"
9351 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
9352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9353 /* end confdefs.h. */
9354
9355 int
9356 main ()
9357 {
9358 return 0
9359 ;
9360 return 0;
9361 }
9362 _ACEOF
9363 if ac_fn_c_try_compile "$LINENO"; then :
9364
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366 $as_echo "no" >&6; }
9367 #
9368 # We're assuming this is clang, where
9369 # -Werror=unknown-warning-option is the appropriate
9370 # option to force the compiler to fail.
9371 #
9372 ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
9373
9374 else
9375
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9377 $as_echo "yes" >&6; }
9378
9379 fi
9380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9381 CFLAGS="$save_CFLAGS"
9382
9383
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
9385 $as_echo_n "checking whether the compiler supports the -W option... " >&6; }
9386 save_CFLAGS="$CFLAGS"
9387 if expr "x-W" : "x-W.*" >/dev/null
9388 then
9389 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
9390 elif expr "x-W" : "x-f.*" >/dev/null
9391 then
9392 CFLAGS="$CFLAGS -Werror -W"
9393 elif expr "x-W" : "x-m.*" >/dev/null
9394 then
9395 CFLAGS="$CFLAGS -Werror -W"
9396 else
9397 CFLAGS="$CFLAGS -W"
9398 fi
9399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9400 /* end confdefs.h. */
9401
9402 int
9403 main ()
9404 {
9405 return 0
9406 ;
9407 return 0;
9408 }
9409 _ACEOF
9410 if ac_fn_c_try_compile "$LINENO"; then :
9411
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9413 $as_echo "yes" >&6; }
9414 can_add_to_cflags=yes
9415 #
9416 # The compile supports this; do we have some C code for
9417 # which the warning should *not* appear?
9418 # We test the fourth argument because the third argument
9419 # could contain quotes, breaking the test.
9420 #
9421 if test "x" != "x"
9422 then
9423 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
9425 $as_echo_n "checking whether -W ... " >&6; }
9426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9427 /* end confdefs.h. */
9428
9429 _ACEOF
9430 if ac_fn_c_try_compile "$LINENO"; then :
9431
9432 #
9433 # Not a problem.
9434 #
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436 $as_echo "no" >&6; }
9437
9438 else
9439
9440 #
9441 # A problem.
9442 #
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9444 $as_echo "yes" >&6; }
9445 can_add_to_cflags=no
9446
9447 fi
9448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9449 fi
9450 CFLAGS="$save_CFLAGS"
9451 if test x"$can_add_to_cflags" = "xyes"
9452 then
9453 V_CCOPT="$V_CCOPT -W"
9454 fi
9455
9456 else
9457
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459 $as_echo "no" >&6; }
9460 CFLAGS="$save_CFLAGS"
9461
9462 fi
9463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9464
9465
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
9467 $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
9468 save_CFLAGS="$CFLAGS"
9469 if expr "x-Wall" : "x-W.*" >/dev/null
9470 then
9471 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
9472 elif expr "x-Wall" : "x-f.*" >/dev/null
9473 then
9474 CFLAGS="$CFLAGS -Werror -Wall"
9475 elif expr "x-Wall" : "x-m.*" >/dev/null
9476 then
9477 CFLAGS="$CFLAGS -Werror -Wall"
9478 else
9479 CFLAGS="$CFLAGS -Wall"
9480 fi
9481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9482 /* end confdefs.h. */
9483
9484 int
9485 main ()
9486 {
9487 return 0
9488 ;
9489 return 0;
9490 }
9491 _ACEOF
9492 if ac_fn_c_try_compile "$LINENO"; then :
9493
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9495 $as_echo "yes" >&6; }
9496 can_add_to_cflags=yes
9497 #
9498 # The compile supports this; do we have some C code for
9499 # which the warning should *not* appear?
9500 # We test the fourth argument because the third argument
9501 # could contain quotes, breaking the test.
9502 #
9503 if test "x" != "x"
9504 then
9505 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
9507 $as_echo_n "checking whether -Wall ... " >&6; }
9508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9509 /* end confdefs.h. */
9510
9511 _ACEOF
9512 if ac_fn_c_try_compile "$LINENO"; then :
9513
9514 #
9515 # Not a problem.
9516 #
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9518 $as_echo "no" >&6; }
9519
9520 else
9521
9522 #
9523 # A problem.
9524 #
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9526 $as_echo "yes" >&6; }
9527 can_add_to_cflags=no
9528
9529 fi
9530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9531 fi
9532 CFLAGS="$save_CFLAGS"
9533 if test x"$can_add_to_cflags" = "xyes"
9534 then
9535 V_CCOPT="$V_CCOPT -Wall"
9536 fi
9537
9538 else
9539
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541 $as_echo "no" >&6; }
9542 CFLAGS="$save_CFLAGS"
9543
9544 fi
9545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9546
9547
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
9549 $as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
9550 save_CFLAGS="$CFLAGS"
9551 if expr "x-Wcomma" : "x-W.*" >/dev/null
9552 then
9553 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
9554 elif expr "x-Wcomma" : "x-f.*" >/dev/null
9555 then
9556 CFLAGS="$CFLAGS -Werror -Wcomma"
9557 elif expr "x-Wcomma" : "x-m.*" >/dev/null
9558 then
9559 CFLAGS="$CFLAGS -Werror -Wcomma"
9560 else
9561 CFLAGS="$CFLAGS -Wcomma"
9562 fi
9563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9564 /* end confdefs.h. */
9565
9566 int
9567 main ()
9568 {
9569 return 0
9570 ;
9571 return 0;
9572 }
9573 _ACEOF
9574 if ac_fn_c_try_compile "$LINENO"; then :
9575
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9577 $as_echo "yes" >&6; }
9578 can_add_to_cflags=yes
9579 #
9580 # The compile supports this; do we have some C code for
9581 # which the warning should *not* appear?
9582 # We test the fourth argument because the third argument
9583 # could contain quotes, breaking the test.
9584 #
9585 if test "x" != "x"
9586 then
9587 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
9589 $as_echo_n "checking whether -Wcomma ... " >&6; }
9590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9591 /* end confdefs.h. */
9592
9593 _ACEOF
9594 if ac_fn_c_try_compile "$LINENO"; then :
9595
9596 #
9597 # Not a problem.
9598 #
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600 $as_echo "no" >&6; }
9601
9602 else
9603
9604 #
9605 # A problem.
9606 #
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9608 $as_echo "yes" >&6; }
9609 can_add_to_cflags=no
9610
9611 fi
9612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9613 fi
9614 CFLAGS="$save_CFLAGS"
9615 if test x"$can_add_to_cflags" = "xyes"
9616 then
9617 V_CCOPT="$V_CCOPT -Wcomma"
9618 fi
9619
9620 else
9621
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9623 $as_echo "no" >&6; }
9624 CFLAGS="$save_CFLAGS"
9625
9626 fi
9627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9628
9629
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
9631 $as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
9632 save_CFLAGS="$CFLAGS"
9633 if expr "x-Wdocumentation" : "x-W.*" >/dev/null
9634 then
9635 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation"
9636 elif expr "x-Wdocumentation" : "x-f.*" >/dev/null
9637 then
9638 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9639 elif expr "x-Wdocumentation" : "x-m.*" >/dev/null
9640 then
9641 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9642 else
9643 CFLAGS="$CFLAGS -Wdocumentation"
9644 fi
9645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9646 /* end confdefs.h. */
9647
9648 int
9649 main ()
9650 {
9651 return 0
9652 ;
9653 return 0;
9654 }
9655 _ACEOF
9656 if ac_fn_c_try_compile "$LINENO"; then :
9657
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9659 $as_echo "yes" >&6; }
9660 can_add_to_cflags=yes
9661 #
9662 # The compile supports this; do we have some C code for
9663 # which the warning should *not* appear?
9664 # We test the fourth argument because the third argument
9665 # could contain quotes, breaking the test.
9666 #
9667 if test "x" != "x"
9668 then
9669 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
9671 $as_echo_n "checking whether -Wdocumentation ... " >&6; }
9672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9673 /* end confdefs.h. */
9674
9675 _ACEOF
9676 if ac_fn_c_try_compile "$LINENO"; then :
9677
9678 #
9679 # Not a problem.
9680 #
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9682 $as_echo "no" >&6; }
9683
9684 else
9685
9686 #
9687 # A problem.
9688 #
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9690 $as_echo "yes" >&6; }
9691 can_add_to_cflags=no
9692
9693 fi
9694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9695 fi
9696 CFLAGS="$save_CFLAGS"
9697 if test x"$can_add_to_cflags" = "xyes"
9698 then
9699 V_CCOPT="$V_CCOPT -Wdocumentation"
9700 fi
9701
9702 else
9703
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706 CFLAGS="$save_CFLAGS"
9707
9708 fi
9709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9710
9711
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
9713 $as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
9714 save_CFLAGS="$CFLAGS"
9715 if expr "x-Wformat-nonliteral" : "x-W.*" >/dev/null
9716 then
9717 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral"
9718 elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null
9719 then
9720 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9721 elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null
9722 then
9723 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9724 else
9725 CFLAGS="$CFLAGS -Wformat-nonliteral"
9726 fi
9727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728 /* end confdefs.h. */
9729
9730 int
9731 main ()
9732 {
9733 return 0
9734 ;
9735 return 0;
9736 }
9737 _ACEOF
9738 if ac_fn_c_try_compile "$LINENO"; then :
9739
9740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9741 $as_echo "yes" >&6; }
9742 can_add_to_cflags=yes
9743 #
9744 # The compile supports this; do we have some C code for
9745 # which the warning should *not* appear?
9746 # We test the fourth argument because the third argument
9747 # could contain quotes, breaking the test.
9748 #
9749 if test "x" != "x"
9750 then
9751 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
9753 $as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9755 /* end confdefs.h. */
9756
9757 _ACEOF
9758 if ac_fn_c_try_compile "$LINENO"; then :
9759
9760 #
9761 # Not a problem.
9762 #
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9764 $as_echo "no" >&6; }
9765
9766 else
9767
9768 #
9769 # A problem.
9770 #
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9772 $as_echo "yes" >&6; }
9773 can_add_to_cflags=no
9774
9775 fi
9776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9777 fi
9778 CFLAGS="$save_CFLAGS"
9779 if test x"$can_add_to_cflags" = "xyes"
9780 then
9781 V_CCOPT="$V_CCOPT -Wformat-nonliteral"
9782 fi
9783
9784 else
9785
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9787 $as_echo "no" >&6; }
9788 CFLAGS="$save_CFLAGS"
9789
9790 fi
9791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9792
9793
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
9795 $as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
9796 save_CFLAGS="$CFLAGS"
9797 if expr "x-Wmissing-noreturn" : "x-W.*" >/dev/null
9798 then
9799 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn"
9800 elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null
9801 then
9802 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9803 elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null
9804 then
9805 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9806 else
9807 CFLAGS="$CFLAGS -Wmissing-noreturn"
9808 fi
9809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9810 /* end confdefs.h. */
9811
9812 int
9813 main ()
9814 {
9815 return 0
9816 ;
9817 return 0;
9818 }
9819 _ACEOF
9820 if ac_fn_c_try_compile "$LINENO"; then :
9821
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9823 $as_echo "yes" >&6; }
9824 can_add_to_cflags=yes
9825 #
9826 # The compile supports this; do we have some C code for
9827 # which the warning should *not* appear?
9828 # We test the fourth argument because the third argument
9829 # could contain quotes, breaking the test.
9830 #
9831 if test "x" != "x"
9832 then
9833 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
9835 $as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9837 /* end confdefs.h. */
9838
9839 _ACEOF
9840 if ac_fn_c_try_compile "$LINENO"; then :
9841
9842 #
9843 # Not a problem.
9844 #
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846 $as_echo "no" >&6; }
9847
9848 else
9849
9850 #
9851 # A problem.
9852 #
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9854 $as_echo "yes" >&6; }
9855 can_add_to_cflags=no
9856
9857 fi
9858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9859 fi
9860 CFLAGS="$save_CFLAGS"
9861 if test x"$can_add_to_cflags" = "xyes"
9862 then
9863 V_CCOPT="$V_CCOPT -Wmissing-noreturn"
9864 fi
9865
9866 else
9867
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869 $as_echo "no" >&6; }
9870 CFLAGS="$save_CFLAGS"
9871
9872 fi
9873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9874
9875
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
9877 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
9878 save_CFLAGS="$CFLAGS"
9879 if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
9880 then
9881 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
9882 elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
9883 then
9884 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9885 elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
9886 then
9887 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9888 else
9889 CFLAGS="$CFLAGS -Wmissing-prototypes"
9890 fi
9891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9892 /* end confdefs.h. */
9893
9894 int
9895 main ()
9896 {
9897 return 0
9898 ;
9899 return 0;
9900 }
9901 _ACEOF
9902 if ac_fn_c_try_compile "$LINENO"; then :
9903
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9905 $as_echo "yes" >&6; }
9906 can_add_to_cflags=yes
9907 #
9908 # The compile supports this; do we have some C code for
9909 # which the warning should *not* appear?
9910 # We test the fourth argument because the third argument
9911 # could contain quotes, breaking the test.
9912 #
9913 if test "x" != "x"
9914 then
9915 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
9917 $as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919 /* end confdefs.h. */
9920
9921 _ACEOF
9922 if ac_fn_c_try_compile "$LINENO"; then :
9923
9924 #
9925 # Not a problem.
9926 #
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928 $as_echo "no" >&6; }
9929
9930 else
9931
9932 #
9933 # A problem.
9934 #
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9936 $as_echo "yes" >&6; }
9937 can_add_to_cflags=no
9938
9939 fi
9940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9941 fi
9942 CFLAGS="$save_CFLAGS"
9943 if test x"$can_add_to_cflags" = "xyes"
9944 then
9945 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
9946 fi
9947
9948 else
9949
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951 $as_echo "no" >&6; }
9952 CFLAGS="$save_CFLAGS"
9953
9954 fi
9955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9956
9957
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
9959 $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
9960 save_CFLAGS="$CFLAGS"
9961 if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
9962 then
9963 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
9964 elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
9965 then
9966 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9967 elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
9968 then
9969 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9970 else
9971 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
9972 fi
9973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9974 /* end confdefs.h. */
9975
9976 int
9977 main ()
9978 {
9979 return 0
9980 ;
9981 return 0;
9982 }
9983 _ACEOF
9984 if ac_fn_c_try_compile "$LINENO"; then :
9985
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9987 $as_echo "yes" >&6; }
9988 can_add_to_cflags=yes
9989 #
9990 # The compile supports this; do we have some C code for
9991 # which the warning should *not* appear?
9992 # We test the fourth argument because the third argument
9993 # could contain quotes, breaking the test.
9994 #
9995 if test "x" != "x"
9996 then
9997 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
9999 $as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
10000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10001 /* end confdefs.h. */
10002
10003 _ACEOF
10004 if ac_fn_c_try_compile "$LINENO"; then :
10005
10006 #
10007 # Not a problem.
10008 #
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010 $as_echo "no" >&6; }
10011
10012 else
10013
10014 #
10015 # A problem.
10016 #
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10018 $as_echo "yes" >&6; }
10019 can_add_to_cflags=no
10020
10021 fi
10022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10023 fi
10024 CFLAGS="$save_CFLAGS"
10025 if test x"$can_add_to_cflags" = "xyes"
10026 then
10027 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
10028 fi
10029
10030 else
10031
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033 $as_echo "no" >&6; }
10034 CFLAGS="$save_CFLAGS"
10035
10036 fi
10037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10038
10039
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
10041 $as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
10042 save_CFLAGS="$CFLAGS"
10043 if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
10044 then
10045 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
10046 elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
10047 then
10048 CFLAGS="$CFLAGS -Werror -Wpointer-arith"
10049 elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
10050 then
10051 CFLAGS="$CFLAGS -Werror -Wpointer-arith"
10052 else
10053 CFLAGS="$CFLAGS -Wpointer-arith"
10054 fi
10055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10056 /* end confdefs.h. */
10057
10058 int
10059 main ()
10060 {
10061 return 0
10062 ;
10063 return 0;
10064 }
10065 _ACEOF
10066 if ac_fn_c_try_compile "$LINENO"; then :
10067
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10069 $as_echo "yes" >&6; }
10070 can_add_to_cflags=yes
10071 #
10072 # The compile supports this; do we have some C code for
10073 # which the warning should *not* appear?
10074 # We test the fourth argument because the third argument
10075 # could contain quotes, breaking the test.
10076 #
10077 if test "x" != "x"
10078 then
10079 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
10081 $as_echo_n "checking whether -Wpointer-arith ... " >&6; }
10082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083 /* end confdefs.h. */
10084
10085 _ACEOF
10086 if ac_fn_c_try_compile "$LINENO"; then :
10087
10088 #
10089 # Not a problem.
10090 #
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092 $as_echo "no" >&6; }
10093
10094 else
10095
10096 #
10097 # A problem.
10098 #
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10100 $as_echo "yes" >&6; }
10101 can_add_to_cflags=no
10102
10103 fi
10104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10105 fi
10106 CFLAGS="$save_CFLAGS"
10107 if test x"$can_add_to_cflags" = "xyes"
10108 then
10109 V_CCOPT="$V_CCOPT -Wpointer-arith"
10110 fi
10111
10112 else
10113
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115 $as_echo "no" >&6; }
10116 CFLAGS="$save_CFLAGS"
10117
10118 fi
10119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10120
10121
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
10123 $as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
10124 save_CFLAGS="$CFLAGS"
10125 if expr "x-Wpointer-sign" : "x-W.*" >/dev/null
10126 then
10127 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-sign"
10128 elif expr "x-Wpointer-sign" : "x-f.*" >/dev/null
10129 then
10130 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
10131 elif expr "x-Wpointer-sign" : "x-m.*" >/dev/null
10132 then
10133 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
10134 else
10135 CFLAGS="$CFLAGS -Wpointer-sign"
10136 fi
10137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10138 /* end confdefs.h. */
10139
10140 int
10141 main ()
10142 {
10143 return 0
10144 ;
10145 return 0;
10146 }
10147 _ACEOF
10148 if ac_fn_c_try_compile "$LINENO"; then :
10149
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10151 $as_echo "yes" >&6; }
10152 can_add_to_cflags=yes
10153 #
10154 # The compile supports this; do we have some C code for
10155 # which the warning should *not* appear?
10156 # We test the fourth argument because the third argument
10157 # could contain quotes, breaking the test.
10158 #
10159 if test "x" != "x"
10160 then
10161 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
10163 $as_echo_n "checking whether -Wpointer-sign ... " >&6; }
10164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10165 /* end confdefs.h. */
10166
10167 _ACEOF
10168 if ac_fn_c_try_compile "$LINENO"; then :
10169
10170 #
10171 # Not a problem.
10172 #
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10174 $as_echo "no" >&6; }
10175
10176 else
10177
10178 #
10179 # A problem.
10180 #
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10182 $as_echo "yes" >&6; }
10183 can_add_to_cflags=no
10184
10185 fi
10186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10187 fi
10188 CFLAGS="$save_CFLAGS"
10189 if test x"$can_add_to_cflags" = "xyes"
10190 then
10191 V_CCOPT="$V_CCOPT -Wpointer-sign"
10192 fi
10193
10194 else
10195
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197 $as_echo "no" >&6; }
10198 CFLAGS="$save_CFLAGS"
10199
10200 fi
10201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10202
10203
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
10205 $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
10206 save_CFLAGS="$CFLAGS"
10207 if expr "x-Wshadow" : "x-W.*" >/dev/null
10208 then
10209 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
10210 elif expr "x-Wshadow" : "x-f.*" >/dev/null
10211 then
10212 CFLAGS="$CFLAGS -Werror -Wshadow"
10213 elif expr "x-Wshadow" : "x-m.*" >/dev/null
10214 then
10215 CFLAGS="$CFLAGS -Werror -Wshadow"
10216 else
10217 CFLAGS="$CFLAGS -Wshadow"
10218 fi
10219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220 /* end confdefs.h. */
10221
10222 int
10223 main ()
10224 {
10225 return 0
10226 ;
10227 return 0;
10228 }
10229 _ACEOF
10230 if ac_fn_c_try_compile "$LINENO"; then :
10231
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10233 $as_echo "yes" >&6; }
10234 can_add_to_cflags=yes
10235 #
10236 # The compile supports this; do we have some C code for
10237 # which the warning should *not* appear?
10238 # We test the fourth argument because the third argument
10239 # could contain quotes, breaking the test.
10240 #
10241 if test "x" != "x"
10242 then
10243 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
10245 $as_echo_n "checking whether -Wshadow ... " >&6; }
10246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10247 /* end confdefs.h. */
10248
10249 _ACEOF
10250 if ac_fn_c_try_compile "$LINENO"; then :
10251
10252 #
10253 # Not a problem.
10254 #
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256 $as_echo "no" >&6; }
10257
10258 else
10259
10260 #
10261 # A problem.
10262 #
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10264 $as_echo "yes" >&6; }
10265 can_add_to_cflags=no
10266
10267 fi
10268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10269 fi
10270 CFLAGS="$save_CFLAGS"
10271 if test x"$can_add_to_cflags" = "xyes"
10272 then
10273 V_CCOPT="$V_CCOPT -Wshadow"
10274 fi
10275
10276 else
10277
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279 $as_echo "no" >&6; }
10280 CFLAGS="$save_CFLAGS"
10281
10282 fi
10283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10284
10285
10286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
10287 $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
10288 save_CFLAGS="$CFLAGS"
10289 if expr "x-Wsign-compare" : "x-W.*" >/dev/null
10290 then
10291 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
10292 elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
10293 then
10294 CFLAGS="$CFLAGS -Werror -Wsign-compare"
10295 elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
10296 then
10297 CFLAGS="$CFLAGS -Werror -Wsign-compare"
10298 else
10299 CFLAGS="$CFLAGS -Wsign-compare"
10300 fi
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h. */
10303
10304 int
10305 main ()
10306 {
10307 return 0
10308 ;
10309 return 0;
10310 }
10311 _ACEOF
10312 if ac_fn_c_try_compile "$LINENO"; then :
10313
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10315 $as_echo "yes" >&6; }
10316 can_add_to_cflags=yes
10317 #
10318 # The compile supports this; do we have some C code for
10319 # which the warning should *not* appear?
10320 # We test the fourth argument because the third argument
10321 # could contain quotes, breaking the test.
10322 #
10323 if test "x" != "x"
10324 then
10325 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
10327 $as_echo_n "checking whether -Wsign-compare ... " >&6; }
10328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329 /* end confdefs.h. */
10330
10331 _ACEOF
10332 if ac_fn_c_try_compile "$LINENO"; then :
10333
10334 #
10335 # Not a problem.
10336 #
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10338 $as_echo "no" >&6; }
10339
10340 else
10341
10342 #
10343 # A problem.
10344 #
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10346 $as_echo "yes" >&6; }
10347 can_add_to_cflags=no
10348
10349 fi
10350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10351 fi
10352 CFLAGS="$save_CFLAGS"
10353 if test x"$can_add_to_cflags" = "xyes"
10354 then
10355 V_CCOPT="$V_CCOPT -Wsign-compare"
10356 fi
10357
10358 else
10359
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10361 $as_echo "no" >&6; }
10362 CFLAGS="$save_CFLAGS"
10363
10364 fi
10365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10366
10367
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
10369 $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
10370 save_CFLAGS="$CFLAGS"
10371 if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
10372 then
10373 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
10374 elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
10375 then
10376 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
10377 elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
10378 then
10379 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
10380 else
10381 CFLAGS="$CFLAGS -Wstrict-prototypes"
10382 fi
10383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10384 /* end confdefs.h. */
10385
10386 int
10387 main ()
10388 {
10389 return 0
10390 ;
10391 return 0;
10392 }
10393 _ACEOF
10394 if ac_fn_c_try_compile "$LINENO"; then :
10395
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10397 $as_echo "yes" >&6; }
10398 can_add_to_cflags=yes
10399 #
10400 # The compile supports this; do we have some C code for
10401 # which the warning should *not* appear?
10402 # We test the fourth argument because the third argument
10403 # could contain quotes, breaking the test.
10404 #
10405 if test "x" != "x"
10406 then
10407 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
10409 $as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
10410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10411 /* end confdefs.h. */
10412
10413 _ACEOF
10414 if ac_fn_c_try_compile "$LINENO"; then :
10415
10416 #
10417 # Not a problem.
10418 #
10419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420 $as_echo "no" >&6; }
10421
10422 else
10423
10424 #
10425 # A problem.
10426 #
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10428 $as_echo "yes" >&6; }
10429 can_add_to_cflags=no
10430
10431 fi
10432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10433 fi
10434 CFLAGS="$save_CFLAGS"
10435 if test x"$can_add_to_cflags" = "xyes"
10436 then
10437 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
10438 fi
10439
10440 else
10441
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443 $as_echo "no" >&6; }
10444 CFLAGS="$save_CFLAGS"
10445
10446 fi
10447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10448
10449
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
10451 $as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
10452 save_CFLAGS="$CFLAGS"
10453 if expr "x-Wunused-parameter" : "x-W.*" >/dev/null
10454 then
10455 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter"
10456 elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null
10457 then
10458 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
10459 elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null
10460 then
10461 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
10462 else
10463 CFLAGS="$CFLAGS -Wunused-parameter"
10464 fi
10465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10466 /* end confdefs.h. */
10467
10468 int
10469 main ()
10470 {
10471 return 0
10472 ;
10473 return 0;
10474 }
10475 _ACEOF
10476 if ac_fn_c_try_compile "$LINENO"; then :
10477
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10479 $as_echo "yes" >&6; }
10480 can_add_to_cflags=yes
10481 #
10482 # The compile supports this; do we have some C code for
10483 # which the warning should *not* appear?
10484 # We test the fourth argument because the third argument
10485 # could contain quotes, breaking the test.
10486 #
10487 if test "x" != "x"
10488 then
10489 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
10491 $as_echo_n "checking whether -Wunused-parameter ... " >&6; }
10492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10493 /* end confdefs.h. */
10494
10495 _ACEOF
10496 if ac_fn_c_try_compile "$LINENO"; then :
10497
10498 #
10499 # Not a problem.
10500 #
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502 $as_echo "no" >&6; }
10503
10504 else
10505
10506 #
10507 # A problem.
10508 #
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10510 $as_echo "yes" >&6; }
10511 can_add_to_cflags=no
10512
10513 fi
10514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10515 fi
10516 CFLAGS="$save_CFLAGS"
10517 if test x"$can_add_to_cflags" = "xyes"
10518 then
10519 V_CCOPT="$V_CCOPT -Wunused-parameter"
10520 fi
10521
10522 else
10523
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525 $as_echo "no" >&6; }
10526 CFLAGS="$save_CFLAGS"
10527
10528 fi
10529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10530
10531
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
10533 $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
10534 save_CFLAGS="$CFLAGS"
10535 if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
10536 then
10537 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
10538 elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
10539 then
10540 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
10541 elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
10542 then
10543 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
10544 else
10545 CFLAGS="$CFLAGS -Wused-but-marked-unused"
10546 fi
10547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10548 /* end confdefs.h. */
10549
10550 int
10551 main ()
10552 {
10553 return 0
10554 ;
10555 return 0;
10556 }
10557 _ACEOF
10558 if ac_fn_c_try_compile "$LINENO"; then :
10559
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10561 $as_echo "yes" >&6; }
10562 can_add_to_cflags=yes
10563 #
10564 # The compile supports this; do we have some C code for
10565 # which the warning should *not* appear?
10566 # We test the fourth argument because the third argument
10567 # could contain quotes, breaking the test.
10568 #
10569 if test "x" != "x"
10570 then
10571 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
10573 $as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
10574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575 /* end confdefs.h. */
10576
10577 _ACEOF
10578 if ac_fn_c_try_compile "$LINENO"; then :
10579
10580 #
10581 # Not a problem.
10582 #
10583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584 $as_echo "no" >&6; }
10585
10586 else
10587
10588 #
10589 # A problem.
10590 #
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10592 $as_echo "yes" >&6; }
10593 can_add_to_cflags=no
10594
10595 fi
10596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10597 fi
10598 CFLAGS="$save_CFLAGS"
10599 if test x"$can_add_to_cflags" = "xyes"
10600 then
10601 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
10602 fi
10603
10604 else
10605
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10607 $as_echo "no" >&6; }
10608 CFLAGS="$save_CFLAGS"
10609
10610 fi
10611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10612
10613 # Warns about safeguards added in case the enums are
10614 # extended
10615 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
10616 #
10617 # This can cause problems with ntohs(), ntohl(),
10618 # htons(), and htonl() on some platforms, such
10619 # as OpenBSD 6.3 with Clang 5.0.1. I guess the
10620 # problem is that the macro that ultimately does
10621 # the byte-swapping involves a conditional
10622 # expression that tests whether the value being
10623 # swapped is a compile-time constant or not,
10624 # using __builtin_constant_p(), and, depending
10625 # on whether it is, does a compile-time swap or
10626 # a run-time swap; perhaps the compiler always
10627 # considers one of the two results of the
10628 # conditional expressin is never evaluated,
10629 # because the conditional check is done at
10630 # compile time, and thus always says "that
10631 # expression is never executed".
10632 #
10633 # (Perhaps there should be a way of flagging
10634 # an expression that you *want* evaluated at
10635 # compile time, so that the compiler 1) warns
10636 # if it *can't* be evaluated at compile time
10637 # and 2) *doesn't* warn that the true or false
10638 # branch will never be reached.)
10639 #
10640
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
10642 $as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
10643 save_CFLAGS="$CFLAGS"
10644 if expr "x-Wunreachable-code" : "x-W.*" >/dev/null
10645 then
10646 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code"
10647 elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null
10648 then
10649 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
10650 elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null
10651 then
10652 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
10653 else
10654 CFLAGS="$CFLAGS -Wunreachable-code"
10655 fi
10656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657 /* end confdefs.h. */
10658
10659 int
10660 main ()
10661 {
10662 return 0
10663 ;
10664 return 0;
10665 }
10666 _ACEOF
10667 if ac_fn_c_try_compile "$LINENO"; then :
10668
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10670 $as_echo "yes" >&6; }
10671 can_add_to_cflags=yes
10672 #
10673 # The compile supports this; do we have some C code for
10674 # which the warning should *not* appear?
10675 # We test the fourth argument because the third argument
10676 # could contain quotes, breaking the test.
10677 #
10678 if test "xgenerates warnings from ntohs()" != "x"
10679 then
10680 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
10682 $as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10684 /* end confdefs.h. */
10685 #include <arpa/inet.h>
10686
10687 unsigned short
10688 testme(unsigned short a)
10689 {
10690 return ntohs(a);
10691 }
10692
10693 _ACEOF
10694 if ac_fn_c_try_compile "$LINENO"; then :
10695
10696 #
10697 # Not a problem.
10698 #
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700 $as_echo "no" >&6; }
10701
10702 else
10703
10704 #
10705 # A problem.
10706 #
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10708 $as_echo "yes" >&6; }
10709 can_add_to_cflags=no
10710
10711 fi
10712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10713 fi
10714 CFLAGS="$save_CFLAGS"
10715 if test x"$can_add_to_cflags" = "xyes"
10716 then
10717 V_CCOPT="$V_CCOPT -Wunreachable-code"
10718 fi
10719
10720 else
10721
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723 $as_echo "no" >&6; }
10724 CFLAGS="$save_CFLAGS"
10725
10726 fi
10727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10728
10729
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
10731 $as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
10732 save_CFLAGS="$CFLAGS"
10733 if expr "x-Wshorten-64-to-32" : "x-W.*" >/dev/null
10734 then
10735 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshorten-64-to-32"
10736 elif expr "x-Wshorten-64-to-32" : "x-f.*" >/dev/null
10737 then
10738 CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10739 elif expr "x-Wshorten-64-to-32" : "x-m.*" >/dev/null
10740 then
10741 CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10742 else
10743 CFLAGS="$CFLAGS -Wshorten-64-to-32"
10744 fi
10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746 /* end confdefs.h. */
10747
10748 int
10749 main ()
10750 {
10751 return 0
10752 ;
10753 return 0;
10754 }
10755 _ACEOF
10756 if ac_fn_c_try_compile "$LINENO"; then :
10757
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10759 $as_echo "yes" >&6; }
10760 can_add_to_cflags=yes
10761 #
10762 # The compile supports this; do we have some C code for
10763 # which the warning should *not* appear?
10764 # We test the fourth argument because the third argument
10765 # could contain quotes, breaking the test.
10766 #
10767 if test "x" != "x"
10768 then
10769 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
10771 $as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10773 /* end confdefs.h. */
10774
10775 _ACEOF
10776 if ac_fn_c_try_compile "$LINENO"; then :
10777
10778 #
10779 # Not a problem.
10780 #
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10782 $as_echo "no" >&6; }
10783
10784 else
10785
10786 #
10787 # A problem.
10788 #
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10790 $as_echo "yes" >&6; }
10791 can_add_to_cflags=no
10792
10793 fi
10794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10795 fi
10796 CFLAGS="$save_CFLAGS"
10797 if test x"$can_add_to_cflags" = "xyes"
10798 then
10799 V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
10800 fi
10801
10802 else
10803
10804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10805 $as_echo "no" >&6; }
10806 CFLAGS="$save_CFLAGS"
10807
10808 fi
10809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10810
10811 fi
10812
10813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
10814 $as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
10815 if test "$GCC" = yes ; then
10816 #
10817 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
10818 # though it's not); we assume that, in this case, the flag
10819 # would be -M.
10820 #
10821 ac_lbl_dependency_flag="-M"
10822 else
10823 #
10824 # Not GCC or a compiler deemed to be GCC; what platform is
10825 # this? (We're assuming that if the compiler isn't GCC
10826 # it's the compiler from the vendor of the OS; that won't
10827 # necessarily be true for x86 platforms, where it might be
10828 # the Intel C compiler.)
10829 #
10830 case "$host_os" in
10831
10832 irix*|osf*|darwin*)
10833 #
10834 # MIPS C for IRIX, DEC C, and clang all use -M.
10835 #
10836 ac_lbl_dependency_flag="-M"
10837 ;;
10838
10839 solaris*)
10840 #
10841 # Sun C uses -xM.
10842 #
10843 ac_lbl_dependency_flag="-xM"
10844 ;;
10845
10846 hpux*)
10847 #
10848 # HP's older C compilers don't support this.
10849 # HP's newer C compilers support this with
10850 # either +M or +Make; the older compilers
10851 # interpret +M as something completely
10852 # different, so we use +Make so we don't
10853 # think it works with the older compilers.
10854 #
10855 ac_lbl_dependency_flag="+Make"
10856 ;;
10857
10858 *)
10859 #
10860 # Not one of the above; assume no support for
10861 # generating dependencies.
10862 #
10863 ac_lbl_dependency_flag=""
10864 ;;
10865 esac
10866 fi
10867
10868 #
10869 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
10870 # complain about it?
10871 #
10872 # Note: clang doesn't seem to exit with an error status when handed
10873 # an unknown non-warning error, even if you pass it
10874 # -Werror=unknown-warning-option. However, it always supports
10875 # -M, so the fact that this test always succeeds with clang
10876 # isn't an issue.
10877 #
10878 if test ! -z "$ac_lbl_dependency_flag"; then
10879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10880 /* end confdefs.h. */
10881 int main(void) { return 0; }
10882 _ACEOF
10883 if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
10884 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
10885 ac_status=$?
10886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10887 test $ac_status = 0; }; then
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
10889 $as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
10890 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
10891 MKDEP='${srcdir}/mkdep'
10892 else
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10894 $as_echo "no" >&6; }
10895 #
10896 # We can't run mkdep, so have "make depend" do
10897 # nothing.
10898 #
10899 MKDEP='${srcdir}/nomkdep'
10900 fi
10901 rm -rf conftest*
10902 else
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10904 $as_echo "no" >&6; }
10905 #
10906 # We can't run mkdep, so have "make depend" do
10907 # nothing.
10908 #
10909 MKDEP='${srcdir}/nomkdep'
10910 fi
10911
10912
10913
10914 #
10915 # We used to set -n32 for IRIX 6 when not using GCC (presumed
10916 # to mean that we're using MIPS C or MIPSpro C); it specified
10917 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
10918 # not sure why that would be something to do *only* with a
10919 # .devel file; why should the ABI for which we produce code
10920 # depend on .devel?
10921 #
10922 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
10923 name="lbl/os-$os.h"
10924 if test -f $name ; then
10925 ln -s $name os-proto.h
10926
10927 $as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
10928
10929 else
10930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
10931 $as_echo "$as_me: WARNING: can't find $name" >&2;}
10932 fi
10933 fi
10934
10935 #
10936 # Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
10937 #
10938 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
10939 #include <sys/types.h>
10940 #include <sys/socket.h>
10941
10942 "
10943 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10944
10945 cat >>confdefs.h <<_ACEOF
10946 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10947 _ACEOF
10948
10949
10950 fi
10951
10952
10953 #
10954 # Check to see if there's a sockaddr_storage structure.
10955 #
10956 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10957 #include <sys/types.h>
10958 #include <sys/socket.h>
10959
10960 "
10961 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10962
10963 cat >>confdefs.h <<_ACEOF
10964 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10965 _ACEOF
10966
10967
10968 fi
10969
10970
10971 #
10972 # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
10973 # dl_module_id_1 member.
10974 #
10975 # NOTE: any failure means we conclude that it doesn't have that member,
10976 # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
10977 # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
10978 # it doesn't have that member (which is OK, as either we won't be
10979 # using code that would use that member, or we wouldn't compile in
10980 # any case).
10981 #
10982 ac_fn_c_check_member "$LINENO" "dl_hp_ppa_info_t" "dl_module_id_1" "ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" "
10983 #include <sys/types.h>
10984 #include <sys/dlpi.h>
10985 #include <sys/dlpi_ext.h>
10986
10987 "
10988 if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
10989
10990 cat >>confdefs.h <<_ACEOF
10991 #define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
10992 _ACEOF
10993
10994
10995 fi
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029 # Check whether --enable-usb was given.
11030 if test "${enable_usb+set}" = set; then :
11031 enableval=$enable_usb;
11032 else
11033 enable_usb=yes
11034 fi
11035
11036
11037 if test "xxx_only" = yes; then
11038 # User requested something-else-only pcap, so they don't
11039 # want USB support.
11040 enable_usb=no
11041 fi
11042
11043 if test "x$enable_usb" != "xno" ; then
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB sniffing support" >&5
11045 $as_echo_n "checking for USB sniffing support... " >&6; }
11046 case "$host_os" in
11047 linux*)
11048
11049 $as_echo "#define PCAP_SUPPORT_USB 1" >>confdefs.h
11050
11051 MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11053 $as_echo "yes" >&6; }
11054 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
11055 if test $? -ne 0 ; then
11056 ac_usb_dev_name="usbmon"
11057 fi
11058
11059 cat >>confdefs.h <<_ACEOF
11060 #define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
11061 _ACEOF
11062
11063 { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
11064 $as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
11065 #
11066 # Do we have a version of <linux/compiler.h> available?
11067 # If so, we might need it for <linux/usbdevice_fs.h>.
11068 #
11069 for ac_header in linux/compiler.h
11070 do :
11071 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
11072 if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
11073 cat >>confdefs.h <<_ACEOF
11074 #define HAVE_LINUX_COMPILER_H 1
11075 _ACEOF
11076
11077 fi
11078
11079 done
11080
11081 if test "$ac_cv_header_linux_compiler_h" = yes; then
11082 #
11083 # Yes - include it when testing for <linux/usbdevice_fs.h>.
11084 #
11085 for ac_header in linux/usbdevice_fs.h
11086 do :
11087 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
11088 "
11089 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
11090 cat >>confdefs.h <<_ACEOF
11091 #define HAVE_LINUX_USBDEVICE_FS_H 1
11092 _ACEOF
11093
11094 fi
11095
11096 done
11097
11098 else
11099 for ac_header in linux/usbdevice_fs.h
11100 do :
11101 ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
11102 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
11103 cat >>confdefs.h <<_ACEOF
11104 #define HAVE_LINUX_USBDEVICE_FS_H 1
11105 _ACEOF
11106
11107 fi
11108
11109 done
11110
11111 fi
11112 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
11113 #
11114 # OK, does it define bRequestType? Older versions of the kernel
11115 # define fields with names like "requesttype, "request", and
11116 # "value", rather than "bRequestType", "bRequest", and
11117 # "wValue".
11118 #
11119 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
11120 $ac_includes_default
11121 #ifdef HAVE_LINUX_COMPILER_H
11122 #include <linux/compiler.h>
11123 #endif
11124 #include <linux/usbdevice_fs.h>
11125
11126 "
11127 if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
11128
11129 cat >>confdefs.h <<_ACEOF
11130 #define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
11131 _ACEOF
11132
11133
11134 fi
11135
11136 fi
11137 ;;
11138 freebsd*)
11139 #
11140 # This just uses BPF in FreeBSD 8.4 and later; we don't need
11141 # to check for anything special for capturing.
11142 #
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in FreeBSD 8.4 and later" >&5
11144 $as_echo "yes, in FreeBSD 8.4 and later" >&6; }
11145 ;;
11146
11147 *)
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149 $as_echo "no" >&6; }
11150 ;;
11151 esac
11152 fi
11153
11154
11155 if test "xxx_only" != yes; then
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the platform could support netfilter sniffing" >&5
11157 $as_echo_n "checking whether the platform could support netfilter sniffing... " >&6; }
11158 case "$host_os" in
11159 linux*)
11160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11161 $as_echo "yes" >&6; }
11162 #
11163 # Life's too short to deal with trying to get this to compile
11164 # if you don't get the right types defined with
11165 # __KERNEL_STRICT_NAMES getting defined by some other include.
11166 #
11167 # Check whether the includes Just Work. If not, don't turn on
11168 # netfilter support.
11169 #
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
11171 $as_echo_n "checking whether we can compile the netfilter support... " >&6; }
11172 if ${ac_cv_netfilter_can_compile+:} false; then :
11173 $as_echo_n "(cached) " >&6
11174 else
11175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11176 /* end confdefs.h. */
11177
11178 $ac_includes_default
11179 #include <sys/socket.h>
11180 #include <netinet/in.h>
11181 #include <linux/types.h>
11182
11183 #include <linux/netlink.h>
11184 #include <linux/netfilter.h>
11185 #include <linux/netfilter/nfnetlink.h>
11186 #include <linux/netfilter/nfnetlink_log.h>
11187 #include <linux/netfilter/nfnetlink_queue.h>
11188 int
11189 main ()
11190 {
11191
11192 ;
11193 return 0;
11194 }
11195 _ACEOF
11196 if ac_fn_c_try_compile "$LINENO"; then :
11197 ac_cv_netfilter_can_compile=yes
11198 else
11199 ac_cv_netfilter_can_compile=no
11200 fi
11201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202 fi
11203
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
11205 $as_echo "$ac_cv_netfilter_can_compile" >&6; }
11206 if test $ac_cv_netfilter_can_compile = yes ; then
11207
11208 $as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
11209
11210 MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
11211 fi
11212 ;;
11213 *)
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11215 $as_echo "no" >&6; }
11216 ;;
11217 esac
11218 fi
11219
11220
11221 # Check whether --enable-netmap was given.
11222 if test "${enable_netmap+set}" = set; then :
11223 enableval=$enable_netmap;
11224 else
11225 enable_netmap=yes
11226 fi
11227
11228
11229 if test "x$enable_netmap" != "xno" ; then
11230 #
11231 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
11232 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
11233 # is defined, for example, as it includes a non-existent malloc.h
11234 # header.
11235 #
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
11237 $as_echo_n "checking whether we can compile the netmap support... " >&6; }
11238 if ${ac_cv_net_netmap_user_can_compile+:} false; then :
11239 $as_echo_n "(cached) " >&6
11240 else
11241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11242 /* end confdefs.h. */
11243
11244 $ac_includes_default
11245 #define NETMAP_WITH_LIBS
11246 #include <net/netmap_user.h>
11247 int
11248 main ()
11249 {
11250
11251 ;
11252 return 0;
11253 }
11254 _ACEOF
11255 if ac_fn_c_try_compile "$LINENO"; then :
11256 ac_cv_net_netmap_user_can_compile=yes
11257 else
11258 ac_cv_net_netmap_user_can_compile=no
11259 fi
11260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261 fi
11262
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
11264 $as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
11265 if test $ac_cv_net_netmap_user_can_compile = yes ; then
11266
11267 $as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
11268
11269 MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
11270 fi
11271
11272 fi
11273
11274 # Check for DPDK support.
11275
11276 # Check whether --with-dpdk was given.
11277 if test "${with_dpdk+set}" = set; then :
11278 withval=$with_dpdk;
11279 if test "$withval" = no
11280 then
11281 # User doesn't want DPDK support.
11282 want_dpdk=no
11283 elif test "$withval" = yes
11284 then
11285 # User wants DPDK support but hasn't specified a directory.
11286 want_dpdk=yes
11287 else
11288 # User wants DPDK support and has specified a directory,
11289 # so use the provided value.
11290 want_dpdk=yes
11291 dpdk_dir=$withval
11292 fi
11293
11294 else
11295
11296 if test "$V_PCAP" = dpdk; then
11297 # User requested DPDK-only libpcap, so we'd better have
11298 # the DPDK API.
11299 want_dpdk=yes
11300 elif test "xxx_only" = yes; then
11301 # User requested something-else-only pcap, so they don't
11302 # want DPDK support.
11303 want_dpdk=no
11304 else
11305 #
11306 # Use DPDK API if present, otherwise don't
11307 #
11308 want_dpdk=ifpresent
11309 fi
11310
11311 fi
11312
11313
11314 if test "$want_dpdk" != no; then
11315 if test -z "$dpdk_dir"; then
11316 #
11317 # The user didn't specify a directory containing
11318 # the DPDK headers and libraries. If we find
11319 # a /usr/local/include/dpdk directory, assume
11320 # it's /usr/local, otherwise assume it's /usr.
11321 #
11322 if test -d "/usr/local/include/dpdk"; then
11323 dpdk_dir="/usr/local"
11324 else
11325 dpdk_dir="/usr"
11326 fi
11327 fi
11328 #
11329 # The convention appears to be that 1) there's a "dpdk"
11330 # subdirectory of the include directory, containing DPDK
11331 # headers (at least in the installation on Ubuntu with
11332 # the system DPDK packages) and 2) includes of DPDK
11333 # headers don't use "dpdk/{header}" (at least from the
11334 # way the DPDK documentation is written).
11335 #
11336 # So we add "/dpdk" to the include directory, and always
11337 # add that to the list of include directories to search.
11338 #
11339 dpdk_inc_dir="$dpdk_dir/include/dpdk"
11340 dpdk_lib_dir="$dpdk_dir/lib"
11341 DPDK_MACHINE_CFLAGS="-march=native"
11342 DPDK_CFLAGS="$DPDK_MACHINE_CFLAGS -I$dpdk_inc_dir"
11343 DPDK_LDFLAGS="-L$dpdk_lib_dir -ldpdk -lrt -lm -lnuma -ldl -pthread"
11344
11345 save_CFLAGS="$CFLAGS"
11346 save_LIBS="$LIBS"
11347 save_LDFLAGS="$LDFLAGS"
11348 CFLAGS="$CFLAGS $DPDK_CFLAGS"
11349 LIBS="$LIBS $DPDK_LDFLAGS"
11350 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11351
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the DPDK support" >&5
11353 $as_echo_n "checking whether we can compile the DPDK support... " >&6; }
11354 if ${ac_cv_dpdk_can_compile+:} false; then :
11355 $as_echo_n "(cached) " >&6
11356 else
11357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11358 /* end confdefs.h. */
11359
11360 $ac_includes_default
11361 #include <rte_common.h>
11362 int
11363 main ()
11364 {
11365
11366 ;
11367 return 0;
11368 }
11369 _ACEOF
11370 if ac_fn_c_try_compile "$LINENO"; then :
11371 ac_cv_dpdk_can_compile=yes
11372 else
11373 ac_cv_dpdk_can_compile=no
11374 fi
11375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11376 fi
11377
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dpdk_can_compile" >&5
11379 $as_echo "$ac_cv_dpdk_can_compile" >&6; }
11380
11381 #
11382 # We include rte_bus.h, and older versions of DPDK
11383 # didn't have it, so check for it.
11384 #
11385 if test "$ac_cv_dpdk_can_compile" = yes; then
11386 for ac_header in rte_bus.h
11387 do :
11388 ac_fn_c_check_header_mongrel "$LINENO" "rte_bus.h" "ac_cv_header_rte_bus_h" "$ac_includes_default"
11389 if test "x$ac_cv_header_rte_bus_h" = xyes; then :
11390 cat >>confdefs.h <<_ACEOF
11391 #define HAVE_RTE_BUS_H 1
11392 _ACEOF
11393
11394 fi
11395
11396 done
11397
11398 fi
11399
11400 CFLAGS="$save_CFLAGS"
11401 LIBS="$save_LIBS"
11402 LDFLAGS="$save_LDFLAGS"
11403
11404 if test "$ac_cv_header_rte_bus_h" = yes; then
11405 CFLAGS="$CFLAGS $DPDK_CFLAGS"
11406 LIBS="$LIBS $DPDK_LDFLAGS"
11407 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11408 V_INCLS="$V_INCLS $DPDK_CFLAGS"
11409
11410 $as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
11411
11412 if test $V_PCAP != dpdk ; then
11413 MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
11414 fi
11415 else
11416 if test "$V_PCAP" = dpdk; then
11417 # User requested "dpdk" capture type but we couldn't
11418 # find the DPDK API support.
11419 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but the DPDK headers weren't found at $dpdk_inc_dir: make sure the DPDK support is installed, specify a different path or paths if necessary, or don't request DPDK support" "$LINENO" 5
11420 fi
11421
11422 if test "$want_dpdk" = yes; then
11423 # User wanted DPDK support but we couldn't find it.
11424 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but the DPDK headers weren't found at $dpdk_inc_dir: make sure the DPDK support is installed, specify a different path or paths if necessary, or don't request DPDK support" "$LINENO" 5
11425 fi
11426 fi
11427 fi
11428
11429
11430 # Check whether --enable-bluetooth was given.
11431 if test "${enable_bluetooth+set}" = set; then :
11432 enableval=$enable_bluetooth;
11433 else
11434 enable_bluetooth=ifsupportavailable
11435 fi
11436
11437
11438 if test "xxx_only" = yes; then
11439 # User requested something-else-only pcap, so they don't
11440 # want Bluetooth support.
11441 enable_bluetooth=no
11442 fi
11443
11444 if test "x$enable_bluetooth" != "xno" ; then
11445 case "$host_os" in
11446 linux*)
11447 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
11448 if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
11449
11450 #
11451 # We have bluetooth.h, so we support Bluetooth
11452 # sniffing.
11453 #
11454
11455 $as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
11456
11457 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
11458 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
11459 $as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
11460 ac_lbl_bluetooth_available=yes
11461
11462 #
11463 # OK, does struct sockaddr_hci have an hci_channel
11464 # member?
11465 #
11466 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
11467 #include <bluetooth/bluetooth.h>
11468 #include <bluetooth/hci.h>
11469
11470 "
11471 if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
11472
11473 cat >>confdefs.h <<_ACEOF
11474 #define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
11475 _ACEOF
11476
11477
11478 #
11479 # Yes; is HCI_CHANNEL_MONITOR defined?
11480 #
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
11482 $as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
11483 if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
11484 $as_echo_n "(cached) " >&6
11485 else
11486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487 /* end confdefs.h. */
11488
11489 #include <bluetooth/bluetooth.h>
11490 #include <bluetooth/hci.h>
11491
11492 int
11493 main ()
11494 {
11495
11496 u_int i = HCI_CHANNEL_MONITOR;
11497
11498 ;
11499 return 0;
11500 }
11501 _ACEOF
11502 if ac_fn_c_try_compile "$LINENO"; then :
11503
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11505 $as_echo "yes" >&6; }
11506
11507 $as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
11508
11509 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
11510
11511 else
11512
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11514 $as_echo "no" >&6; }
11515
11516 fi
11517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11518 fi
11519
11520
11521 fi
11522
11523
11524 else
11525
11526 #
11527 # We don't have bluetooth.h, so we don't support
11528 # Bluetooth sniffing.
11529 #
11530 if test "x$enable_bluetooth" = "xyes" ; then
11531 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
11532 else
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
11534 $as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
11535 fi
11536
11537 fi
11538
11539
11540 ;;
11541 *)
11542 if test "x$enable_bluetooth" = "xyes" ; then
11543 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
11544 else
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
11546 $as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
11547 fi
11548 ;;
11549 esac
11550
11551 fi
11552
11553 # Check whether --enable-dbus was given.
11554 if test "${enable_dbus+set}" = set; then :
11555 enableval=$enable_dbus;
11556 else
11557 enable_dbus=ifavailable
11558 fi
11559
11560
11561 if test "xxx_only" = yes; then
11562 # User requested something-else-only pcap, so they don't
11563 # want D-Bus support.
11564 enable_dbus=no
11565 fi
11566
11567 if test "x$enable_dbus" != "xno"; then
11568 if test "x$enable_dbus" = "xyes"; then
11569 case "$host_os" in
11570
11571 darwin*)
11572 #
11573 # We don't support D-Bus sniffing on macOS; see
11574 #
11575 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
11576 #
11577 # The user requested it, so fail.
11578 #
11579 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
11580 esac
11581 else
11582 case "$host_os" in
11583
11584 darwin*)
11585 #
11586 # We don't support D-Bus sniffing on macOS; see
11587 #
11588 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
11589 #
11590 # The user dind't explicitly request it, so just
11591 # silently refuse to enable it.
11592 #
11593 enable_dbus="no"
11594 ;;
11595 esac
11596 fi
11597 fi
11598
11599 if test "x$enable_dbus" != "xno"; then
11600 if test "x$PKGCONFIG" != "xno"; then
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
11602 $as_echo_n "checking for D-Bus... " >&6; }
11603 if "$PKGCONFIG" dbus-1; then
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11605 $as_echo "yes" >&6; }
11606 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
11607 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
11608 save_CFLAGS="$CFLAGS"
11609 save_LIBS="$LIBS"
11610 CFLAGS="$CFLAGS $DBUS_CFLAGS"
11611 LIBS="$LIBS $DBUS_LIBS"
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
11613 $as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
11614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11615 /* end confdefs.h. */
11616 #include <string.h>
11617
11618 #include <time.h>
11619 #include <sys/time.h>
11620
11621 #include <dbus/dbus.h>
11622 int
11623 main ()
11624 {
11625 return dbus_connection_read_write(NULL, 0);
11626 ;
11627 return 0;
11628 }
11629 _ACEOF
11630 if ac_fn_c_try_link "$LINENO"; then :
11631
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11633 $as_echo "yes" >&6; }
11634
11635 $as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
11636
11637 MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
11638 V_INCLS="$V_INCLS $DBUS_CFLAGS"
11639
11640 else
11641
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643 $as_echo "no" >&6; }
11644 if test "x$enable_dbus" = "xyes"; then
11645 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
11646 fi
11647 LIBS="$save_LIBS"
11648
11649 fi
11650 rm -f core conftest.err conftest.$ac_objext \
11651 conftest$ac_exeext conftest.$ac_ext
11652 CFLAGS="$save_CFLAGS"
11653 else
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655 $as_echo "no" >&6; }
11656 if test "x$enable_dbus" = "xyes"; then
11657 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
11658 fi
11659 fi
11660 fi
11661
11662 fi
11663
11664 # Check whether --enable-rdma was given.
11665 if test "${enable_rdma+set}" = set; then :
11666 enableval=$enable_rdma;
11667 else
11668 enable_rdma=ifavailable
11669 fi
11670
11671
11672 if test "xxx_only" = yes; then
11673 # User requested something-else-only pcap, so they don't
11674 # want RDMA support.
11675 enable_rdma=no
11676 fi
11677
11678 if test "x$enable_rdma" != "xno"; then
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
11680 $as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
11681 if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
11682 $as_echo_n "(cached) " >&6
11683 else
11684 ac_check_lib_save_LIBS=$LIBS
11685 LIBS="-libverbs $LIBS"
11686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687 /* end confdefs.h. */
11688
11689 /* Override any GCC internal prototype to avoid an error.
11690 Use char because int might match the return type of a GCC
11691 builtin and then its argument prototype would still apply. */
11692 #ifdef __cplusplus
11693 extern "C"
11694 #endif
11695 char ibv_get_device_list ();
11696 int
11697 main ()
11698 {
11699 return ibv_get_device_list ();
11700 ;
11701 return 0;
11702 }
11703 _ACEOF
11704 if ac_fn_c_try_link "$LINENO"; then :
11705 ac_cv_lib_ibverbs_ibv_get_device_list=yes
11706 else
11707 ac_cv_lib_ibverbs_ibv_get_device_list=no
11708 fi
11709 rm -f core conftest.err conftest.$ac_objext \
11710 conftest$ac_exeext conftest.$ac_ext
11711 LIBS=$ac_check_lib_save_LIBS
11712 fi
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
11714 $as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
11715 if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
11716
11717 ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
11718 if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
11719
11720 #
11721 # ibv_create_flow may be defined as a static inline
11722 # function in infiniband/verbs.h, so we can't
11723 # use AC_CHECK_LIB.
11724 #
11725 # Too bad autoconf has no AC_SYMBOL_EXISTS()
11726 # macro that works like CMake's check_symbol_exists()
11727 # function, to check do a compile check like
11728 # this (they do a clever trick to avoid having
11729 # to know the function's signature).
11730 #
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
11732 $as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
11733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11734 /* end confdefs.h. */
11735
11736 #include <infiniband/verbs.h>
11737
11738 int
11739 main ()
11740 {
11741
11742 (void) ibv_create_flow((struct ibv_qp *) NULL,
11743 (struct ibv_flow_attr *) NULL);
11744
11745 ;
11746 return 0;
11747 }
11748 _ACEOF
11749 if ac_fn_c_try_link "$LINENO"; then :
11750
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11752 $as_echo "yes" >&6; }
11753
11754 $as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
11755
11756 MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
11757 LIBS="-libverbs $LIBS"
11758
11759 else
11760
11761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762 $as_echo "no" >&6; }
11763
11764
11765 fi
11766 rm -f core conftest.err conftest.$ac_objext \
11767 conftest$ac_exeext conftest.$ac_ext
11768
11769 fi
11770
11771
11772
11773 fi
11774
11775
11776 fi
11777
11778 # Find a good install program. We prefer a C program (faster),
11779 # so one script is as good as another. But avoid the broken or
11780 # incompatible versions:
11781 # SysV /etc/install, /usr/sbin/install
11782 # SunOS /usr/etc/install
11783 # IRIX /sbin/install
11784 # AIX /bin/install
11785 # AmigaOS /C/install, which installs bootblocks on floppy discs
11786 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
11787 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
11788 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
11789 # OS/2's system install, which has a completely different semantic
11790 # ./install, which can be erroneously created by make from ./install.sh.
11791 # Reject install programs that cannot install multiple files.
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
11793 $as_echo_n "checking for a BSD-compatible install... " >&6; }
11794 if test -z "$INSTALL"; then
11795 if ${ac_cv_path_install+:} false; then :
11796 $as_echo_n "(cached) " >&6
11797 else
11798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799 for as_dir in $PATH
11800 do
11801 IFS=$as_save_IFS
11802 test -z "$as_dir" && as_dir=.
11803 # Account for people who put trailing slashes in PATH elements.
11804 case $as_dir/ in #((
11805 ./ | .// | /[cC]/* | \
11806 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
11807 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
11808 /usr/ucb/* ) ;;
11809 *)
11810 # OSF1 and SCO ODT 3.0 have their own names for install.
11811 # Don't use installbsd from OSF since it installs stuff as root
11812 # by default.
11813 for ac_prog in ginstall scoinst install; do
11814 for ac_exec_ext in '' $ac_executable_extensions; do
11815 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
11816 if test $ac_prog = install &&
11817 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11818 # AIX install. It has an incompatible calling convention.
11819 :
11820 elif test $ac_prog = install &&
11821 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11822 # program-specific install script used by HP pwplus--don't use.
11823 :
11824 else
11825 rm -rf conftest.one conftest.two conftest.dir
11826 echo one > conftest.one
11827 echo two > conftest.two
11828 mkdir conftest.dir
11829 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
11830 test -s conftest.one && test -s conftest.two &&
11831 test -s conftest.dir/conftest.one &&
11832 test -s conftest.dir/conftest.two
11833 then
11834 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
11835 break 3
11836 fi
11837 fi
11838 fi
11839 done
11840 done
11841 ;;
11842 esac
11843
11844 done
11845 IFS=$as_save_IFS
11846
11847 rm -rf conftest.one conftest.two conftest.dir
11848
11849 fi
11850 if test "${ac_cv_path_install+set}" = set; then
11851 INSTALL=$ac_cv_path_install
11852 else
11853 # As a last resort, use the slow shell script. Don't cache a
11854 # value for INSTALL within a source directory, because that will
11855 # break other packages using the cache if that directory is
11856 # removed, or if the value is a relative name.
11857 INSTALL=$ac_install_sh
11858 fi
11859 fi
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
11861 $as_echo "$INSTALL" >&6; }
11862
11863 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
11864 # It thinks the first close brace ends the variable substitution.
11865 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
11866
11867 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
11868
11869 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
11870
11871
11872 ac_config_headers="$ac_config_headers config.h"
11873
11874
11875 ac_config_commands="$ac_config_commands default-1"
11876
11877 ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile testprogs/Makefile"
11878
11879 cat >confcache <<\_ACEOF
11880 # This file is a shell script that caches the results of configure
11881 # tests run on this system so they can be shared between configure
11882 # scripts and configure runs, see configure's option --config-cache.
11883 # It is not useful on other systems. If it contains results you don't
11884 # want to keep, you may remove or edit it.
11885 #
11886 # config.status only pays attention to the cache file if you give it
11887 # the --recheck option to rerun configure.
11888 #
11889 # `ac_cv_env_foo' variables (set or unset) will be overridden when
11890 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11891 # following values.
11892
11893 _ACEOF
11894
11895 # The following way of writing the cache mishandles newlines in values,
11896 # but we know of no workaround that is simple, portable, and efficient.
11897 # So, we kill variables containing newlines.
11898 # Ultrix sh set writes to stderr and can't be redirected directly,
11899 # and sets the high bit in the cache file unless we assign to the vars.
11900 (
11901 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11902 eval ac_val=\$$ac_var
11903 case $ac_val in #(
11904 *${as_nl}*)
11905 case $ac_var in #(
11906 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
11907 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11908 esac
11909 case $ac_var in #(
11910 _ | IFS | as_nl) ;; #(
11911 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11912 *) { eval $ac_var=; unset $ac_var;} ;;
11913 esac ;;
11914 esac
11915 done
11916
11917 (set) 2>&1 |
11918 case $as_nl`(ac_space=' '; set) 2>&1` in #(
11919 *${as_nl}ac_space=\ *)
11920 # `set' does not quote correctly, so add quotes: double-quote
11921 # substitution turns \\\\ into \\, and sed turns \\ into \.
11922 sed -n \
11923 "s/'/'\\\\''/g;
11924 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11925 ;; #(
11926 *)
11927 # `set' quotes correctly as required by POSIX, so do not add quotes.
11928 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11929 ;;
11930 esac |
11931 sort
11932 ) |
11933 sed '
11934 /^ac_cv_env_/b end
11935 t clear
11936 :clear
11937 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11938 t end
11939 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11940 :end' >>confcache
11941 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11942 if test -w "$cache_file"; then
11943 if test "x$cache_file" != "x/dev/null"; then
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
11945 $as_echo "$as_me: updating cache $cache_file" >&6;}
11946 if test ! -f "$cache_file" || test -h "$cache_file"; then
11947 cat confcache >"$cache_file"
11948 else
11949 case $cache_file in #(
11950 */* | ?:*)
11951 mv -f confcache "$cache_file"$$ &&
11952 mv -f "$cache_file"$$ "$cache_file" ;; #(
11953 *)
11954 mv -f confcache "$cache_file" ;;
11955 esac
11956 fi
11957 fi
11958 else
11959 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
11960 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11961 fi
11962 fi
11963 rm -f confcache
11964
11965 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11966 # Let make expand exec_prefix.
11967 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11968
11969 DEFS=-DHAVE_CONFIG_H
11970
11971 ac_libobjs=
11972 ac_ltlibobjs=
11973 U=
11974 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11975 # 1. Remove the extension, and $U if already installed.
11976 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11977 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
11978 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
11979 # will be set to the directory where LIBOBJS objects are built.
11980 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11981 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
11982 done
11983 LIBOBJS=$ac_libobjs
11984
11985 LTLIBOBJS=$ac_ltlibobjs
11986
11987
11988
11989 : "${CONFIG_STATUS=./config.status}"
11990 ac_write_fail=0
11991 ac_clean_files_save=$ac_clean_files
11992 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
11994 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
11995 as_write_fail=0
11996 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
11997 #! $SHELL
11998 # Generated by $as_me.
11999 # Run this file to recreate the current configuration.
12000 # Compiler output produced by configure, useful for debugging
12001 # configure, is in config.log if it exists.
12002
12003 debug=false
12004 ac_cs_recheck=false
12005 ac_cs_silent=false
12006
12007 SHELL=\${CONFIG_SHELL-$SHELL}
12008 export SHELL
12009 _ASEOF
12010 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12011 ## -------------------- ##
12012 ## M4sh Initialization. ##
12013 ## -------------------- ##
12014
12015 # Be more Bourne compatible
12016 DUALCASE=1; export DUALCASE # for MKS sh
12017 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12018 emulate sh
12019 NULLCMD=:
12020 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12021 # is contrary to our usage. Disable this feature.
12022 alias -g '${1+"$@"}'='"$@"'
12023 setopt NO_GLOB_SUBST
12024 else
12025 case `(set -o) 2>/dev/null` in #(
12026 *posix*) :
12027 set -o posix ;; #(
12028 *) :
12029 ;;
12030 esac
12031 fi
12032
12033
12034 as_nl='
12035 '
12036 export as_nl
12037 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12038 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12039 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12040 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12041 # Prefer a ksh shell builtin over an external printf program on Solaris,
12042 # but without wasting forks for bash or zsh.
12043 if test -z "$BASH_VERSION$ZSH_VERSION" \
12044 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12045 as_echo='print -r --'
12046 as_echo_n='print -rn --'
12047 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12048 as_echo='printf %s\n'
12049 as_echo_n='printf %s'
12050 else
12051 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12052 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12053 as_echo_n='/usr/ucb/echo -n'
12054 else
12055 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12056 as_echo_n_body='eval
12057 arg=$1;
12058 case $arg in #(
12059 *"$as_nl"*)
12060 expr "X$arg" : "X\\(.*\\)$as_nl";
12061 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12062 esac;
12063 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12064 '
12065 export as_echo_n_body
12066 as_echo_n='sh -c $as_echo_n_body as_echo'
12067 fi
12068 export as_echo_body
12069 as_echo='sh -c $as_echo_body as_echo'
12070 fi
12071
12072 # The user is always right.
12073 if test "${PATH_SEPARATOR+set}" != set; then
12074 PATH_SEPARATOR=:
12075 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12076 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12077 PATH_SEPARATOR=';'
12078 }
12079 fi
12080
12081
12082 # IFS
12083 # We need space, tab and new line, in precisely that order. Quoting is
12084 # there to prevent editors from complaining about space-tab.
12085 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12086 # splitting by setting IFS to empty value.)
12087 IFS=" "" $as_nl"
12088
12089 # Find who we are. Look in the path if we contain no directory separator.
12090 as_myself=
12091 case $0 in #((
12092 *[\\/]* ) as_myself=$0 ;;
12093 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12094 for as_dir in $PATH
12095 do
12096 IFS=$as_save_IFS
12097 test -z "$as_dir" && as_dir=.
12098 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12099 done
12100 IFS=$as_save_IFS
12101
12102 ;;
12103 esac
12104 # We did not find ourselves, most probably we were run as `sh COMMAND'
12105 # in which case we are not to be found in the path.
12106 if test "x$as_myself" = x; then
12107 as_myself=$0
12108 fi
12109 if test ! -f "$as_myself"; then
12110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12111 exit 1
12112 fi
12113
12114 # Unset variables that we do not need and which cause bugs (e.g. in
12115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
12116 # suppresses any "Segmentation fault" message there. '((' could
12117 # trigger a bug in pdksh 5.2.14.
12118 for as_var in BASH_ENV ENV MAIL MAILPATH
12119 do eval test x\${$as_var+set} = xset \
12120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12121 done
12122 PS1='$ '
12123 PS2='> '
12124 PS4='+ '
12125
12126 # NLS nuisances.
12127 LC_ALL=C
12128 export LC_ALL
12129 LANGUAGE=C
12130 export LANGUAGE
12131
12132 # CDPATH.
12133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12134
12135
12136 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12137 # ----------------------------------------
12138 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12139 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12140 # script with STATUS, using 1 if that was 0.
12141 as_fn_error ()
12142 {
12143 as_status=$1; test $as_status -eq 0 && as_status=1
12144 if test "$4"; then
12145 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12146 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12147 fi
12148 $as_echo "$as_me: error: $2" >&2
12149 as_fn_exit $as_status
12150 } # as_fn_error
12151
12152
12153 # as_fn_set_status STATUS
12154 # -----------------------
12155 # Set $? to STATUS, without forking.
12156 as_fn_set_status ()
12157 {
12158 return $1
12159 } # as_fn_set_status
12160
12161 # as_fn_exit STATUS
12162 # -----------------
12163 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12164 as_fn_exit ()
12165 {
12166 set +e
12167 as_fn_set_status $1
12168 exit $1
12169 } # as_fn_exit
12170
12171 # as_fn_unset VAR
12172 # ---------------
12173 # Portably unset VAR.
12174 as_fn_unset ()
12175 {
12176 { eval $1=; unset $1;}
12177 }
12178 as_unset=as_fn_unset
12179 # as_fn_append VAR VALUE
12180 # ----------------------
12181 # Append the text in VALUE to the end of the definition contained in VAR. Take
12182 # advantage of any shell optimizations that allow amortized linear growth over
12183 # repeated appends, instead of the typical quadratic growth present in naive
12184 # implementations.
12185 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12186 eval 'as_fn_append ()
12187 {
12188 eval $1+=\$2
12189 }'
12190 else
12191 as_fn_append ()
12192 {
12193 eval $1=\$$1\$2
12194 }
12195 fi # as_fn_append
12196
12197 # as_fn_arith ARG...
12198 # ------------------
12199 # Perform arithmetic evaluation on the ARGs, and store the result in the
12200 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12201 # must be portable across $(()) and expr.
12202 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12203 eval 'as_fn_arith ()
12204 {
12205 as_val=$(( $* ))
12206 }'
12207 else
12208 as_fn_arith ()
12209 {
12210 as_val=`expr "$@" || test $? -eq 1`
12211 }
12212 fi # as_fn_arith
12213
12214
12215 if expr a : '\(a\)' >/dev/null 2>&1 &&
12216 test "X`expr 00001 : '.*\(...\)'`" = X001; then
12217 as_expr=expr
12218 else
12219 as_expr=false
12220 fi
12221
12222 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12223 as_basename=basename
12224 else
12225 as_basename=false
12226 fi
12227
12228 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12229 as_dirname=dirname
12230 else
12231 as_dirname=false
12232 fi
12233
12234 as_me=`$as_basename -- "$0" ||
12235 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12236 X"$0" : 'X\(//\)$' \| \
12237 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12238 $as_echo X/"$0" |
12239 sed '/^.*\/\([^/][^/]*\)\/*$/{
12240 s//\1/
12241 q
12242 }
12243 /^X\/\(\/\/\)$/{
12244 s//\1/
12245 q
12246 }
12247 /^X\/\(\/\).*/{
12248 s//\1/
12249 q
12250 }
12251 s/.*/./; q'`
12252
12253 # Avoid depending upon Character Ranges.
12254 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12255 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12256 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12257 as_cr_digits='0123456789'
12258 as_cr_alnum=$as_cr_Letters$as_cr_digits
12259
12260 ECHO_C= ECHO_N= ECHO_T=
12261 case `echo -n x` in #(((((
12262 -n*)
12263 case `echo 'xy\c'` in
12264 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
12265 xy) ECHO_C='\c';;
12266 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
12267 ECHO_T=' ';;
12268 esac;;
12269 *)
12270 ECHO_N='-n';;
12271 esac
12272
12273 rm -f conf$$ conf$$.exe conf$$.file
12274 if test -d conf$$.dir; then
12275 rm -f conf$$.dir/conf$$.file
12276 else
12277 rm -f conf$$.dir
12278 mkdir conf$$.dir 2>/dev/null
12279 fi
12280 if (echo >conf$$.file) 2>/dev/null; then
12281 if ln -s conf$$.file conf$$ 2>/dev/null; then
12282 as_ln_s='ln -s'
12283 # ... but there are two gotchas:
12284 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12285 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12286 # In both cases, we have to default to `cp -pR'.
12287 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12288 as_ln_s='cp -pR'
12289 elif ln conf$$.file conf$$ 2>/dev/null; then
12290 as_ln_s=ln
12291 else
12292 as_ln_s='cp -pR'
12293 fi
12294 else
12295 as_ln_s='cp -pR'
12296 fi
12297 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12298 rmdir conf$$.dir 2>/dev/null
12299
12300
12301 # as_fn_mkdir_p
12302 # -------------
12303 # Create "$as_dir" as a directory, including parents if necessary.
12304 as_fn_mkdir_p ()
12305 {
12306
12307 case $as_dir in #(
12308 -*) as_dir=./$as_dir;;
12309 esac
12310 test -d "$as_dir" || eval $as_mkdir_p || {
12311 as_dirs=
12312 while :; do
12313 case $as_dir in #(
12314 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12315 *) as_qdir=$as_dir;;
12316 esac
12317 as_dirs="'$as_qdir' $as_dirs"
12318 as_dir=`$as_dirname -- "$as_dir" ||
12319 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12320 X"$as_dir" : 'X\(//\)[^/]' \| \
12321 X"$as_dir" : 'X\(//\)$' \| \
12322 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12323 $as_echo X"$as_dir" |
12324 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12325 s//\1/
12326 q
12327 }
12328 /^X\(\/\/\)[^/].*/{
12329 s//\1/
12330 q
12331 }
12332 /^X\(\/\/\)$/{
12333 s//\1/
12334 q
12335 }
12336 /^X\(\/\).*/{
12337 s//\1/
12338 q
12339 }
12340 s/.*/./; q'`
12341 test -d "$as_dir" && break
12342 done
12343 test -z "$as_dirs" || eval "mkdir $as_dirs"
12344 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
12345
12346
12347 } # as_fn_mkdir_p
12348 if mkdir -p . 2>/dev/null; then
12349 as_mkdir_p='mkdir -p "$as_dir"'
12350 else
12351 test -d ./-p && rmdir ./-p
12352 as_mkdir_p=false
12353 fi
12354
12355
12356 # as_fn_executable_p FILE
12357 # -----------------------
12358 # Test if FILE is an executable regular file.
12359 as_fn_executable_p ()
12360 {
12361 test -f "$1" && test -x "$1"
12362 } # as_fn_executable_p
12363 as_test_x='test -x'
12364 as_executable_p=as_fn_executable_p
12365
12366 # Sed expression to map a string onto a valid CPP name.
12367 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12368
12369 # Sed expression to map a string onto a valid variable name.
12370 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12371
12372
12373 exec 6>&1
12374 ## ----------------------------------- ##
12375 ## Main body of $CONFIG_STATUS script. ##
12376 ## ----------------------------------- ##
12377 _ASEOF
12378 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
12379
12380 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12381 # Save the log message, to keep $0 and so on meaningful, and to
12382 # report actual input values of CONFIG_FILES etc. instead of their
12383 # values after options handling.
12384 ac_log="
12385 This file was extended by pcap $as_me 1.10.0-PRE-GIT, which was
12386 generated by GNU Autoconf 2.69. Invocation command line was
12387
12388 CONFIG_FILES = $CONFIG_FILES
12389 CONFIG_HEADERS = $CONFIG_HEADERS
12390 CONFIG_LINKS = $CONFIG_LINKS
12391 CONFIG_COMMANDS = $CONFIG_COMMANDS
12392 $ $0 $@
12393
12394 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12395 "
12396
12397 _ACEOF
12398
12399 case $ac_config_files in *"
12400 "*) set x $ac_config_files; shift; ac_config_files=$*;;
12401 esac
12402
12403 case $ac_config_headers in *"
12404 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12405 esac
12406
12407
12408 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12409 # Files that config.status was made for.
12410 config_files="$ac_config_files"
12411 config_headers="$ac_config_headers"
12412 config_commands="$ac_config_commands"
12413
12414 _ACEOF
12415
12416 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12417 ac_cs_usage="\
12418 \`$as_me' instantiates files and other configuration actions
12419 from templates according to the current configuration. Unless the files
12420 and actions are specified as TAGs, all are instantiated by default.
12421
12422 Usage: $0 [OPTION]... [TAG]...
12423
12424 -h, --help print this help, then exit
12425 -V, --version print version number and configuration settings, then exit
12426 --config print configuration, then exit
12427 -q, --quiet, --silent
12428 do not print progress messages
12429 -d, --debug don't remove temporary files
12430 --recheck update $as_me by reconfiguring in the same conditions
12431 --file=FILE[:TEMPLATE]
12432 instantiate the configuration file FILE
12433 --header=FILE[:TEMPLATE]
12434 instantiate the configuration header FILE
12435
12436 Configuration files:
12437 $config_files
12438
12439 Configuration headers:
12440 $config_headers
12441
12442 Configuration commands:
12443 $config_commands
12444
12445 Report bugs to the package provider."
12446
12447 _ACEOF
12448 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12449 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
12450 ac_cs_version="\\
12451 pcap config.status 1.10.0-PRE-GIT
12452 configured by $0, generated by GNU Autoconf 2.69,
12453 with options \\"\$ac_cs_config\\"
12454
12455 Copyright (C) 2012 Free Software Foundation, Inc.
12456 This config.status script is free software; the Free Software Foundation
12457 gives unlimited permission to copy, distribute and modify it."
12458
12459 ac_pwd='$ac_pwd'
12460 srcdir='$srcdir'
12461 INSTALL='$INSTALL'
12462 test -n "\$AWK" || AWK=awk
12463 _ACEOF
12464
12465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12466 # The default lists apply if the user does not specify any file.
12467 ac_need_defaults=:
12468 while test $# != 0
12469 do
12470 case $1 in
12471 --*=?*)
12472 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12473 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12474 ac_shift=:
12475 ;;
12476 --*=)
12477 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12478 ac_optarg=
12479 ac_shift=:
12480 ;;
12481 *)
12482 ac_option=$1
12483 ac_optarg=$2
12484 ac_shift=shift
12485 ;;
12486 esac
12487
12488 case $ac_option in
12489 # Handling of the options.
12490 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12491 ac_cs_recheck=: ;;
12492 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12493 $as_echo "$ac_cs_version"; exit ;;
12494 --config | --confi | --conf | --con | --co | --c )
12495 $as_echo "$ac_cs_config"; exit ;;
12496 --debug | --debu | --deb | --de | --d | -d )
12497 debug=: ;;
12498 --file | --fil | --fi | --f )
12499 $ac_shift
12500 case $ac_optarg in
12501 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12502 '') as_fn_error $? "missing file argument" ;;
12503 esac
12504 as_fn_append CONFIG_FILES " '$ac_optarg'"
12505 ac_need_defaults=false;;
12506 --header | --heade | --head | --hea )
12507 $ac_shift
12508 case $ac_optarg in
12509 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12510 esac
12511 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
12512 ac_need_defaults=false;;
12513 --he | --h)
12514 # Conflict between --help and --header
12515 as_fn_error $? "ambiguous option: \`$1'
12516 Try \`$0 --help' for more information.";;
12517 --help | --hel | -h )
12518 $as_echo "$ac_cs_usage"; exit ;;
12519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12520 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12521 ac_cs_silent=: ;;
12522
12523 # This is an error.
12524 -*) as_fn_error $? "unrecognized option: \`$1'
12525 Try \`$0 --help' for more information." ;;
12526
12527 *) as_fn_append ac_config_targets " $1"
12528 ac_need_defaults=false ;;
12529
12530 esac
12531 shift
12532 done
12533
12534 ac_configure_extra_args=
12535
12536 if $ac_cs_silent; then
12537 exec 6>/dev/null
12538 ac_configure_extra_args="$ac_configure_extra_args --silent"
12539 fi
12540
12541 _ACEOF
12542 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12543 if \$ac_cs_recheck; then
12544 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12545 shift
12546 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
12547 CONFIG_SHELL='$SHELL'
12548 export CONFIG_SHELL
12549 exec "\$@"
12550 fi
12551
12552 _ACEOF
12553 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12554 exec 5>>config.log
12555 {
12556 echo
12557 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12558 ## Running $as_me. ##
12559 _ASBOX
12560 $as_echo "$ac_log"
12561 } >&5
12562
12563 _ACEOF
12564 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12565 #
12566 # INIT-COMMANDS
12567 #
12568
12569
12570 _ACEOF
12571
12572 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12573
12574 # Handling of arguments.
12575 for ac_config_target in $ac_config_targets
12576 do
12577 case $ac_config_target in
12578 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
12579 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
12580 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12581 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
12582 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
12583 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
12584 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
12585 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
12586 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
12587 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
12588 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
12589 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
12590 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
12591 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
12592 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
12593 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
12594 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
12595 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
12596 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
12597 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
12598 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
12599 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
12600 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
12601
12602 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
12603 esac
12604 done
12605
12606
12607 # If the user did not use the arguments to specify the items to instantiate,
12608 # then the envvar interface is used. Set only those that are not.
12609 # We use the long form for the default assignment because of an extremely
12610 # bizarre bug on SunOS 4.1.3.
12611 if $ac_need_defaults; then
12612 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12613 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12614 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12615 fi
12616
12617 # Have a temporary directory for convenience. Make it in the build tree
12618 # simply because there is no reason against having it here, and in addition,
12619 # creating and moving files from /tmp can sometimes cause problems.
12620 # Hook for its removal unless debugging.
12621 # Note that there is a small window in which the directory will not be cleaned:
12622 # after its creation but before its name has been assigned to `$tmp'.
12623 $debug ||
12624 {
12625 tmp= ac_tmp=
12626 trap 'exit_status=$?
12627 : "${ac_tmp:=$tmp}"
12628 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
12629 ' 0
12630 trap 'as_fn_exit 1' 1 2 13 15
12631 }
12632 # Create a (secure) tmp directory for tmp files.
12633
12634 {
12635 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12636 test -d "$tmp"
12637 } ||
12638 {
12639 tmp=./conf$$-$RANDOM
12640 (umask 077 && mkdir "$tmp")
12641 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
12642 ac_tmp=$tmp
12643
12644 # Set up the scripts for CONFIG_FILES section.
12645 # No need to generate them if there are no CONFIG_FILES.
12646 # This happens for instance with `./config.status config.h'.
12647 if test -n "$CONFIG_FILES"; then
12648
12649
12650 ac_cr=`echo X | tr X '\015'`
12651 # On cygwin, bash can eat \r inside `` if the user requested igncr.
12652 # But we know of no other shell where ac_cr would be empty at this
12653 # point, so we can use a bashism as a fallback.
12654 if test "x$ac_cr" = x; then
12655 eval ac_cr=\$\'\\r\'
12656 fi
12657 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
12658 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
12659 ac_cs_awk_cr='\\r'
12660 else
12661 ac_cs_awk_cr=$ac_cr
12662 fi
12663
12664 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
12665 _ACEOF
12666
12667
12668 {
12669 echo "cat >conf$$subs.awk <<_ACEOF" &&
12670 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
12671 echo "_ACEOF"
12672 } >conf$$subs.sh ||
12673 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12674 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
12675 ac_delim='%!_!# '
12676 for ac_last_try in false false false false false :; do
12677 . ./conf$$subs.sh ||
12678 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12679
12680 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
12681 if test $ac_delim_n = $ac_delim_num; then
12682 break
12683 elif $ac_last_try; then
12684 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12685 else
12686 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12687 fi
12688 done
12689 rm -f conf$$subs.sh
12690
12691 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12692 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
12693 _ACEOF
12694 sed -n '
12695 h
12696 s/^/S["/; s/!.*/"]=/
12697 p
12698 g
12699 s/^[^!]*!//
12700 :repl
12701 t repl
12702 s/'"$ac_delim"'$//
12703 t delim
12704 :nl
12705 h
12706 s/\(.\{148\}\)..*/\1/
12707 t more1
12708 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
12709 p
12710 n
12711 b repl
12712 :more1
12713 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12714 p
12715 g
12716 s/.\{148\}//
12717 t nl
12718 :delim
12719 h
12720 s/\(.\{148\}\)..*/\1/
12721 t more2
12722 s/["\\]/\\&/g; s/^/"/; s/$/"/
12723 p
12724 b
12725 :more2
12726 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12727 p
12728 g
12729 s/.\{148\}//
12730 t delim
12731 ' <conf$$subs.awk | sed '
12732 /^[^""]/{
12733 N
12734 s/\n//
12735 }
12736 ' >>$CONFIG_STATUS || ac_write_fail=1
12737 rm -f conf$$subs.awk
12738 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12739 _ACAWK
12740 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
12741 for (key in S) S_is_set[key] = 1
12742 FS = "\a"
12743
12744 }
12745 {
12746 line = $ 0
12747 nfields = split(line, field, "@")
12748 substed = 0
12749 len = length(field[1])
12750 for (i = 2; i < nfields; i++) {
12751 key = field[i]
12752 keylen = length(key)
12753 if (S_is_set[key]) {
12754 value = S[key]
12755 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
12756 len += length(value) + length(field[++i])
12757 substed = 1
12758 } else
12759 len += 1 + keylen
12760 }
12761
12762 print line
12763 }
12764
12765 _ACAWK
12766 _ACEOF
12767 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12768 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
12769 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
12770 else
12771 cat
12772 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
12773 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
12774 _ACEOF
12775
12776 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
12777 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
12778 # trailing colons and then remove the whole line if VPATH becomes empty
12779 # (actually we leave an empty line to preserve line numbers).
12780 if test "x$srcdir" = x.; then
12781 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
12782 h
12783 s///
12784 s/^/:/
12785 s/[ ]*$/:/
12786 s/:\$(srcdir):/:/g
12787 s/:\${srcdir}:/:/g
12788 s/:@srcdir@:/:/g
12789 s/^:*//
12790 s/:*$//
12791 x
12792 s/\(=[ ]*\).*/\1/
12793 G
12794 s/\n//
12795 s/^[^=]*=[ ]*$//
12796 }'
12797 fi
12798
12799 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12800 fi # test -n "$CONFIG_FILES"
12801
12802 # Set up the scripts for CONFIG_HEADERS section.
12803 # No need to generate them if there are no CONFIG_HEADERS.
12804 # This happens for instance with `./config.status Makefile'.
12805 if test -n "$CONFIG_HEADERS"; then
12806 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
12807 BEGIN {
12808 _ACEOF
12809
12810 # Transform confdefs.h into an awk script `defines.awk', embedded as
12811 # here-document in config.status, that substitutes the proper values into
12812 # config.h.in to produce config.h.
12813
12814 # Create a delimiter string that does not exist in confdefs.h, to ease
12815 # handling of long lines.
12816 ac_delim='%!_!# '
12817 for ac_last_try in false false :; do
12818 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
12819 if test -z "$ac_tt"; then
12820 break
12821 elif $ac_last_try; then
12822 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
12823 else
12824 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12825 fi
12826 done
12827
12828 # For the awk script, D is an array of macro values keyed by name,
12829 # likewise P contains macro parameters if any. Preserve backslash
12830 # newline sequences.
12831
12832 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
12833 sed -n '
12834 s/.\{148\}/&'"$ac_delim"'/g
12835 t rset
12836 :rset
12837 s/^[ ]*#[ ]*define[ ][ ]*/ /
12838 t def
12839 d
12840 :def
12841 s/\\$//
12842 t bsnl
12843 s/["\\]/\\&/g
12844 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12845 D["\1"]=" \3"/p
12846 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
12847 d
12848 :bsnl
12849 s/["\\]/\\&/g
12850 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12851 D["\1"]=" \3\\\\\\n"\\/p
12852 t cont
12853 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
12854 t cont
12855 d
12856 :cont
12857 n
12858 s/.\{148\}/&'"$ac_delim"'/g
12859 t clear
12860 :clear
12861 s/\\$//
12862 t bsnlc
12863 s/["\\]/\\&/g; s/^/"/; s/$/"/p
12864 d
12865 :bsnlc
12866 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
12867 b cont
12868 ' <confdefs.h | sed '
12869 s/'"$ac_delim"'/"\\\
12870 "/g' >>$CONFIG_STATUS || ac_write_fail=1
12871
12872 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12873 for (key in D) D_is_set[key] = 1
12874 FS = "\a"
12875 }
12876 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
12877 line = \$ 0
12878 split(line, arg, " ")
12879 if (arg[1] == "#") {
12880 defundef = arg[2]
12881 mac1 = arg[3]
12882 } else {
12883 defundef = substr(arg[1], 2)
12884 mac1 = arg[2]
12885 }
12886 split(mac1, mac2, "(") #)
12887 macro = mac2[1]
12888 prefix = substr(line, 1, index(line, defundef) - 1)
12889 if (D_is_set[macro]) {
12890 # Preserve the white space surrounding the "#".
12891 print prefix "define", macro P[macro] D[macro]
12892 next
12893 } else {
12894 # Replace #undef with comments. This is necessary, for example,
12895 # in the case of _POSIX_SOURCE, which is predefined and required
12896 # on some systems where configure will not decide to define it.
12897 if (defundef == "undef") {
12898 print "/*", prefix defundef, macro, "*/"
12899 next
12900 }
12901 }
12902 }
12903 { print }
12904 _ACAWK
12905 _ACEOF
12906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12907 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
12908 fi # test -n "$CONFIG_HEADERS"
12909
12910
12911 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
12912 shift
12913 for ac_tag
12914 do
12915 case $ac_tag in
12916 :[FHLC]) ac_mode=$ac_tag; continue;;
12917 esac
12918 case $ac_mode$ac_tag in
12919 :[FHL]*:*);;
12920 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
12921 :[FH]-) ac_tag=-:-;;
12922 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12923 esac
12924 ac_save_IFS=$IFS
12925 IFS=:
12926 set x $ac_tag
12927 IFS=$ac_save_IFS
12928 shift
12929 ac_file=$1
12930 shift
12931
12932 case $ac_mode in
12933 :L) ac_source=$1;;
12934 :[FH])
12935 ac_file_inputs=
12936 for ac_f
12937 do
12938 case $ac_f in
12939 -) ac_f="$ac_tmp/stdin";;
12940 *) # Look for the file first in the build tree, then in the source tree
12941 # (if the path is not absolute). The absolute path cannot be DOS-style,
12942 # because $ac_f cannot contain `:'.
12943 test -f "$ac_f" ||
12944 case $ac_f in
12945 [\\/$]*) false;;
12946 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12947 esac ||
12948 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
12949 esac
12950 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
12951 as_fn_append ac_file_inputs " '$ac_f'"
12952 done
12953
12954 # Let's still pretend it is `configure' which instantiates (i.e., don't
12955 # use $as_me), people would be surprised to read:
12956 # /* config.h. Generated by config.status. */
12957 configure_input='Generated from '`
12958 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
12959 `' by configure.'
12960 if test x"$ac_file" != x-; then
12961 configure_input="$ac_file. $configure_input"
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
12963 $as_echo "$as_me: creating $ac_file" >&6;}
12964 fi
12965 # Neutralize special characters interpreted by sed in replacement strings.
12966 case $configure_input in #(
12967 *\&* | *\|* | *\\* )
12968 ac_sed_conf_input=`$as_echo "$configure_input" |
12969 sed 's/[\\\\&|]/\\\\&/g'`;; #(
12970 *) ac_sed_conf_input=$configure_input;;
12971 esac
12972
12973 case $ac_tag in
12974 *:-:* | *:-) cat >"$ac_tmp/stdin" \
12975 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
12976 esac
12977 ;;
12978 esac
12979
12980 ac_dir=`$as_dirname -- "$ac_file" ||
12981 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12982 X"$ac_file" : 'X\(//\)[^/]' \| \
12983 X"$ac_file" : 'X\(//\)$' \| \
12984 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12985 $as_echo X"$ac_file" |
12986 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12987 s//\1/
12988 q
12989 }
12990 /^X\(\/\/\)[^/].*/{
12991 s//\1/
12992 q
12993 }
12994 /^X\(\/\/\)$/{
12995 s//\1/
12996 q
12997 }
12998 /^X\(\/\).*/{
12999 s//\1/
13000 q
13001 }
13002 s/.*/./; q'`
13003 as_dir="$ac_dir"; as_fn_mkdir_p
13004 ac_builddir=.
13005
13006 case "$ac_dir" in
13007 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13008 *)
13009 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13010 # A ".." for each directory in $ac_dir_suffix.
13011 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13012 case $ac_top_builddir_sub in
13013 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13014 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13015 esac ;;
13016 esac
13017 ac_abs_top_builddir=$ac_pwd
13018 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13019 # for backward compatibility:
13020 ac_top_builddir=$ac_top_build_prefix
13021
13022 case $srcdir in
13023 .) # We are building in place.
13024 ac_srcdir=.
13025 ac_top_srcdir=$ac_top_builddir_sub
13026 ac_abs_top_srcdir=$ac_pwd ;;
13027 [\\/]* | ?:[\\/]* ) # Absolute name.
13028 ac_srcdir=$srcdir$ac_dir_suffix;
13029 ac_top_srcdir=$srcdir
13030 ac_abs_top_srcdir=$srcdir ;;
13031 *) # Relative name.
13032 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13033 ac_top_srcdir=$ac_top_build_prefix$srcdir
13034 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13035 esac
13036 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13037
13038
13039 case $ac_mode in
13040 :F)
13041 #
13042 # CONFIG_FILE
13043 #
13044
13045 case $INSTALL in
13046 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13047 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13048 esac
13049 _ACEOF
13050
13051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13052 # If the template does not know about datarootdir, expand it.
13053 # FIXME: This hack should be removed a few years after 2.60.
13054 ac_datarootdir_hack=; ac_datarootdir_seen=
13055 ac_sed_dataroot='
13056 /datarootdir/ {
13057 p
13058 q
13059 }
13060 /@datadir@/p
13061 /@docdir@/p
13062 /@infodir@/p
13063 /@localedir@/p
13064 /@mandir@/p'
13065 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13066 *datarootdir*) ac_datarootdir_seen=yes;;
13067 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13069 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13070 _ACEOF
13071 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13072 ac_datarootdir_hack='
13073 s&@datadir@&$datadir&g
13074 s&@docdir@&$docdir&g
13075 s&@infodir@&$infodir&g
13076 s&@localedir@&$localedir&g
13077 s&@mandir@&$mandir&g
13078 s&\\\${datarootdir}&$datarootdir&g' ;;
13079 esac
13080 _ACEOF
13081
13082 # Neutralize VPATH when `$srcdir' = `.'.
13083 # Shell code in configure.ac might set extrasub.
13084 # FIXME: do we really want to maintain this feature?
13085 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13086 ac_sed_extra="$ac_vpsub
13087 $extrasub
13088 _ACEOF
13089 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13090 :t
13091 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13092 s|@configure_input@|$ac_sed_conf_input|;t t
13093 s&@top_builddir@&$ac_top_builddir_sub&;t t
13094 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13095 s&@srcdir@&$ac_srcdir&;t t
13096 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13097 s&@top_srcdir@&$ac_top_srcdir&;t t
13098 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13099 s&@builddir@&$ac_builddir&;t t
13100 s&@abs_builddir@&$ac_abs_builddir&;t t
13101 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13102 s&@INSTALL@&$ac_INSTALL&;t t
13103 $ac_datarootdir_hack
13104 "
13105 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13106 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13107
13108 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13109 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13110 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
13111 "$ac_tmp/out"`; test -z "$ac_out"; } &&
13112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13113 which seems to be undefined. Please make sure it is defined" >&5
13114 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13115 which seems to be undefined. Please make sure it is defined" >&2;}
13116
13117 rm -f "$ac_tmp/stdin"
13118 case $ac_file in
13119 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13120 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13121 esac \
13122 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13123 ;;
13124 :H)
13125 #
13126 # CONFIG_HEADER
13127 #
13128 if test x"$ac_file" != x-; then
13129 {
13130 $as_echo "/* $configure_input */" \
13131 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13132 } >"$ac_tmp/config.h" \
13133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13134 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13135 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13136 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13137 else
13138 rm -f "$ac_file"
13139 mv "$ac_tmp/config.h" "$ac_file" \
13140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13141 fi
13142 else
13143 $as_echo "/* $configure_input */" \
13144 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13145 || as_fn_error $? "could not create -" "$LINENO" 5
13146 fi
13147 ;;
13148
13149 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13150 $as_echo "$as_me: executing $ac_file commands" >&6;}
13151 ;;
13152 esac
13153
13154
13155 case $ac_file$ac_mode in
13156 "default-1":C) if test -f .devel; then
13157 echo timestamp > stamp-h
13158 cat $srcdir/Makefile-devel-adds >> Makefile
13159 make depend
13160 fi ;;
13161
13162 esac
13163 done # for ac_tag
13164
13165
13166 as_fn_exit 0
13167 _ACEOF
13168 ac_clean_files=$ac_clean_files_save
13169
13170 test $ac_write_fail = 0 ||
13171 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13172
13173
13174 # configure is writing to config.log, and then calls config.status.
13175 # config.status does its own redirection, appending to config.log.
13176 # Unfortunately, on DOS this fails, as config.log is still kept open
13177 # by configure, so config.status won't be able to write to it; its
13178 # output is simply discarded. So we exec the FD to /dev/null,
13179 # effectively closing config.log, so it can be properly (re)opened and
13180 # appended to by config.status. When coming back to configure, we
13181 # need to make the FD available again.
13182 if test "$no_create" != yes; then
13183 ac_cs_success=:
13184 ac_config_status_args=
13185 test "$silent" = yes &&
13186 ac_config_status_args="$ac_config_status_args --quiet"
13187 exec 5>/dev/null
13188 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13189 exec 5>>config.log
13190 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13191 # would make configure fail if this is the last instruction.
13192 $ac_cs_success || as_fn_exit 1
13193 fi
13194 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13196 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13197 fi
13198
13199 exit 0