]> The Tcpdump Group git mirrors - libpcap/blob - configure
That worked; move it after the warning-disabling-and-reenabling.
[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_LINUX_USBMON
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 VALGRINDTEST_SRC
675 LIBOBJS
676 EGREP
677 GREP
678 CPP
679 ac_ct_CXX
680 CXXFLAGS
681 CXX
682 OBJEXT
683 EXEEXT
684 ac_ct_CC
685 CPPFLAGS
686 LDFLAGS
687 CFLAGS
688 CC
689 SHLICC2
690 target_os
691 target_vendor
692 target_cpu
693 target
694 host_os
695 host_vendor
696 host_cpu
697 host
698 build_os
699 build_vendor
700 build_cpu
701 build
702 target_alias
703 host_alias
704 build_alias
705 LIBS
706 ECHO_T
707 ECHO_N
708 ECHO_C
709 DEFS
710 mandir
711 localedir
712 libdir
713 psdir
714 pdfdir
715 dvidir
716 htmldir
717 infodir
718 docdir
719 oldincludedir
720 includedir
721 localstatedir
722 sharedstatedir
723 sysconfdir
724 datadir
725 datarootdir
726 libexecdir
727 sbindir
728 bindir
729 program_transform_name
730 prefix
731 exec_prefix
732 PACKAGE_URL
733 PACKAGE_BUGREPORT
734 PACKAGE_STRING
735 PACKAGE_VERSION
736 PACKAGE_TARNAME
737 PACKAGE_NAME
738 PATH_SEPARATOR
739 SHELL'
740 ac_subst_files=''
741 ac_user_opts='
742 enable_option_checking
743 with_gcc
744 enable_largefile
745 enable_protochain
746 with_pcap
747 with_libnl
748 enable_ipv6
749 with_dag
750 with_dag_includes
751 with_dag_libraries
752 with_septel
753 with_snf
754 with_snf_includes
755 with_snf_libraries
756 with_turbocap
757 enable_remote
758 enable_optimizer_dbg
759 enable_yydebug
760 enable_universal
761 enable_shared
762 enable_usb
763 enable_netmap
764 with_dpdk
765 enable_bluetooth
766 enable_dbus
767 enable_rdma
768 '
769 ac_precious_vars='build_alias
770 host_alias
771 target_alias
772 CC
773 CFLAGS
774 LDFLAGS
775 LIBS
776 CPPFLAGS
777 CXX
778 CXXFLAGS
779 CCC
780 CPP
781 YACC
782 YFLAGS'
783
784
785 # Initialize some variables set by options.
786 ac_init_help=
787 ac_init_version=false
788 ac_unrecognized_opts=
789 ac_unrecognized_sep=
790 # The variables have the same names as the options, with
791 # dashes changed to underlines.
792 cache_file=/dev/null
793 exec_prefix=NONE
794 no_create=
795 no_recursion=
796 prefix=NONE
797 program_prefix=NONE
798 program_suffix=NONE
799 program_transform_name=s,x,x,
800 silent=
801 site=
802 srcdir=
803 verbose=
804 x_includes=NONE
805 x_libraries=NONE
806
807 # Installation directory options.
808 # These are left unexpanded so users can "make install exec_prefix=/foo"
809 # and all the variables that are supposed to be based on exec_prefix
810 # by default will actually change.
811 # Use braces instead of parens because sh, perl, etc. also accept them.
812 # (The list follows the same order as the GNU Coding Standards.)
813 bindir='${exec_prefix}/bin'
814 sbindir='${exec_prefix}/sbin'
815 libexecdir='${exec_prefix}/libexec'
816 datarootdir='${prefix}/share'
817 datadir='${datarootdir}'
818 sysconfdir='${prefix}/etc'
819 sharedstatedir='${prefix}/com'
820 localstatedir='${prefix}/var'
821 includedir='${prefix}/include'
822 oldincludedir='/usr/include'
823 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
824 infodir='${datarootdir}/info'
825 htmldir='${docdir}'
826 dvidir='${docdir}'
827 pdfdir='${docdir}'
828 psdir='${docdir}'
829 libdir='${exec_prefix}/lib'
830 localedir='${datarootdir}/locale'
831 mandir='${datarootdir}/man'
832
833 ac_prev=
834 ac_dashdash=
835 for ac_option
836 do
837 # If the previous option needs an argument, assign it.
838 if test -n "$ac_prev"; then
839 eval $ac_prev=\$ac_option
840 ac_prev=
841 continue
842 fi
843
844 case $ac_option in
845 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
846 *=) ac_optarg= ;;
847 *) ac_optarg=yes ;;
848 esac
849
850 # Accept the important Cygnus configure options, so we can diagnose typos.
851
852 case $ac_dashdash$ac_option in
853 --)
854 ac_dashdash=yes ;;
855
856 -bindir | --bindir | --bindi | --bind | --bin | --bi)
857 ac_prev=bindir ;;
858 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
859 bindir=$ac_optarg ;;
860
861 -build | --build | --buil | --bui | --bu)
862 ac_prev=build_alias ;;
863 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
864 build_alias=$ac_optarg ;;
865
866 -cache-file | --cache-file | --cache-fil | --cache-fi \
867 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
868 ac_prev=cache_file ;;
869 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
870 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
871 cache_file=$ac_optarg ;;
872
873 --config-cache | -C)
874 cache_file=config.cache ;;
875
876 -datadir | --datadir | --datadi | --datad)
877 ac_prev=datadir ;;
878 -datadir=* | --datadir=* | --datadi=* | --datad=*)
879 datadir=$ac_optarg ;;
880
881 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
882 | --dataroo | --dataro | --datar)
883 ac_prev=datarootdir ;;
884 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
885 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
886 datarootdir=$ac_optarg ;;
887
888 -disable-* | --disable-*)
889 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
890 # Reject names that are not valid shell variable names.
891 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
892 as_fn_error $? "invalid feature name: $ac_useropt"
893 ac_useropt_orig=$ac_useropt
894 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
895 case $ac_user_opts in
896 *"
897 "enable_$ac_useropt"
898 "*) ;;
899 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
900 ac_unrecognized_sep=', ';;
901 esac
902 eval enable_$ac_useropt=no ;;
903
904 -docdir | --docdir | --docdi | --doc | --do)
905 ac_prev=docdir ;;
906 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907 docdir=$ac_optarg ;;
908
909 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910 ac_prev=dvidir ;;
911 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912 dvidir=$ac_optarg ;;
913
914 -enable-* | --enable-*)
915 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
916 # Reject names that are not valid shell variable names.
917 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
918 as_fn_error $? "invalid feature name: $ac_useropt"
919 ac_useropt_orig=$ac_useropt
920 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
921 case $ac_user_opts in
922 *"
923 "enable_$ac_useropt"
924 "*) ;;
925 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
926 ac_unrecognized_sep=', ';;
927 esac
928 eval enable_$ac_useropt=\$ac_optarg ;;
929
930 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
931 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
932 | --exec | --exe | --ex)
933 ac_prev=exec_prefix ;;
934 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
935 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
936 | --exec=* | --exe=* | --ex=*)
937 exec_prefix=$ac_optarg ;;
938
939 -gas | --gas | --ga | --g)
940 # Obsolete; use --with-gas.
941 with_gas=yes ;;
942
943 -help | --help | --hel | --he | -h)
944 ac_init_help=long ;;
945 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
946 ac_init_help=recursive ;;
947 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
948 ac_init_help=short ;;
949
950 -host | --host | --hos | --ho)
951 ac_prev=host_alias ;;
952 -host=* | --host=* | --hos=* | --ho=*)
953 host_alias=$ac_optarg ;;
954
955 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
956 ac_prev=htmldir ;;
957 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
958 | --ht=*)
959 htmldir=$ac_optarg ;;
960
961 -includedir | --includedir | --includedi | --included | --include \
962 | --includ | --inclu | --incl | --inc)
963 ac_prev=includedir ;;
964 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
965 | --includ=* | --inclu=* | --incl=* | --inc=*)
966 includedir=$ac_optarg ;;
967
968 -infodir | --infodir | --infodi | --infod | --info | --inf)
969 ac_prev=infodir ;;
970 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
971 infodir=$ac_optarg ;;
972
973 -libdir | --libdir | --libdi | --libd)
974 ac_prev=libdir ;;
975 -libdir=* | --libdir=* | --libdi=* | --libd=*)
976 libdir=$ac_optarg ;;
977
978 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
979 | --libexe | --libex | --libe)
980 ac_prev=libexecdir ;;
981 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
982 | --libexe=* | --libex=* | --libe=*)
983 libexecdir=$ac_optarg ;;
984
985 -localedir | --localedir | --localedi | --localed | --locale)
986 ac_prev=localedir ;;
987 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
988 localedir=$ac_optarg ;;
989
990 -localstatedir | --localstatedir | --localstatedi | --localstated \
991 | --localstate | --localstat | --localsta | --localst | --locals)
992 ac_prev=localstatedir ;;
993 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
994 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
995 localstatedir=$ac_optarg ;;
996
997 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
998 ac_prev=mandir ;;
999 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1000 mandir=$ac_optarg ;;
1001
1002 -nfp | --nfp | --nf)
1003 # Obsolete; use --without-fp.
1004 with_fp=no ;;
1005
1006 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1007 | --no-cr | --no-c | -n)
1008 no_create=yes ;;
1009
1010 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1011 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1012 no_recursion=yes ;;
1013
1014 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1015 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1016 | --oldin | --oldi | --old | --ol | --o)
1017 ac_prev=oldincludedir ;;
1018 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1019 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1020 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1021 oldincludedir=$ac_optarg ;;
1022
1023 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1024 ac_prev=prefix ;;
1025 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1026 prefix=$ac_optarg ;;
1027
1028 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1029 | --program-pre | --program-pr | --program-p)
1030 ac_prev=program_prefix ;;
1031 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1032 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1033 program_prefix=$ac_optarg ;;
1034
1035 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1036 | --program-suf | --program-su | --program-s)
1037 ac_prev=program_suffix ;;
1038 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1039 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1040 program_suffix=$ac_optarg ;;
1041
1042 -program-transform-name | --program-transform-name \
1043 | --program-transform-nam | --program-transform-na \
1044 | --program-transform-n | --program-transform- \
1045 | --program-transform | --program-transfor \
1046 | --program-transfo | --program-transf \
1047 | --program-trans | --program-tran \
1048 | --progr-tra | --program-tr | --program-t)
1049 ac_prev=program_transform_name ;;
1050 -program-transform-name=* | --program-transform-name=* \
1051 | --program-transform-nam=* | --program-transform-na=* \
1052 | --program-transform-n=* | --program-transform-=* \
1053 | --program-transform=* | --program-transfor=* \
1054 | --program-transfo=* | --program-transf=* \
1055 | --program-trans=* | --program-tran=* \
1056 | --progr-tra=* | --program-tr=* | --program-t=*)
1057 program_transform_name=$ac_optarg ;;
1058
1059 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1060 ac_prev=pdfdir ;;
1061 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1062 pdfdir=$ac_optarg ;;
1063
1064 -psdir | --psdir | --psdi | --psd | --ps)
1065 ac_prev=psdir ;;
1066 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1067 psdir=$ac_optarg ;;
1068
1069 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1070 | -silent | --silent | --silen | --sile | --sil)
1071 silent=yes ;;
1072
1073 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1074 ac_prev=sbindir ;;
1075 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1076 | --sbi=* | --sb=*)
1077 sbindir=$ac_optarg ;;
1078
1079 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1080 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1081 | --sharedst | --shareds | --shared | --share | --shar \
1082 | --sha | --sh)
1083 ac_prev=sharedstatedir ;;
1084 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1085 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1086 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1087 | --sha=* | --sh=*)
1088 sharedstatedir=$ac_optarg ;;
1089
1090 -site | --site | --sit)
1091 ac_prev=site ;;
1092 -site=* | --site=* | --sit=*)
1093 site=$ac_optarg ;;
1094
1095 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1096 ac_prev=srcdir ;;
1097 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1098 srcdir=$ac_optarg ;;
1099
1100 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1101 | --syscon | --sysco | --sysc | --sys | --sy)
1102 ac_prev=sysconfdir ;;
1103 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1104 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1105 sysconfdir=$ac_optarg ;;
1106
1107 -target | --target | --targe | --targ | --tar | --ta | --t)
1108 ac_prev=target_alias ;;
1109 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1110 target_alias=$ac_optarg ;;
1111
1112 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1113 verbose=yes ;;
1114
1115 -version | --version | --versio | --versi | --vers | -V)
1116 ac_init_version=: ;;
1117
1118 -with-* | --with-*)
1119 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1120 # Reject names that are not valid shell variable names.
1121 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1122 as_fn_error $? "invalid package name: $ac_useropt"
1123 ac_useropt_orig=$ac_useropt
1124 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1125 case $ac_user_opts in
1126 *"
1127 "with_$ac_useropt"
1128 "*) ;;
1129 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1130 ac_unrecognized_sep=', ';;
1131 esac
1132 eval with_$ac_useropt=\$ac_optarg ;;
1133
1134 -without-* | --without-*)
1135 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1136 # Reject names that are not valid shell variable names.
1137 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1138 as_fn_error $? "invalid package name: $ac_useropt"
1139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143 "with_$ac_useropt"
1144 "*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
1147 esac
1148 eval with_$ac_useropt=no ;;
1149
1150 --x)
1151 # Obsolete; use --with-x.
1152 with_x=yes ;;
1153
1154 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1155 | --x-incl | --x-inc | --x-in | --x-i)
1156 ac_prev=x_includes ;;
1157 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1158 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1159 x_includes=$ac_optarg ;;
1160
1161 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1162 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1163 ac_prev=x_libraries ;;
1164 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1165 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1166 x_libraries=$ac_optarg ;;
1167
1168 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1169 Try \`$0 --help' for more information"
1170 ;;
1171
1172 *=*)
1173 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1174 # Reject names that are not valid shell variable names.
1175 case $ac_envvar in #(
1176 '' | [0-9]* | *[!_$as_cr_alnum]* )
1177 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1178 esac
1179 eval $ac_envvar=\$ac_optarg
1180 export $ac_envvar ;;
1181
1182 *)
1183 # FIXME: should be removed in autoconf 3.0.
1184 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1185 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1186 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1187 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1188 ;;
1189
1190 esac
1191 done
1192
1193 if test -n "$ac_prev"; then
1194 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1195 as_fn_error $? "missing argument to $ac_option"
1196 fi
1197
1198 if test -n "$ac_unrecognized_opts"; then
1199 case $enable_option_checking in
1200 no) ;;
1201 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1202 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1203 esac
1204 fi
1205
1206 # Check all directory arguments for consistency.
1207 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1208 datadir sysconfdir sharedstatedir localstatedir includedir \
1209 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1210 libdir localedir mandir
1211 do
1212 eval ac_val=\$$ac_var
1213 # Remove trailing slashes.
1214 case $ac_val in
1215 */ )
1216 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1217 eval $ac_var=\$ac_val;;
1218 esac
1219 # Be sure to have absolute directory names.
1220 case $ac_val in
1221 [\\/$]* | ?:[\\/]* ) continue;;
1222 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1223 esac
1224 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1225 done
1226
1227 # There might be people who depend on the old broken behavior: `$host'
1228 # used to hold the argument of --host etc.
1229 # FIXME: To remove some day.
1230 build=$build_alias
1231 host=$host_alias
1232 target=$target_alias
1233
1234 # FIXME: To remove some day.
1235 if test "x$host_alias" != x; then
1236 if test "x$build_alias" = x; then
1237 cross_compiling=maybe
1238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241 fi
1242
1243 ac_tool_prefix=
1244 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1245
1246 test "$silent" = yes && exec 6>/dev/null
1247
1248
1249 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250 ac_ls_di=`ls -di .` &&
1251 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1252 as_fn_error $? "working directory cannot be determined"
1253 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1254 as_fn_error $? "pwd does not report name of working directory"
1255
1256
1257 # Find the source files, if location was not specified.
1258 if test -z "$srcdir"; then
1259 ac_srcdir_defaulted=yes
1260 # Try the directory containing this script, then the parent directory.
1261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266 $as_echo X"$as_myself" |
1267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
1284 srcdir=$ac_confdir
1285 if test ! -r "$srcdir/$ac_unique_file"; then
1286 srcdir=..
1287 fi
1288 else
1289 ac_srcdir_defaulted=no
1290 fi
1291 if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1294 fi
1295 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296 ac_abs_confdir=`(
1297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1298 pwd)`
1299 # When building in place, set srcdir=.
1300 if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302 fi
1303 # Remove unnecessary trailing slashes from srcdir.
1304 # Double slashes in file names in object file debugging info
1305 # mess up M-x gdb in Emacs.
1306 case $srcdir in
1307 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308 esac
1309 for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314 done
1315
1316 #
1317 # Report the --help message.
1318 #
1319 if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
1322 cat <<_ACEOF
1323 \`configure' configures pcap 1.10.0-PRE-GIT to adapt to many kinds of systems.
1324
1325 Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328 VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330 Defaults for the options are specified in brackets.
1331
1332 Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
1337 -q, --quiet, --silent do not print \`checking ...' messages
1338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
1343 Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
1345 [$ac_default_prefix]
1346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1347 [PREFIX]
1348
1349 By default, \`make install' will install all the files in
1350 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352 for instance \`--prefix=\$HOME'.
1353
1354 For better control, use the options below.
1355
1356 Fine tuning of the installation directories:
1357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
1376 _ACEOF
1377
1378 cat <<\_ACEOF
1379
1380 System types:
1381 --build=BUILD configure for building on BUILD [guessed]
1382 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1383 --target=TARGET configure for building compilers for TARGET [HOST]
1384 _ACEOF
1385 fi
1386
1387 if test -n "$ac_init_help"; then
1388 case $ac_init_help in
1389 short | recursive ) echo "Configuration of pcap 1.10.0-PRE-GIT:";;
1390 esac
1391 cat <<\_ACEOF
1392
1393 Optional Features:
1394 --disable-option-checking ignore unrecognized --enable/--with options
1395 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1396 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1397 --disable-largefile omit support for large files
1398 --disable-protochain disable \"protochain\" insn
1399 --enable-ipv6 build IPv6-capable version [default=yes]
1400 --enable-remote enable remote packet capture [default=no]
1401 --disable-remote disable remote packet capture
1402 --enable-optimizer-dbg build optimizer debugging code
1403 --enable-yydebug build parser debugging code
1404 --disable-universal don't build universal on macOS
1405 --enable-shared build shared libraries [default=yes, if support
1406 available]
1407 --enable-usb enable Linux usbmon USB capture support
1408 [default=yes, if support available]
1409 --enable-netmap enable netmap support [default=yes, if support
1410 available]
1411 --enable-bluetooth enable Bluetooth support [default=yes, if support
1412 available]
1413 --enable-dbus enable D-Bus capture support [default=yes, if
1414 support available]
1415 --enable-rdma enable RDMA capture support [default=yes, if support
1416 available]
1417
1418 Optional Packages:
1419 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1420 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1421 --without-gcc don't use gcc
1422 --with-pcap=TYPE use packet capture TYPE
1423 --without-libnl disable libnl support [default=yes, on Linux, if
1424 present]
1425 --with-dag[=DIR] include Endace DAG support (located in directory
1426 DIR, if supplied). [default=yes, if present]
1427 --with-dag-includes=IDIR
1428 Endace DAG include directory, if not DIR/include
1429 --with-dag-libraries=LDIR
1430 Endace DAG library directory, if not DIR/lib
1431 --with-septel[=DIR] include Septel support (located in directory DIR, if
1432 supplied). [default=yes, if present]
1433 --with-snf[=DIR] include Myricom SNF support (located in directory
1434 DIR, if supplied). [default=yes, if present]
1435 --with-snf-includes=IDIR
1436 Myricom SNF include directory, if not DIR/include
1437 --with-snf-libraries=LDIR
1438 Myricom SNF library directory, if not DIR/lib
1439 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1440 directory DIR, if supplied). [default=yes, if
1441 present]
1442 --with-dpdk[=DIR] include DPDK support (located in directory DIR, if
1443 supplied). [default=yes, if present]
1444
1445 Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
1450 LIBS libraries to pass to the linker, e.g. -l<library>
1451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1452 you have headers in a nonstandard directory <include dir>
1453 CXX C++ compiler command
1454 CXXFLAGS C++ compiler flags
1455 CPP C preprocessor
1456 YACC The `Yet Another Compiler Compiler' implementation to use.
1457 Defaults to the first program found out of: `bison -y', `byacc',
1458 `yacc'.
1459 YFLAGS The list of arguments that will be passed by default to $YACC.
1460 This script will default YFLAGS to the empty string to avoid a
1461 default value of `-d' given by some make applications.
1462
1463 Use these variables to override the choices made by `configure' or to help
1464 it to find libraries and programs with nonstandard names/locations.
1465
1466 Report bugs to the package provider.
1467 _ACEOF
1468 ac_status=$?
1469 fi
1470
1471 if test "$ac_init_help" = "recursive"; then
1472 # If there are subdirs, report their specific --help.
1473 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1474 test -d "$ac_dir" ||
1475 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1476 continue
1477 ac_builddir=.
1478
1479 case "$ac_dir" in
1480 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481 *)
1482 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1483 # A ".." for each directory in $ac_dir_suffix.
1484 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1485 case $ac_top_builddir_sub in
1486 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1487 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1488 esac ;;
1489 esac
1490 ac_abs_top_builddir=$ac_pwd
1491 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1492 # for backward compatibility:
1493 ac_top_builddir=$ac_top_build_prefix
1494
1495 case $srcdir in
1496 .) # We are building in place.
1497 ac_srcdir=.
1498 ac_top_srcdir=$ac_top_builddir_sub
1499 ac_abs_top_srcdir=$ac_pwd ;;
1500 [\\/]* | ?:[\\/]* ) # Absolute name.
1501 ac_srcdir=$srcdir$ac_dir_suffix;
1502 ac_top_srcdir=$srcdir
1503 ac_abs_top_srcdir=$srcdir ;;
1504 *) # Relative name.
1505 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1506 ac_top_srcdir=$ac_top_build_prefix$srcdir
1507 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1508 esac
1509 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1510
1511 cd "$ac_dir" || { ac_status=$?; continue; }
1512 # Check for guested configure.
1513 if test -f "$ac_srcdir/configure.gnu"; then
1514 echo &&
1515 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1516 elif test -f "$ac_srcdir/configure"; then
1517 echo &&
1518 $SHELL "$ac_srcdir/configure" --help=recursive
1519 else
1520 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1521 fi || ac_status=$?
1522 cd "$ac_pwd" || { ac_status=$?; break; }
1523 done
1524 fi
1525
1526 test -n "$ac_init_help" && exit $ac_status
1527 if $ac_init_version; then
1528 cat <<\_ACEOF
1529 pcap configure 1.10.0-PRE-GIT
1530 generated by GNU Autoconf 2.69
1531
1532 Copyright (C) 2012 Free Software Foundation, Inc.
1533 This configure script is free software; the Free Software Foundation
1534 gives unlimited permission to copy, distribute and modify it.
1535 _ACEOF
1536 exit
1537 fi
1538
1539 ## ------------------------ ##
1540 ## Autoconf initialization. ##
1541 ## ------------------------ ##
1542
1543 # ac_fn_c_try_compile LINENO
1544 # --------------------------
1545 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1546 ac_fn_c_try_compile ()
1547 {
1548 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1549 rm -f conftest.$ac_objext
1550 if { { ac_try="$ac_compile"
1551 case "(($ac_try" in
1552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1553 *) ac_try_echo=$ac_try;;
1554 esac
1555 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1556 $as_echo "$ac_try_echo"; } >&5
1557 (eval "$ac_compile") 2>conftest.err
1558 ac_status=$?
1559 if test -s conftest.err; then
1560 grep -v '^ *+' conftest.err >conftest.er1
1561 cat conftest.er1 >&5
1562 mv -f conftest.er1 conftest.err
1563 fi
1564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1565 test $ac_status = 0; } && {
1566 test -z "$ac_c_werror_flag" ||
1567 test ! -s conftest.err
1568 } && test -s conftest.$ac_objext; then :
1569 ac_retval=0
1570 else
1571 $as_echo "$as_me: failed program was:" >&5
1572 sed 's/^/| /' conftest.$ac_ext >&5
1573
1574 ac_retval=1
1575 fi
1576 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1577 as_fn_set_status $ac_retval
1578
1579 } # ac_fn_c_try_compile
1580
1581 # ac_fn_cxx_try_compile LINENO
1582 # ----------------------------
1583 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1584 ac_fn_cxx_try_compile ()
1585 {
1586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1587 rm -f conftest.$ac_objext
1588 if { { ac_try="$ac_compile"
1589 case "(($ac_try" in
1590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1591 *) ac_try_echo=$ac_try;;
1592 esac
1593 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1594 $as_echo "$ac_try_echo"; } >&5
1595 (eval "$ac_compile") 2>conftest.err
1596 ac_status=$?
1597 if test -s conftest.err; then
1598 grep -v '^ *+' conftest.err >conftest.er1
1599 cat conftest.er1 >&5
1600 mv -f conftest.er1 conftest.err
1601 fi
1602 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1603 test $ac_status = 0; } && {
1604 test -z "$ac_cxx_werror_flag" ||
1605 test ! -s conftest.err
1606 } && test -s conftest.$ac_objext; then :
1607 ac_retval=0
1608 else
1609 $as_echo "$as_me: failed program was:" >&5
1610 sed 's/^/| /' conftest.$ac_ext >&5
1611
1612 ac_retval=1
1613 fi
1614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1615 as_fn_set_status $ac_retval
1616
1617 } # ac_fn_cxx_try_compile
1618
1619 # ac_fn_c_try_link LINENO
1620 # -----------------------
1621 # Try to link conftest.$ac_ext, and return whether this succeeded.
1622 ac_fn_c_try_link ()
1623 {
1624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625 rm -f conftest.$ac_objext conftest$ac_exeext
1626 if { { ac_try="$ac_link"
1627 case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630 esac
1631 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632 $as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_link") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1641 test $ac_status = 0; } && {
1642 test -z "$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 } && test -s conftest$ac_exeext && {
1645 test "$cross_compiling" = yes ||
1646 test -x conftest$ac_exeext
1647 }; then :
1648 ac_retval=0
1649 else
1650 $as_echo "$as_me: failed program was:" >&5
1651 sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654 fi
1655 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1656 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1657 # interfere with the next link command; also delete a directory that is
1658 # left behind by Apple's compiler. We do this before executing the actions.
1659 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1660 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1661 as_fn_set_status $ac_retval
1662
1663 } # ac_fn_c_try_link
1664
1665 # ac_fn_c_try_cpp LINENO
1666 # ----------------------
1667 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1668 ac_fn_c_try_cpp ()
1669 {
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1671 if { { ac_try="$ac_cpp conftest.$ac_ext"
1672 case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675 esac
1676 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677 $as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } > conftest.i && {
1687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 }; then :
1690 ac_retval=0
1691 else
1692 $as_echo "$as_me: failed program was:" >&5
1693 sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=1
1696 fi
1697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1698 as_fn_set_status $ac_retval
1699
1700 } # ac_fn_c_try_cpp
1701
1702 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1703 # -------------------------------------------------------
1704 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1705 # the include files in INCLUDES and setting the cache variable VAR
1706 # accordingly.
1707 ac_fn_c_check_header_mongrel ()
1708 {
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 if eval \${$3+:} false; then :
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1712 $as_echo_n "checking for $2... " >&6; }
1713 if eval \${$3+:} false; then :
1714 $as_echo_n "(cached) " >&6
1715 fi
1716 eval ac_res=\$$3
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1718 $as_echo "$ac_res" >&6; }
1719 else
1720 # Is the header compilable?
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1722 $as_echo_n "checking $2 usability... " >&6; }
1723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1724 /* end confdefs.h. */
1725 $4
1726 #include <$2>
1727 _ACEOF
1728 if ac_fn_c_try_compile "$LINENO"; then :
1729 ac_header_compiler=yes
1730 else
1731 ac_header_compiler=no
1732 fi
1733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1735 $as_echo "$ac_header_compiler" >&6; }
1736
1737 # Is the header present?
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1739 $as_echo_n "checking $2 presence... " >&6; }
1740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741 /* end confdefs.h. */
1742 #include <$2>
1743 _ACEOF
1744 if ac_fn_c_try_cpp "$LINENO"; then :
1745 ac_header_preproc=yes
1746 else
1747 ac_header_preproc=no
1748 fi
1749 rm -f conftest.err conftest.i conftest.$ac_ext
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1751 $as_echo "$ac_header_preproc" >&6; }
1752
1753 # So? What about this header?
1754 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1755 yes:no: )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1757 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1759 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1760 ;;
1761 no:yes:* )
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1763 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1765 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1767 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1769 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1771 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1772 ;;
1773 esac
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775 $as_echo_n "checking for $2... " >&6; }
1776 if eval \${$3+:} false; then :
1777 $as_echo_n "(cached) " >&6
1778 else
1779 eval "$3=\$ac_header_compiler"
1780 fi
1781 eval ac_res=\$$3
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1783 $as_echo "$ac_res" >&6; }
1784 fi
1785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1786
1787 } # ac_fn_c_check_header_mongrel
1788
1789 # ac_fn_c_try_run LINENO
1790 # ----------------------
1791 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1792 # that executables *can* be run.
1793 ac_fn_c_try_run ()
1794 {
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 if { { ac_try="$ac_link"
1797 case "(($ac_try" in
1798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1799 *) ac_try_echo=$ac_try;;
1800 esac
1801 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1802 $as_echo "$ac_try_echo"; } >&5
1803 (eval "$ac_link") 2>&5
1804 ac_status=$?
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1807 { { case "(($ac_try" in
1808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1809 *) ac_try_echo=$ac_try;;
1810 esac
1811 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1812 $as_echo "$ac_try_echo"; } >&5
1813 (eval "$ac_try") 2>&5
1814 ac_status=$?
1815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816 test $ac_status = 0; }; }; then :
1817 ac_retval=0
1818 else
1819 $as_echo "$as_me: program exited with status $ac_status" >&5
1820 $as_echo "$as_me: failed program was:" >&5
1821 sed 's/^/| /' conftest.$ac_ext >&5
1822
1823 ac_retval=$ac_status
1824 fi
1825 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827 as_fn_set_status $ac_retval
1828
1829 } # ac_fn_c_try_run
1830
1831 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1832 # -------------------------------------------------------
1833 # Tests whether HEADER exists and can be compiled using the include files in
1834 # INCLUDES, setting the cache variable VAR accordingly.
1835 ac_fn_c_check_header_compile ()
1836 {
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1839 $as_echo_n "checking for $2... " >&6; }
1840 if eval \${$3+:} false; then :
1841 $as_echo_n "(cached) " >&6
1842 else
1843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1844 /* end confdefs.h. */
1845 $4
1846 #include <$2>
1847 _ACEOF
1848 if ac_fn_c_try_compile "$LINENO"; then :
1849 eval "$3=yes"
1850 else
1851 eval "$3=no"
1852 fi
1853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854 fi
1855 eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857 $as_echo "$ac_res" >&6; }
1858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1859
1860 } # ac_fn_c_check_header_compile
1861
1862 # ac_fn_c_check_func LINENO FUNC VAR
1863 # ----------------------------------
1864 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1865 ac_fn_c_check_func ()
1866 {
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1869 $as_echo_n "checking for $2... " >&6; }
1870 if eval \${$3+:} false; then :
1871 $as_echo_n "(cached) " >&6
1872 else
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874 /* end confdefs.h. */
1875 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1876 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1877 #define $2 innocuous_$2
1878
1879 /* System header to define __stub macros and hopefully few prototypes,
1880 which can conflict with char $2 (); below.
1881 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1882 <limits.h> exists even on freestanding compilers. */
1883
1884 #ifdef __STDC__
1885 # include <limits.h>
1886 #else
1887 # include <assert.h>
1888 #endif
1889
1890 #undef $2
1891
1892 /* Override any GCC internal prototype to avoid an error.
1893 Use char because int might match the return type of a GCC
1894 builtin and then its argument prototype would still apply. */
1895 #ifdef __cplusplus
1896 extern "C"
1897 #endif
1898 char $2 ();
1899 /* The GNU C library defines this for functions which it implements
1900 to always fail with ENOSYS. Some functions are actually named
1901 something starting with __ and the normal name is an alias. */
1902 #if defined __stub_$2 || defined __stub___$2
1903 choke me
1904 #endif
1905
1906 int
1907 main ()
1908 {
1909 return $2 ();
1910 ;
1911 return 0;
1912 }
1913 _ACEOF
1914 if ac_fn_c_try_link "$LINENO"; then :
1915 eval "$3=yes"
1916 else
1917 eval "$3=no"
1918 fi
1919 rm -f core conftest.err conftest.$ac_objext \
1920 conftest$ac_exeext conftest.$ac_ext
1921 fi
1922 eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924 $as_echo "$ac_res" >&6; }
1925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1926
1927 } # ac_fn_c_check_func
1928
1929 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1930 # ---------------------------------------------
1931 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1932 # accordingly.
1933 ac_fn_c_check_decl ()
1934 {
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 as_decl_name=`echo $2|sed 's/ *(.*//'`
1937 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1939 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1940 if eval \${$3+:} false; then :
1941 $as_echo_n "(cached) " >&6
1942 else
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944 /* end confdefs.h. */
1945 $4
1946 int
1947 main ()
1948 {
1949 #ifndef $as_decl_name
1950 #ifdef __cplusplus
1951 (void) $as_decl_use;
1952 #else
1953 (void) $as_decl_name;
1954 #endif
1955 #endif
1956
1957 ;
1958 return 0;
1959 }
1960 _ACEOF
1961 if ac_fn_c_try_compile "$LINENO"; then :
1962 eval "$3=yes"
1963 else
1964 eval "$3=no"
1965 fi
1966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967 fi
1968 eval ac_res=\$$3
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970 $as_echo "$ac_res" >&6; }
1971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972
1973 } # ac_fn_c_check_decl
1974
1975 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1976 # -------------------------------------------
1977 # Tests whether TYPE exists after having included INCLUDES, setting cache
1978 # variable VAR accordingly.
1979 ac_fn_c_check_type ()
1980 {
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983 $as_echo_n "checking for $2... " >&6; }
1984 if eval \${$3+:} false; then :
1985 $as_echo_n "(cached) " >&6
1986 else
1987 eval "$3=no"
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h. */
1990 $4
1991 int
1992 main ()
1993 {
1994 if (sizeof ($2))
1995 return 0;
1996 ;
1997 return 0;
1998 }
1999 _ACEOF
2000 if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002 /* end confdefs.h. */
2003 $4
2004 int
2005 main ()
2006 {
2007 if (sizeof (($2)))
2008 return 0;
2009 ;
2010 return 0;
2011 }
2012 _ACEOF
2013 if ac_fn_c_try_compile "$LINENO"; then :
2014
2015 else
2016 eval "$3=yes"
2017 fi
2018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2019 fi
2020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021 fi
2022 eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024 $as_echo "$ac_res" >&6; }
2025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2026
2027 } # ac_fn_c_check_type
2028
2029 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2030 # ----------------------------------------------------
2031 # Tries to find if the field MEMBER exists in type AGGR, after including
2032 # INCLUDES, setting cache variable VAR accordingly.
2033 ac_fn_c_check_member ()
2034 {
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2037 $as_echo_n "checking for $2.$3... " >&6; }
2038 if eval \${$4+:} false; then :
2039 $as_echo_n "(cached) " >&6
2040 else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042 /* end confdefs.h. */
2043 $5
2044 int
2045 main ()
2046 {
2047 static $2 ac_aggr;
2048 if (ac_aggr.$3)
2049 return 0;
2050 ;
2051 return 0;
2052 }
2053 _ACEOF
2054 if ac_fn_c_try_compile "$LINENO"; then :
2055 eval "$4=yes"
2056 else
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058 /* end confdefs.h. */
2059 $5
2060 int
2061 main ()
2062 {
2063 static $2 ac_aggr;
2064 if (sizeof ac_aggr.$3)
2065 return 0;
2066 ;
2067 return 0;
2068 }
2069 _ACEOF
2070 if ac_fn_c_try_compile "$LINENO"; then :
2071 eval "$4=yes"
2072 else
2073 eval "$4=no"
2074 fi
2075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 fi
2077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 fi
2079 eval ac_res=\$$4
2080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2081 $as_echo "$ac_res" >&6; }
2082 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2083
2084 } # ac_fn_c_check_member
2085 cat >config.log <<_ACEOF
2086 This file contains any messages produced by compilers while
2087 running configure, to aid debugging if configure makes a mistake.
2088
2089 It was created by pcap $as_me 1.10.0-PRE-GIT, which was
2090 generated by GNU Autoconf 2.69. Invocation command line was
2091
2092 $ $0 $@
2093
2094 _ACEOF
2095 exec 5>>config.log
2096 {
2097 cat <<_ASUNAME
2098 ## --------- ##
2099 ## Platform. ##
2100 ## --------- ##
2101
2102 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2103 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2104 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2105 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2106 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2107
2108 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2109 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2110
2111 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2112 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2113 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2114 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2115 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2116 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2117 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2118
2119 _ASUNAME
2120
2121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2122 for as_dir in $PATH
2123 do
2124 IFS=$as_save_IFS
2125 test -z "$as_dir" && as_dir=.
2126 $as_echo "PATH: $as_dir"
2127 done
2128 IFS=$as_save_IFS
2129
2130 } >&5
2131
2132 cat >&5 <<_ACEOF
2133
2134
2135 ## ----------- ##
2136 ## Core tests. ##
2137 ## ----------- ##
2138
2139 _ACEOF
2140
2141
2142 # Keep a trace of the command line.
2143 # Strip out --no-create and --no-recursion so they do not pile up.
2144 # Strip out --silent because we don't want to record it for future runs.
2145 # Also quote any args containing shell meta-characters.
2146 # Make two passes to allow for proper duplicate-argument suppression.
2147 ac_configure_args=
2148 ac_configure_args0=
2149 ac_configure_args1=
2150 ac_must_keep_next=false
2151 for ac_pass in 1 2
2152 do
2153 for ac_arg
2154 do
2155 case $ac_arg in
2156 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2157 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2158 | -silent | --silent | --silen | --sile | --sil)
2159 continue ;;
2160 *\'*)
2161 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2162 esac
2163 case $ac_pass in
2164 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2165 2)
2166 as_fn_append ac_configure_args1 " '$ac_arg'"
2167 if test $ac_must_keep_next = true; then
2168 ac_must_keep_next=false # Got value, back to normal.
2169 else
2170 case $ac_arg in
2171 *=* | --config-cache | -C | -disable-* | --disable-* \
2172 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2173 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2174 | -with-* | --with-* | -without-* | --without-* | --x)
2175 case "$ac_configure_args0 " in
2176 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2177 esac
2178 ;;
2179 -* ) ac_must_keep_next=true ;;
2180 esac
2181 fi
2182 as_fn_append ac_configure_args " '$ac_arg'"
2183 ;;
2184 esac
2185 done
2186 done
2187 { ac_configure_args0=; unset ac_configure_args0;}
2188 { ac_configure_args1=; unset ac_configure_args1;}
2189
2190 # When interrupted or exit'd, cleanup temporary files, and complete
2191 # config.log. We remove comments because anyway the quotes in there
2192 # would cause problems or look ugly.
2193 # WARNING: Use '\'' to represent an apostrophe within the trap.
2194 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2195 trap 'exit_status=$?
2196 # Save into config.log some information that might help in debugging.
2197 {
2198 echo
2199
2200 $as_echo "## ---------------- ##
2201 ## Cache variables. ##
2202 ## ---------------- ##"
2203 echo
2204 # The following way of writing the cache mishandles newlines in values,
2205 (
2206 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2207 eval ac_val=\$$ac_var
2208 case $ac_val in #(
2209 *${as_nl}*)
2210 case $ac_var in #(
2211 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2212 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2213 esac
2214 case $ac_var in #(
2215 _ | IFS | as_nl) ;; #(
2216 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2217 *) { eval $ac_var=; unset $ac_var;} ;;
2218 esac ;;
2219 esac
2220 done
2221 (set) 2>&1 |
2222 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2223 *${as_nl}ac_space=\ *)
2224 sed -n \
2225 "s/'\''/'\''\\\\'\'''\''/g;
2226 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2227 ;; #(
2228 *)
2229 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2230 ;;
2231 esac |
2232 sort
2233 )
2234 echo
2235
2236 $as_echo "## ----------------- ##
2237 ## Output variables. ##
2238 ## ----------------- ##"
2239 echo
2240 for ac_var in $ac_subst_vars
2241 do
2242 eval ac_val=\$$ac_var
2243 case $ac_val in
2244 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2245 esac
2246 $as_echo "$ac_var='\''$ac_val'\''"
2247 done | sort
2248 echo
2249
2250 if test -n "$ac_subst_files"; then
2251 $as_echo "## ------------------- ##
2252 ## File substitutions. ##
2253 ## ------------------- ##"
2254 echo
2255 for ac_var in $ac_subst_files
2256 do
2257 eval ac_val=\$$ac_var
2258 case $ac_val in
2259 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2260 esac
2261 $as_echo "$ac_var='\''$ac_val'\''"
2262 done | sort
2263 echo
2264 fi
2265
2266 if test -s confdefs.h; then
2267 $as_echo "## ----------- ##
2268 ## confdefs.h. ##
2269 ## ----------- ##"
2270 echo
2271 cat confdefs.h
2272 echo
2273 fi
2274 test "$ac_signal" != 0 &&
2275 $as_echo "$as_me: caught signal $ac_signal"
2276 $as_echo "$as_me: exit $exit_status"
2277 } >&5
2278 rm -f core *.core core.conftest.* &&
2279 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2280 exit $exit_status
2281 ' 0
2282 for ac_signal in 1 2 13 15; do
2283 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2284 done
2285 ac_signal=0
2286
2287 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2288 rm -f -r conftest* confdefs.h
2289
2290 $as_echo "/* confdefs.h */" > confdefs.h
2291
2292 # Predefined preprocessor variables.
2293
2294 cat >>confdefs.h <<_ACEOF
2295 #define PACKAGE_NAME "$PACKAGE_NAME"
2296 _ACEOF
2297
2298 cat >>confdefs.h <<_ACEOF
2299 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2300 _ACEOF
2301
2302 cat >>confdefs.h <<_ACEOF
2303 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2304 _ACEOF
2305
2306 cat >>confdefs.h <<_ACEOF
2307 #define PACKAGE_STRING "$PACKAGE_STRING"
2308 _ACEOF
2309
2310 cat >>confdefs.h <<_ACEOF
2311 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2312 _ACEOF
2313
2314 cat >>confdefs.h <<_ACEOF
2315 #define PACKAGE_URL "$PACKAGE_URL"
2316 _ACEOF
2317
2318
2319 # Let the site file select an alternate cache file if it wants to.
2320 # Prefer an explicitly selected file to automatically selected ones.
2321 ac_site_file1=NONE
2322 ac_site_file2=NONE
2323 if test -n "$CONFIG_SITE"; then
2324 # We do not want a PATH search for config.site.
2325 case $CONFIG_SITE in #((
2326 -*) ac_site_file1=./$CONFIG_SITE;;
2327 */*) ac_site_file1=$CONFIG_SITE;;
2328 *) ac_site_file1=./$CONFIG_SITE;;
2329 esac
2330 elif test "x$prefix" != xNONE; then
2331 ac_site_file1=$prefix/share/config.site
2332 ac_site_file2=$prefix/etc/config.site
2333 else
2334 ac_site_file1=$ac_default_prefix/share/config.site
2335 ac_site_file2=$ac_default_prefix/etc/config.site
2336 fi
2337 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2338 do
2339 test "x$ac_site_file" = xNONE && continue
2340 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2342 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2343 sed 's/^/| /' "$ac_site_file" >&5
2344 . "$ac_site_file" \
2345 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2346 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2347 as_fn_error $? "failed to load site script $ac_site_file
2348 See \`config.log' for more details" "$LINENO" 5; }
2349 fi
2350 done
2351
2352 if test -r "$cache_file"; then
2353 # Some versions of bash will fail to source /dev/null (special files
2354 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2355 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2357 $as_echo "$as_me: loading cache $cache_file" >&6;}
2358 case $cache_file in
2359 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2360 *) . "./$cache_file";;
2361 esac
2362 fi
2363 else
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2365 $as_echo "$as_me: creating cache $cache_file" >&6;}
2366 >$cache_file
2367 fi
2368
2369 # Check that the precious variables saved in the cache have kept the same
2370 # value.
2371 ac_cache_corrupted=false
2372 for ac_var in $ac_precious_vars; do
2373 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2374 eval ac_new_set=\$ac_env_${ac_var}_set
2375 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2376 eval ac_new_val=\$ac_env_${ac_var}_value
2377 case $ac_old_set,$ac_new_set in
2378 set,)
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2380 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2381 ac_cache_corrupted=: ;;
2382 ,set)
2383 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2384 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2385 ac_cache_corrupted=: ;;
2386 ,);;
2387 *)
2388 if test "x$ac_old_val" != "x$ac_new_val"; then
2389 # differences in whitespace do not lead to failure.
2390 ac_old_val_w=`echo x $ac_old_val`
2391 ac_new_val_w=`echo x $ac_new_val`
2392 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2393 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2394 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2395 ac_cache_corrupted=:
2396 else
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2398 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2399 eval $ac_var=\$ac_old_val
2400 fi
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2402 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2403 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2404 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2405 fi;;
2406 esac
2407 # Pass precious variables to config.status.
2408 if test "$ac_new_set" = set; then
2409 case $ac_new_val in
2410 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2411 *) ac_arg=$ac_var=$ac_new_val ;;
2412 esac
2413 case " $ac_configure_args " in
2414 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2415 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2416 esac
2417 fi
2418 done
2419 if $ac_cache_corrupted; then
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2421 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2422 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2423 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2424 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2425 fi
2426 ## -------------------- ##
2427 ## Main body of script. ##
2428 ## -------------------- ##
2429
2430 ac_ext=c
2431 ac_cpp='$CPP $CPPFLAGS'
2432 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2433 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2434 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2435
2436
2437
2438
2439
2440 ac_aux_dir=
2441 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2442 if test -f "$ac_dir/install-sh"; then
2443 ac_aux_dir=$ac_dir
2444 ac_install_sh="$ac_aux_dir/install-sh -c"
2445 break
2446 elif test -f "$ac_dir/install.sh"; then
2447 ac_aux_dir=$ac_dir
2448 ac_install_sh="$ac_aux_dir/install.sh -c"
2449 break
2450 elif test -f "$ac_dir/shtool"; then
2451 ac_aux_dir=$ac_dir
2452 ac_install_sh="$ac_aux_dir/shtool install -c"
2453 break
2454 fi
2455 done
2456 if test -z "$ac_aux_dir"; then
2457 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2458 fi
2459
2460 # These three variables are undocumented and unsupported,
2461 # and are intended to be withdrawn in a future Autoconf release.
2462 # They can cause serious problems if a builder's source tree is in a directory
2463 # whose full name contains unusual characters.
2464 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2465 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2466 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2467
2468
2469 # Make sure we can run config.sub.
2470 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2471 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2472
2473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2474 $as_echo_n "checking build system type... " >&6; }
2475 if ${ac_cv_build+:} false; then :
2476 $as_echo_n "(cached) " >&6
2477 else
2478 ac_build_alias=$build_alias
2479 test "x$ac_build_alias" = x &&
2480 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2481 test "x$ac_build_alias" = x &&
2482 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2483 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2484 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2485
2486 fi
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2488 $as_echo "$ac_cv_build" >&6; }
2489 case $ac_cv_build in
2490 *-*-*) ;;
2491 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2492 esac
2493 build=$ac_cv_build
2494 ac_save_IFS=$IFS; IFS='-'
2495 set x $ac_cv_build
2496 shift
2497 build_cpu=$1
2498 build_vendor=$2
2499 shift; shift
2500 # Remember, the first character of IFS is used to create $*,
2501 # except with old shells:
2502 build_os=$*
2503 IFS=$ac_save_IFS
2504 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2505
2506
2507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2508 $as_echo_n "checking host system type... " >&6; }
2509 if ${ac_cv_host+:} false; then :
2510 $as_echo_n "(cached) " >&6
2511 else
2512 if test "x$host_alias" = x; then
2513 ac_cv_host=$ac_cv_build
2514 else
2515 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2516 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2517 fi
2518
2519 fi
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2521 $as_echo "$ac_cv_host" >&6; }
2522 case $ac_cv_host in
2523 *-*-*) ;;
2524 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2525 esac
2526 host=$ac_cv_host
2527 ac_save_IFS=$IFS; IFS='-'
2528 set x $ac_cv_host
2529 shift
2530 host_cpu=$1
2531 host_vendor=$2
2532 shift; shift
2533 # Remember, the first character of IFS is used to create $*,
2534 # except with old shells:
2535 host_os=$*
2536 IFS=$ac_save_IFS
2537 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2538
2539
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2541 $as_echo_n "checking target system type... " >&6; }
2542 if ${ac_cv_target+:} false; then :
2543 $as_echo_n "(cached) " >&6
2544 else
2545 if test "x$target_alias" = x; then
2546 ac_cv_target=$ac_cv_host
2547 else
2548 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2549 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2550 fi
2551
2552 fi
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2554 $as_echo "$ac_cv_target" >&6; }
2555 case $ac_cv_target in
2556 *-*-*) ;;
2557 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2558 esac
2559 target=$ac_cv_target
2560 ac_save_IFS=$IFS; IFS='-'
2561 set x $ac_cv_target
2562 shift
2563 target_cpu=$1
2564 target_vendor=$2
2565 shift; shift
2566 # Remember, the first character of IFS is used to create $*,
2567 # except with old shells:
2568 target_os=$*
2569 IFS=$ac_save_IFS
2570 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2571
2572
2573 # The aliases save the names the user supplied, while $host etc.
2574 # will get canonicalized.
2575 test -n "$target_alias" &&
2576 test "$program_prefix$program_suffix$program_transform_name" = \
2577 NONENONEs,x,x, &&
2578 program_prefix=${target_alias}-
2579
2580
2581
2582
2583
2584
2585
2586
2587 # Check whether --with-gcc was given.
2588 if test "${with_gcc+set}" = set; then :
2589 withval=$with_gcc;
2590 fi
2591
2592 V_CCOPT=""
2593 if test "${srcdir}" != "." ; then
2594 V_CCOPT="-I\$(srcdir)"
2595 fi
2596 if test "${CFLAGS+set}" = set; then
2597 LBL_CFLAGS="$CFLAGS"
2598 fi
2599 if test -z "$CC" ; then
2600 case "$host_os" in
2601
2602 bsdi*)
2603 # Extract the first word of "shlicc2", so it can be a program name with args.
2604 set dummy shlicc2; ac_word=$2
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2606 $as_echo_n "checking for $ac_word... " >&6; }
2607 if ${ac_cv_prog_SHLICC2+:} false; then :
2608 $as_echo_n "(cached) " >&6
2609 else
2610 if test -n "$SHLICC2"; then
2611 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2612 else
2613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2614 for as_dir in $PATH
2615 do
2616 IFS=$as_save_IFS
2617 test -z "$as_dir" && as_dir=.
2618 for ac_exec_ext in '' $ac_executable_extensions; do
2619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2620 ac_cv_prog_SHLICC2="yes"
2621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2622 break 2
2623 fi
2624 done
2625 done
2626 IFS=$as_save_IFS
2627
2628 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2629 fi
2630 fi
2631 SHLICC2=$ac_cv_prog_SHLICC2
2632 if test -n "$SHLICC2"; then
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2634 $as_echo "$SHLICC2" >&6; }
2635 else
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2637 $as_echo "no" >&6; }
2638 fi
2639
2640
2641 if test $SHLICC2 = yes ; then
2642 CC=shlicc2
2643 export CC
2644 fi
2645 ;;
2646 esac
2647 fi
2648 if test -z "$CC" -a "$with_gcc" = no ; then
2649 CC=cc
2650 export CC
2651 fi
2652
2653 #
2654 # We require C99 or later.
2655 # Try to get it, which may involve adding compiler flags;
2656 # if that fails, give up.
2657 #
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663 if test -n "$ac_tool_prefix"; then
2664 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2665 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2667 $as_echo_n "checking for $ac_word... " >&6; }
2668 if ${ac_cv_prog_CC+:} false; then :
2669 $as_echo_n "(cached) " >&6
2670 else
2671 if test -n "$CC"; then
2672 ac_cv_prog_CC="$CC" # Let the user override the test.
2673 else
2674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2675 for as_dir in $PATH
2676 do
2677 IFS=$as_save_IFS
2678 test -z "$as_dir" && as_dir=.
2679 for ac_exec_ext in '' $ac_executable_extensions; do
2680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2681 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2683 break 2
2684 fi
2685 done
2686 done
2687 IFS=$as_save_IFS
2688
2689 fi
2690 fi
2691 CC=$ac_cv_prog_CC
2692 if test -n "$CC"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2694 $as_echo "$CC" >&6; }
2695 else
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2697 $as_echo "no" >&6; }
2698 fi
2699
2700
2701 fi
2702 if test -z "$ac_cv_prog_CC"; then
2703 ac_ct_CC=$CC
2704 # Extract the first word of "gcc", so it can be a program name with args.
2705 set dummy gcc; ac_word=$2
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707 $as_echo_n "checking for $ac_word... " >&6; }
2708 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2709 $as_echo_n "(cached) " >&6
2710 else
2711 if test -n "$ac_ct_CC"; then
2712 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2713 else
2714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715 for as_dir in $PATH
2716 do
2717 IFS=$as_save_IFS
2718 test -z "$as_dir" && as_dir=.
2719 for ac_exec_ext in '' $ac_executable_extensions; do
2720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2721 ac_cv_prog_ac_ct_CC="gcc"
2722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723 break 2
2724 fi
2725 done
2726 done
2727 IFS=$as_save_IFS
2728
2729 fi
2730 fi
2731 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2732 if test -n "$ac_ct_CC"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2734 $as_echo "$ac_ct_CC" >&6; }
2735 else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737 $as_echo "no" >&6; }
2738 fi
2739
2740 if test "x$ac_ct_CC" = x; then
2741 CC=""
2742 else
2743 case $cross_compiling:$ac_tool_warned in
2744 yes:)
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2746 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2747 ac_tool_warned=yes ;;
2748 esac
2749 CC=$ac_ct_CC
2750 fi
2751 else
2752 CC="$ac_cv_prog_CC"
2753 fi
2754
2755 if test -z "$CC"; then
2756 if test -n "$ac_tool_prefix"; then
2757 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2758 set dummy ${ac_tool_prefix}cc; ac_word=$2
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2760 $as_echo_n "checking for $ac_word... " >&6; }
2761 if ${ac_cv_prog_CC+:} false; then :
2762 $as_echo_n "(cached) " >&6
2763 else
2764 if test -n "$CC"; then
2765 ac_cv_prog_CC="$CC" # Let the user override the test.
2766 else
2767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2768 for as_dir in $PATH
2769 do
2770 IFS=$as_save_IFS
2771 test -z "$as_dir" && as_dir=.
2772 for ac_exec_ext in '' $ac_executable_extensions; do
2773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2774 ac_cv_prog_CC="${ac_tool_prefix}cc"
2775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2776 break 2
2777 fi
2778 done
2779 done
2780 IFS=$as_save_IFS
2781
2782 fi
2783 fi
2784 CC=$ac_cv_prog_CC
2785 if test -n "$CC"; then
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2787 $as_echo "$CC" >&6; }
2788 else
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2790 $as_echo "no" >&6; }
2791 fi
2792
2793
2794 fi
2795 fi
2796 if test -z "$CC"; then
2797 # Extract the first word of "cc", so it can be a program name with args.
2798 set dummy cc; ac_word=$2
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2800 $as_echo_n "checking for $ac_word... " >&6; }
2801 if ${ac_cv_prog_CC+:} false; then :
2802 $as_echo_n "(cached) " >&6
2803 else
2804 if test -n "$CC"; then
2805 ac_cv_prog_CC="$CC" # Let the user override the test.
2806 else
2807 ac_prog_rejected=no
2808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2809 for as_dir in $PATH
2810 do
2811 IFS=$as_save_IFS
2812 test -z "$as_dir" && as_dir=.
2813 for ac_exec_ext in '' $ac_executable_extensions; do
2814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2815 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2816 ac_prog_rejected=yes
2817 continue
2818 fi
2819 ac_cv_prog_CC="cc"
2820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2821 break 2
2822 fi
2823 done
2824 done
2825 IFS=$as_save_IFS
2826
2827 if test $ac_prog_rejected = yes; then
2828 # We found a bogon in the path, so make sure we never use it.
2829 set dummy $ac_cv_prog_CC
2830 shift
2831 if test $# != 0; then
2832 # We chose a different compiler from the bogus one.
2833 # However, it has the same basename, so the bogon will be chosen
2834 # first if we set CC to just the basename; use the full file name.
2835 shift
2836 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2837 fi
2838 fi
2839 fi
2840 fi
2841 CC=$ac_cv_prog_CC
2842 if test -n "$CC"; then
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2844 $as_echo "$CC" >&6; }
2845 else
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2847 $as_echo "no" >&6; }
2848 fi
2849
2850
2851 fi
2852 if test -z "$CC"; then
2853 if test -n "$ac_tool_prefix"; then
2854 for ac_prog in cl.exe
2855 do
2856 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2857 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2859 $as_echo_n "checking for $ac_word... " >&6; }
2860 if ${ac_cv_prog_CC+:} false; then :
2861 $as_echo_n "(cached) " >&6
2862 else
2863 if test -n "$CC"; then
2864 ac_cv_prog_CC="$CC" # Let the user override the test.
2865 else
2866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2867 for as_dir in $PATH
2868 do
2869 IFS=$as_save_IFS
2870 test -z "$as_dir" && as_dir=.
2871 for ac_exec_ext in '' $ac_executable_extensions; do
2872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2873 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877 done
2878 done
2879 IFS=$as_save_IFS
2880
2881 fi
2882 fi
2883 CC=$ac_cv_prog_CC
2884 if test -n "$CC"; then
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2886 $as_echo "$CC" >&6; }
2887 else
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2889 $as_echo "no" >&6; }
2890 fi
2891
2892
2893 test -n "$CC" && break
2894 done
2895 fi
2896 if test -z "$CC"; then
2897 ac_ct_CC=$CC
2898 for ac_prog in cl.exe
2899 do
2900 # Extract the first word of "$ac_prog", so it can be a program name with args.
2901 set dummy $ac_prog; ac_word=$2
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2903 $as_echo_n "checking for $ac_word... " >&6; }
2904 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2905 $as_echo_n "(cached) " >&6
2906 else
2907 if test -n "$ac_ct_CC"; then
2908 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2909 else
2910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2911 for as_dir in $PATH
2912 do
2913 IFS=$as_save_IFS
2914 test -z "$as_dir" && as_dir=.
2915 for ac_exec_ext in '' $ac_executable_extensions; do
2916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2917 ac_cv_prog_ac_ct_CC="$ac_prog"
2918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2919 break 2
2920 fi
2921 done
2922 done
2923 IFS=$as_save_IFS
2924
2925 fi
2926 fi
2927 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2928 if test -n "$ac_ct_CC"; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2930 $as_echo "$ac_ct_CC" >&6; }
2931 else
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2933 $as_echo "no" >&6; }
2934 fi
2935
2936
2937 test -n "$ac_ct_CC" && break
2938 done
2939
2940 if test "x$ac_ct_CC" = x; then
2941 CC=""
2942 else
2943 case $cross_compiling:$ac_tool_warned in
2944 yes:)
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2946 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2947 ac_tool_warned=yes ;;
2948 esac
2949 CC=$ac_ct_CC
2950 fi
2951 fi
2952
2953 fi
2954
2955
2956 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2957 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2958 as_fn_error $? "no acceptable C compiler found in \$PATH
2959 See \`config.log' for more details" "$LINENO" 5; }
2960
2961 # Provide some information about the compiler.
2962 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2963 set X $ac_compile
2964 ac_compiler=$2
2965 for ac_option in --version -v -V -qversion; do
2966 { { ac_try="$ac_compiler $ac_option >&5"
2967 case "(($ac_try" in
2968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2969 *) ac_try_echo=$ac_try;;
2970 esac
2971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2972 $as_echo "$ac_try_echo"; } >&5
2973 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2974 ac_status=$?
2975 if test -s conftest.err; then
2976 sed '10a\
2977 ... rest of stderr output deleted ...
2978 10q' conftest.err >conftest.er1
2979 cat conftest.er1 >&5
2980 fi
2981 rm -f conftest.er1 conftest.err
2982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2983 test $ac_status = 0; }
2984 done
2985
2986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2987 /* end confdefs.h. */
2988
2989 int
2990 main ()
2991 {
2992
2993 ;
2994 return 0;
2995 }
2996 _ACEOF
2997 ac_clean_files_save=$ac_clean_files
2998 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2999 # Try to create an executable without -o first, disregard a.out.
3000 # It will help us diagnose broken compilers, and finding out an intuition
3001 # of exeext.
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3003 $as_echo_n "checking whether the C compiler works... " >&6; }
3004 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3005
3006 # The possible output files:
3007 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3008
3009 ac_rmfiles=
3010 for ac_file in $ac_files
3011 do
3012 case $ac_file in
3013 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3014 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3015 esac
3016 done
3017 rm -f $ac_rmfiles
3018
3019 if { { ac_try="$ac_link_default"
3020 case "(($ac_try" in
3021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3022 *) ac_try_echo=$ac_try;;
3023 esac
3024 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3025 $as_echo "$ac_try_echo"; } >&5
3026 (eval "$ac_link_default") 2>&5
3027 ac_status=$?
3028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3029 test $ac_status = 0; }; then :
3030 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3031 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3032 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3033 # so that the user can short-circuit this test for compilers unknown to
3034 # Autoconf.
3035 for ac_file in $ac_files ''
3036 do
3037 test -f "$ac_file" || continue
3038 case $ac_file in
3039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3040 ;;
3041 [ab].out )
3042 # We found the default executable, but exeext='' is most
3043 # certainly right.
3044 break;;
3045 *.* )
3046 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3047 then :; else
3048 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3049 fi
3050 # We set ac_cv_exeext here because the later test for it is not
3051 # safe: cross compilers may not add the suffix if given an `-o'
3052 # argument, so we may need to know it at that point already.
3053 # Even if this section looks crufty: it has the advantage of
3054 # actually working.
3055 break;;
3056 * )
3057 break;;
3058 esac
3059 done
3060 test "$ac_cv_exeext" = no && ac_cv_exeext=
3061
3062 else
3063 ac_file=''
3064 fi
3065 if test -z "$ac_file"; then :
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3067 $as_echo "no" >&6; }
3068 $as_echo "$as_me: failed program was:" >&5
3069 sed 's/^/| /' conftest.$ac_ext >&5
3070
3071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3072 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3073 as_fn_error 77 "C compiler cannot create executables
3074 See \`config.log' for more details" "$LINENO" 5; }
3075 else
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3077 $as_echo "yes" >&6; }
3078 fi
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3080 $as_echo_n "checking for C compiler default output file name... " >&6; }
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3082 $as_echo "$ac_file" >&6; }
3083 ac_exeext=$ac_cv_exeext
3084
3085 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3086 ac_clean_files=$ac_clean_files_save
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3088 $as_echo_n "checking for suffix of executables... " >&6; }
3089 if { { ac_try="$ac_link"
3090 case "(($ac_try" in
3091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3092 *) ac_try_echo=$ac_try;;
3093 esac
3094 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3095 $as_echo "$ac_try_echo"; } >&5
3096 (eval "$ac_link") 2>&5
3097 ac_status=$?
3098 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3099 test $ac_status = 0; }; then :
3100 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3101 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3102 # work properly (i.e., refer to `conftest.exe'), while it won't with
3103 # `rm'.
3104 for ac_file in conftest.exe conftest conftest.*; do
3105 test -f "$ac_file" || continue
3106 case $ac_file in
3107 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3108 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3109 break;;
3110 * ) break;;
3111 esac
3112 done
3113 else
3114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3115 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3116 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3117 See \`config.log' for more details" "$LINENO" 5; }
3118 fi
3119 rm -f conftest conftest$ac_cv_exeext
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3121 $as_echo "$ac_cv_exeext" >&6; }
3122
3123 rm -f conftest.$ac_ext
3124 EXEEXT=$ac_cv_exeext
3125 ac_exeext=$EXEEXT
3126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3127 /* end confdefs.h. */
3128 #include <stdio.h>
3129 int
3130 main ()
3131 {
3132 FILE *f = fopen ("conftest.out", "w");
3133 return ferror (f) || fclose (f) != 0;
3134
3135 ;
3136 return 0;
3137 }
3138 _ACEOF
3139 ac_clean_files="$ac_clean_files conftest.out"
3140 # Check that the compiler produces executables we can run. If not, either
3141 # the compiler is broken, or we cross compile.
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3143 $as_echo_n "checking whether we are cross compiling... " >&6; }
3144 if test "$cross_compiling" != yes; then
3145 { { ac_try="$ac_link"
3146 case "(($ac_try" in
3147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3148 *) ac_try_echo=$ac_try;;
3149 esac
3150 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3151 $as_echo "$ac_try_echo"; } >&5
3152 (eval "$ac_link") 2>&5
3153 ac_status=$?
3154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3155 test $ac_status = 0; }
3156 if { ac_try='./conftest$ac_cv_exeext'
3157 { { case "(($ac_try" in
3158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3159 *) ac_try_echo=$ac_try;;
3160 esac
3161 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3162 $as_echo "$ac_try_echo"; } >&5
3163 (eval "$ac_try") 2>&5
3164 ac_status=$?
3165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3166 test $ac_status = 0; }; }; then
3167 cross_compiling=no
3168 else
3169 if test "$cross_compiling" = maybe; then
3170 cross_compiling=yes
3171 else
3172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3173 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3174 as_fn_error $? "cannot run C compiled programs.
3175 If you meant to cross compile, use \`--host'.
3176 See \`config.log' for more details" "$LINENO" 5; }
3177 fi
3178 fi
3179 fi
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3181 $as_echo "$cross_compiling" >&6; }
3182
3183 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3184 ac_clean_files=$ac_clean_files_save
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3186 $as_echo_n "checking for suffix of object files... " >&6; }
3187 if ${ac_cv_objext+:} false; then :
3188 $as_echo_n "(cached) " >&6
3189 else
3190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3191 /* end confdefs.h. */
3192
3193 int
3194 main ()
3195 {
3196
3197 ;
3198 return 0;
3199 }
3200 _ACEOF
3201 rm -f conftest.o conftest.obj
3202 if { { ac_try="$ac_compile"
3203 case "(($ac_try" in
3204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205 *) ac_try_echo=$ac_try;;
3206 esac
3207 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3208 $as_echo "$ac_try_echo"; } >&5
3209 (eval "$ac_compile") 2>&5
3210 ac_status=$?
3211 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3212 test $ac_status = 0; }; then :
3213 for ac_file in conftest.o conftest.obj conftest.*; do
3214 test -f "$ac_file" || continue;
3215 case $ac_file in
3216 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3217 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3218 break;;
3219 esac
3220 done
3221 else
3222 $as_echo "$as_me: failed program was:" >&5
3223 sed 's/^/| /' conftest.$ac_ext >&5
3224
3225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3227 as_fn_error $? "cannot compute suffix of object files: cannot compile
3228 See \`config.log' for more details" "$LINENO" 5; }
3229 fi
3230 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3231 fi
3232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3233 $as_echo "$ac_cv_objext" >&6; }
3234 OBJEXT=$ac_cv_objext
3235 ac_objext=$OBJEXT
3236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3237 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3238 if ${ac_cv_c_compiler_gnu+:} false; then :
3239 $as_echo_n "(cached) " >&6
3240 else
3241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3242 /* end confdefs.h. */
3243
3244 int
3245 main ()
3246 {
3247 #ifndef __GNUC__
3248 choke me
3249 #endif
3250
3251 ;
3252 return 0;
3253 }
3254 _ACEOF
3255 if ac_fn_c_try_compile "$LINENO"; then :
3256 ac_compiler_gnu=yes
3257 else
3258 ac_compiler_gnu=no
3259 fi
3260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3261 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3262
3263 fi
3264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3265 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3266 if test $ac_compiler_gnu = yes; then
3267 GCC=yes
3268 else
3269 GCC=
3270 fi
3271 ac_test_CFLAGS=${CFLAGS+set}
3272 ac_save_CFLAGS=$CFLAGS
3273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3274 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3275 if ${ac_cv_prog_cc_g+:} false; then :
3276 $as_echo_n "(cached) " >&6
3277 else
3278 ac_save_c_werror_flag=$ac_c_werror_flag
3279 ac_c_werror_flag=yes
3280 ac_cv_prog_cc_g=no
3281 CFLAGS="-g"
3282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3283 /* end confdefs.h. */
3284
3285 int
3286 main ()
3287 {
3288
3289 ;
3290 return 0;
3291 }
3292 _ACEOF
3293 if ac_fn_c_try_compile "$LINENO"; then :
3294 ac_cv_prog_cc_g=yes
3295 else
3296 CFLAGS=""
3297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3298 /* end confdefs.h. */
3299
3300 int
3301 main ()
3302 {
3303
3304 ;
3305 return 0;
3306 }
3307 _ACEOF
3308 if ac_fn_c_try_compile "$LINENO"; then :
3309
3310 else
3311 ac_c_werror_flag=$ac_save_c_werror_flag
3312 CFLAGS="-g"
3313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3314 /* end confdefs.h. */
3315
3316 int
3317 main ()
3318 {
3319
3320 ;
3321 return 0;
3322 }
3323 _ACEOF
3324 if ac_fn_c_try_compile "$LINENO"; then :
3325 ac_cv_prog_cc_g=yes
3326 fi
3327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 ac_c_werror_flag=$ac_save_c_werror_flag
3333 fi
3334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3335 $as_echo "$ac_cv_prog_cc_g" >&6; }
3336 if test "$ac_test_CFLAGS" = set; then
3337 CFLAGS=$ac_save_CFLAGS
3338 elif test $ac_cv_prog_cc_g = yes; then
3339 if test "$GCC" = yes; then
3340 CFLAGS="-g -O2"
3341 else
3342 CFLAGS="-g"
3343 fi
3344 else
3345 if test "$GCC" = yes; then
3346 CFLAGS="-O2"
3347 else
3348 CFLAGS=
3349 fi
3350 fi
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3352 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3353 if ${ac_cv_prog_cc_c89+:} false; then :
3354 $as_echo_n "(cached) " >&6
3355 else
3356 ac_cv_prog_cc_c89=no
3357 ac_save_CC=$CC
3358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3359 /* end confdefs.h. */
3360 #include <stdarg.h>
3361 #include <stdio.h>
3362 struct stat;
3363 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3364 struct buf { int x; };
3365 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3366 static char *e (p, i)
3367 char **p;
3368 int i;
3369 {
3370 return p[i];
3371 }
3372 static char *f (char * (*g) (char **, int), char **p, ...)
3373 {
3374 char *s;
3375 va_list v;
3376 va_start (v,p);
3377 s = g (p, va_arg (v,int));
3378 va_end (v);
3379 return s;
3380 }
3381
3382 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3383 function prototypes and stuff, but not '\xHH' hex character constants.
3384 These don't provoke an error unfortunately, instead are silently treated
3385 as 'x'. The following induces an error, until -std is added to get
3386 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3387 array size at least. It's necessary to write '\x00'==0 to get something
3388 that's true only with -std. */
3389 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3390
3391 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3392 inside strings and character constants. */
3393 #define FOO(x) 'x'
3394 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3395
3396 int test (int i, double x);
3397 struct s1 {int (*f) (int a);};
3398 struct s2 {int (*f) (double a);};
3399 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3400 int argc;
3401 char **argv;
3402 int
3403 main ()
3404 {
3405 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3406 ;
3407 return 0;
3408 }
3409 _ACEOF
3410 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3411 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3412 do
3413 CC="$ac_save_CC $ac_arg"
3414 if ac_fn_c_try_compile "$LINENO"; then :
3415 ac_cv_prog_cc_c89=$ac_arg
3416 fi
3417 rm -f core conftest.err conftest.$ac_objext
3418 test "x$ac_cv_prog_cc_c89" != "xno" && break
3419 done
3420 rm -f conftest.$ac_ext
3421 CC=$ac_save_CC
3422
3423 fi
3424 # AC_CACHE_VAL
3425 case "x$ac_cv_prog_cc_c89" in
3426 x)
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3428 $as_echo "none needed" >&6; } ;;
3429 xno)
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3431 $as_echo "unsupported" >&6; } ;;
3432 *)
3433 CC="$CC $ac_cv_prog_cc_c89"
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3435 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3436 esac
3437 if test "x$ac_cv_prog_cc_c89" != xno; then :
3438
3439 fi
3440
3441 ac_ext=c
3442 ac_cpp='$CPP $CPPFLAGS'
3443 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3444 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3446
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3448 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3449 if ${ac_cv_prog_cc_c99+:} false; then :
3450 $as_echo_n "(cached) " >&6
3451 else
3452 ac_cv_prog_cc_c99=no
3453 ac_save_CC=$CC
3454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3455 /* end confdefs.h. */
3456 #include <stdarg.h>
3457 #include <stdbool.h>
3458 #include <stdlib.h>
3459 #include <wchar.h>
3460 #include <stdio.h>
3461
3462 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3463 #define debug(...) fprintf (stderr, __VA_ARGS__)
3464 #define showlist(...) puts (#__VA_ARGS__)
3465 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3466 static void
3467 test_varargs_macros (void)
3468 {
3469 int x = 1234;
3470 int y = 5678;
3471 debug ("Flag");
3472 debug ("X = %d\n", x);
3473 showlist (The first, second, and third items.);
3474 report (x>y, "x is %d but y is %d", x, y);
3475 }
3476
3477 // Check long long types.
3478 #define BIG64 18446744073709551615ull
3479 #define BIG32 4294967295ul
3480 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3481 #if !BIG_OK
3482 your preprocessor is broken;
3483 #endif
3484 #if BIG_OK
3485 #else
3486 your preprocessor is broken;
3487 #endif
3488 static long long int bignum = -9223372036854775807LL;
3489 static unsigned long long int ubignum = BIG64;
3490
3491 struct incomplete_array
3492 {
3493 int datasize;
3494 double data[];
3495 };
3496
3497 struct named_init {
3498 int number;
3499 const wchar_t *name;
3500 double average;
3501 };
3502
3503 typedef const char *ccp;
3504
3505 static inline int
3506 test_restrict (ccp restrict text)
3507 {
3508 // See if C++-style comments work.
3509 // Iterate through items via the restricted pointer.
3510 // Also check for declarations in for loops.
3511 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3512 continue;
3513 return 0;
3514 }
3515
3516 // Check varargs and va_copy.
3517 static void
3518 test_varargs (const char *format, ...)
3519 {
3520 va_list args;
3521 va_start (args, format);
3522 va_list args_copy;
3523 va_copy (args_copy, args);
3524
3525 const char *str;
3526 int number;
3527 float fnumber;
3528
3529 while (*format)
3530 {
3531 switch (*format++)
3532 {
3533 case 's': // string
3534 str = va_arg (args_copy, const char *);
3535 break;
3536 case 'd': // int
3537 number = va_arg (args_copy, int);
3538 break;
3539 case 'f': // float
3540 fnumber = va_arg (args_copy, double);
3541 break;
3542 default:
3543 break;
3544 }
3545 }
3546 va_end (args_copy);
3547 va_end (args);
3548 }
3549
3550 int
3551 main ()
3552 {
3553
3554 // Check bool.
3555 _Bool success = false;
3556
3557 // Check restrict.
3558 if (test_restrict ("String literal") == 0)
3559 success = true;
3560 char *restrict newvar = "Another string";
3561
3562 // Check varargs.
3563 test_varargs ("s, d' f .", "string", 65, 34.234);
3564 test_varargs_macros ();
3565
3566 // Check flexible array members.
3567 struct incomplete_array *ia =
3568 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3569 ia->datasize = 10;
3570 for (int i = 0; i < ia->datasize; ++i)
3571 ia->data[i] = i * 1.234;
3572
3573 // Check named initializers.
3574 struct named_init ni = {
3575 .number = 34,
3576 .name = L"Test wide string",
3577 .average = 543.34343,
3578 };
3579
3580 ni.number = 58;
3581
3582 int dynamic_array[ni.number];
3583 dynamic_array[ni.number - 1] = 543;
3584
3585 // work around unused variable warnings
3586 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3587 || dynamic_array[ni.number - 1] != 543);
3588
3589 ;
3590 return 0;
3591 }
3592 _ACEOF
3593 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3594 do
3595 CC="$ac_save_CC $ac_arg"
3596 if ac_fn_c_try_compile "$LINENO"; then :
3597 ac_cv_prog_cc_c99=$ac_arg
3598 fi
3599 rm -f core conftest.err conftest.$ac_objext
3600 test "x$ac_cv_prog_cc_c99" != "xno" && break
3601 done
3602 rm -f conftest.$ac_ext
3603 CC=$ac_save_CC
3604
3605 fi
3606 # AC_CACHE_VAL
3607 case "x$ac_cv_prog_cc_c99" in
3608 x)
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3610 $as_echo "none needed" >&6; } ;;
3611 xno)
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3613 $as_echo "unsupported" >&6; } ;;
3614 *)
3615 CC="$CC $ac_cv_prog_cc_c99"
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3617 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3618 esac
3619 if test "x$ac_cv_prog_cc_c99" != xno; then :
3620
3621 fi
3622
3623
3624 if test "$ac_cv_prog_cc_c99" = "no"; then
3625 as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
3626 fi
3627 case "$host_os" in
3628 haiku*)
3629 #
3630 # Haiku's platform file is in C++.
3631 #
3632 ac_ext=cpp
3633 ac_cpp='$CXXCPP $CPPFLAGS'
3634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3637 if test -z "$CXX"; then
3638 if test -n "$CCC"; then
3639 CXX=$CCC
3640 else
3641 if test -n "$ac_tool_prefix"; then
3642 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3643 do
3644 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3645 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3647 $as_echo_n "checking for $ac_word... " >&6; }
3648 if ${ac_cv_prog_CXX+:} false; then :
3649 $as_echo_n "(cached) " >&6
3650 else
3651 if test -n "$CXX"; then
3652 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3653 else
3654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3655 for as_dir in $PATH
3656 do
3657 IFS=$as_save_IFS
3658 test -z "$as_dir" && as_dir=.
3659 for ac_exec_ext in '' $ac_executable_extensions; do
3660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3661 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3663 break 2
3664 fi
3665 done
3666 done
3667 IFS=$as_save_IFS
3668
3669 fi
3670 fi
3671 CXX=$ac_cv_prog_CXX
3672 if test -n "$CXX"; then
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3674 $as_echo "$CXX" >&6; }
3675 else
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3677 $as_echo "no" >&6; }
3678 fi
3679
3680
3681 test -n "$CXX" && break
3682 done
3683 fi
3684 if test -z "$CXX"; then
3685 ac_ct_CXX=$CXX
3686 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3687 do
3688 # Extract the first word of "$ac_prog", so it can be a program name with args.
3689 set dummy $ac_prog; ac_word=$2
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3691 $as_echo_n "checking for $ac_word... " >&6; }
3692 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3693 $as_echo_n "(cached) " >&6
3694 else
3695 if test -n "$ac_ct_CXX"; then
3696 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3697 else
3698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699 for as_dir in $PATH
3700 do
3701 IFS=$as_save_IFS
3702 test -z "$as_dir" && as_dir=.
3703 for ac_exec_ext in '' $ac_executable_extensions; do
3704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3705 ac_cv_prog_ac_ct_CXX="$ac_prog"
3706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3707 break 2
3708 fi
3709 done
3710 done
3711 IFS=$as_save_IFS
3712
3713 fi
3714 fi
3715 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3716 if test -n "$ac_ct_CXX"; then
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3718 $as_echo "$ac_ct_CXX" >&6; }
3719 else
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3721 $as_echo "no" >&6; }
3722 fi
3723
3724
3725 test -n "$ac_ct_CXX" && break
3726 done
3727
3728 if test "x$ac_ct_CXX" = x; then
3729 CXX="g++"
3730 else
3731 case $cross_compiling:$ac_tool_warned in
3732 yes:)
3733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3734 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3735 ac_tool_warned=yes ;;
3736 esac
3737 CXX=$ac_ct_CXX
3738 fi
3739 fi
3740
3741 fi
3742 fi
3743 # Provide some information about the compiler.
3744 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3745 set X $ac_compile
3746 ac_compiler=$2
3747 for ac_option in --version -v -V -qversion; do
3748 { { ac_try="$ac_compiler $ac_option >&5"
3749 case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752 esac
3753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754 $as_echo "$ac_try_echo"; } >&5
3755 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3756 ac_status=$?
3757 if test -s conftest.err; then
3758 sed '10a\
3759 ... rest of stderr output deleted ...
3760 10q' conftest.err >conftest.er1
3761 cat conftest.er1 >&5
3762 fi
3763 rm -f conftest.er1 conftest.err
3764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3765 test $ac_status = 0; }
3766 done
3767
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3769 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3770 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3771 $as_echo_n "(cached) " >&6
3772 else
3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3774 /* end confdefs.h. */
3775
3776 int
3777 main ()
3778 {
3779 #ifndef __GNUC__
3780 choke me
3781 #endif
3782
3783 ;
3784 return 0;
3785 }
3786 _ACEOF
3787 if ac_fn_cxx_try_compile "$LINENO"; then :
3788 ac_compiler_gnu=yes
3789 else
3790 ac_compiler_gnu=no
3791 fi
3792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3793 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3794
3795 fi
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3797 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3798 if test $ac_compiler_gnu = yes; then
3799 GXX=yes
3800 else
3801 GXX=
3802 fi
3803 ac_test_CXXFLAGS=${CXXFLAGS+set}
3804 ac_save_CXXFLAGS=$CXXFLAGS
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3806 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3807 if ${ac_cv_prog_cxx_g+:} false; then :
3808 $as_echo_n "(cached) " >&6
3809 else
3810 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3811 ac_cxx_werror_flag=yes
3812 ac_cv_prog_cxx_g=no
3813 CXXFLAGS="-g"
3814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3815 /* end confdefs.h. */
3816
3817 int
3818 main ()
3819 {
3820
3821 ;
3822 return 0;
3823 }
3824 _ACEOF
3825 if ac_fn_cxx_try_compile "$LINENO"; then :
3826 ac_cv_prog_cxx_g=yes
3827 else
3828 CXXFLAGS=""
3829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3830 /* end confdefs.h. */
3831
3832 int
3833 main ()
3834 {
3835
3836 ;
3837 return 0;
3838 }
3839 _ACEOF
3840 if ac_fn_cxx_try_compile "$LINENO"; then :
3841
3842 else
3843 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3844 CXXFLAGS="-g"
3845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3846 /* end confdefs.h. */
3847
3848 int
3849 main ()
3850 {
3851
3852 ;
3853 return 0;
3854 }
3855 _ACEOF
3856 if ac_fn_cxx_try_compile "$LINENO"; then :
3857 ac_cv_prog_cxx_g=yes
3858 fi
3859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3860 fi
3861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862 fi
3863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3864 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3865 fi
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3867 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3868 if test "$ac_test_CXXFLAGS" = set; then
3869 CXXFLAGS=$ac_save_CXXFLAGS
3870 elif test $ac_cv_prog_cxx_g = yes; then
3871 if test "$GXX" = yes; then
3872 CXXFLAGS="-g -O2"
3873 else
3874 CXXFLAGS="-g"
3875 fi
3876 else
3877 if test "$GXX" = yes; then
3878 CXXFLAGS="-O2"
3879 else
3880 CXXFLAGS=
3881 fi
3882 fi
3883 ac_ext=c
3884 ac_cpp='$CPP $CPPFLAGS'
3885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3888
3889 ;;
3890 esac
3891
3892
3893
3894
3895
3896
3897 if test "$GCC" = yes ; then
3898 #
3899 # -Werror forces warnings to be errors.
3900 #
3901 ac_lbl_cc_force_warning_errors=-Werror
3902
3903 #
3904 # Try to have the compiler default to hiding symbols,
3905 # so that only symbols explicitly exported with
3906 # PCAP_API will be visible outside (shared) libraries.
3907 #
3908
3909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3910 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3911 save_CFLAGS="$CFLAGS"
3912 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3913 then
3914 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3915 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3916 then
3917 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3918 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3919 then
3920 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3921 else
3922 CFLAGS="$CFLAGS -fvisibility=hidden"
3923 fi
3924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3925 /* end confdefs.h. */
3926
3927 int
3928 main ()
3929 {
3930 return 0
3931 ;
3932 return 0;
3933 }
3934 _ACEOF
3935 if ac_fn_c_try_compile "$LINENO"; then :
3936
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3938 $as_echo "yes" >&6; }
3939 can_add_to_cflags=yes
3940 #
3941 # The compile supports this; do we have some C code for
3942 # which the warning should *not* appear?
3943 # We test the fourth argument because the third argument
3944 # could contain quotes, breaking the test.
3945 #
3946 if test "x" != "x"
3947 then
3948 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3950 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3952 /* end confdefs.h. */
3953
3954 _ACEOF
3955 if ac_fn_c_try_compile "$LINENO"; then :
3956
3957 #
3958 # Not a problem.
3959 #
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3961 $as_echo "no" >&6; }
3962
3963 else
3964
3965 #
3966 # A problem.
3967 #
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3969 $as_echo "yes" >&6; }
3970 can_add_to_cflags=no
3971
3972 fi
3973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3974 fi
3975 CFLAGS="$save_CFLAGS"
3976 if test x"$can_add_to_cflags" = "xyes"
3977 then
3978 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3979 fi
3980
3981 else
3982
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3984 $as_echo "no" >&6; }
3985 CFLAGS="$save_CFLAGS"
3986
3987 fi
3988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3989
3990 else
3991 V_INCLS="$V_INCLS -I/usr/local/include"
3992 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3993
3994 case "$host_os" in
3995
3996 darwin*)
3997 #
3998 # This is assumed either to be GCC or clang, both
3999 # of which use -Werror to force warnings to be errors.
4000 #
4001 ac_lbl_cc_force_warning_errors=-Werror
4002
4003 #
4004 # Try to have the compiler default to hiding symbols,
4005 # so that only symbols explicitly exported with
4006 # PCAP_API will be visible outside (shared) libraries.
4007 #
4008
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
4010 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
4011 save_CFLAGS="$CFLAGS"
4012 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
4013 then
4014 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
4015 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
4016 then
4017 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
4018 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
4019 then
4020 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
4021 else
4022 CFLAGS="$CFLAGS -fvisibility=hidden"
4023 fi
4024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025 /* end confdefs.h. */
4026
4027 int
4028 main ()
4029 {
4030 return 0
4031 ;
4032 return 0;
4033 }
4034 _ACEOF
4035 if ac_fn_c_try_compile "$LINENO"; then :
4036
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4038 $as_echo "yes" >&6; }
4039 can_add_to_cflags=yes
4040 #
4041 # The compile supports this; do we have some C code for
4042 # which the warning should *not* appear?
4043 # We test the fourth argument because the third argument
4044 # could contain quotes, breaking the test.
4045 #
4046 if test "x" != "x"
4047 then
4048 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4050 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
4051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052 /* end confdefs.h. */
4053
4054 _ACEOF
4055 if ac_fn_c_try_compile "$LINENO"; then :
4056
4057 #
4058 # Not a problem.
4059 #
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4061 $as_echo "no" >&6; }
4062
4063 else
4064
4065 #
4066 # A problem.
4067 #
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4069 $as_echo "yes" >&6; }
4070 can_add_to_cflags=no
4071
4072 fi
4073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4074 fi
4075 CFLAGS="$save_CFLAGS"
4076 if test x"$can_add_to_cflags" = "xyes"
4077 then
4078 V_CCOPT="$V_CCOPT -fvisibility=hidden"
4079 fi
4080
4081 else
4082
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4084 $as_echo "no" >&6; }
4085 CFLAGS="$save_CFLAGS"
4086
4087 fi
4088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4089
4090 ;;
4091
4092 hpux*)
4093 #
4094 # HP C, which is what we presume we're using, doesn't
4095 # exit with a non-zero exit status if we hand it an
4096 # invalid -W flag, can't be forced to do so even with
4097 # +We, and doesn't handle GCC-style -W flags, so we
4098 # don't want to try using GCC-style -W flags.
4099 #
4100 ac_lbl_cc_dont_try_gcc_dashW=yes
4101 ;;
4102
4103 irix*)
4104 #
4105 # MIPS C, which is what we presume we're using, doesn't
4106 # necessarily exit with a non-zero exit status if we
4107 # hand it an invalid -W flag, can't be forced to do
4108 # so, and doesn't handle GCC-style -W flags, so we
4109 # don't want to try using GCC-style -W flags.
4110 #
4111 ac_lbl_cc_dont_try_gcc_dashW=yes
4112 #
4113 # It also, apparently, defaults to "char" being
4114 # unsigned, unlike most other C implementations;
4115 # I suppose we could say "signed char" whenever
4116 # we want to guarantee a signed "char", but let's
4117 # just force signed chars.
4118 #
4119 # -xansi is normally the default, but the
4120 # configure script was setting it; perhaps -cckr
4121 # was the default in the Old Days. (Then again,
4122 # that would probably be for backwards compatibility
4123 # in the days when ANSI C was Shiny and New, i.e.
4124 # 1989 and the early '90's, so maybe we can just
4125 # drop support for those compilers.)
4126 #
4127 # -g is equivalent to -g2, which turns off
4128 # optimization; we choose -g3, which generates
4129 # debugging information but doesn't turn off
4130 # optimization (even if the optimization would
4131 # cause inaccuracies in debugging).
4132 #
4133 V_CCOPT="$V_CCOPT -xansi -signed -g3"
4134 ;;
4135
4136 osf*)
4137 #
4138 # Presumed to be DEC OSF/1, Digital UNIX, or
4139 # Tru64 UNIX.
4140 #
4141 # The DEC C compiler, which is what we presume we're
4142 # using, doesn't exit with a non-zero exit status if we
4143 # hand it an invalid -W flag, can't be forced to do
4144 # so, and doesn't handle GCC-style -W flags, so we
4145 # don't want to try using GCC-style -W flags.
4146 #
4147 ac_lbl_cc_dont_try_gcc_dashW=yes
4148 #
4149 # -g is equivalent to -g2, which turns off
4150 # optimization; we choose -g3, which generates
4151 # debugging information but doesn't turn off
4152 # optimization (even if the optimization would
4153 # cause inaccuracies in debugging).
4154 #
4155 V_CCOPT="$V_CCOPT -g3"
4156 ;;
4157
4158 solaris*)
4159 #
4160 # Assumed to be Sun C, which requires -errwarn to force
4161 # warnings to be treated as errors.
4162 #
4163 ac_lbl_cc_force_warning_errors=-errwarn
4164
4165 #
4166 # Try to have the compiler default to hiding symbols,
4167 # so that only symbols explicitly exported with
4168 # PCAP_API will be visible outside (shared) libraries.
4169 #
4170
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
4172 $as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
4173 save_CFLAGS="$CFLAGS"
4174 if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
4175 then
4176 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
4177 elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
4178 then
4179 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
4180 elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
4181 then
4182 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
4183 else
4184 CFLAGS="$CFLAGS -xldscope=hidden"
4185 fi
4186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187 /* end confdefs.h. */
4188
4189 int
4190 main ()
4191 {
4192 return 0
4193 ;
4194 return 0;
4195 }
4196 _ACEOF
4197 if ac_fn_c_try_compile "$LINENO"; then :
4198
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4200 $as_echo "yes" >&6; }
4201 can_add_to_cflags=yes
4202 #
4203 # The compile supports this; do we have some C code for
4204 # which the warning should *not* appear?
4205 # We test the fourth argument because the third argument
4206 # could contain quotes, breaking the test.
4207 #
4208 if test "x" != "x"
4209 then
4210 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
4212 $as_echo_n "checking whether -xldscope=hidden ... " >&6; }
4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4214 /* end confdefs.h. */
4215
4216 _ACEOF
4217 if ac_fn_c_try_compile "$LINENO"; then :
4218
4219 #
4220 # Not a problem.
4221 #
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4223 $as_echo "no" >&6; }
4224
4225 else
4226
4227 #
4228 # A problem.
4229 #
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4231 $as_echo "yes" >&6; }
4232 can_add_to_cflags=no
4233
4234 fi
4235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236 fi
4237 CFLAGS="$save_CFLAGS"
4238 if test x"$can_add_to_cflags" = "xyes"
4239 then
4240 V_CCOPT="$V_CCOPT -xldscope=hidden"
4241 fi
4242
4243 else
4244
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4246 $as_echo "no" >&6; }
4247 CFLAGS="$save_CFLAGS"
4248
4249 fi
4250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251
4252 ;;
4253
4254 ultrix*)
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
4256 $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
4257 if ${ac_cv_lbl_cc_const_proto+:} false; then :
4258 $as_echo_n "(cached) " >&6
4259 else
4260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4261 /* end confdefs.h. */
4262 #include <sys/types.h>
4263 int
4264 main ()
4265 {
4266 struct a { int b; };
4267 void c(const struct a *)
4268 ;
4269 return 0;
4270 }
4271 _ACEOF
4272 if ac_fn_c_try_compile "$LINENO"; then :
4273 ac_cv_lbl_cc_const_proto=yes
4274 else
4275 ac_cv_lbl_cc_const_proto=no
4276 fi
4277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4278 fi
4279
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
4281 $as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
4282 if test $ac_cv_lbl_cc_const_proto = no ; then
4283
4284 $as_echo "#define const /**/" >>confdefs.h
4285
4286 fi
4287 ;;
4288 esac
4289 V_CCOPT="$V_CCOPT -O"
4290 fi
4291
4292
4293 if test "$GCC" = yes ; then
4294 #
4295 # On platforms where we build a shared library:
4296 #
4297 # add options to generate position-independent code,
4298 # if necessary (it's the default in AIX and Darwin/macOS);
4299 #
4300 # define option to set the soname of the shared library,
4301 # if the OS supports that;
4302 #
4303 # add options to specify, at link time, a directory to
4304 # add to the run-time search path, if that's necessary.
4305 #
4306 V_SHLIB_CMD="\$(CC)"
4307 V_SHLIB_OPT="-shared"
4308 case "$host_os" in
4309
4310 aix*)
4311 ;;
4312
4313 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
4314 #
4315 # Platforms where the linker is the GNU linker
4316 # or accepts command-line arguments like
4317 # those the GNU linker accepts.
4318 #
4319 # Some instruction sets require -fPIC on some
4320 # operating systems. Check for them. If you
4321 # have a combination that requires it, add it
4322 # here.
4323 #
4324 PIC_OPT=-fpic
4325 case "$host_cpu" in
4326
4327 sparc64*)
4328 case "$host_os" in
4329
4330 freebsd*|openbsd*|linux*)
4331 PIC_OPT=-fPIC
4332 ;;
4333 esac
4334 ;;
4335 esac
4336 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
4337 V_SONAME_OPT="-Wl,-soname,"
4338 V_RPATH_OPT="-Wl,-rpath,"
4339 ;;
4340
4341 hpux*)
4342 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4343 #
4344 # XXX - this assumes GCC is using the HP linker,
4345 # rather than the GNU linker, and that the "+h"
4346 # option is used on all HP-UX platforms, both .sl
4347 # and .so.
4348 #
4349 V_SONAME_OPT="-Wl,+h,"
4350 #
4351 # By default, directories specifed with -L
4352 # are added to the run-time search path, so
4353 # we don't add them in pcap-config.
4354 #
4355 ;;
4356
4357 solaris*)
4358 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4359 #
4360 # XXX - this assumes GCC is using the Sun linker,
4361 # rather than the GNU linker.
4362 #
4363 V_SONAME_OPT="-Wl,-h,"
4364 V_RPATH_OPT="-Wl,-R,"
4365 ;;
4366 esac
4367 else
4368 #
4369 # Set the appropriate compiler flags and, on platforms
4370 # where we build a shared library:
4371 #
4372 # add options to generate position-independent code,
4373 # if necessary (it's the default in Darwin/macOS);
4374 #
4375 # if we generate ".so" shared libraries, define the
4376 # appropriate options for building the shared library;
4377 #
4378 # add options to specify, at link time, a directory to
4379 # add to the run-time search path, if that's necessary.
4380 #
4381 # Note: spaces after V_SONAME_OPT are significant; on
4382 # some platforms the soname is passed with a GCC-like
4383 # "-Wl,-soname,{soname}" option, with the soname part
4384 # of the option, while on other platforms the C compiler
4385 # driver takes it as a regular option with the soname
4386 # following the option. The same applies to V_RPATH_OPT.
4387 #
4388 case "$host_os" in
4389
4390 aix*)
4391 V_SHLIB_CMD="\$(CC)"
4392 V_SHLIB_OPT="-G -bnoentry -bexpall"
4393 ;;
4394
4395 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
4396 #
4397 # "cc" is GCC.
4398 #
4399 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4400 V_SHLIB_CMD="\$(CC)"
4401 V_SHLIB_OPT="-shared"
4402 V_SONAME_OPT="-Wl,-soname,"
4403 V_RPATH_OPT="-Wl,-rpath,"
4404 ;;
4405
4406 hpux*)
4407 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
4408 V_SHLIB_CMD="\$(LD)"
4409 V_SHLIB_OPT="-b"
4410 V_SONAME_OPT="+h "
4411 #
4412 # By default, directories specifed with -L
4413 # are added to the run-time search path, so
4414 # we don't add them in pcap-config.
4415 #
4416 ;;
4417
4418 osf*)
4419 #
4420 # Presumed to be DEC OSF/1, Digital UNIX, or
4421 # Tru64 UNIX.
4422 #
4423 V_SHLIB_CMD="\$(CC)"
4424 V_SHLIB_OPT="-shared"
4425 V_SONAME_OPT="-soname "
4426 V_RPATH_OPT="-rpath "
4427 ;;
4428
4429 solaris*)
4430 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
4431 V_SHLIB_CMD="\$(CC)"
4432 V_SHLIB_OPT="-G"
4433 V_SONAME_OPT="-h "
4434 V_RPATH_OPT="-R"
4435 ;;
4436 esac
4437 fi
4438
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4440 $as_echo_n "checking for inline... " >&6; }
4441 save_CFLAGS="$CFLAGS"
4442 CFLAGS="$V_CCOPT"
4443 if ${ac_cv_lbl_inline+:} false; then :
4444 $as_echo_n "(cached) " >&6
4445 else
4446
4447 ac_cv_lbl_inline=""
4448 ac_lbl_cc_inline=no
4449 for ac_lbl_inline in inline __inline__ __inline
4450 do
4451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4452 /* end confdefs.h. */
4453 #define inline $ac_lbl_inline
4454 static inline struct iltest *foo(void);
4455 struct iltest {
4456 int iltest1;
4457 int iltest2;
4458 };
4459
4460 static inline struct iltest *
4461 foo()
4462 {
4463 static struct iltest xxx;
4464
4465 return &xxx;
4466 }
4467 int
4468 main ()
4469 {
4470
4471 ;
4472 return 0;
4473 }
4474 _ACEOF
4475 if ac_fn_c_try_compile "$LINENO"; then :
4476 ac_lbl_cc_inline=yes
4477 fi
4478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4479 if test "$ac_lbl_cc_inline" = yes ; then
4480 break;
4481 fi
4482 done
4483 if test "$ac_lbl_cc_inline" = yes ; then
4484 ac_cv_lbl_inline=$ac_lbl_inline
4485 fi
4486 fi
4487
4488 CFLAGS="$save_CFLAGS"
4489 if test ! -z "$ac_cv_lbl_inline" ; then
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4491 $as_echo "$ac_cv_lbl_inline" >&6; }
4492 else
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4494 $as_echo "no" >&6; }
4495 fi
4496
4497 cat >>confdefs.h <<_ACEOF
4498 #define inline $ac_cv_lbl_inline
4499 _ACEOF
4500
4501
4502 #
4503 # Try to arrange for large file support.
4504 #
4505 # Check whether --enable-largefile was given.
4506 if test "${enable_largefile+set}" = set; then :
4507 enableval=$enable_largefile;
4508 fi
4509
4510 if test "$enable_largefile" != no; then
4511
4512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4513 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4514 if ${ac_cv_sys_largefile_CC+:} false; then :
4515 $as_echo_n "(cached) " >&6
4516 else
4517 ac_cv_sys_largefile_CC=no
4518 if test "$GCC" != yes; then
4519 ac_save_CC=$CC
4520 while :; do
4521 # IRIX 6.2 and later do not support large files by default,
4522 # so use the C compiler's -n32 option if that helps.
4523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4524 /* end confdefs.h. */
4525 #include <sys/types.h>
4526 /* Check that off_t can represent 2**63 - 1 correctly.
4527 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4528 since some C++ compilers masquerading as C compilers
4529 incorrectly reject 9223372036854775807. */
4530 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4531 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4532 && LARGE_OFF_T % 2147483647 == 1)
4533 ? 1 : -1];
4534 int
4535 main ()
4536 {
4537
4538 ;
4539 return 0;
4540 }
4541 _ACEOF
4542 if ac_fn_c_try_compile "$LINENO"; then :
4543 break
4544 fi
4545 rm -f core conftest.err conftest.$ac_objext
4546 CC="$CC -n32"
4547 if ac_fn_c_try_compile "$LINENO"; then :
4548 ac_cv_sys_largefile_CC=' -n32'; break
4549 fi
4550 rm -f core conftest.err conftest.$ac_objext
4551 break
4552 done
4553 CC=$ac_save_CC
4554 rm -f conftest.$ac_ext
4555 fi
4556 fi
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4558 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4559 if test "$ac_cv_sys_largefile_CC" != no; then
4560 CC=$CC$ac_cv_sys_largefile_CC
4561 fi
4562
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4564 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4565 if ${ac_cv_sys_file_offset_bits+:} false; then :
4566 $as_echo_n "(cached) " >&6
4567 else
4568 while :; do
4569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4570 /* end confdefs.h. */
4571 #include <sys/types.h>
4572 /* Check that off_t can represent 2**63 - 1 correctly.
4573 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4574 since some C++ compilers masquerading as C compilers
4575 incorrectly reject 9223372036854775807. */
4576 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4577 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4578 && LARGE_OFF_T % 2147483647 == 1)
4579 ? 1 : -1];
4580 int
4581 main ()
4582 {
4583
4584 ;
4585 return 0;
4586 }
4587 _ACEOF
4588 if ac_fn_c_try_compile "$LINENO"; then :
4589 ac_cv_sys_file_offset_bits=no; break
4590 fi
4591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593 /* end confdefs.h. */
4594 #define _FILE_OFFSET_BITS 64
4595 #include <sys/types.h>
4596 /* Check that off_t can represent 2**63 - 1 correctly.
4597 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4598 since some C++ compilers masquerading as C compilers
4599 incorrectly reject 9223372036854775807. */
4600 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4601 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4602 && LARGE_OFF_T % 2147483647 == 1)
4603 ? 1 : -1];
4604 int
4605 main ()
4606 {
4607
4608 ;
4609 return 0;
4610 }
4611 _ACEOF
4612 if ac_fn_c_try_compile "$LINENO"; then :
4613 ac_cv_sys_file_offset_bits=64; break
4614 fi
4615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4616 ac_cv_sys_file_offset_bits=unknown
4617 break
4618 done
4619 fi
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4621 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4622 case $ac_cv_sys_file_offset_bits in #(
4623 no | unknown) ;;
4624 *)
4625 cat >>confdefs.h <<_ACEOF
4626 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4627 _ACEOF
4628 ;;
4629 esac
4630 rm -rf conftest*
4631 if test $ac_cv_sys_file_offset_bits = unknown; then
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4633 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4634 if ${ac_cv_sys_large_files+:} false; then :
4635 $as_echo_n "(cached) " >&6
4636 else
4637 while :; do
4638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4639 /* end confdefs.h. */
4640 #include <sys/types.h>
4641 /* Check that off_t can represent 2**63 - 1 correctly.
4642 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4643 since some C++ compilers masquerading as C compilers
4644 incorrectly reject 9223372036854775807. */
4645 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4646 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4647 && LARGE_OFF_T % 2147483647 == 1)
4648 ? 1 : -1];
4649 int
4650 main ()
4651 {
4652
4653 ;
4654 return 0;
4655 }
4656 _ACEOF
4657 if ac_fn_c_try_compile "$LINENO"; then :
4658 ac_cv_sys_large_files=no; break
4659 fi
4660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4662 /* end confdefs.h. */
4663 #define _LARGE_FILES 1
4664 #include <sys/types.h>
4665 /* Check that off_t can represent 2**63 - 1 correctly.
4666 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4667 since some C++ compilers masquerading as C compilers
4668 incorrectly reject 9223372036854775807. */
4669 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4670 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4671 && LARGE_OFF_T % 2147483647 == 1)
4672 ? 1 : -1];
4673 int
4674 main ()
4675 {
4676
4677 ;
4678 return 0;
4679 }
4680 _ACEOF
4681 if ac_fn_c_try_compile "$LINENO"; then :
4682 ac_cv_sys_large_files=1; break
4683 fi
4684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4685 ac_cv_sys_large_files=unknown
4686 break
4687 done
4688 fi
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4690 $as_echo "$ac_cv_sys_large_files" >&6; }
4691 case $ac_cv_sys_large_files in #(
4692 no | unknown) ;;
4693 *)
4694 cat >>confdefs.h <<_ACEOF
4695 #define _LARGE_FILES $ac_cv_sys_large_files
4696 _ACEOF
4697 ;;
4698 esac
4699 rm -rf conftest*
4700 fi
4701
4702
4703 fi
4704
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4706 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4707 if ${ac_cv_sys_largefile_source+:} false; then :
4708 $as_echo_n "(cached) " >&6
4709 else
4710 while :; do
4711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4712 /* end confdefs.h. */
4713 #include <sys/types.h> /* for off_t */
4714 #include <stdio.h>
4715 int
4716 main ()
4717 {
4718 int (*fp) (FILE *, off_t, int) = fseeko;
4719 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4720 ;
4721 return 0;
4722 }
4723 _ACEOF
4724 if ac_fn_c_try_link "$LINENO"; then :
4725 ac_cv_sys_largefile_source=no; break
4726 fi
4727 rm -f core conftest.err conftest.$ac_objext \
4728 conftest$ac_exeext conftest.$ac_ext
4729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4730 /* end confdefs.h. */
4731 #define _LARGEFILE_SOURCE 1
4732 #include <sys/types.h> /* for off_t */
4733 #include <stdio.h>
4734 int
4735 main ()
4736 {
4737 int (*fp) (FILE *, off_t, int) = fseeko;
4738 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4739 ;
4740 return 0;
4741 }
4742 _ACEOF
4743 if ac_fn_c_try_link "$LINENO"; then :
4744 ac_cv_sys_largefile_source=1; break
4745 fi
4746 rm -f core conftest.err conftest.$ac_objext \
4747 conftest$ac_exeext conftest.$ac_ext
4748 ac_cv_sys_largefile_source=unknown
4749 break
4750 done
4751 fi
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4753 $as_echo "$ac_cv_sys_largefile_source" >&6; }
4754 case $ac_cv_sys_largefile_source in #(
4755 no | unknown) ;;
4756 *)
4757 cat >>confdefs.h <<_ACEOF
4758 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4759 _ACEOF
4760 ;;
4761 esac
4762 rm -rf conftest*
4763
4764 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4765 # in glibc 2.1.3, but that breaks too many other things.
4766 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4767 if test $ac_cv_sys_largefile_source != unknown; then
4768
4769 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
4770
4771 fi
4772
4773
4774 ac_ext=c
4775 ac_cpp='$CPP $CPPFLAGS'
4776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4780 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4781 # On Suns, sometimes $CPP names a directory.
4782 if test -n "$CPP" && test -d "$CPP"; then
4783 CPP=
4784 fi
4785 if test -z "$CPP"; then
4786 if ${ac_cv_prog_CPP+:} false; then :
4787 $as_echo_n "(cached) " >&6
4788 else
4789 # Double quotes because CPP needs to be expanded
4790 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4791 do
4792 ac_preproc_ok=false
4793 for ac_c_preproc_warn_flag in '' yes
4794 do
4795 # Use a header file that comes with gcc, so configuring glibc
4796 # with a fresh cross-compiler works.
4797 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4798 # <limits.h> exists even on freestanding compilers.
4799 # On the NeXT, cc -E runs the code through the compiler's parser,
4800 # not just through cpp. "Syntax error" is here to catch this case.
4801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4802 /* end confdefs.h. */
4803 #ifdef __STDC__
4804 # include <limits.h>
4805 #else
4806 # include <assert.h>
4807 #endif
4808 Syntax error
4809 _ACEOF
4810 if ac_fn_c_try_cpp "$LINENO"; then :
4811
4812 else
4813 # Broken: fails on valid input.
4814 continue
4815 fi
4816 rm -f conftest.err conftest.i conftest.$ac_ext
4817
4818 # OK, works on sane cases. Now check whether nonexistent headers
4819 # can be detected and how.
4820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4821 /* end confdefs.h. */
4822 #include <ac_nonexistent.h>
4823 _ACEOF
4824 if ac_fn_c_try_cpp "$LINENO"; then :
4825 # Broken: success on invalid input.
4826 continue
4827 else
4828 # Passes both tests.
4829 ac_preproc_ok=:
4830 break
4831 fi
4832 rm -f conftest.err conftest.i conftest.$ac_ext
4833
4834 done
4835 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4836 rm -f conftest.i conftest.err conftest.$ac_ext
4837 if $ac_preproc_ok; then :
4838 break
4839 fi
4840
4841 done
4842 ac_cv_prog_CPP=$CPP
4843
4844 fi
4845 CPP=$ac_cv_prog_CPP
4846 else
4847 ac_cv_prog_CPP=$CPP
4848 fi
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4850 $as_echo "$CPP" >&6; }
4851 ac_preproc_ok=false
4852 for ac_c_preproc_warn_flag in '' yes
4853 do
4854 # Use a header file that comes with gcc, so configuring glibc
4855 # with a fresh cross-compiler works.
4856 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4857 # <limits.h> exists even on freestanding compilers.
4858 # On the NeXT, cc -E runs the code through the compiler's parser,
4859 # not just through cpp. "Syntax error" is here to catch this case.
4860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h. */
4862 #ifdef __STDC__
4863 # include <limits.h>
4864 #else
4865 # include <assert.h>
4866 #endif
4867 Syntax error
4868 _ACEOF
4869 if ac_fn_c_try_cpp "$LINENO"; then :
4870
4871 else
4872 # Broken: fails on valid input.
4873 continue
4874 fi
4875 rm -f conftest.err conftest.i conftest.$ac_ext
4876
4877 # OK, works on sane cases. Now check whether nonexistent headers
4878 # can be detected and how.
4879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4880 /* end confdefs.h. */
4881 #include <ac_nonexistent.h>
4882 _ACEOF
4883 if ac_fn_c_try_cpp "$LINENO"; then :
4884 # Broken: success on invalid input.
4885 continue
4886 else
4887 # Passes both tests.
4888 ac_preproc_ok=:
4889 break
4890 fi
4891 rm -f conftest.err conftest.i conftest.$ac_ext
4892
4893 done
4894 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4895 rm -f conftest.i conftest.err conftest.$ac_ext
4896 if $ac_preproc_ok; then :
4897
4898 else
4899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4900 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4901 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4902 See \`config.log' for more details" "$LINENO" 5; }
4903 fi
4904
4905 ac_ext=c
4906 ac_cpp='$CPP $CPPFLAGS'
4907 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4908 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4909 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4910
4911
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4913 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4914 if ${ac_cv_path_GREP+:} false; then :
4915 $as_echo_n "(cached) " >&6
4916 else
4917 if test -z "$GREP"; then
4918 ac_path_GREP_found=false
4919 # Loop through the user's path and test for each of PROGNAME-LIST
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4922 do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_prog in grep ggrep; do
4926 for ac_exec_ext in '' $ac_executable_extensions; do
4927 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4928 as_fn_executable_p "$ac_path_GREP" || continue
4929 # Check for GNU ac_path_GREP and select it if it is found.
4930 # Check for GNU $ac_path_GREP
4931 case `"$ac_path_GREP" --version 2>&1` in
4932 *GNU*)
4933 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4934 *)
4935 ac_count=0
4936 $as_echo_n 0123456789 >"conftest.in"
4937 while :
4938 do
4939 cat "conftest.in" "conftest.in" >"conftest.tmp"
4940 mv "conftest.tmp" "conftest.in"
4941 cp "conftest.in" "conftest.nl"
4942 $as_echo 'GREP' >> "conftest.nl"
4943 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4944 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4945 as_fn_arith $ac_count + 1 && ac_count=$as_val
4946 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4947 # Best one so far, save it but keep looking for a better one
4948 ac_cv_path_GREP="$ac_path_GREP"
4949 ac_path_GREP_max=$ac_count
4950 fi
4951 # 10*(2^10) chars as input seems more than enough
4952 test $ac_count -gt 10 && break
4953 done
4954 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4955 esac
4956
4957 $ac_path_GREP_found && break 3
4958 done
4959 done
4960 done
4961 IFS=$as_save_IFS
4962 if test -z "$ac_cv_path_GREP"; then
4963 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4964 fi
4965 else
4966 ac_cv_path_GREP=$GREP
4967 fi
4968
4969 fi
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4971 $as_echo "$ac_cv_path_GREP" >&6; }
4972 GREP="$ac_cv_path_GREP"
4973
4974
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4976 $as_echo_n "checking for egrep... " >&6; }
4977 if ${ac_cv_path_EGREP+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979 else
4980 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4981 then ac_cv_path_EGREP="$GREP -E"
4982 else
4983 if test -z "$EGREP"; then
4984 ac_path_EGREP_found=false
4985 # Loop through the user's path and test for each of PROGNAME-LIST
4986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4988 do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
4991 for ac_prog in egrep; do
4992 for ac_exec_ext in '' $ac_executable_extensions; do
4993 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4994 as_fn_executable_p "$ac_path_EGREP" || continue
4995 # Check for GNU ac_path_EGREP and select it if it is found.
4996 # Check for GNU $ac_path_EGREP
4997 case `"$ac_path_EGREP" --version 2>&1` in
4998 *GNU*)
4999 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5000 *)
5001 ac_count=0
5002 $as_echo_n 0123456789 >"conftest.in"
5003 while :
5004 do
5005 cat "conftest.in" "conftest.in" >"conftest.tmp"
5006 mv "conftest.tmp" "conftest.in"
5007 cp "conftest.in" "conftest.nl"
5008 $as_echo 'EGREP' >> "conftest.nl"
5009 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5010 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5011 as_fn_arith $ac_count + 1 && ac_count=$as_val
5012 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5013 # Best one so far, save it but keep looking for a better one
5014 ac_cv_path_EGREP="$ac_path_EGREP"
5015 ac_path_EGREP_max=$ac_count
5016 fi
5017 # 10*(2^10) chars as input seems more than enough
5018 test $ac_count -gt 10 && break
5019 done
5020 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5021 esac
5022
5023 $ac_path_EGREP_found && break 3
5024 done
5025 done
5026 done
5027 IFS=$as_save_IFS
5028 if test -z "$ac_cv_path_EGREP"; then
5029 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5030 fi
5031 else
5032 ac_cv_path_EGREP=$EGREP
5033 fi
5034
5035 fi
5036 fi
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5038 $as_echo "$ac_cv_path_EGREP" >&6; }
5039 EGREP="$ac_cv_path_EGREP"
5040
5041
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5043 $as_echo_n "checking for ANSI C header files... " >&6; }
5044 if ${ac_cv_header_stdc+:} false; then :
5045 $as_echo_n "(cached) " >&6
5046 else
5047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5048 /* end confdefs.h. */
5049 #include <stdlib.h>
5050 #include <stdarg.h>
5051 #include <string.h>
5052 #include <float.h>
5053
5054 int
5055 main ()
5056 {
5057
5058 ;
5059 return 0;
5060 }
5061 _ACEOF
5062 if ac_fn_c_try_compile "$LINENO"; then :
5063 ac_cv_header_stdc=yes
5064 else
5065 ac_cv_header_stdc=no
5066 fi
5067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5068
5069 if test $ac_cv_header_stdc = yes; then
5070 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5072 /* end confdefs.h. */
5073 #include <string.h>
5074
5075 _ACEOF
5076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5077 $EGREP "memchr" >/dev/null 2>&1; then :
5078
5079 else
5080 ac_cv_header_stdc=no
5081 fi
5082 rm -f conftest*
5083
5084 fi
5085
5086 if test $ac_cv_header_stdc = yes; then
5087 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5089 /* end confdefs.h. */
5090 #include <stdlib.h>
5091
5092 _ACEOF
5093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5094 $EGREP "free" >/dev/null 2>&1; then :
5095
5096 else
5097 ac_cv_header_stdc=no
5098 fi
5099 rm -f conftest*
5100
5101 fi
5102
5103 if test $ac_cv_header_stdc = yes; then
5104 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5105 if test "$cross_compiling" = yes; then :
5106 :
5107 else
5108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5109 /* end confdefs.h. */
5110 #include <ctype.h>
5111 #include <stdlib.h>
5112 #if ((' ' & 0x0FF) == 0x020)
5113 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5114 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5115 #else
5116 # define ISLOWER(c) \
5117 (('a' <= (c) && (c) <= 'i') \
5118 || ('j' <= (c) && (c) <= 'r') \
5119 || ('s' <= (c) && (c) <= 'z'))
5120 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5121 #endif
5122
5123 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5124 int
5125 main ()
5126 {
5127 int i;
5128 for (i = 0; i < 256; i++)
5129 if (XOR (islower (i), ISLOWER (i))
5130 || toupper (i) != TOUPPER (i))
5131 return 2;
5132 return 0;
5133 }
5134 _ACEOF
5135 if ac_fn_c_try_run "$LINENO"; then :
5136
5137 else
5138 ac_cv_header_stdc=no
5139 fi
5140 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5141 conftest.$ac_objext conftest.beam conftest.$ac_ext
5142 fi
5143
5144 fi
5145 fi
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5147 $as_echo "$ac_cv_header_stdc" >&6; }
5148 if test $ac_cv_header_stdc = yes; then
5149
5150 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5151
5152 fi
5153
5154 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5155 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5156 inttypes.h stdint.h unistd.h
5157 do :
5158 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5159 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5160 "
5161 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5162 cat >>confdefs.h <<_ACEOF
5163 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5164 _ACEOF
5165
5166 fi
5167
5168 done
5169
5170
5171 for ac_header in sys/ioccom.h sys/sockio.h
5172 do :
5173 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5174 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5175 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5176 cat >>confdefs.h <<_ACEOF
5177 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5178 _ACEOF
5179
5180 fi
5181
5182 done
5183
5184 for ac_header in netpacket/packet.h
5185 do :
5186 ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5187 if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
5188 cat >>confdefs.h <<_ACEOF
5189 #define HAVE_NETPACKET_PACKET_H 1
5190 _ACEOF
5191
5192 fi
5193
5194 done
5195
5196 for ac_header in net/pfvar.h
5197 do :
5198 ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
5199 #include <sys/socket.h>
5200 #include <net/if.h>
5201 "
5202 if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
5203 cat >>confdefs.h <<_ACEOF
5204 #define HAVE_NET_PFVAR_H 1
5205 _ACEOF
5206
5207 fi
5208
5209 done
5210
5211 if test "$ac_cv_header_net_pfvar_h" = yes; then
5212 #
5213 # Check for various PF actions.
5214 #
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
5216 $as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
5217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5218 /* end confdefs.h. */
5219 #include <sys/types.h>
5220 #include <sys/socket.h>
5221 #include <net/if.h>
5222 #include <net/pfvar.h>
5223 int
5224 main ()
5225 {
5226 return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
5227 ;
5228 return 0;
5229 }
5230 _ACEOF
5231 if ac_fn_c_try_compile "$LINENO"; then :
5232
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5234 $as_echo "yes" >&6; }
5235
5236 $as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
5237
5238
5239 else
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241 $as_echo "no" >&6; }
5242 fi
5243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5244 fi
5245
5246 case "$host_os" in
5247 haiku*)
5248 #
5249 # Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
5250 #
5251 CFLAGS="$CFLAGS -D_BSD_SOURCE"
5252 ;;
5253 esac
5254
5255 if test "$GCC" = yes ; then
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
5257 $as_echo_n "checking for ANSI ioctl definitions... " >&6; }
5258 if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
5259 $as_echo_n "(cached) " >&6
5260 else
5261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262 /* end confdefs.h. */
5263 /*
5264 * This generates a "duplicate case value" when fixincludes
5265 * has not be run.
5266 */
5267 # include <sys/types.h>
5268 # include <sys/time.h>
5269 # include <sys/ioctl.h>
5270 # ifdef HAVE_SYS_IOCCOM_H
5271 # include <sys/ioccom.h>
5272 # endif
5273 int
5274 main ()
5275 {
5276 switch (0) {
5277 case _IO('A', 1):;
5278 case _IO('B', 1):;
5279 }
5280 ;
5281 return 0;
5282 }
5283 _ACEOF
5284 if ac_fn_c_try_compile "$LINENO"; then :
5285 ac_cv_lbl_gcc_fixincludes=yes
5286 else
5287 ac_cv_lbl_gcc_fixincludes=no
5288 fi
5289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5290 fi
5291
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
5293 $as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
5294 if test $ac_cv_lbl_gcc_fixincludes = no ; then
5295 # Don't cache failure
5296 unset ac_cv_lbl_gcc_fixincludes
5297 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
5298 fi
5299 fi
5300
5301 for ac_func in strerror
5302 do :
5303 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
5304 if test "x$ac_cv_func_strerror" = xyes; then :
5305 cat >>confdefs.h <<_ACEOF
5306 #define HAVE_STRERROR 1
5307 _ACEOF
5308
5309 fi
5310 done
5311
5312 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
5313 if test "x$ac_cv_func_strerror_r" = xyes; then :
5314
5315 #
5316 # We have strerror_r; if we define _GNU_SOURCE, is it a
5317 # POSIX-compliant strerror_r() or a GNU strerror_r()?
5318 #
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
5320 $as_echo_n "checking whether strerror_r is GNU-style... " >&6; }
5321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5322 /* end confdefs.h. */
5323
5324 #define _GNU_SOURCE
5325 #include <string.h>
5326
5327 /* Define it GNU-style; that will cause an error if it's not GNU-style */
5328 extern char *strerror_r(int, char *, size_t);
5329
5330 int
5331 main(void)
5332 {
5333 return 0;
5334 }
5335
5336
5337 _ACEOF
5338 if ac_fn_c_try_compile "$LINENO"; then :
5339
5340 # GNU-style
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5342 $as_echo "yes" >&6; }
5343
5344 $as_echo "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
5345
5346
5347 else
5348
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350 $as_echo "no" >&6; }
5351
5352 $as_echo "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
5353
5354
5355 fi
5356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5357
5358 else
5359
5360 #
5361 # We don't have strerror_r; do we have _wcserror_s?
5362 #
5363 for ac_func in _wcserror_s
5364 do :
5365 ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
5366 if test "x$ac_cv_func__wcserror_s" = xyes; then :
5367 cat >>confdefs.h <<_ACEOF
5368 #define HAVE__WCSERROR_S 1
5369 _ACEOF
5370
5371 fi
5372 done
5373
5374
5375 fi
5376
5377
5378 #
5379 # Thanks, IBM, for not providing vsyslog() in AIX!
5380 #
5381 for ac_func in vsyslog
5382 do :
5383 ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5384 if test "x$ac_cv_func_vsyslog" = xyes; then :
5385 cat >>confdefs.h <<_ACEOF
5386 #define HAVE_VSYSLOG 1
5387 _ACEOF
5388
5389 fi
5390 done
5391
5392
5393 #
5394 # Make sure we have vsnprintf() and snprintf(); we require them.
5395 #
5396 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5397 if test "x$ac_cv_func_vsnprintf" = xyes; then :
5398
5399 else
5400 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5401 fi
5402
5403 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5404 if test "x$ac_cv_func_snprintf" = xyes; then :
5405
5406 else
5407 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5408 fi
5409
5410
5411 needasprintf=no
5412 for ac_func in vasprintf asprintf
5413 do :
5414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5415 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5416 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5417 cat >>confdefs.h <<_ACEOF
5418 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5419 _ACEOF
5420
5421 else
5422 needasprintf=yes
5423 fi
5424 done
5425
5426 if test $needasprintf = yes; then
5427 case " $LIBOBJS " in
5428 *" asprintf.$ac_objext "* ) ;;
5429 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5430 ;;
5431 esac
5432
5433 fi
5434
5435 needstrlcat=no
5436 for ac_func in strlcat
5437 do :
5438 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5439 if test "x$ac_cv_func_strlcat" = xyes; then :
5440 cat >>confdefs.h <<_ACEOF
5441 #define HAVE_STRLCAT 1
5442 _ACEOF
5443
5444 else
5445 needstrlcat=yes
5446 fi
5447 done
5448
5449 if test $needstrlcat = yes; then
5450 case " $LIBOBJS " in
5451 *" strlcat.$ac_objext "* ) ;;
5452 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5453 ;;
5454 esac
5455
5456 fi
5457
5458 needstrlcpy=no
5459 for ac_func in strlcpy
5460 do :
5461 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5462 if test "x$ac_cv_func_strlcpy" = xyes; then :
5463 cat >>confdefs.h <<_ACEOF
5464 #define HAVE_STRLCPY 1
5465 _ACEOF
5466
5467 else
5468 needstrlcpy=yes
5469 fi
5470 done
5471
5472 if test $needstrlcpy = yes; then
5473 case " $LIBOBJS " in
5474 *" strlcpy.$ac_objext "* ) ;;
5475 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5476 ;;
5477 esac
5478
5479 fi
5480
5481 needstrtok_r=no
5482 for ac_func in strtok_r
5483 do :
5484 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5485 if test "x$ac_cv_func_strtok_r" = xyes; then :
5486 cat >>confdefs.h <<_ACEOF
5487 #define HAVE_STRTOK_R 1
5488 _ACEOF
5489
5490 else
5491 needstrtok_r=yes
5492 fi
5493 done
5494
5495 if test $needstrtok_r = yes; then
5496 case " $LIBOBJS " in
5497 *" strtok_r.$ac_objext "* ) ;;
5498 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5499 ;;
5500 esac
5501
5502 fi
5503
5504 #
5505 # Do we have ffs(), and is it declared in <strings.h>?
5506 #
5507 for ac_func in ffs
5508 do :
5509 ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5510 if test "x$ac_cv_func_ffs" = xyes; then :
5511 cat >>confdefs.h <<_ACEOF
5512 #define HAVE_FFS 1
5513 _ACEOF
5514
5515 fi
5516 done
5517
5518 if test "$ac_cv_func_ffs" = yes; then
5519 #
5520 # We have ffs(); is it declared in <strings.h>?
5521 #
5522 # This test fails if we don't have <strings.h> or if we do
5523 # but it doesn't declare ffs().
5524 #
5525 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5526 #include <strings.h>
5527
5528 "
5529 if test "x$ac_cv_have_decl_ffs" = xyes; then :
5530
5531
5532 $as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5533
5534
5535 fi
5536
5537 fi
5538
5539 #
5540 # Do this before checking for ether_hostton(), as it's a
5541 # "getaddrinfo()-ish function".
5542 #
5543
5544 #
5545 # Most operating systems have getaddrinfo() in the default searched
5546 # libraries (i.e. libc). Check there first.
5547 #
5548 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5549 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5550
5551 else
5552
5553 #
5554 # Not found in the standard system libraries.
5555 # Try libsocket, which requires libnsl.
5556 #
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5558 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
5559 if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
5560 $as_echo_n "(cached) " >&6
5561 else
5562 ac_check_lib_save_LIBS=$LIBS
5563 LIBS="-lsocket -lnsl $LIBS"
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565 /* end confdefs.h. */
5566
5567 /* Override any GCC internal prototype to avoid an error.
5568 Use char because int might match the return type of a GCC
5569 builtin and then its argument prototype would still apply. */
5570 #ifdef __cplusplus
5571 extern "C"
5572 #endif
5573 char getaddrinfo ();
5574 int
5575 main ()
5576 {
5577 return getaddrinfo ();
5578 ;
5579 return 0;
5580 }
5581 _ACEOF
5582 if ac_fn_c_try_link "$LINENO"; then :
5583 ac_cv_lib_socket_getaddrinfo=yes
5584 else
5585 ac_cv_lib_socket_getaddrinfo=no
5586 fi
5587 rm -f core conftest.err conftest.$ac_objext \
5588 conftest$ac_exeext conftest.$ac_ext
5589 LIBS=$ac_check_lib_save_LIBS
5590 fi
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5592 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
5593 if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
5594
5595 #
5596 # OK, we found it in libsocket.
5597 #
5598 LIBS="-lsocket -lnsl $LIBS"
5599
5600 else
5601
5602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
5603 $as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
5604 if ${ac_cv_lib_network_getaddrinfo+:} false; then :
5605 $as_echo_n "(cached) " >&6
5606 else
5607 ac_check_lib_save_LIBS=$LIBS
5608 LIBS="-lnetwork $LIBS"
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610 /* end confdefs.h. */
5611
5612 /* Override any GCC internal prototype to avoid an error.
5613 Use char because int might match the return type of a GCC
5614 builtin and then its argument prototype would still apply. */
5615 #ifdef __cplusplus
5616 extern "C"
5617 #endif
5618 char getaddrinfo ();
5619 int
5620 main ()
5621 {
5622 return getaddrinfo ();
5623 ;
5624 return 0;
5625 }
5626 _ACEOF
5627 if ac_fn_c_try_link "$LINENO"; then :
5628 ac_cv_lib_network_getaddrinfo=yes
5629 else
5630 ac_cv_lib_network_getaddrinfo=no
5631 fi
5632 rm -f core conftest.err conftest.$ac_objext \
5633 conftest$ac_exeext conftest.$ac_ext
5634 LIBS=$ac_check_lib_save_LIBS
5635 fi
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
5637 $as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
5638 if test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
5639
5640 #
5641 # OK, we found it in libnetwork on Haiku.
5642 #
5643 LIBS="-lnetwork $LIBS"
5644
5645 else
5646
5647 #
5648 # We didn't find it.
5649 #
5650 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5651
5652 fi
5653
5654
5655 fi
5656
5657
5658 #
5659 # OK, do we have recvmsg() in libxnet?
5660 # We also link with libsocket and libnsl.
5661 #
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5663 $as_echo_n "checking for recvmsg in -lxnet... " >&6; }
5664 if ${ac_cv_lib_xnet_recvmsg+:} false; then :
5665 $as_echo_n "(cached) " >&6
5666 else
5667 ac_check_lib_save_LIBS=$LIBS
5668 LIBS="-lxnet -lsocket -lnsl $LIBS"
5669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5670 /* end confdefs.h. */
5671
5672 /* Override any GCC internal prototype to avoid an error.
5673 Use char because int might match the return type of a GCC
5674 builtin and then its argument prototype would still apply. */
5675 #ifdef __cplusplus
5676 extern "C"
5677 #endif
5678 char recvmsg ();
5679 int
5680 main ()
5681 {
5682 return recvmsg ();
5683 ;
5684 return 0;
5685 }
5686 _ACEOF
5687 if ac_fn_c_try_link "$LINENO"; then :
5688 ac_cv_lib_xnet_recvmsg=yes
5689 else
5690 ac_cv_lib_xnet_recvmsg=no
5691 fi
5692 rm -f core conftest.err conftest.$ac_objext \
5693 conftest$ac_exeext conftest.$ac_ext
5694 LIBS=$ac_check_lib_save_LIBS
5695 fi
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
5697 $as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
5698 if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
5699
5700 #
5701 # Yes - link with it as well.
5702 #
5703 LIBS="-lxnet $LIBS"
5704
5705 fi
5706
5707
5708 fi
5709
5710 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5712 $as_echo_n "checking for library containing putmsg... " >&6; }
5713 if ${ac_cv_search_putmsg+:} false; then :
5714 $as_echo_n "(cached) " >&6
5715 else
5716 ac_func_search_save_LIBS=$LIBS
5717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5718 /* end confdefs.h. */
5719
5720 /* Override any GCC internal prototype to avoid an error.
5721 Use char because int might match the return type of a GCC
5722 builtin and then its argument prototype would still apply. */
5723 #ifdef __cplusplus
5724 extern "C"
5725 #endif
5726 char putmsg ();
5727 int
5728 main ()
5729 {
5730 return putmsg ();
5731 ;
5732 return 0;
5733 }
5734 _ACEOF
5735 for ac_lib in '' str; do
5736 if test -z "$ac_lib"; then
5737 ac_res="none required"
5738 else
5739 ac_res=-l$ac_lib
5740 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5741 fi
5742 if ac_fn_c_try_link "$LINENO"; then :
5743 ac_cv_search_putmsg=$ac_res
5744 fi
5745 rm -f core conftest.err conftest.$ac_objext \
5746 conftest$ac_exeext
5747 if ${ac_cv_search_putmsg+:} false; then :
5748 break
5749 fi
5750 done
5751 if ${ac_cv_search_putmsg+:} false; then :
5752
5753 else
5754 ac_cv_search_putmsg=no
5755 fi
5756 rm conftest.$ac_ext
5757 LIBS=$ac_func_search_save_LIBS
5758 fi
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5760 $as_echo "$ac_cv_search_putmsg" >&6; }
5761 ac_res=$ac_cv_search_putmsg
5762 if test "$ac_res" != no; then :
5763 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5764
5765 fi
5766
5767
5768
5769 #
5770 # Check for reentrant versions of getnetbyname_r(), as provided by
5771 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5772 # If we don't find one, we just use getnetbyname(), which uses
5773 # thread-specific data on many platforms, but doesn't use it on
5774 # NetBSD or OpenBSD, and may not use it on older versions of other
5775 # platforms.
5776 #
5777 # Only do the check if we have a declaration of getnetbyname_r();
5778 # without it, we can't check which API it has. (We assume that
5779 # if there's a declaration, it has a prototype, so that the API
5780 # can be checked.)
5781 #
5782 ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
5783 "
5784 if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
5785
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
5787 $as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789 /* end confdefs.h. */
5790 #include <netdb.h>
5791 int
5792 main ()
5793 {
5794
5795 struct netent netent_buf;
5796 char buf[1024];
5797 struct netent *resultp;
5798 int h_errnoval;
5799
5800 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
5801
5802 ;
5803 return 0;
5804 }
5805 _ACEOF
5806 if ac_fn_c_try_link "$LINENO"; then :
5807
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5809 $as_echo "yes" >&6; }
5810
5811 $as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
5812
5813
5814 else
5815
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817 $as_echo "no" >&6; }
5818
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
5820 $as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
5821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822 /* end confdefs.h. */
5823 #include <netdb.h>
5824 int
5825 main ()
5826 {
5827
5828 struct netent netent_buf;
5829 char buf[1024];
5830
5831 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
5832
5833 ;
5834 return 0;
5835 }
5836 _ACEOF
5837 if ac_fn_c_try_link "$LINENO"; then :
5838
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5840 $as_echo "yes" >&6; }
5841
5842 $as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
5843
5844
5845 else
5846
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5848 $as_echo "no" >&6; }
5849
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
5851 $as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
5852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5853 /* end confdefs.h. */
5854 #include <netdb.h>
5855 int
5856 main ()
5857 {
5858
5859 struct netent netent_buf;
5860 struct netent_data net_data;
5861
5862 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
5863
5864 ;
5865 return 0;
5866 }
5867 _ACEOF
5868 if ac_fn_c_try_link "$LINENO"; then :
5869
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5871 $as_echo "yes" >&6; }
5872
5873 $as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
5874
5875
5876 else
5877
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879 $as_echo "no" >&6; }
5880
5881 fi
5882 rm -f core conftest.err conftest.$ac_objext \
5883 conftest$ac_exeext conftest.$ac_ext
5884
5885 fi
5886 rm -f core conftest.err conftest.$ac_objext \
5887 conftest$ac_exeext conftest.$ac_ext
5888
5889 fi
5890 rm -f core conftest.err conftest.$ac_objext \
5891 conftest$ac_exeext conftest.$ac_ext
5892
5893 fi
5894
5895
5896 #
5897 # Check for reentrant versions of getprotobyname_r(), as provided by
5898 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5899 # If we don't find one, we just use getprotobyname(), which uses
5900 # thread-specific data on many platforms, but doesn't use it on
5901 # NetBSD or OpenBSD, and may not use it on older versions of other
5902 # platforms.
5903 #
5904 # Only do the check if we have a declaration of getprotobyname_r();
5905 # without it, we can't check which API it has. (We assume that
5906 # if there's a declaration, it has a prototype, so that the API
5907 # can be checked.)
5908 #
5909 ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
5910 "
5911 if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
5912
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
5914 $as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
5915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5916 /* end confdefs.h. */
5917 #include <netdb.h>
5918 int
5919 main ()
5920 {
5921
5922 struct protoent protoent_buf;
5923 char buf[1024];
5924 struct protoent *resultp;
5925
5926 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
5927
5928 ;
5929 return 0;
5930 }
5931 _ACEOF
5932 if ac_fn_c_try_link "$LINENO"; then :
5933
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5935 $as_echo "yes" >&6; }
5936
5937 $as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
5938
5939
5940 else
5941
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5943 $as_echo "no" >&6; }
5944
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
5946 $as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
5947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5948 /* end confdefs.h. */
5949 #include <netdb.h>
5950 int
5951 main ()
5952 {
5953
5954 struct protoent protoent_buf;
5955 char buf[1024];
5956
5957 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
5958
5959 ;
5960 return 0;
5961 }
5962 _ACEOF
5963 if ac_fn_c_try_link "$LINENO"; then :
5964
5965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5966 $as_echo "yes" >&6; }
5967
5968 $as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
5969
5970
5971 else
5972
5973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974 $as_echo "no" >&6; }
5975
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
5977 $as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
5978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5979 /* end confdefs.h. */
5980 #include <netdb.h>
5981 int
5982 main ()
5983 {
5984
5985 struct protoent protoent_buf;
5986 struct protoent_data proto_data;
5987
5988 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
5989
5990 ;
5991 return 0;
5992 }
5993 _ACEOF
5994 if ac_fn_c_try_link "$LINENO"; then :
5995
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5997 $as_echo "yes" >&6; }
5998
5999 $as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6000
6001
6002 else
6003
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005 $as_echo "no" >&6; }
6006
6007 fi
6008 rm -f core conftest.err conftest.$ac_objext \
6009 conftest$ac_exeext conftest.$ac_ext
6010
6011 fi
6012 rm -f core conftest.err conftest.$ac_objext \
6013 conftest$ac_exeext conftest.$ac_ext
6014
6015 fi
6016 rm -f core conftest.err conftest.$ac_objext \
6017 conftest$ac_exeext conftest.$ac_ext
6018
6019 fi
6020
6021
6022 #
6023 # You are in a twisty little maze of UN*Xes, all different.
6024 # Some might not have ether_hostton().
6025 # Some might have it and declare it in <net/ethernet.h>.
6026 # Some might have it and declare it in <netinet/ether.h>
6027 # Some might have it and declare it in <sys/ethernet.h>.
6028 # Some might have it and declare it in <arpa/inet.h>.
6029 # Some might have it and declare it in <netinet/if_ether.h>.
6030 # Some might have it and not declare it in any header file.
6031 #
6032 # Before you is a C compiler.
6033 #
6034 for ac_func in ether_hostton
6035 do :
6036 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6037 if test "x$ac_cv_func_ether_hostton" = xyes; then :
6038 cat >>confdefs.h <<_ACEOF
6039 #define HAVE_ETHER_HOSTTON 1
6040 _ACEOF
6041
6042 fi
6043 done
6044
6045 if test "$ac_cv_func_ether_hostton" = yes; then
6046 #
6047 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
6048 #
6049 # This test fails if we don't have <net/ethernet.h> or if we do
6050 # but it doesn't declare ether_hostton().
6051 #
6052 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6053 #include <net/ethernet.h>
6054
6055 "
6056 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6057
6058
6059 $as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6060
6061
6062 fi
6063
6064 #
6065 # Did that succeed?
6066 #
6067 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6068 #
6069 # No, how about <netinet/ether.h>, as on Linux?
6070 #
6071 # This test fails if we don't have <netinet/ether.h>
6072 # or if we do but it doesn't declare ether_hostton().
6073 #
6074 # Unset ac_cv_have_decl_ether_hostton so we don't
6075 # treat the previous failure as a cached value and
6076 # suppress the next test.
6077 #
6078 unset ac_cv_have_decl_ether_hostton
6079 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6080 #include <netinet/ether.h>
6081
6082 "
6083 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6084
6085
6086 $as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6087
6088
6089 fi
6090
6091 fi
6092 #
6093 # Did that succeed?
6094 #
6095 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6096 #
6097 # No, how about <sys/ethernet.h>, as on Solaris 10
6098 # and later?
6099 #
6100 # This test fails if we don't have <sys/ethernet.h>
6101 # or if we do but it doesn't declare ether_hostton().
6102 #
6103 # Unset ac_cv_have_decl_ether_hostton so we don't
6104 # treat the previous failure as a cached value and
6105 # suppress the next test.
6106 #
6107 unset ac_cv_have_decl_ether_hostton
6108 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6109 #include <sys/ethernet.h>
6110
6111 "
6112 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6113
6114
6115 $as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6116
6117
6118 fi
6119
6120 fi
6121 #
6122 # Did that succeed?
6123 #
6124 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6125 #
6126 # No, how about <arpa/inet.h>, as in AIX?
6127 #
6128 # This test fails if we don't have <arpa/inet.h>
6129 # (if we have ether_hostton(), we should have
6130 # networking, and if we have networking, we should
6131 # have <arapa/inet.h>) or if we do but it doesn't
6132 # declare ether_hostton().
6133 #
6134 # Unset ac_cv_have_decl_ether_hostton so we don't
6135 # treat the previous failure as a cached value and
6136 # suppress the next test.
6137 #
6138 unset ac_cv_have_decl_ether_hostton
6139 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6140 #include <arpa/inet.h>
6141
6142 "
6143 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6144
6145
6146 $as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6147
6148
6149 fi
6150
6151 fi
6152 #
6153 # Did that succeed?
6154 #
6155 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6156 #
6157 # No, how about <netinet/if_ether.h>?
6158 # On some platforms, it requires <net/if.h> and
6159 # <netinet/in.h>, and we always include it with
6160 # both of them, so test it with both of them.
6161 #
6162 # This test fails if we don't have <netinet/if_ether.h>
6163 # and the headers we include before it, or if we do but
6164 # <netinet/if_ether.h> doesn't declare ether_hostton().
6165 #
6166 # Unset ac_cv_have_decl_ether_hostton so we don't
6167 # treat the previous failure as a cached value and
6168 # suppress the next test.
6169 #
6170 unset ac_cv_have_decl_ether_hostton
6171 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6172 #include <sys/types.h>
6173 #include <sys/socket.h>
6174 #include <net/if.h>
6175 #include <netinet/in.h>
6176 #include <netinet/if_ether.h>
6177
6178 "
6179 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6180
6181
6182 $as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6183
6184
6185 fi
6186
6187 fi
6188 #
6189 # After all that, is ether_hostton() declared?
6190 #
6191 if test "$ac_cv_have_decl_ether_hostton" = yes; then
6192 #
6193 # Yes.
6194 #
6195
6196 $as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6197
6198 else
6199 #
6200 # No, we'll have to declare it ourselves.
6201 # Do we have "struct ether_addr" if we include
6202 # <netinet/if_ether.h>?
6203 #
6204 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6205 #include <sys/types.h>
6206 #include <sys/socket.h>
6207 #include <net/if.h>
6208 #include <netinet/in.h>
6209 #include <netinet/if_ether.h>
6210
6211 "
6212 if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6213
6214 cat >>confdefs.h <<_ACEOF
6215 #define HAVE_STRUCT_ETHER_ADDR 1
6216 _ACEOF
6217
6218
6219 fi
6220
6221 fi
6222 fi
6223
6224 #
6225 # For various things that might use pthreads.
6226 #
6227 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6228 if test "x$ac_cv_header_pthread_h" = xyes; then :
6229
6230 #
6231 # OK, we have pthread.h. Do we have pthread_create in the
6232 # system libraries?
6233 #
6234 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
6235 if test "x$ac_cv_func_pthread_create" = xyes; then :
6236
6237 #
6238 # Yes.
6239 #
6240 ac_lbl_have_pthreads="found"
6241
6242 else
6243
6244 #
6245 # No - do we have it in -lpthreads?
6246 #
6247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
6248 $as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
6249 if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
6250 $as_echo_n "(cached) " >&6
6251 else
6252 ac_check_lib_save_LIBS=$LIBS
6253 LIBS="-lpthreads $LIBS"
6254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6255 /* end confdefs.h. */
6256
6257 /* Override any GCC internal prototype to avoid an error.
6258 Use char because int might match the return type of a GCC
6259 builtin and then its argument prototype would still apply. */
6260 #ifdef __cplusplus
6261 extern "C"
6262 #endif
6263 char pthread_create ();
6264 int
6265 main ()
6266 {
6267 return pthread_create ();
6268 ;
6269 return 0;
6270 }
6271 _ACEOF
6272 if ac_fn_c_try_link "$LINENO"; then :
6273 ac_cv_lib_pthreads_pthread_create=yes
6274 else
6275 ac_cv_lib_pthreads_pthread_create=no
6276 fi
6277 rm -f core conftest.err conftest.$ac_objext \
6278 conftest$ac_exeext conftest.$ac_ext
6279 LIBS=$ac_check_lib_save_LIBS
6280 fi
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
6282 $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
6283 if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
6284
6285 #
6286 # Yes - add -lpthreads.
6287 #
6288 ac_lbl_have_pthreads="found"
6289 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
6290
6291 else
6292
6293 #
6294 # No - do we have it in -lpthread?
6295 #
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6297 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6298 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6299 $as_echo_n "(cached) " >&6
6300 else
6301 ac_check_lib_save_LIBS=$LIBS
6302 LIBS="-lpthread $LIBS"
6303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6304 /* end confdefs.h. */
6305
6306 /* Override any GCC internal prototype to avoid an error.
6307 Use char because int might match the return type of a GCC
6308 builtin and then its argument prototype would still apply. */
6309 #ifdef __cplusplus
6310 extern "C"
6311 #endif
6312 char pthread_create ();
6313 int
6314 main ()
6315 {
6316 return pthread_create ();
6317 ;
6318 return 0;
6319 }
6320 _ACEOF
6321 if ac_fn_c_try_link "$LINENO"; then :
6322 ac_cv_lib_pthread_pthread_create=yes
6323 else
6324 ac_cv_lib_pthread_pthread_create=no
6325 fi
6326 rm -f core conftest.err conftest.$ac_objext \
6327 conftest$ac_exeext conftest.$ac_ext
6328 LIBS=$ac_check_lib_save_LIBS
6329 fi
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6331 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6332 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6333
6334 #
6335 # Yes - add -lpthread.
6336 #
6337 ac_lbl_have_pthreads="found"
6338 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
6339
6340 else
6341
6342 #
6343 # No.
6344 #
6345 ac_lbl_have_pthreads="not found"
6346
6347 fi
6348
6349
6350 fi
6351
6352
6353 fi
6354
6355
6356 else
6357
6358 #
6359 # We didn't find pthread.h.
6360 #
6361 ac_lbl_have_pthreads="not found"
6362
6363
6364 fi
6365
6366
6367
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
6369 $as_echo_n "checking if --disable-protochain option is specified... " >&6; }
6370 # Check whether --enable-protochain was given.
6371 if test "${enable_protochain+set}" = set; then :
6372 enableval=$enable_protochain;
6373 fi
6374
6375 case "x$enable_protochain" in
6376 xyes) enable_protochain=enabled ;;
6377 xno) enable_protochain=disabled ;;
6378 x) enable_protochain=enabled ;;
6379 esac
6380
6381 if test "$enable_protochain" = "disabled"; then
6382
6383 $as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
6384
6385 fi
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
6387 $as_echo "${enable_protochain}" >&6; }
6388
6389 #
6390 # valgrindtest directly uses the native capture mechanism, but
6391 # only tests with BPF and PF_PACKET sockets; only enable it if
6392 # we have BPF or PF_PACKET sockets.
6393 #
6394 VALGRINDTEST_SRC=
6395
6396
6397 # Check whether --with-pcap was given.
6398 if test "${with_pcap+set}" = set; then :
6399 withval=$with_pcap;
6400 fi
6401
6402 if test ! -z "$with_pcap" ; then
6403 V_PCAP="$withval"
6404 else
6405 #
6406 # Check for a bunch of headers for various packet
6407 # capture mechanisms.
6408 #
6409 for ac_header in net/bpf.h
6410 do :
6411 ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
6412 if test "x$ac_cv_header_net_bpf_h" = xyes; then :
6413 cat >>confdefs.h <<_ACEOF
6414 #define HAVE_NET_BPF_H 1
6415 _ACEOF
6416
6417 fi
6418
6419 done
6420
6421 if test "$ac_cv_header_net_bpf_h" = yes; then
6422 #
6423 # Does it define BIOCSETIF?
6424 # I.e., is it a header for an LBL/BSD-style capture
6425 # mechanism, or is it just a header for a BPF filter
6426 # engine? Some versions of Arch Linux, for example,
6427 # have a net/bpf.h that doesn't define BIOCSETIF;
6428 # as it's a Linux, it should use packet sockets,
6429 # instead.
6430 #
6431 # We need:
6432 #
6433 # sys/types.h, because FreeBSD 10's net/bpf.h
6434 # requires that various BSD-style integer types
6435 # be defined;
6436 #
6437 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
6438 # doesn't include it but does use struct timeval
6439 # in ioctl definitions;
6440 #
6441 # sys/ioctl.h and, if we have it, sys/ioccom.h,
6442 # because net/bpf.h defines ioctls;
6443 #
6444 # net/if.h, because it defines some structures
6445 # used in ioctls defined by net/bpf.h;
6446 #
6447 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
6448 # defines some structure fields as being
6449 # struct sockaddrs;
6450 #
6451 # and net/bpf.h doesn't necessarily include all
6452 # of those headers itself.
6453 #
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
6455 $as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
6456 if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
6457 $as_echo_n "(cached) " >&6
6458 else
6459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6460 /* end confdefs.h. */
6461
6462 #include <sys/types.h>
6463 #include <sys/time.h>
6464 #include <sys/ioctl.h>
6465 #include <sys/socket.h>
6466 #ifdef HAVE_SYS_IOCCOM_H
6467 #include <sys/ioccom.h>
6468 #endif
6469 #include <net/bpf.h>
6470 #include <net/if.h>
6471
6472 int
6473 main ()
6474 {
6475 u_int i = BIOCSETIF;
6476 ;
6477 return 0;
6478 }
6479 _ACEOF
6480 if ac_fn_c_try_compile "$LINENO"; then :
6481 ac_cv_lbl_bpf_h_defines_biocsetif=yes
6482 else
6483 ac_cv_lbl_bpf_h_defines_biocsetif=no
6484 fi
6485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6486 fi
6487
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6489 $as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6490 fi
6491 for ac_header in net/pfilt.h net/enet.h
6492 do :
6493 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6494 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6495 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6496 cat >>confdefs.h <<_ACEOF
6497 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6498 _ACEOF
6499
6500 fi
6501
6502 done
6503
6504 for ac_header in net/nit.h sys/net/nit.h
6505 do :
6506 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6507 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6508 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6509 cat >>confdefs.h <<_ACEOF
6510 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6511 _ACEOF
6512
6513 fi
6514
6515 done
6516
6517 for ac_header in linux/socket.h net/raw.h sys/dlpi.h
6518 do :
6519 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6520 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6521 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6522 cat >>confdefs.h <<_ACEOF
6523 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6524 _ACEOF
6525
6526 fi
6527
6528 done
6529
6530 for ac_header in config/HaikuConfig.h
6531 do :
6532 ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
6533 if test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
6534 cat >>confdefs.h <<_ACEOF
6535 #define HAVE_CONFIG_HAIKUCONFIG_H 1
6536 _ACEOF
6537
6538 fi
6539
6540 done
6541
6542
6543 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6544 #
6545 # BPF.
6546 # Check this before DLPI, so that we pick BPF on
6547 # Solaris 11 and later.
6548 #
6549 V_PCAP=bpf
6550
6551 #
6552 # We have BPF, so build valgrindtest with "make test"
6553 # on macOS and FreeBSD (add your OS once there's a
6554 # valgrind for it).
6555 #
6556 case "$host_os" in
6557
6558 freebsd*|darwin*|linux*)
6559 VALGRINDTEST_SRC=valgrindtest.c
6560 ;;
6561 esac
6562 elif test "$ac_cv_header_linux_socket_h" = yes; then
6563 #
6564 # No prizes for guessing this one.
6565 #
6566 V_PCAP=linux
6567 VALGRINDTEST_SRC=valgrindtest.c
6568 elif test "$ac_cv_header_net_pfilt_h" = yes; then
6569 #
6570 # DEC OSF/1, Digital UNIX, Tru64 UNIX
6571 #
6572 V_PCAP=pf
6573 elif test "$ac_cv_header_net_enet_h" = yes; then
6574 #
6575 # Stanford Enetfilter.
6576 #
6577 V_PCAP=enet
6578 elif test "$ac_cv_header_net_nit_h" = yes; then
6579 #
6580 # SunOS 4.x STREAMS NIT.
6581 #
6582 V_PCAP=snit
6583 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6584 #
6585 # Pre-SunOS 4.x non-STREAMS NIT.
6586 #
6587 V_PCAP=nit
6588 elif test "$ac_cv_header_net_raw_h" = yes; then
6589 #
6590 # IRIX snoop.
6591 #
6592 V_PCAP=snoop
6593 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6594 #
6595 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6596 #
6597 V_PCAP=dlpi
6598 elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
6599 #
6600 # Haiku.
6601 #
6602 V_PCAP=haiku
6603 else
6604 #
6605 # Nothing we support.
6606 #
6607 V_PCAP=null
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6609 $as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6611 $as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6612 fi
6613 fi
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6615 $as_echo_n "checking packet capture type... " >&6; }
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6617 $as_echo "$V_PCAP" >&6; }
6618
6619
6620 #
6621 # Do we have pkg-config?
6622 #
6623 # Extract the first word of "pkg-config", so it can be a program name with args.
6624 set dummy pkg-config; ac_word=$2
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626 $as_echo_n "checking for $ac_word... " >&6; }
6627 if ${ac_cv_prog_PKGCONFIG+:} false; then :
6628 $as_echo_n "(cached) " >&6
6629 else
6630 if test -n "$PKGCONFIG"; then
6631 ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
6632 else
6633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634 for as_dir in $PATH
6635 do
6636 IFS=$as_save_IFS
6637 test -z "$as_dir" && as_dir=.
6638 for ac_exec_ext in '' $ac_executable_extensions; do
6639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6640 ac_cv_prog_PKGCONFIG="pkg-config"
6641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6642 break 2
6643 fi
6644 done
6645 done
6646 IFS=$as_save_IFS
6647
6648 test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
6649 fi
6650 fi
6651 PKGCONFIG=$ac_cv_prog_PKGCONFIG
6652 if test -n "$PKGCONFIG"; then
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
6654 $as_echo "$PKGCONFIG" >&6; }
6655 else
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657 $as_echo "no" >&6; }
6658 fi
6659
6660
6661
6662 #
6663 # Handle each capture type.
6664 #
6665 case "$V_PCAP" in
6666 dlpi)
6667 #
6668 # Checks for some header files.
6669 #
6670 for ac_header in sys/bufmod.h sys/dlpi_ext.h
6671 do :
6672 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6673 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6674 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6675 cat >>confdefs.h <<_ACEOF
6676 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6677 _ACEOF
6678
6679 fi
6680
6681 done
6682
6683
6684 #
6685 # Checks to see if Solaris has the public libdlpi(3LIB) library.
6686 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
6687 # public libdlpi(3LIB) version. Before libdlpi was made public, a
6688 # private version also existed, which did not have the same APIs.
6689 # Due to a gcc bug, the default search path for 32-bit libraries does
6690 # not include /lib, we add it explicitly here.
6691 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
6692 # Also, due to the bug above applications that link to libpcap with
6693 # libdlpi will have to add "-L/lib" option to "configure".
6694 #
6695 save_LDFLAGS="$LDFLAGS"
6696 LDFLAGS="$LIBS -L/lib"
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6698 $as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
6699 if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
6700 $as_echo_n "(cached) " >&6
6701 else
6702 ac_check_lib_save_LIBS=$LIBS
6703 LIBS="-ldlpi $LIBS"
6704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6705 /* end confdefs.h. */
6706
6707 /* Override any GCC internal prototype to avoid an error.
6708 Use char because int might match the return type of a GCC
6709 builtin and then its argument prototype would still apply. */
6710 #ifdef __cplusplus
6711 extern "C"
6712 #endif
6713 char dlpi_walk ();
6714 int
6715 main ()
6716 {
6717 return dlpi_walk ();
6718 ;
6719 return 0;
6720 }
6721 _ACEOF
6722 if ac_fn_c_try_link "$LINENO"; then :
6723 ac_cv_lib_dlpi_dlpi_walk=yes
6724 else
6725 ac_cv_lib_dlpi_dlpi_walk=no
6726 fi
6727 rm -f core conftest.err conftest.$ac_objext \
6728 conftest$ac_exeext conftest.$ac_ext
6729 LIBS=$ac_check_lib_save_LIBS
6730 fi
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6732 $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6733 if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6734
6735 LIBS="-ldlpi $LIBS"
6736 V_PCAP=libdlpi
6737
6738 #
6739 # Capture module plus common code needed for
6740 # common functions used by pcap-[dlpi,libdlpi].c
6741 #
6742 PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
6743
6744 $as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
6745
6746
6747 else
6748
6749 V_PCAP=dlpi
6750
6751 #
6752 # Capture module plus common code needed for
6753 # common functions used by pcap-[dlpi,libdlpi].c
6754 #
6755 PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
6756
6757 fi
6758
6759 LDFLAGS="$save_LDFLAGS"
6760
6761 #
6762 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
6763 # versions of DLPI.
6764 #
6765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
6766 $as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
6767 if ${ac_cv_sys_dlpi_usable+:} false; then :
6768 $as_echo_n "(cached) " >&6
6769 else
6770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6771 /* end confdefs.h. */
6772
6773 #include <sys/types.h>
6774 #include <sys/time.h>
6775 #include <sys/dlpi.h>
6776
6777 int
6778 main ()
6779 {
6780 int i = DL_PROMISC_PHYS;
6781 ;
6782 return 0;
6783 }
6784 _ACEOF
6785 if ac_fn_c_try_compile "$LINENO"; then :
6786 ac_cv_sys_dlpi_usable=yes
6787 else
6788 ac_cv_sys_dlpi_usable=no
6789 fi
6790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6791 fi
6792
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
6794 $as_echo "$ac_cv_sys_dlpi_usable" >&6; }
6795 if test $ac_cv_sys_dlpi_usable = no ; then
6796 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
6797 fi
6798
6799 #
6800 # Check to see if Solaris has the dl_passive_req_t struct defined
6801 # in <sys/dlpi.h>.
6802 # This check is for DLPI support for passive modes.
6803 # See dlpi(7P) for more details.
6804 #
6805 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
6806 #include <sys/types.h>
6807 #include <sys/dlpi.h>
6808
6809 "
6810 if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
6811
6812 cat >>confdefs.h <<_ACEOF
6813 #define HAVE_DL_PASSIVE_REQ_T 1
6814 _ACEOF
6815
6816
6817 fi
6818
6819 ;;
6820
6821 enet)
6822 #
6823 # Capture module
6824 #
6825 PLATFORM_C_SRC="pcap-enet.c"
6826 ;;
6827
6828 haiku)
6829 #
6830 # Capture module
6831 #
6832 PLATFORM_CXX_SRC="pcap-haiku.cpp"
6833
6834 #
6835 # Just for the sake of it.
6836 #
6837 for ac_header in net/if.h net/if_dl.h net/if_types.h
6838 do :
6839 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6840 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6841 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6842 cat >>confdefs.h <<_ACEOF
6843 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6844 _ACEOF
6845
6846 fi
6847
6848 done
6849
6850 ;;
6851
6852 linux)
6853 #
6854 # Capture module
6855 #
6856 PLATFORM_C_SRC="pcap-linux.c"
6857
6858 #
6859 # Do we have the wireless extensions?
6860 #
6861 for ac_header in linux/wireless.h
6862 do :
6863 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
6864 #include <sys/socket.h>
6865 #include <linux/if.h>
6866 #include <linux/types.h>
6867
6868 "
6869 if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
6870 cat >>confdefs.h <<_ACEOF
6871 #define HAVE_LINUX_WIRELESS_H 1
6872 _ACEOF
6873
6874 fi
6875
6876 done
6877
6878
6879 #
6880 # Do we have libnl?
6881 # We only want version 3. Version 2 was, apparently,
6882 # short-lived, and version 1 is source and binary
6883 # incompatible with version 3, and it appears that,
6884 # these days, everybody's using version 3. We're
6885 # not supporting older versions of the Linux kernel;
6886 # let's drop support for older versions of libnl, too.
6887 #
6888
6889 # Check whether --with-libnl was given.
6890 if test "${with_libnl+set}" = set; then :
6891 withval=$with_libnl; with_libnl=$withval
6892 else
6893 with_libnl=if_available
6894 fi
6895
6896
6897 if test x$with_libnl != xno ; then
6898 have_any_nl="no"
6899
6900 incdir=-I/usr/include/libnl3
6901 libnldir=
6902 case "$with_libnl" in
6903
6904 yes|if_available)
6905 ;;
6906
6907 *)
6908 if test -d $withval; then
6909 libnldir=-L${withval}/lib/.libs
6910 incdir=-I${withval}/include
6911 fi
6912 ;;
6913 esac
6914
6915 if test "x$PKGCONFIG" != "xno"; then
6916 #
6917 # We have pkg-config; see if we have libnl-3.0
6918 # as a package.
6919 #
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl-3.0 with pkg-config" >&5
6921 $as_echo_n "checking for libnl-3.0 with pkg-config... " >&6; }
6922 if "$PKGCONFIG" libnl-3.0; then
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
6924 $as_echo "found" >&6; }
6925 have_libnl=yes
6926 libnl_cflags=`"$PKGCONFIG" --cflags libnl-3.0`
6927 V_INCLS="$V_INCLS ${libnl_cflags}"
6928 libnl_libs=`"$PKGCONFIG" --libs openssl`
6929 LIBS="${libnl_libs} $LIBS"
6930 else
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6932 $as_echo "not found" >&6; }
6933 fi
6934 fi
6935
6936 if test x$have_libnl != xyes; then
6937 #
6938 # Check for it directly.
6939 #
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
6941 $as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
6942 if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
6943 $as_echo_n "(cached) " >&6
6944 else
6945 ac_check_lib_save_LIBS=$LIBS
6946 LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948 /* end confdefs.h. */
6949
6950 /* Override any GCC internal prototype to avoid an error.
6951 Use char because int might match the return type of a GCC
6952 builtin and then its argument prototype would still apply. */
6953 #ifdef __cplusplus
6954 extern "C"
6955 #endif
6956 char nl_socket_alloc ();
6957 int
6958 main ()
6959 {
6960 return nl_socket_alloc ();
6961 ;
6962 return 0;
6963 }
6964 _ACEOF
6965 if ac_fn_c_try_link "$LINENO"; then :
6966 ac_cv_lib_nl_3_nl_socket_alloc=yes
6967 else
6968 ac_cv_lib_nl_3_nl_socket_alloc=no
6969 fi
6970 rm -f core conftest.err conftest.$ac_objext \
6971 conftest$ac_exeext conftest.$ac_ext
6972 LIBS=$ac_check_lib_save_LIBS
6973 fi
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
6975 $as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
6976 if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
6977
6978 #
6979 # Yes, we have libnl 3.x.
6980 #
6981 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
6982
6983 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6984
6985 V_INCLS="$V_INCLS ${incdir}"
6986 have_libnl=yes
6987
6988 else
6989
6990 #
6991 # No, we don't have libnl at all.
6992 #
6993 if test x$with_libnl = xyes ; then
6994 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
6995 fi
6996
6997 fi
6998
6999 fi
7000 fi
7001
7002 #
7003 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
7004 #
7005 # NOTE: any failure means we conclude that it doesn't have that
7006 # member, so if we don't have tpacket_auxdata, we conclude it
7007 # doesn't have that member (which is OK, as either we won't be
7008 # using code that would use that member, or we wouldn't compile
7009 # in any case).
7010 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
7011 #include <sys/types.h>
7012 #include <linux/if_packet.h>
7013
7014 "
7015 if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
7016
7017 cat >>confdefs.h <<_ACEOF
7018 #define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
7019 _ACEOF
7020
7021
7022 fi
7023
7024 ;;
7025
7026 bpf)
7027 #
7028 # Capture module
7029 #
7030 PLATFORM_C_SRC="pcap-bpf.c"
7031
7032 #
7033 # Check whether we have the *BSD-style ioctls.
7034 #
7035 for ac_header in net/if_media.h
7036 do :
7037 ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
7038 if test "x$ac_cv_header_net_if_media_h" = xyes; then :
7039 cat >>confdefs.h <<_ACEOF
7040 #define HAVE_NET_IF_MEDIA_H 1
7041 _ACEOF
7042
7043 fi
7044
7045 done
7046
7047
7048 #
7049 # Check whether we have struct BPF_TIMEVAL.
7050 #
7051 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
7052 #include <sys/types.h>
7053 #include <sys/ioctl.h>
7054 #ifdef HAVE_SYS_IOCCOM_H
7055 #include <sys/ioccom.h>
7056 #endif
7057 #include <net/bpf.h>
7058
7059 "
7060 if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
7061
7062 cat >>confdefs.h <<_ACEOF
7063 #define HAVE_STRUCT_BPF_TIMEVAL 1
7064 _ACEOF
7065
7066
7067 fi
7068
7069 ;;
7070
7071 pf)
7072 #
7073 # Capture module
7074 #
7075 PLATFORM_C_SRC="pcap-pf.c"
7076 ;;
7077
7078 snit)
7079 #
7080 # Capture module
7081 #
7082 PLATFORM_C_SRC="pcap-snit.c"
7083 ;;
7084
7085 snoop)
7086 #
7087 # Capture module
7088 #
7089 PLATFORM_C_SRC="pcap-snoop.c"
7090 ;;
7091
7092 dag)
7093 #
7094 # --with-pcap=dag is the only way to get here, and it means
7095 # "DAG support but nothing else"
7096 #
7097 V_DEFS="$V_DEFS -DDAG_ONLY"
7098 PLATFORM_C_SRC="pcap-dag.c"
7099 xxx_only=yes
7100 ;;
7101
7102 dpdk)
7103 #
7104 # --with-pcap=dpdk is the only way to get here, and it means
7105 # "DPDK support but nothing else"
7106 #
7107 V_DEFS="$V_DEFS -DDPDK_ONLY"
7108 PLATFORM_C_SRC="pcap-dpdk.c"
7109 xxx_only=yes
7110 ;;
7111
7112 septel)
7113 #
7114 # --with-pcap=septel is the only way to get here, and it means
7115 # "Septel support but nothing else"
7116 #
7117 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
7118 PLATFORM_C_SRC="pcap-septel.c"
7119 xxx_only=yes
7120 ;;
7121
7122 snf)
7123 #
7124 # --with-pcap=snf is the only way to get here, and it means
7125 # "SNF support but nothing else"
7126 #
7127 V_DEFS="$V_DEFS -DSNF_ONLY"
7128 PLATFORM_C_SRC="pcap-snf.c"
7129 xxx_only=yes
7130 ;;
7131
7132 null)
7133 #
7134 # Capture module
7135 #
7136 PLATFORM_C_SRC="pcap-null.c"
7137 ;;
7138
7139 *)
7140 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
7141 ;;
7142 esac
7143
7144 if test "$V_PCAP" != null
7145 then
7146 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
7147 if test "x$ac_cv_func_getifaddrs" = xyes; then :
7148
7149 #
7150 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
7151 # as well, just in case some platform is really weird.
7152 #
7153 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
7154 if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
7155
7156 #
7157 # We have the header, so we use "getifaddrs()" to
7158 # get the list of interfaces.
7159 #
7160 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
7161
7162 else
7163
7164 #
7165 # We don't have the header - give up.
7166 # XXX - we could also fall back on some other
7167 # mechanism, but, for now, this'll catch this
7168 # problem so that we can at least try to figure
7169 # out something to do on systems with "getifaddrs()"
7170 # but without "ifaddrs.h", if there is something
7171 # we can do on those systems.
7172 #
7173 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
7174
7175 fi
7176
7177
7178
7179 else
7180
7181 #
7182 # Well, we don't have "getifaddrs()", at least not with the
7183 # libraries with which we've decided we need to link
7184 # libpcap with, so we have to use some other mechanism.
7185 #
7186 # Note that this may happen on Solaris, which has
7187 # getifaddrs(), but in -lsocket, not in -lxnet, so we
7188 # won't find it if we link with -lxnet, which we want
7189 # to do for other reasons.
7190 #
7191 # For now, we use either the SIOCGIFCONF ioctl or the
7192 # SIOCGLIFCONF ioctl, preferring the latter if we have
7193 # it; the latter is a Solarisism that first appeared
7194 # in Solaris 8. (Solaris's getifaddrs() appears to
7195 # be built atop SIOCGLIFCONF; using it directly
7196 # avoids a not-all-that-useful middleman.)
7197 #
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
7199 $as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
7200 if ${ac_cv_lbl_have_siocglifconf+:} false; then :
7201 $as_echo_n "(cached) " >&6
7202 else
7203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204 /* end confdefs.h. */
7205 #include <sys/param.h>
7206 #include <sys/file.h>
7207 #include <sys/ioctl.h>
7208 #include <sys/socket.h>
7209 #include <sys/sockio.h>
7210 int
7211 main ()
7212 {
7213 ioctl(0, SIOCGLIFCONF, (char *)0);
7214 ;
7215 return 0;
7216 }
7217 _ACEOF
7218 if ac_fn_c_try_compile "$LINENO"; then :
7219 ac_cv_lbl_have_siocglifconf=yes
7220 else
7221 ac_cv_lbl_have_siocglifconf=no
7222 fi
7223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7224 fi
7225
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
7227 $as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
7228 if test $ac_cv_lbl_have_siocglifconf = yes ; then
7229 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
7230 else
7231 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
7232 fi
7233
7234 fi
7235
7236 fi
7237
7238 case "$host_os" in
7239 linux*)
7240 for ac_header in linux/net_tstamp.h
7241 do :
7242 ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
7243 if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
7244 cat >>confdefs.h <<_ACEOF
7245 #define HAVE_LINUX_NET_TSTAMP_H 1
7246 _ACEOF
7247
7248 fi
7249
7250 done
7251
7252 ;;
7253 *)
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
7255 $as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
7256 ;;
7257 esac
7258
7259 #
7260 # Check for socklen_t.
7261 #
7262 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
7263 #include <sys/types.h>
7264 #include <sys/socket.h>
7265
7266 "
7267 if test "x$ac_cv_type_socklen_t" = xyes; then :
7268
7269 cat >>confdefs.h <<_ACEOF
7270 #define HAVE_SOCKLEN_T 1
7271 _ACEOF
7272
7273
7274 fi
7275
7276
7277 # Check whether --enable-ipv6 was given.
7278 if test "${enable_ipv6+set}" = set; then :
7279 enableval=$enable_ipv6;
7280 else
7281 enable_ipv6=yes
7282 fi
7283
7284 if test "$enable_ipv6" != "no"; then
7285 #
7286 # We've already made sure we have getaddrinfo above in
7287 # AC_LBL_LIBRARY_NET.
7288 #
7289
7290 $as_echo "#define INET6 1" >>confdefs.h
7291
7292 fi
7293
7294 # Check for Endace DAG card support.
7295
7296 # Check whether --with-dag was given.
7297 if test "${with_dag+set}" = set; then :
7298 withval=$with_dag;
7299 if test "$withval" = no
7300 then
7301 # User doesn't want DAG support.
7302 want_dag=no
7303 elif test "$withval" = yes
7304 then
7305 # User wants DAG support but hasn't specified a directory.
7306 want_dag=yes
7307 else
7308 # User wants DAG support and has specified a directory, so use the provided value.
7309 want_dag=yes
7310 dag_root=$withval
7311 fi
7312
7313 else
7314
7315 if test "$V_PCAP" = dag; then
7316 # User requested DAG-only libpcap, so we'd better have
7317 # the DAG API.
7318 want_dag=yes
7319 elif test "xxx_only" = yes; then
7320 # User requested something-else-only pcap, so they don't
7321 # want DAG support.
7322 want_dag=no
7323 else
7324 #
7325 # Use DAG API if present, otherwise don't
7326 #
7327 want_dag=ifpresent
7328 fi
7329
7330 fi
7331
7332
7333
7334 # Check whether --with-dag-includes was given.
7335 if test "${with_dag_includes+set}" = set; then :
7336 withval=$with_dag_includes;
7337 # User wants DAG support and has specified a header directory, so use the provided value.
7338 want_dag=yes
7339 dag_include_dir=$withval
7340
7341 fi
7342
7343
7344
7345 # Check whether --with-dag-libraries was given.
7346 if test "${with_dag_libraries+set}" = set; then :
7347 withval=$with_dag_libraries;
7348 # User wants DAG support and has specified a library directory, so use the provided value.
7349 want_dag=yes
7350 dag_lib_dir=$withval
7351
7352 fi
7353
7354
7355 if test "$want_dag" != no; then
7356
7357 # If necessary, set default paths for DAG API headers and libraries.
7358 if test -z "$dag_root"; then
7359 dag_root=/usr/local
7360 fi
7361
7362 if test -z "$dag_include_dir"; then
7363 dag_include_dir="$dag_root/include"
7364 fi
7365
7366 if test -z "$dag_lib_dir"; then
7367 dag_lib_dir="$dag_root/lib"
7368 #
7369 # Handle multiarch systems.
7370 #
7371 if test -d "$dag_lib_dir/$host"
7372 then
7373 dag_lib_dir="$dag_lib_dir/$host"
7374 fi
7375 fi
7376
7377 save_CFLAGS="$CFLAGS"
7378 CFLAGS="$CFLAGS -I$dag_include_dir"
7379 for ac_header in dagapi.h
7380 do :
7381 ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
7382 if test "x$ac_cv_header_dagapi_h" = xyes; then :
7383 cat >>confdefs.h <<_ACEOF
7384 #define HAVE_DAGAPI_H 1
7385 _ACEOF
7386
7387 fi
7388
7389 done
7390
7391
7392 if test "$ac_cv_header_dagapi_h" = yes; then
7393
7394 V_INCLS="$V_INCLS -I$dag_include_dir"
7395
7396 if test $V_PCAP != dag ; then
7397 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
7398 fi
7399
7400 # Check for various DAG API functions.
7401 # Don't need to save and restore LIBS to prevent -ldag being
7402 # included if there's a found-action (arg 3).
7403 save_LDFLAGS="$LDFLAGS"
7404 LDFLAGS="-L$dag_lib_dir"
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
7406 $as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
7407 if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
7408 $as_echo_n "(cached) " >&6
7409 else
7410 ac_check_lib_save_LIBS=$LIBS
7411 LIBS="-ldag $LIBS"
7412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7413 /* end confdefs.h. */
7414
7415 /* Override any GCC internal prototype to avoid an error.
7416 Use char because int might match the return type of a GCC
7417 builtin and then its argument prototype would still apply. */
7418 #ifdef __cplusplus
7419 extern "C"
7420 #endif
7421 char dag_attach_stream ();
7422 int
7423 main ()
7424 {
7425 return dag_attach_stream ();
7426 ;
7427 return 0;
7428 }
7429 _ACEOF
7430 if ac_fn_c_try_link "$LINENO"; then :
7431 ac_cv_lib_dag_dag_attach_stream=yes
7432 else
7433 ac_cv_lib_dag_dag_attach_stream=no
7434 fi
7435 rm -f core conftest.err conftest.$ac_objext \
7436 conftest$ac_exeext conftest.$ac_ext
7437 LIBS=$ac_check_lib_save_LIBS
7438 fi
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
7440 $as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
7441 if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
7442 cat >>confdefs.h <<_ACEOF
7443 #define HAVE_LIBDAG 1
7444 _ACEOF
7445
7446 LIBS="-ldag $LIBS"
7447
7448 else
7449 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
7450 fi
7451
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
7453 $as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
7454 if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
7455 $as_echo_n "(cached) " >&6
7456 else
7457 ac_check_lib_save_LIBS=$LIBS
7458 LIBS="-ldag $LIBS"
7459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7460 /* end confdefs.h. */
7461
7462 /* Override any GCC internal prototype to avoid an error.
7463 Use char because int might match the return type of a GCC
7464 builtin and then its argument prototype would still apply. */
7465 #ifdef __cplusplus
7466 extern "C"
7467 #endif
7468 char dag_attach_stream64 ();
7469 int
7470 main ()
7471 {
7472 return dag_attach_stream64 ();
7473 ;
7474 return 0;
7475 }
7476 _ACEOF
7477 if ac_fn_c_try_link "$LINENO"; then :
7478 ac_cv_lib_dag_dag_attach_stream64=yes
7479 else
7480 ac_cv_lib_dag_dag_attach_stream64=no
7481 fi
7482 rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
7484 LIBS=$ac_check_lib_save_LIBS
7485 fi
7486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
7487 $as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
7488 if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
7489 dag_large_streams="1"
7490 else
7491 dag_large_streams="0"
7492 fi
7493
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
7495 $as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
7496 if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
7497 $as_echo_n "(cached) " >&6
7498 else
7499 ac_check_lib_save_LIBS=$LIBS
7500 LIBS="-ldag $LIBS"
7501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7502 /* end confdefs.h. */
7503
7504 /* Override any GCC internal prototype to avoid an error.
7505 Use char because int might match the return type of a GCC
7506 builtin and then its argument prototype would still apply. */
7507 #ifdef __cplusplus
7508 extern "C"
7509 #endif
7510 char dag_get_erf_types ();
7511 int
7512 main ()
7513 {
7514 return dag_get_erf_types ();
7515 ;
7516 return 0;
7517 }
7518 _ACEOF
7519 if ac_fn_c_try_link "$LINENO"; then :
7520 ac_cv_lib_dag_dag_get_erf_types=yes
7521 else
7522 ac_cv_lib_dag_dag_get_erf_types=no
7523 fi
7524 rm -f core conftest.err conftest.$ac_objext \
7525 conftest$ac_exeext conftest.$ac_ext
7526 LIBS=$ac_check_lib_save_LIBS
7527 fi
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
7529 $as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
7530 if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
7531
7532
7533 $as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
7534
7535 fi
7536
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
7538 $as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
7539 if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
7540 $as_echo_n "(cached) " >&6
7541 else
7542 ac_check_lib_save_LIBS=$LIBS
7543 LIBS="-ldag $LIBS"
7544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545 /* end confdefs.h. */
7546
7547 /* Override any GCC internal prototype to avoid an error.
7548 Use char because int might match the return type of a GCC
7549 builtin and then its argument prototype would still apply. */
7550 #ifdef __cplusplus
7551 extern "C"
7552 #endif
7553 char dag_get_stream_erf_types ();
7554 int
7555 main ()
7556 {
7557 return dag_get_stream_erf_types ();
7558 ;
7559 return 0;
7560 }
7561 _ACEOF
7562 if ac_fn_c_try_link "$LINENO"; then :
7563 ac_cv_lib_dag_dag_get_stream_erf_types=yes
7564 else
7565 ac_cv_lib_dag_dag_get_stream_erf_types=no
7566 fi
7567 rm -f core conftest.err conftest.$ac_objext \
7568 conftest$ac_exeext conftest.$ac_ext
7569 LIBS=$ac_check_lib_save_LIBS
7570 fi
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
7572 $as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
7573 if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
7574
7575
7576 $as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
7577
7578 fi
7579
7580
7581 LDFLAGS="$save_LDFLAGS"
7582
7583 #
7584 # We assume that if we have libdag we have libdagconf,
7585 # as they're installed at the same time from the same
7586 # package.
7587 #
7588 LIBS="$LIBS -ldag -ldagconf"
7589 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
7590
7591 if test "$dag_large_streams" = 1; then
7592
7593 $as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
7594
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
7596 $as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
7597 if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
7598 $as_echo_n "(cached) " >&6
7599 else
7600 ac_check_lib_save_LIBS=$LIBS
7601 LIBS="-lvdag $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 vdag_set_device_info ();
7612 int
7613 main ()
7614 {
7615 return vdag_set_device_info ();
7616 ;
7617 return 0;
7618 }
7619 _ACEOF
7620 if ac_fn_c_try_link "$LINENO"; then :
7621 ac_cv_lib_vdag_vdag_set_device_info=yes
7622 else
7623 ac_cv_lib_vdag_vdag_set_device_info=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_vdag_vdag_set_device_info" >&5
7630 $as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
7631 if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
7632 ac_dag_have_vdag="1"
7633 else
7634 ac_dag_have_vdag="0"
7635 fi
7636
7637 if test "$ac_dag_have_vdag" = 1; then
7638
7639 $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
7640
7641 if test "$ac_lbl_have_pthreads" != "found"; then
7642 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
7643 fi
7644 LIBS="$LIBS $PTHREAD_LIBS"
7645 fi
7646 fi
7647
7648
7649 $as_echo "#define HAVE_DAG_API 1" >>confdefs.h
7650
7651 else
7652
7653 if test "$V_PCAP" = dag; then
7654 # User requested "dag" capture type but we couldn't
7655 # find the DAG API support.
7656 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
7657 fi
7658
7659 if test "$want_dag" = yes; then
7660 # User wanted DAG support but we couldn't find it.
7661 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
7662 fi
7663 fi
7664 CFLAGS="$save_CFLAGS"
7665 fi
7666
7667
7668 # Check whether --with-septel was given.
7669 if test "${with_septel+set}" = set; then :
7670 withval=$with_septel;
7671 if test "$withval" = no
7672 then
7673 want_septel=no
7674 elif test "$withval" = yes
7675 then
7676 want_septel=yes
7677 septel_root=
7678 else
7679 want_septel=yes
7680 septel_root=$withval
7681 fi
7682
7683 else
7684
7685 if test "$V_PCAP" = septel; then
7686 # User requested Septel-only libpcap, so we'd better have
7687 # the Septel API.
7688 want_septel=yes
7689 elif test "xxx_only" = yes; then
7690 # User requested something-else-only pcap, so they don't
7691 # want Septel support.
7692 want_septel=no
7693 else
7694 #
7695 # Use Septel API if present, otherwise don't
7696 #
7697 want_septel=ifpresent
7698 fi
7699
7700 fi
7701
7702
7703 ac_cv_lbl_septel_api=no
7704 if test "$with_septel" != no; then
7705
7706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
7707 $as_echo_n "checking whether we have Septel API headers... " >&6; }
7708
7709 # If necessary, set default paths for Septel API headers and libraries.
7710 if test -z "$septel_root"; then
7711 septel_root=$srcdir/../septel
7712 fi
7713
7714 septel_tools_dir="$septel_root"
7715 septel_include_dir="$septel_root/INC"
7716
7717 if test -r "$septel_include_dir/msg.h"; then
7718 ac_cv_lbl_septel_api=yes
7719 fi
7720
7721 if test "$ac_cv_lbl_septel_api" = yes; then
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
7723 $as_echo "yes ($septel_include_dir)" >&6; }
7724
7725 V_INCLS="$V_INCLS -I$septel_include_dir"
7726 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"
7727 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"
7728
7729 if test "$V_PCAP" != septel ; then
7730 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
7731 fi
7732
7733
7734 $as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
7735
7736 else
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7738 $as_echo "no" >&6; }
7739
7740 if test "$V_PCAP" = septel; then
7741 # User requested "septel" capture type but
7742 # we couldn't find the Septel API support.
7743 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
7744 fi
7745
7746 if test "$want_septel" = yes; then
7747 # User wanted Septel support but we couldn't find it.
7748 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
7749 fi
7750 fi
7751 fi
7752
7753 # Check for Myricom SNF support.
7754
7755 # Check whether --with-snf was given.
7756 if test "${with_snf+set}" = set; then :
7757 withval=$with_snf;
7758 if test "$withval" = no
7759 then
7760 # User explicitly doesn't want SNF
7761 want_snf=no
7762 elif test "$withval" = yes
7763 then
7764 # User wants SNF support but hasn't specified a directory.
7765 want_snf=yes
7766 else
7767 # User wants SNF support with a specified directory.
7768 want_snf=yes
7769 snf_root=$withval
7770 fi
7771
7772 else
7773
7774 if test "$V_PCAP" = snf; then
7775 # User requested Sniffer-only libpcap, so we'd better have
7776 # the Sniffer API.
7777 want_snf=yes
7778 elif test "xxx_only" = yes; then
7779 # User requested something-else-only pcap, so they don't
7780 # want SNF support.
7781 want_snf=no
7782 else
7783 #
7784 # Use Sniffer API if present, otherwise don't
7785 #
7786 want_snf=ifpresent
7787 fi
7788
7789 fi
7790
7791
7792
7793 # Check whether --with-snf-includes was given.
7794 if test "${with_snf_includes+set}" = set; then :
7795 withval=$with_snf_includes;
7796 # User wants SNF with specific header directory
7797 want_snf=yes
7798 snf_include_dir=$withval
7799
7800 fi
7801
7802
7803
7804 # Check whether --with-snf-libraries was given.
7805 if test "${with_snf_libraries+set}" = set; then :
7806 withval=$with_snf_libraries;
7807 # User wants SNF with specific lib directory
7808 want_snf=yes
7809 snf_lib_dir=$withval
7810
7811 fi
7812
7813
7814 ac_cv_lbl_snf_api=no
7815 if test "$with_snf" != no; then
7816
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
7818 $as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
7819
7820 # If necessary, set default paths for Sniffer headers and libraries.
7821 if test -z "$snf_root"; then
7822 snf_root=/opt/snf
7823 fi
7824
7825 if test -z "$snf_include_dir"; then
7826 snf_include_dir="$snf_root/include"
7827 fi
7828
7829 if test -z "$snf_lib_dir"; then
7830 snf_lib_dir="$snf_root/lib"
7831 #
7832 # Handle multiarch systems.
7833 #
7834 if test -d "$snf_lib_dir/$host"
7835 then
7836 snf_lib_dir="$snf_lib_dir/$host"
7837 fi
7838 fi
7839
7840 if test -f "$snf_include_dir/snf.h"; then
7841 # We found a header; make sure we can link with the library
7842 save_LDFLAGS="$LDFLAGS"
7843 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
7845 $as_echo_n "checking for snf_init in -lsnf... " >&6; }
7846 if ${ac_cv_lib_snf_snf_init+:} false; then :
7847 $as_echo_n "(cached) " >&6
7848 else
7849 ac_check_lib_save_LIBS=$LIBS
7850 LIBS="-lsnf $LIBS"
7851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7852 /* end confdefs.h. */
7853
7854 /* Override any GCC internal prototype to avoid an error.
7855 Use char because int might match the return type of a GCC
7856 builtin and then its argument prototype would still apply. */
7857 #ifdef __cplusplus
7858 extern "C"
7859 #endif
7860 char snf_init ();
7861 int
7862 main ()
7863 {
7864 return snf_init ();
7865 ;
7866 return 0;
7867 }
7868 _ACEOF
7869 if ac_fn_c_try_link "$LINENO"; then :
7870 ac_cv_lib_snf_snf_init=yes
7871 else
7872 ac_cv_lib_snf_snf_init=no
7873 fi
7874 rm -f core conftest.err conftest.$ac_objext \
7875 conftest$ac_exeext conftest.$ac_ext
7876 LIBS=$ac_check_lib_save_LIBS
7877 fi
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
7879 $as_echo "$ac_cv_lib_snf_snf_init" >&6; }
7880 if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
7881 ac_cv_lbl_snf_api="yes"
7882 fi
7883
7884 LDFLAGS="$save_LDFLAGS"
7885 if test "$ac_cv_lbl_snf_api" = no; then
7886 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
7887 fi
7888 fi
7889
7890 if test "$ac_cv_lbl_snf_api" = yes; then
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
7892 $as_echo "yes ($snf_root)" >&6; }
7893
7894 V_INCLS="$V_INCLS -I$snf_include_dir"
7895 LIBS="$LIBS -lsnf"
7896 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7897
7898 if test "$V_PCAP" != snf ; then
7899 MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
7900 fi
7901
7902
7903 $as_echo "#define HAVE_SNF_API 1" >>confdefs.h
7904
7905 else
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907 $as_echo "no" >&6; }
7908
7909 if test "$want_snf" = yes; then
7910 # User requested "snf" capture type but
7911 # we couldn't find the Sniffer API support.
7912 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
7913 fi
7914
7915 if test "$want_snf" = yes; then
7916 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
7917 fi
7918 fi
7919 fi
7920
7921 # Check for Riverbed TurboCap support.
7922
7923 # Check whether --with-turbocap was given.
7924 if test "${with_turbocap+set}" = set; then :
7925 withval=$with_turbocap;
7926 if test "$withval" = no
7927 then
7928 # User explicitly doesn't want TurboCap
7929 want_turbocap=no
7930 elif test "$withval" = yes
7931 then
7932 # User wants TurboCap support but hasn't specified a directory.
7933 want_turbocap=yes
7934 else
7935 # User wants TurboCap support with a specified directory.
7936 want_turbocap=yes
7937 turbocap_root=$withval
7938 fi
7939
7940 else
7941
7942 if test "xxx_only" = yes; then
7943 # User requested something-else-only pcap, so they don't
7944 # want TurboCap support.
7945 want_turbocap=no
7946 else
7947 #
7948 # Use TurboCap API if present, otherwise don't
7949 #
7950 want_turbocap=ifpresent
7951 fi
7952
7953 fi
7954
7955
7956 ac_cv_lbl_turbocap_api=no
7957 if test "$want_turbocap" != no; then
7958
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
7960 $as_echo_n "checking whether TurboCap is supported... " >&6; }
7961
7962 save_CFLAGS="$CFLAGS"
7963 save_LIBS="$LIBS"
7964 if test ! -z "$turbocap_root"; then
7965 TURBOCAP_CFLAGS="-I$turbocap_root/include"
7966 TURBOCAP_LIBS="-L$turbocap_root/lib"
7967 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
7968 fi
7969
7970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7971 /* end confdefs.h. */
7972
7973 #include <TcApi.h>
7974
7975 int
7976 main ()
7977 {
7978
7979 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
7980 TC_INSTANCE i;
7981 (void)TcInstanceCreateByName("foo", &i);
7982
7983 ;
7984 return 0;
7985 }
7986 _ACEOF
7987 if ac_fn_c_try_compile "$LINENO"; then :
7988 ac_cv_lbl_turbocap_api=yes
7989 fi
7990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7991
7992 CFLAGS="$save_CFLAGS"
7993 if test $ac_cv_lbl_turbocap_api = yes; then
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7995 $as_echo "yes" >&6; }
7996
7997 MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
7998 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
7999 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
8000
8001
8002 $as_echo "#define HAVE_TC_API 1" >>confdefs.h
8003
8004 else
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8006 $as_echo "no" >&6; }
8007
8008 if test "$want_turbocap" = yes; then
8009 # User wanted Turbo support but we couldn't find it.
8010 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
8011 fi
8012 fi
8013 fi
8014
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
8016 $as_echo_n "checking whether to enable remote packet capture... " >&6; }
8017 # Check whether --enable-remote was given.
8018 if test "${enable_remote+set}" = set; then :
8019 enableval=$enable_remote;
8020 else
8021 enableval=no
8022 fi
8023
8024 case "$enableval" in
8025 yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8026 $as_echo "yes" >&6; }
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
8028 $as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
8030 $as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
8031 #
8032 # rpcapd requires pthreads on UN*X.
8033 #
8034 if test "$ac_lbl_have_pthreads" != "found"; then
8035 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
8036 fi
8037 #
8038 # It also requires crypt().
8039 # Do we have it in the system libraries?
8040 #
8041 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
8042 if test "x$ac_cv_func_crypt" = xyes; then :
8043
8044 else
8045
8046 #
8047 # No. Do we have it in -lcrypt?
8048 #
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
8050 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
8051 if ${ac_cv_lib_crypt_crypt+:} false; then :
8052 $as_echo_n "(cached) " >&6
8053 else
8054 ac_check_lib_save_LIBS=$LIBS
8055 LIBS="-lcrypt $LIBS"
8056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057 /* end confdefs.h. */
8058
8059 /* Override any GCC internal prototype to avoid an error.
8060 Use char because int might match the return type of a GCC
8061 builtin and then its argument prototype would still apply. */
8062 #ifdef __cplusplus
8063 extern "C"
8064 #endif
8065 char crypt ();
8066 int
8067 main ()
8068 {
8069 return crypt ();
8070 ;
8071 return 0;
8072 }
8073 _ACEOF
8074 if ac_fn_c_try_link "$LINENO"; then :
8075 ac_cv_lib_crypt_crypt=yes
8076 else
8077 ac_cv_lib_crypt_crypt=no
8078 fi
8079 rm -f core conftest.err conftest.$ac_objext \
8080 conftest$ac_exeext conftest.$ac_ext
8081 LIBS=$ac_check_lib_save_LIBS
8082 fi
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
8084 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
8085 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
8086
8087 #
8088 # Yes; add -lcrypt to the libraries for rpcapd.
8089 #
8090 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
8091
8092 else
8093
8094 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
8095
8096 fi
8097
8098
8099 fi
8100
8101
8102 #
8103 # OK, we have crypt(). Do we have getspnam()?
8104 #
8105 for ac_func in getspnam
8106 do :
8107 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8108 if test "x$ac_cv_func_getspnam" = xyes; then :
8109 cat >>confdefs.h <<_ACEOF
8110 #define HAVE_GETSPNAM 1
8111 _ACEOF
8112
8113 fi
8114 done
8115
8116
8117 #
8118 # Check for various members of struct msghdr.
8119 #
8120 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
8121 #include \"ftmacros.h\"
8122 #include <sys/socket.h>
8123
8124 "
8125 if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
8126
8127 cat >>confdefs.h <<_ACEOF
8128 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
8129 _ACEOF
8130
8131
8132 fi
8133
8134 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
8135 #include \"ftmacros.h\"
8136 #include <sys/socket.h>
8137
8138 "
8139 if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
8140
8141 cat >>confdefs.h <<_ACEOF
8142 #define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
8143 _ACEOF
8144
8145
8146 fi
8147
8148
8149 #
8150 # Optionally, we may want to support SSL.
8151 # Check for OpenSSL/libressl.
8152 #
8153 # First, try looking for it as a regular system library.
8154 # Make sure we can find SSL_library_init() using the
8155 # standard headers, just in case we're running a version
8156 # of macOS that ships with the OpenSSL library but not
8157 # the OpenSSL headers, and have also installed another
8158 # version of OpenSSL with headers.
8159 #
8160 save_LIBS="$LIBS"
8161 LIBS="-lssl -lcrypto"
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
8163 $as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
8164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8165 /* end confdefs.h. */
8166
8167 #include <openssl/ssl.h>
8168
8169 int
8170 main ()
8171 {
8172
8173 SSL_library_init();
8174 return 0;
8175
8176 ;
8177 return 0;
8178 }
8179 _ACEOF
8180 if ac_fn_c_try_link "$LINENO"; then :
8181
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8183 $as_echo "yes" >&6; }
8184 HAVE_OPENSSL=yes
8185 OPENSSL_LIBS="-lssl -lcrypto"
8186
8187 else
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189 $as_echo "no" >&6; }
8190 fi
8191 rm -f core conftest.err conftest.$ac_objext \
8192 conftest$ac_exeext conftest.$ac_ext
8193 LIBS="$save_LIBS"
8194
8195 #
8196 # If we didn't find it, check for it with pkg-config.
8197 #
8198 if test "x$HAVE_OPENSSL" != "xyes"; then
8199 if test "x$PKGCONFIG" != "xno"; then
8200 #
8201 # We have pkg-config; see if we have OpenSSL/
8202 # libressl installed as a package.
8203 #
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL/libressl with pkg-config" >&5
8205 $as_echo_n "checking for OpenSSL/libressl with pkg-config... " >&6; }
8206 if "$PKGCONFIG" openssl; then
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8208 $as_echo "found" >&6; }
8209 HAVE_OPENSSL=yes
8210 OPENSSL_CFLAGS=`"$PKGCONFIG" --cflags openssl`
8211 OPENSSL_LIBS=`"$PKGCONFIG" --libs openssl`
8212 else
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8214 $as_echo "not found" >&6; }
8215 fi
8216 fi
8217 fi
8218
8219 #
8220 # If we didn't find it, check for it under /usr/local/opt/openssl;
8221 # that's where Homebrew puts it on macOS. Feel free to add other
8222 # -L directories as necessary; the "system library" check should
8223 # also handle "add-on library under /usr/local", so that shouldn't
8224 # be necessary here.
8225 #
8226 if test "x$HAVE_OPENSSL" != "xyes"; then
8227 save_CFLAGS="$CFLAGS"
8228 save_LIBS="$LIBS"
8229 CFLAGS="$CFLAGS -L/usr/local/opt/openssl/include"
8230 LIBS="$LIBS -L/usr/local/opt/openssl/lib -lssl -lcrypto"
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local/opt that we can use" >&5
8232 $as_echo_n "checking whether we have OpenSSL/libressl in /usr/local/opt that we can use... " >&6; }
8233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8234 /* end confdefs.h. */
8235
8236 #include <openssl/ssl.h>
8237
8238 int
8239 main ()
8240 {
8241
8242 SSL_library_init();
8243 return 0;
8244
8245 ;
8246 return 0;
8247 }
8248 _ACEOF
8249 if ac_fn_c_try_link "$LINENO"; then :
8250
8251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8252 $as_echo "yes" >&6; }
8253 HAVE_OPENSSL=yes
8254 OPENSSL_CFLAGS="-I/usr/local/opt/openssl/include"
8255 OPENSSL_LIBS="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
8256
8257 else
8258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259 $as_echo "no" >&6; }
8260 fi
8261 rm -f core conftest.err conftest.$ac_objext \
8262 conftest$ac_exeext conftest.$ac_ext
8263 CFLAGS="$save_CFLAGS"
8264 LIBS="$save_LIBS"
8265 fi
8266
8267 #
8268 # OK, did we find it?
8269 #
8270 if test "x$HAVE_OPENSSL" = "xyes"; then
8271
8272 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
8273
8274 CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
8275 LIBS="$LIBS $OPENSSL_LIBS"
8276 else
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
8278 $as_echo "$as_me: OpenSSL not found" >&6;}
8279 fi
8280
8281
8282 $as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
8283
8284 REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
8285 BUILD_RPCAPD=build-rpcapd
8286 INSTALL_RPCAPD=install-rpcapd
8287 ;;
8288 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8289 $as_echo "no" >&6; }
8290 ;;
8291 esac
8292
8293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
8294 $as_echo_n "checking whether to build optimizer debugging code... " >&6; }
8295 # Check whether --enable-optimizer-dbg was given.
8296 if test "${enable_optimizer_dbg+set}" = set; then :
8297 enableval=$enable_optimizer_dbg;
8298 fi
8299
8300 if test "$enable_optimizer_dbg" = "yes"; then
8301
8302 $as_echo "#define BDEBUG 1" >>confdefs.h
8303
8304 fi
8305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
8306 $as_echo "${enable_optimizer_dbg-no}" >&6; }
8307
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
8309 $as_echo_n "checking whether to build parser debugging code... " >&6; }
8310 # Check whether --enable-yydebug was given.
8311 if test "${enable_yydebug+set}" = set; then :
8312 enableval=$enable_yydebug;
8313 fi
8314
8315 if test "$enable_yydebug" = "yes"; then
8316
8317 $as_echo "#define YYDEBUG 1" >>confdefs.h
8318
8319 fi
8320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
8321 $as_echo "${enable_yydebug-no}" >&6; }
8322
8323 #
8324 # Look for {f}lex.
8325 #
8326 for ac_prog in flex lex
8327 do
8328 # Extract the first word of "$ac_prog", so it can be a program name with args.
8329 set dummy $ac_prog; ac_word=$2
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8331 $as_echo_n "checking for $ac_word... " >&6; }
8332 if ${ac_cv_prog_LEX+:} false; then :
8333 $as_echo_n "(cached) " >&6
8334 else
8335 if test -n "$LEX"; then
8336 ac_cv_prog_LEX="$LEX" # Let the user override the test.
8337 else
8338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8339 for as_dir in $PATH
8340 do
8341 IFS=$as_save_IFS
8342 test -z "$as_dir" && as_dir=.
8343 for ac_exec_ext in '' $ac_executable_extensions; do
8344 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8345 ac_cv_prog_LEX="$ac_prog"
8346 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8347 break 2
8348 fi
8349 done
8350 done
8351 IFS=$as_save_IFS
8352
8353 fi
8354 fi
8355 LEX=$ac_cv_prog_LEX
8356 if test -n "$LEX"; then
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8358 $as_echo "$LEX" >&6; }
8359 else
8360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361 $as_echo "no" >&6; }
8362 fi
8363
8364
8365 test -n "$LEX" && break
8366 done
8367 test -n "$LEX" || LEX=":"
8368
8369 if test "x$LEX" != "x:"; then
8370 cat >conftest.l <<_ACEOF
8371 %%
8372 a { ECHO; }
8373 b { REJECT; }
8374 c { yymore (); }
8375 d { yyless (1); }
8376 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
8377 yyless ((input () != 0)); }
8378 f { unput (yytext[0]); }
8379 . { BEGIN INITIAL; }
8380 %%
8381 #ifdef YYTEXT_POINTER
8382 extern char *yytext;
8383 #endif
8384 int
8385 main (void)
8386 {
8387 return ! yylex () + ! yywrap ();
8388 }
8389 _ACEOF
8390 { { ac_try="$LEX conftest.l"
8391 case "(($ac_try" in
8392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8393 *) ac_try_echo=$ac_try;;
8394 esac
8395 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8396 $as_echo "$ac_try_echo"; } >&5
8397 (eval "$LEX conftest.l") 2>&5
8398 ac_status=$?
8399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8400 test $ac_status = 0; }
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8402 $as_echo_n "checking lex output file root... " >&6; }
8403 if ${ac_cv_prog_lex_root+:} false; then :
8404 $as_echo_n "(cached) " >&6
8405 else
8406
8407 if test -f lex.yy.c; then
8408 ac_cv_prog_lex_root=lex.yy
8409 elif test -f lexyy.c; then
8410 ac_cv_prog_lex_root=lexyy
8411 else
8412 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8413 fi
8414 fi
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8416 $as_echo "$ac_cv_prog_lex_root" >&6; }
8417 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8418
8419 if test -z "${LEXLIB+set}"; then
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8421 $as_echo_n "checking lex library... " >&6; }
8422 if ${ac_cv_lib_lex+:} false; then :
8423 $as_echo_n "(cached) " >&6
8424 else
8425
8426 ac_save_LIBS=$LIBS
8427 ac_cv_lib_lex='none needed'
8428 for ac_lib in '' -lfl -ll; do
8429 LIBS="$ac_lib $ac_save_LIBS"
8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431 /* end confdefs.h. */
8432 `cat $LEX_OUTPUT_ROOT.c`
8433 _ACEOF
8434 if ac_fn_c_try_link "$LINENO"; then :
8435 ac_cv_lib_lex=$ac_lib
8436 fi
8437 rm -f core conftest.err conftest.$ac_objext \
8438 conftest$ac_exeext conftest.$ac_ext
8439 test "$ac_cv_lib_lex" != 'none needed' && break
8440 done
8441 LIBS=$ac_save_LIBS
8442
8443 fi
8444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8445 $as_echo "$ac_cv_lib_lex" >&6; }
8446 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8447 fi
8448
8449
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8451 $as_echo_n "checking whether yytext is a pointer... " >&6; }
8452 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8453 $as_echo_n "(cached) " >&6
8454 else
8455 # POSIX says lex can declare yytext either as a pointer or an array; the
8456 # default is implementation-dependent. Figure out which it is, since
8457 # not all implementations provide the %pointer and %array declarations.
8458 ac_cv_prog_lex_yytext_pointer=no
8459 ac_save_LIBS=$LIBS
8460 LIBS="$LEXLIB $ac_save_LIBS"
8461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8462 /* end confdefs.h. */
8463
8464 #define YYTEXT_POINTER 1
8465 `cat $LEX_OUTPUT_ROOT.c`
8466 _ACEOF
8467 if ac_fn_c_try_link "$LINENO"; then :
8468 ac_cv_prog_lex_yytext_pointer=yes
8469 fi
8470 rm -f core conftest.err conftest.$ac_objext \
8471 conftest$ac_exeext conftest.$ac_ext
8472 LIBS=$ac_save_LIBS
8473
8474 fi
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8476 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8477 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8478
8479 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8480
8481 fi
8482 rm -f conftest.l $LEX_OUTPUT_ROOT.c
8483
8484 fi
8485 if test "$LEX" = ":"; then
8486 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
8487 fi
8488
8489 #
8490 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
8491 # and supports processing our scanner.l.
8492 #
8493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
8494 $as_echo_n "checking for capable lex... " >&6; }
8495 if ${tcpdump_cv_capable_lex+:} false; then :
8496 $as_echo_n "(cached) " >&6
8497 else
8498 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
8499 tcpdump_cv_capable_lex=yes
8500 else
8501 tcpdump_cv_capable_lex=insufficient
8502 fi
8503 fi
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
8505 $as_echo "$tcpdump_cv_capable_lex" >&6; }
8506 if test $tcpdump_cv_capable_lex = insufficient ; then
8507 as_fn_error $? "$LEX is insufficient to compile libpcap.
8508 libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
8509 fi
8510
8511 #
8512 # Look for yacc/bison/byacc.
8513 #
8514 for ac_prog in 'bison -y' byacc
8515 do
8516 # Extract the first word of "$ac_prog", so it can be a program name with args.
8517 set dummy $ac_prog; ac_word=$2
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8519 $as_echo_n "checking for $ac_word... " >&6; }
8520 if ${ac_cv_prog_YACC+:} false; then :
8521 $as_echo_n "(cached) " >&6
8522 else
8523 if test -n "$YACC"; then
8524 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8525 else
8526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8527 for as_dir in $PATH
8528 do
8529 IFS=$as_save_IFS
8530 test -z "$as_dir" && as_dir=.
8531 for ac_exec_ext in '' $ac_executable_extensions; do
8532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8533 ac_cv_prog_YACC="$ac_prog"
8534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8535 break 2
8536 fi
8537 done
8538 done
8539 IFS=$as_save_IFS
8540
8541 fi
8542 fi
8543 YACC=$ac_cv_prog_YACC
8544 if test -n "$YACC"; then
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8546 $as_echo "$YACC" >&6; }
8547 else
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8549 $as_echo "no" >&6; }
8550 fi
8551
8552
8553 test -n "$YACC" && break
8554 done
8555 test -n "$YACC" || YACC="yacc"
8556
8557
8558 #
8559 # Make sure it supports the -p flag and supports processing our
8560 # grammar.y.
8561 #
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5
8563 $as_echo_n "checking for capable yacc/bison... " >&6; }
8564 if ${tcpdump_cv_capable_yacc+:} false; then :
8565 $as_echo_n "(cached) " >&6
8566 else
8567 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
8568 tcpdump_cv_capable_yacc=yes
8569 else
8570 tcpdump_cv_capable_yacc=insufficient
8571 fi
8572 fi
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
8574 $as_echo "$tcpdump_cv_capable_yacc" >&6; }
8575 if test $tcpdump_cv_capable_yacc = insufficient ; then
8576 as_fn_error $? "$YACC is insufficient to compile libpcap.
8577 libpcap requires Bison, a newer version of Berkeley YACC with support
8578 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8579 fi
8580
8581 #
8582 # Do various checks for various OSes and versions of those OSes.
8583 #
8584 # Assume, by default, no support for shared libraries and V7/BSD
8585 # convention for man pages (devices in section 4, file formats in
8586 # section 5, miscellaneous info in section 7, administrative commands
8587 # and daemons in section 8). Individual cases can override this.
8588 #
8589 DYEXT="none"
8590 MAN_DEVICES=4
8591 MAN_FILE_FORMATS=5
8592 MAN_MISC_INFO=7
8593 MAN_ADMIN_COMMANDS=8
8594 case "$host_os" in
8595
8596 aix*)
8597
8598 $as_echo "#define _SUN 1" >>confdefs.h
8599
8600
8601 #
8602 # AIX makes it fun to build shared and static libraries,
8603 # because they're *both* ".a" archive libraries. We
8604 # build the static library for the benefit of the traditional
8605 # scheme of building libpcap and tcpdump in subdirectories of
8606 # the same directory, with tcpdump statically linked with the
8607 # libpcap in question, but we also build a shared library as
8608 # "libpcap.shareda" and install *it*, rather than the static
8609 # library, as "libpcap.a".
8610 #
8611 DYEXT="shareda"
8612
8613 case "$V_PCAP" in
8614
8615 dlpi)
8616 #
8617 # If we're using DLPI, applications will need to
8618 # use /lib/pse.exp if present, as we use the
8619 # STREAMS routines.
8620 #
8621 pseexe="/lib/pse.exp"
8622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
8623 $as_echo_n "checking for $pseexe... " >&6; }
8624 if test -f $pseexe ; then
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8626 $as_echo "yes" >&6; }
8627 LIBS="-I:$pseexe"
8628 fi
8629 ;;
8630
8631 bpf)
8632 #
8633 # If we're using BPF, we need "-lodm" and "-lcfg", as
8634 # we use them to load the BPF module.
8635 #
8636 LIBS="-lodm -lcfg"
8637 ;;
8638 esac
8639 ;;
8640
8641 darwin*)
8642 DYEXT="dylib"
8643 V_CCOPT="$V_CCOPT -fno-common"
8644 # Check whether --enable-universal was given.
8645 if test "${enable_universal+set}" = set; then :
8646 enableval=$enable_universal;
8647 fi
8648
8649 if test "$enable_universal" != "no"; then
8650 case "$host_os" in
8651
8652 darwin[0-7].*)
8653 #
8654 # Pre-Tiger. Build only for 32-bit PowerPC; no
8655 # need for any special compiler or linker flags.
8656 #
8657 ;;
8658
8659 darwin8.[0123]|darwin8.[0123].*)
8660 #
8661 # Tiger, prior to Intel support. Build
8662 # libraries and executables for 32-bit PowerPC
8663 # and 64-bit PowerPC, with 32-bit PowerPC first.
8664 # (I'm guessing that's what Apple does.)
8665 #
8666 # (The double brackets are needed because
8667 # autotools/m4 use brackets as a quoting
8668 # character; the double brackets turn into
8669 # single brackets in the generated configure
8670 # file.)
8671 #
8672 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
8673 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
8674 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
8675 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
8676 ;;
8677
8678 darwin8.[456]|darwin.[456].*)
8679 #
8680 # Tiger, subsequent to Intel support but prior
8681 # to x86-64 support. Build libraries and
8682 # executables for 32-bit PowerPC, 64-bit
8683 # PowerPC, and 32-bit x86, with 32-bit PowerPC
8684 # first. (I'm guessing that's what Apple does.)
8685 #
8686 # (The double brackets are needed because
8687 # autotools/m4 use brackets as a quoting
8688 # character; the double brackets turn into
8689 # single brackets in the generated configure
8690 # file.)
8691 #
8692 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8693 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8694 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8695 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8696 ;;
8697
8698 darwin8.*)
8699 #
8700 # All other Tiger, so subsequent to x86-64
8701 # support. Build libraries and executables for
8702 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
8703 # and x86-64, with 32-bit PowerPC first. (I'm
8704 # guessing that's what Apple does.)
8705 #
8706 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8707 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8708 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8709 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8710 ;;
8711
8712 darwin9.*)
8713 #
8714 # Leopard. Build libraries for 32-bit PowerPC,
8715 # 64-bit PowerPC, 32-bit x86, and x86-64, with
8716 # 32-bit PowerPC first, and build executables
8717 # for 32-bit x86 and 32-bit PowerPC, with 32-bit
8718 # x86 first. (That's what Apple does.)
8719 #
8720 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8721 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8722 V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
8723 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
8724 ;;
8725
8726 darwin10.*)
8727 #
8728 # Snow Leopard. Build libraries for x86-64,
8729 # 32-bit x86, and 32-bit PowerPC, with x86-64
8730 # first, and build executables for x86-64 and
8731 # 32-bit x86, with x86-64 first. (That's what
8732 # Apple does, even though Snow Leopard doesn't
8733 # run on PPC, so PPC libpcap runs under Rosetta,
8734 # and Rosetta doesn't support BPF ioctls, so PPC
8735 # programs can't do live captures.)
8736 #
8737 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
8738 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
8739 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
8740 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
8741 ;;
8742
8743 darwin*)
8744 #
8745 # Post-Snow Leopard. Build libraries for x86-64
8746 # and 32-bit x86, with x86-64 first, and build
8747 # executables only for x86-64. (That's what
8748 # Apple does.) This requires no special flags
8749 # for programs.
8750 # XXX - update if and when Apple drops support
8751 # for 32-bit x86 code and if and when Apple adds
8752 # ARM-based Macs. (You're on your own for iOS
8753 # etc.)
8754 #
8755 # XXX - check whether we *can* build for
8756 # i386 and, if not, suggest that the user
8757 # install the /usr/include headers if they
8758 # want to build fat.
8759 #
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
8761 $as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
8762 save_CFLAGS="$CFLAGS"
8763 CFLAGS="$CFLAGS -arch i386"
8764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8765 /* end confdefs.h. */
8766
8767 int
8768 main ()
8769 {
8770 return 0;
8771 ;
8772 return 0;
8773 }
8774 _ACEOF
8775 if ac_fn_c_try_link "$LINENO"; then :
8776
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8778 $as_echo "yes" >&6; }
8779 V_LIB_CCOPT_FAT="-arch x86_64"
8780 V_LIB_LDFLAGS_FAT="-arch x86_64"
8781
8782 #
8783 # OpenSSL installation on macOS seems
8784 # to install only the libs for 64-bit
8785 # x86 - at least that's what Brew does:
8786 # only configure 32-bit builds if we
8787 # don't have OpenSSL.
8788 #
8789 if test "$HAVE_OPENSSL" != yes; then
8790 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
8791 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
8792 fi
8793
8794 else
8795
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8797 $as_echo "no" >&6; }
8798 V_LIB_CCOPT_FAT="-arch x86_64"
8799 V_LIB_LDFLAGS_FAT="-arch x86_64"
8800 case "$host_os" in
8801
8802 darwin18.*)
8803 #
8804 # Mojave; you need to install the
8805 # /usr/include headers to get
8806 # 32-bit x86 builds to work.
8807 #
8808 { $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
8809 $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;}
8810 ;;
8811
8812 *)
8813 #
8814 # Pre-Mojave; the command-line
8815 # tools should be sufficient to
8816 # enable 32-bit x86 builds.
8817 #
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
8819 $as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
8820 ;;
8821 esac
8822
8823 fi
8824 rm -f core conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext conftest.$ac_ext
8826 CFLAGS="$save_CFLAGS"
8827 ;;
8828 esac
8829 fi
8830 ;;
8831
8832 hpux9*)
8833
8834 $as_echo "#define HAVE_HPUX9 1" >>confdefs.h
8835
8836
8837 #
8838 # Use System V conventions for man pages.
8839 #
8840 MAN_ADMIN_COMMANDS=1m
8841 MAN_FILE_FORMATS=4
8842 MAN_MISC_INFO=5
8843 ;;
8844
8845 hpux10.0*)
8846
8847 #
8848 # Use System V conventions for man pages.
8849 #
8850 MAN_ADMIN_COMMANDS=1m
8851 MAN_FILE_FORMATS=4
8852 MAN_MISC_INFO=5
8853 ;;
8854
8855 hpux10.1*)
8856
8857 #
8858 # Use System V conventions for man pages.
8859 #
8860 MAN_ADMIN_COMMANDS=1m
8861 MAN_FILE_FORMATS=4
8862 MAN_MISC_INFO=5
8863 ;;
8864
8865 hpux*)
8866
8867 $as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
8868
8869 if test "`uname -m`" = "ia64"; then
8870 DYEXT="so"
8871 else
8872 DYEXT="sl"
8873 fi
8874
8875 #
8876 # "-b" builds a shared library; "+h" sets the soname.
8877 #
8878 SHLIB_OPT="-b"
8879 SONAME_OPT="+h"
8880
8881 #
8882 # Use System V conventions for man pages.
8883 #
8884 MAN_FILE_FORMATS=4
8885 MAN_MISC_INFO=5
8886 ;;
8887
8888 irix*)
8889 #
8890 # Use IRIX conventions for man pages; they're the same as the
8891 # System V conventions, except that they use section 8 for
8892 # administrative commands and daemons.
8893 #
8894 MAN_FILE_FORMATS=4
8895 MAN_MISC_INFO=5
8896 ;;
8897
8898 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
8899 DYEXT="so"
8900
8901 #
8902 # Compiler assumed to be GCC; run-time linker may require a -R
8903 # flag.
8904 #
8905 if test "$libdir" != "/usr/lib"; then
8906 V_RFLAGS=-Wl,-R$libdir
8907 fi
8908 ;;
8909
8910 osf*)
8911 DYEXT="so"
8912
8913 #
8914 # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
8915 # Use Tru64 UNIX conventions for man pages; they're the same as
8916 # the System V conventions except that they use section 8 for
8917 # administrative commands and daemons.
8918 #
8919 MAN_FILE_FORMATS=4
8920 MAN_MISC_INFO=5
8921 MAN_DEVICES=7
8922 ;;
8923
8924 sinix*)
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
8926 $as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
8927 if ${ac_cv_cc_sinix_defined+:} false; then :
8928 $as_echo_n "(cached) " >&6
8929 else
8930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8931 /* end confdefs.h. */
8932
8933 int
8934 main ()
8935 {
8936 int i = sinix;
8937 ;
8938 return 0;
8939 }
8940 _ACEOF
8941 if ac_fn_c_try_compile "$LINENO"; then :
8942 ac_cv_cc_sinix_defined=yes
8943 else
8944 ac_cv_cc_sinix_defined=no
8945 fi
8946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8947 fi
8948
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
8950 $as_echo "$ac_cv_cc_sinix_defined" >&6; }
8951 if test $ac_cv_cc_sinix_defined = no ; then
8952
8953 $as_echo "#define sinix 1" >>confdefs.h
8954
8955 fi
8956 ;;
8957
8958 solaris*)
8959
8960 $as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
8961
8962
8963 DYEXT="so"
8964
8965 #
8966 # Make sure errno is thread-safe, in case we're called in
8967 # a multithreaded program. We don't guarantee that two
8968 # threads can use the *same* pcap_t safely, but the
8969 # current version does guarantee that you can use different
8970 # pcap_t's in different threads, and even that pcap_compile()
8971 # is thread-safe (it wasn't thread-safe in some older versions).
8972 #
8973 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
8974
8975 case "`uname -r`" in
8976
8977 5.12)
8978 ;;
8979
8980 *)
8981 #
8982 # Use System V conventions for man pages.
8983 #
8984 MAN_ADMIN_COMMANDS=1m
8985 MAN_FILE_FORMATS=4
8986 MAN_MISC_INFO=5
8987 MAN_DEVICES=7D
8988 esac
8989 ;;
8990 esac
8991
8992 # Check whether --enable-shared was given.
8993 if test "${enable_shared+set}" = set; then :
8994 enableval=$enable_shared;
8995 fi
8996
8997 test "x$enable_shared" = "xno" && DYEXT="none"
8998
8999 if test -n "$ac_tool_prefix"; then
9000 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9001 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9003 $as_echo_n "checking for $ac_word... " >&6; }
9004 if ${ac_cv_prog_RANLIB+:} false; then :
9005 $as_echo_n "(cached) " >&6
9006 else
9007 if test -n "$RANLIB"; then
9008 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9009 else
9010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9011 for as_dir in $PATH
9012 do
9013 IFS=$as_save_IFS
9014 test -z "$as_dir" && as_dir=.
9015 for ac_exec_ext in '' $ac_executable_extensions; do
9016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9017 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9019 break 2
9020 fi
9021 done
9022 done
9023 IFS=$as_save_IFS
9024
9025 fi
9026 fi
9027 RANLIB=$ac_cv_prog_RANLIB
9028 if test -n "$RANLIB"; then
9029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9030 $as_echo "$RANLIB" >&6; }
9031 else
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033 $as_echo "no" >&6; }
9034 fi
9035
9036
9037 fi
9038 if test -z "$ac_cv_prog_RANLIB"; then
9039 ac_ct_RANLIB=$RANLIB
9040 # Extract the first word of "ranlib", so it can be a program name with args.
9041 set dummy ranlib; ac_word=$2
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043 $as_echo_n "checking for $ac_word... " >&6; }
9044 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9045 $as_echo_n "(cached) " >&6
9046 else
9047 if test -n "$ac_ct_RANLIB"; then
9048 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9049 else
9050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051 for as_dir in $PATH
9052 do
9053 IFS=$as_save_IFS
9054 test -z "$as_dir" && as_dir=.
9055 for ac_exec_ext in '' $ac_executable_extensions; do
9056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057 ac_cv_prog_ac_ct_RANLIB="ranlib"
9058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059 break 2
9060 fi
9061 done
9062 done
9063 IFS=$as_save_IFS
9064
9065 fi
9066 fi
9067 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9068 if test -n "$ac_ct_RANLIB"; then
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9070 $as_echo "$ac_ct_RANLIB" >&6; }
9071 else
9072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9073 $as_echo "no" >&6; }
9074 fi
9075
9076 if test "x$ac_ct_RANLIB" = x; then
9077 RANLIB=":"
9078 else
9079 case $cross_compiling:$ac_tool_warned in
9080 yes:)
9081 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9082 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9083 ac_tool_warned=yes ;;
9084 esac
9085 RANLIB=$ac_ct_RANLIB
9086 fi
9087 else
9088 RANLIB="$ac_cv_prog_RANLIB"
9089 fi
9090
9091 if test -n "$ac_tool_prefix"; then
9092 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9093 set dummy ${ac_tool_prefix}ar; ac_word=$2
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9095 $as_echo_n "checking for $ac_word... " >&6; }
9096 if ${ac_cv_prog_AR+:} false; then :
9097 $as_echo_n "(cached) " >&6
9098 else
9099 if test -n "$AR"; then
9100 ac_cv_prog_AR="$AR" # Let the user override the test.
9101 else
9102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9103 for as_dir in $PATH
9104 do
9105 IFS=$as_save_IFS
9106 test -z "$as_dir" && as_dir=.
9107 for ac_exec_ext in '' $ac_executable_extensions; do
9108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9109 ac_cv_prog_AR="${ac_tool_prefix}ar"
9110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9111 break 2
9112 fi
9113 done
9114 done
9115 IFS=$as_save_IFS
9116
9117 fi
9118 fi
9119 AR=$ac_cv_prog_AR
9120 if test -n "$AR"; then
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9122 $as_echo "$AR" >&6; }
9123 else
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125 $as_echo "no" >&6; }
9126 fi
9127
9128
9129 fi
9130 if test -z "$ac_cv_prog_AR"; then
9131 ac_ct_AR=$AR
9132 # Extract the first word of "ar", so it can be a program name with args.
9133 set dummy ar; ac_word=$2
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135 $as_echo_n "checking for $ac_word... " >&6; }
9136 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138 else
9139 if test -n "$ac_ct_AR"; then
9140 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9141 else
9142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143 for as_dir in $PATH
9144 do
9145 IFS=$as_save_IFS
9146 test -z "$as_dir" && as_dir=.
9147 for ac_exec_ext in '' $ac_executable_extensions; do
9148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149 ac_cv_prog_ac_ct_AR="ar"
9150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151 break 2
9152 fi
9153 done
9154 done
9155 IFS=$as_save_IFS
9156
9157 fi
9158 fi
9159 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9160 if test -n "$ac_ct_AR"; then
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9162 $as_echo "$ac_ct_AR" >&6; }
9163 else
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165 $as_echo "no" >&6; }
9166 fi
9167
9168 if test "x$ac_ct_AR" = x; then
9169 AR=""
9170 else
9171 case $cross_compiling:$ac_tool_warned in
9172 yes:)
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9174 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9175 ac_tool_warned=yes ;;
9176 esac
9177 AR=$ac_ct_AR
9178 fi
9179 else
9180 AR="$ac_cv_prog_AR"
9181 fi
9182
9183
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9185 $as_echo_n "checking whether ln -s works... " >&6; }
9186 LN_S=$as_ln_s
9187 if test "$LN_S" = "ln -s"; then
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9189 $as_echo "yes" >&6; }
9190 else
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9192 $as_echo "no, using $LN_S" >&6; }
9193 fi
9194
9195
9196
9197 rm -f os-proto.h
9198 if test "${LBL_CFLAGS+set}" = set; then
9199 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
9200 fi
9201 if test -f .devel ; then
9202 #
9203 # Skip all the warning option stuff on some compilers.
9204 #
9205 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
9206
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
9208 $as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
9209 save_CFLAGS="$CFLAGS"
9210 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
9211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9212 /* end confdefs.h. */
9213
9214 int
9215 main ()
9216 {
9217 return 0
9218 ;
9219 return 0;
9220 }
9221 _ACEOF
9222 if ac_fn_c_try_compile "$LINENO"; then :
9223
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225 $as_echo "no" >&6; }
9226 #
9227 # We're assuming this is clang, where
9228 # -Werror=unknown-warning-option is the appropriate
9229 # option to force the compiler to fail.
9230 #
9231 ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
9232
9233 else
9234
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9236 $as_echo "yes" >&6; }
9237
9238 fi
9239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9240 CFLAGS="$save_CFLAGS"
9241
9242
9243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
9244 $as_echo_n "checking whether the compiler supports the -W option... " >&6; }
9245 save_CFLAGS="$CFLAGS"
9246 if expr "x-W" : "x-W.*" >/dev/null
9247 then
9248 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
9249 elif expr "x-W" : "x-f.*" >/dev/null
9250 then
9251 CFLAGS="$CFLAGS -Werror -W"
9252 elif expr "x-W" : "x-m.*" >/dev/null
9253 then
9254 CFLAGS="$CFLAGS -Werror -W"
9255 else
9256 CFLAGS="$CFLAGS -W"
9257 fi
9258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9259 /* end confdefs.h. */
9260
9261 int
9262 main ()
9263 {
9264 return 0
9265 ;
9266 return 0;
9267 }
9268 _ACEOF
9269 if ac_fn_c_try_compile "$LINENO"; then :
9270
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9272 $as_echo "yes" >&6; }
9273 can_add_to_cflags=yes
9274 #
9275 # The compile supports this; do we have some C code for
9276 # which the warning should *not* appear?
9277 # We test the fourth argument because the third argument
9278 # could contain quotes, breaking the test.
9279 #
9280 if test "x" != "x"
9281 then
9282 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
9284 $as_echo_n "checking whether -W ... " >&6; }
9285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9286 /* end confdefs.h. */
9287
9288 _ACEOF
9289 if ac_fn_c_try_compile "$LINENO"; then :
9290
9291 #
9292 # Not a problem.
9293 #
9294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9295 $as_echo "no" >&6; }
9296
9297 else
9298
9299 #
9300 # A problem.
9301 #
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9303 $as_echo "yes" >&6; }
9304 can_add_to_cflags=no
9305
9306 fi
9307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9308 fi
9309 CFLAGS="$save_CFLAGS"
9310 if test x"$can_add_to_cflags" = "xyes"
9311 then
9312 V_CCOPT="$V_CCOPT -W"
9313 fi
9314
9315 else
9316
9317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318 $as_echo "no" >&6; }
9319 CFLAGS="$save_CFLAGS"
9320
9321 fi
9322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9323
9324
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
9326 $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
9327 save_CFLAGS="$CFLAGS"
9328 if expr "x-Wall" : "x-W.*" >/dev/null
9329 then
9330 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
9331 elif expr "x-Wall" : "x-f.*" >/dev/null
9332 then
9333 CFLAGS="$CFLAGS -Werror -Wall"
9334 elif expr "x-Wall" : "x-m.*" >/dev/null
9335 then
9336 CFLAGS="$CFLAGS -Werror -Wall"
9337 else
9338 CFLAGS="$CFLAGS -Wall"
9339 fi
9340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9341 /* end confdefs.h. */
9342
9343 int
9344 main ()
9345 {
9346 return 0
9347 ;
9348 return 0;
9349 }
9350 _ACEOF
9351 if ac_fn_c_try_compile "$LINENO"; then :
9352
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9354 $as_echo "yes" >&6; }
9355 can_add_to_cflags=yes
9356 #
9357 # The compile supports this; do we have some C code for
9358 # which the warning should *not* appear?
9359 # We test the fourth argument because the third argument
9360 # could contain quotes, breaking the test.
9361 #
9362 if test "x" != "x"
9363 then
9364 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
9366 $as_echo_n "checking whether -Wall ... " >&6; }
9367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9368 /* end confdefs.h. */
9369
9370 _ACEOF
9371 if ac_fn_c_try_compile "$LINENO"; then :
9372
9373 #
9374 # Not a problem.
9375 #
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377 $as_echo "no" >&6; }
9378
9379 else
9380
9381 #
9382 # A problem.
9383 #
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9385 $as_echo "yes" >&6; }
9386 can_add_to_cflags=no
9387
9388 fi
9389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9390 fi
9391 CFLAGS="$save_CFLAGS"
9392 if test x"$can_add_to_cflags" = "xyes"
9393 then
9394 V_CCOPT="$V_CCOPT -Wall"
9395 fi
9396
9397 else
9398
9399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400 $as_echo "no" >&6; }
9401 CFLAGS="$save_CFLAGS"
9402
9403 fi
9404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9405
9406
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
9408 $as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
9409 save_CFLAGS="$CFLAGS"
9410 if expr "x-Wcomma" : "x-W.*" >/dev/null
9411 then
9412 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
9413 elif expr "x-Wcomma" : "x-f.*" >/dev/null
9414 then
9415 CFLAGS="$CFLAGS -Werror -Wcomma"
9416 elif expr "x-Wcomma" : "x-m.*" >/dev/null
9417 then
9418 CFLAGS="$CFLAGS -Werror -Wcomma"
9419 else
9420 CFLAGS="$CFLAGS -Wcomma"
9421 fi
9422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9423 /* end confdefs.h. */
9424
9425 int
9426 main ()
9427 {
9428 return 0
9429 ;
9430 return 0;
9431 }
9432 _ACEOF
9433 if ac_fn_c_try_compile "$LINENO"; then :
9434
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9436 $as_echo "yes" >&6; }
9437 can_add_to_cflags=yes
9438 #
9439 # The compile supports this; do we have some C code for
9440 # which the warning should *not* appear?
9441 # We test the fourth argument because the third argument
9442 # could contain quotes, breaking the test.
9443 #
9444 if test "x" != "x"
9445 then
9446 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
9448 $as_echo_n "checking whether -Wcomma ... " >&6; }
9449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9450 /* end confdefs.h. */
9451
9452 _ACEOF
9453 if ac_fn_c_try_compile "$LINENO"; then :
9454
9455 #
9456 # Not a problem.
9457 #
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459 $as_echo "no" >&6; }
9460
9461 else
9462
9463 #
9464 # A problem.
9465 #
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9467 $as_echo "yes" >&6; }
9468 can_add_to_cflags=no
9469
9470 fi
9471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9472 fi
9473 CFLAGS="$save_CFLAGS"
9474 if test x"$can_add_to_cflags" = "xyes"
9475 then
9476 V_CCOPT="$V_CCOPT -Wcomma"
9477 fi
9478
9479 else
9480
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482 $as_echo "no" >&6; }
9483 CFLAGS="$save_CFLAGS"
9484
9485 fi
9486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9487
9488
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
9490 $as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
9491 save_CFLAGS="$CFLAGS"
9492 if expr "x-Wdocumentation" : "x-W.*" >/dev/null
9493 then
9494 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation"
9495 elif expr "x-Wdocumentation" : "x-f.*" >/dev/null
9496 then
9497 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9498 elif expr "x-Wdocumentation" : "x-m.*" >/dev/null
9499 then
9500 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9501 else
9502 CFLAGS="$CFLAGS -Wdocumentation"
9503 fi
9504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9505 /* end confdefs.h. */
9506
9507 int
9508 main ()
9509 {
9510 return 0
9511 ;
9512 return 0;
9513 }
9514 _ACEOF
9515 if ac_fn_c_try_compile "$LINENO"; then :
9516
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9518 $as_echo "yes" >&6; }
9519 can_add_to_cflags=yes
9520 #
9521 # The compile supports this; do we have some C code for
9522 # which the warning should *not* appear?
9523 # We test the fourth argument because the third argument
9524 # could contain quotes, breaking the test.
9525 #
9526 if test "x" != "x"
9527 then
9528 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
9530 $as_echo_n "checking whether -Wdocumentation ... " >&6; }
9531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9532 /* end confdefs.h. */
9533
9534 _ACEOF
9535 if ac_fn_c_try_compile "$LINENO"; then :
9536
9537 #
9538 # Not a problem.
9539 #
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541 $as_echo "no" >&6; }
9542
9543 else
9544
9545 #
9546 # A problem.
9547 #
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9549 $as_echo "yes" >&6; }
9550 can_add_to_cflags=no
9551
9552 fi
9553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9554 fi
9555 CFLAGS="$save_CFLAGS"
9556 if test x"$can_add_to_cflags" = "xyes"
9557 then
9558 V_CCOPT="$V_CCOPT -Wdocumentation"
9559 fi
9560
9561 else
9562
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564 $as_echo "no" >&6; }
9565 CFLAGS="$save_CFLAGS"
9566
9567 fi
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9569
9570
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
9572 $as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
9573 save_CFLAGS="$CFLAGS"
9574 if expr "x-Wformat-nonliteral" : "x-W.*" >/dev/null
9575 then
9576 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral"
9577 elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null
9578 then
9579 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9580 elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null
9581 then
9582 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9583 else
9584 CFLAGS="$CFLAGS -Wformat-nonliteral"
9585 fi
9586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9587 /* end confdefs.h. */
9588
9589 int
9590 main ()
9591 {
9592 return 0
9593 ;
9594 return 0;
9595 }
9596 _ACEOF
9597 if ac_fn_c_try_compile "$LINENO"; then :
9598
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9600 $as_echo "yes" >&6; }
9601 can_add_to_cflags=yes
9602 #
9603 # The compile supports this; do we have some C code for
9604 # which the warning should *not* appear?
9605 # We test the fourth argument because the third argument
9606 # could contain quotes, breaking the test.
9607 #
9608 if test "x" != "x"
9609 then
9610 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
9612 $as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
9613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9614 /* end confdefs.h. */
9615
9616 _ACEOF
9617 if ac_fn_c_try_compile "$LINENO"; then :
9618
9619 #
9620 # Not a problem.
9621 #
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9623 $as_echo "no" >&6; }
9624
9625 else
9626
9627 #
9628 # A problem.
9629 #
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9631 $as_echo "yes" >&6; }
9632 can_add_to_cflags=no
9633
9634 fi
9635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9636 fi
9637 CFLAGS="$save_CFLAGS"
9638 if test x"$can_add_to_cflags" = "xyes"
9639 then
9640 V_CCOPT="$V_CCOPT -Wformat-nonliteral"
9641 fi
9642
9643 else
9644
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9646 $as_echo "no" >&6; }
9647 CFLAGS="$save_CFLAGS"
9648
9649 fi
9650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9651
9652
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
9654 $as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
9655 save_CFLAGS="$CFLAGS"
9656 if expr "x-Wmissing-noreturn" : "x-W.*" >/dev/null
9657 then
9658 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn"
9659 elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null
9660 then
9661 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9662 elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null
9663 then
9664 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9665 else
9666 CFLAGS="$CFLAGS -Wmissing-noreturn"
9667 fi
9668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9669 /* end confdefs.h. */
9670
9671 int
9672 main ()
9673 {
9674 return 0
9675 ;
9676 return 0;
9677 }
9678 _ACEOF
9679 if ac_fn_c_try_compile "$LINENO"; then :
9680
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9682 $as_echo "yes" >&6; }
9683 can_add_to_cflags=yes
9684 #
9685 # The compile supports this; do we have some C code for
9686 # which the warning should *not* appear?
9687 # We test the fourth argument because the third argument
9688 # could contain quotes, breaking the test.
9689 #
9690 if test "x" != "x"
9691 then
9692 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
9694 $as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
9695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9696 /* end confdefs.h. */
9697
9698 _ACEOF
9699 if ac_fn_c_try_compile "$LINENO"; then :
9700
9701 #
9702 # Not a problem.
9703 #
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706
9707 else
9708
9709 #
9710 # A problem.
9711 #
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9713 $as_echo "yes" >&6; }
9714 can_add_to_cflags=no
9715
9716 fi
9717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9718 fi
9719 CFLAGS="$save_CFLAGS"
9720 if test x"$can_add_to_cflags" = "xyes"
9721 then
9722 V_CCOPT="$V_CCOPT -Wmissing-noreturn"
9723 fi
9724
9725 else
9726
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728 $as_echo "no" >&6; }
9729 CFLAGS="$save_CFLAGS"
9730
9731 fi
9732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9733
9734
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
9736 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
9737 save_CFLAGS="$CFLAGS"
9738 if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
9739 then
9740 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
9741 elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
9742 then
9743 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9744 elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
9745 then
9746 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9747 else
9748 CFLAGS="$CFLAGS -Wmissing-prototypes"
9749 fi
9750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9751 /* end confdefs.h. */
9752
9753 int
9754 main ()
9755 {
9756 return 0
9757 ;
9758 return 0;
9759 }
9760 _ACEOF
9761 if ac_fn_c_try_compile "$LINENO"; then :
9762
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9764 $as_echo "yes" >&6; }
9765 can_add_to_cflags=yes
9766 #
9767 # The compile supports this; do we have some C code for
9768 # which the warning should *not* appear?
9769 # We test the fourth argument because the third argument
9770 # could contain quotes, breaking the test.
9771 #
9772 if test "x" != "x"
9773 then
9774 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
9776 $as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
9777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9778 /* end confdefs.h. */
9779
9780 _ACEOF
9781 if ac_fn_c_try_compile "$LINENO"; then :
9782
9783 #
9784 # Not a problem.
9785 #
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9787 $as_echo "no" >&6; }
9788
9789 else
9790
9791 #
9792 # A problem.
9793 #
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9795 $as_echo "yes" >&6; }
9796 can_add_to_cflags=no
9797
9798 fi
9799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9800 fi
9801 CFLAGS="$save_CFLAGS"
9802 if test x"$can_add_to_cflags" = "xyes"
9803 then
9804 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
9805 fi
9806
9807 else
9808
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810 $as_echo "no" >&6; }
9811 CFLAGS="$save_CFLAGS"
9812
9813 fi
9814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9815
9816
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
9818 $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
9819 save_CFLAGS="$CFLAGS"
9820 if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
9821 then
9822 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
9823 elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
9824 then
9825 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9826 elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
9827 then
9828 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9829 else
9830 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
9831 fi
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833 /* end confdefs.h. */
9834
9835 int
9836 main ()
9837 {
9838 return 0
9839 ;
9840 return 0;
9841 }
9842 _ACEOF
9843 if ac_fn_c_try_compile "$LINENO"; then :
9844
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9846 $as_echo "yes" >&6; }
9847 can_add_to_cflags=yes
9848 #
9849 # The compile supports this; do we have some C code for
9850 # which the warning should *not* appear?
9851 # We test the fourth argument because the third argument
9852 # could contain quotes, breaking the test.
9853 #
9854 if test "x" != "x"
9855 then
9856 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
9858 $as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
9859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9860 /* end confdefs.h. */
9861
9862 _ACEOF
9863 if ac_fn_c_try_compile "$LINENO"; then :
9864
9865 #
9866 # Not a problem.
9867 #
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869 $as_echo "no" >&6; }
9870
9871 else
9872
9873 #
9874 # A problem.
9875 #
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9877 $as_echo "yes" >&6; }
9878 can_add_to_cflags=no
9879
9880 fi
9881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9882 fi
9883 CFLAGS="$save_CFLAGS"
9884 if test x"$can_add_to_cflags" = "xyes"
9885 then
9886 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
9887 fi
9888
9889 else
9890
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892 $as_echo "no" >&6; }
9893 CFLAGS="$save_CFLAGS"
9894
9895 fi
9896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9897
9898
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
9900 $as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
9901 save_CFLAGS="$CFLAGS"
9902 if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
9903 then
9904 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
9905 elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
9906 then
9907 CFLAGS="$CFLAGS -Werror -Wpointer-arith"
9908 elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
9909 then
9910 CFLAGS="$CFLAGS -Werror -Wpointer-arith"
9911 else
9912 CFLAGS="$CFLAGS -Wpointer-arith"
9913 fi
9914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9915 /* end confdefs.h. */
9916
9917 int
9918 main ()
9919 {
9920 return 0
9921 ;
9922 return 0;
9923 }
9924 _ACEOF
9925 if ac_fn_c_try_compile "$LINENO"; then :
9926
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9928 $as_echo "yes" >&6; }
9929 can_add_to_cflags=yes
9930 #
9931 # The compile supports this; do we have some C code for
9932 # which the warning should *not* appear?
9933 # We test the fourth argument because the third argument
9934 # could contain quotes, breaking the test.
9935 #
9936 if test "x" != "x"
9937 then
9938 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
9940 $as_echo_n "checking whether -Wpointer-arith ... " >&6; }
9941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9942 /* end confdefs.h. */
9943
9944 _ACEOF
9945 if ac_fn_c_try_compile "$LINENO"; then :
9946
9947 #
9948 # Not a problem.
9949 #
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951 $as_echo "no" >&6; }
9952
9953 else
9954
9955 #
9956 # A problem.
9957 #
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9959 $as_echo "yes" >&6; }
9960 can_add_to_cflags=no
9961
9962 fi
9963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9964 fi
9965 CFLAGS="$save_CFLAGS"
9966 if test x"$can_add_to_cflags" = "xyes"
9967 then
9968 V_CCOPT="$V_CCOPT -Wpointer-arith"
9969 fi
9970
9971 else
9972
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974 $as_echo "no" >&6; }
9975 CFLAGS="$save_CFLAGS"
9976
9977 fi
9978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9979
9980
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
9982 $as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
9983 save_CFLAGS="$CFLAGS"
9984 if expr "x-Wpointer-sign" : "x-W.*" >/dev/null
9985 then
9986 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-sign"
9987 elif expr "x-Wpointer-sign" : "x-f.*" >/dev/null
9988 then
9989 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
9990 elif expr "x-Wpointer-sign" : "x-m.*" >/dev/null
9991 then
9992 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
9993 else
9994 CFLAGS="$CFLAGS -Wpointer-sign"
9995 fi
9996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997 /* end confdefs.h. */
9998
9999 int
10000 main ()
10001 {
10002 return 0
10003 ;
10004 return 0;
10005 }
10006 _ACEOF
10007 if ac_fn_c_try_compile "$LINENO"; then :
10008
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10010 $as_echo "yes" >&6; }
10011 can_add_to_cflags=yes
10012 #
10013 # The compile supports this; do we have some C code for
10014 # which the warning should *not* appear?
10015 # We test the fourth argument because the third argument
10016 # could contain quotes, breaking the test.
10017 #
10018 if test "x" != "x"
10019 then
10020 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
10022 $as_echo_n "checking whether -Wpointer-sign ... " >&6; }
10023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10024 /* end confdefs.h. */
10025
10026 _ACEOF
10027 if ac_fn_c_try_compile "$LINENO"; then :
10028
10029 #
10030 # Not a problem.
10031 #
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033 $as_echo "no" >&6; }
10034
10035 else
10036
10037 #
10038 # A problem.
10039 #
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10041 $as_echo "yes" >&6; }
10042 can_add_to_cflags=no
10043
10044 fi
10045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10046 fi
10047 CFLAGS="$save_CFLAGS"
10048 if test x"$can_add_to_cflags" = "xyes"
10049 then
10050 V_CCOPT="$V_CCOPT -Wpointer-sign"
10051 fi
10052
10053 else
10054
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056 $as_echo "no" >&6; }
10057 CFLAGS="$save_CFLAGS"
10058
10059 fi
10060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10061
10062
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
10064 $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
10065 save_CFLAGS="$CFLAGS"
10066 if expr "x-Wshadow" : "x-W.*" >/dev/null
10067 then
10068 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
10069 elif expr "x-Wshadow" : "x-f.*" >/dev/null
10070 then
10071 CFLAGS="$CFLAGS -Werror -Wshadow"
10072 elif expr "x-Wshadow" : "x-m.*" >/dev/null
10073 then
10074 CFLAGS="$CFLAGS -Werror -Wshadow"
10075 else
10076 CFLAGS="$CFLAGS -Wshadow"
10077 fi
10078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10079 /* end confdefs.h. */
10080
10081 int
10082 main ()
10083 {
10084 return 0
10085 ;
10086 return 0;
10087 }
10088 _ACEOF
10089 if ac_fn_c_try_compile "$LINENO"; then :
10090
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10092 $as_echo "yes" >&6; }
10093 can_add_to_cflags=yes
10094 #
10095 # The compile supports this; do we have some C code for
10096 # which the warning should *not* appear?
10097 # We test the fourth argument because the third argument
10098 # could contain quotes, breaking the test.
10099 #
10100 if test "x" != "x"
10101 then
10102 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
10104 $as_echo_n "checking whether -Wshadow ... " >&6; }
10105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10106 /* end confdefs.h. */
10107
10108 _ACEOF
10109 if ac_fn_c_try_compile "$LINENO"; then :
10110
10111 #
10112 # Not a problem.
10113 #
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115 $as_echo "no" >&6; }
10116
10117 else
10118
10119 #
10120 # A problem.
10121 #
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10123 $as_echo "yes" >&6; }
10124 can_add_to_cflags=no
10125
10126 fi
10127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10128 fi
10129 CFLAGS="$save_CFLAGS"
10130 if test x"$can_add_to_cflags" = "xyes"
10131 then
10132 V_CCOPT="$V_CCOPT -Wshadow"
10133 fi
10134
10135 else
10136
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10138 $as_echo "no" >&6; }
10139 CFLAGS="$save_CFLAGS"
10140
10141 fi
10142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10143
10144
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
10146 $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
10147 save_CFLAGS="$CFLAGS"
10148 if expr "x-Wsign-compare" : "x-W.*" >/dev/null
10149 then
10150 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
10151 elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
10152 then
10153 CFLAGS="$CFLAGS -Werror -Wsign-compare"
10154 elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
10155 then
10156 CFLAGS="$CFLAGS -Werror -Wsign-compare"
10157 else
10158 CFLAGS="$CFLAGS -Wsign-compare"
10159 fi
10160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10161 /* end confdefs.h. */
10162
10163 int
10164 main ()
10165 {
10166 return 0
10167 ;
10168 return 0;
10169 }
10170 _ACEOF
10171 if ac_fn_c_try_compile "$LINENO"; then :
10172
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10174 $as_echo "yes" >&6; }
10175 can_add_to_cflags=yes
10176 #
10177 # The compile supports this; do we have some C code for
10178 # which the warning should *not* appear?
10179 # We test the fourth argument because the third argument
10180 # could contain quotes, breaking the test.
10181 #
10182 if test "x" != "x"
10183 then
10184 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
10186 $as_echo_n "checking whether -Wsign-compare ... " >&6; }
10187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10188 /* end confdefs.h. */
10189
10190 _ACEOF
10191 if ac_fn_c_try_compile "$LINENO"; then :
10192
10193 #
10194 # Not a problem.
10195 #
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197 $as_echo "no" >&6; }
10198
10199 else
10200
10201 #
10202 # A problem.
10203 #
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10205 $as_echo "yes" >&6; }
10206 can_add_to_cflags=no
10207
10208 fi
10209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10210 fi
10211 CFLAGS="$save_CFLAGS"
10212 if test x"$can_add_to_cflags" = "xyes"
10213 then
10214 V_CCOPT="$V_CCOPT -Wsign-compare"
10215 fi
10216
10217 else
10218
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10220 $as_echo "no" >&6; }
10221 CFLAGS="$save_CFLAGS"
10222
10223 fi
10224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10225
10226
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
10228 $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
10229 save_CFLAGS="$CFLAGS"
10230 if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
10231 then
10232 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
10233 elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
10234 then
10235 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
10236 elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
10237 then
10238 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
10239 else
10240 CFLAGS="$CFLAGS -Wstrict-prototypes"
10241 fi
10242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10243 /* end confdefs.h. */
10244
10245 int
10246 main ()
10247 {
10248 return 0
10249 ;
10250 return 0;
10251 }
10252 _ACEOF
10253 if ac_fn_c_try_compile "$LINENO"; then :
10254
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10256 $as_echo "yes" >&6; }
10257 can_add_to_cflags=yes
10258 #
10259 # The compile supports this; do we have some C code for
10260 # which the warning should *not* appear?
10261 # We test the fourth argument because the third argument
10262 # could contain quotes, breaking the test.
10263 #
10264 if test "x" != "x"
10265 then
10266 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
10268 $as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
10269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10270 /* end confdefs.h. */
10271
10272 _ACEOF
10273 if ac_fn_c_try_compile "$LINENO"; then :
10274
10275 #
10276 # Not a problem.
10277 #
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279 $as_echo "no" >&6; }
10280
10281 else
10282
10283 #
10284 # A problem.
10285 #
10286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10287 $as_echo "yes" >&6; }
10288 can_add_to_cflags=no
10289
10290 fi
10291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10292 fi
10293 CFLAGS="$save_CFLAGS"
10294 if test x"$can_add_to_cflags" = "xyes"
10295 then
10296 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
10297 fi
10298
10299 else
10300
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302 $as_echo "no" >&6; }
10303 CFLAGS="$save_CFLAGS"
10304
10305 fi
10306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10307
10308
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
10310 $as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
10311 save_CFLAGS="$CFLAGS"
10312 if expr "x-Wunused-parameter" : "x-W.*" >/dev/null
10313 then
10314 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter"
10315 elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null
10316 then
10317 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
10318 elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null
10319 then
10320 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
10321 else
10322 CFLAGS="$CFLAGS -Wunused-parameter"
10323 fi
10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325 /* end confdefs.h. */
10326
10327 int
10328 main ()
10329 {
10330 return 0
10331 ;
10332 return 0;
10333 }
10334 _ACEOF
10335 if ac_fn_c_try_compile "$LINENO"; then :
10336
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10338 $as_echo "yes" >&6; }
10339 can_add_to_cflags=yes
10340 #
10341 # The compile supports this; do we have some C code for
10342 # which the warning should *not* appear?
10343 # We test the fourth argument because the third argument
10344 # could contain quotes, breaking the test.
10345 #
10346 if test "x" != "x"
10347 then
10348 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
10350 $as_echo_n "checking whether -Wunused-parameter ... " >&6; }
10351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10352 /* end confdefs.h. */
10353
10354 _ACEOF
10355 if ac_fn_c_try_compile "$LINENO"; then :
10356
10357 #
10358 # Not a problem.
10359 #
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10361 $as_echo "no" >&6; }
10362
10363 else
10364
10365 #
10366 # A problem.
10367 #
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10369 $as_echo "yes" >&6; }
10370 can_add_to_cflags=no
10371
10372 fi
10373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10374 fi
10375 CFLAGS="$save_CFLAGS"
10376 if test x"$can_add_to_cflags" = "xyes"
10377 then
10378 V_CCOPT="$V_CCOPT -Wunused-parameter"
10379 fi
10380
10381 else
10382
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384 $as_echo "no" >&6; }
10385 CFLAGS="$save_CFLAGS"
10386
10387 fi
10388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10389
10390
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
10392 $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
10393 save_CFLAGS="$CFLAGS"
10394 if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
10395 then
10396 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
10397 elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
10398 then
10399 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
10400 elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
10401 then
10402 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
10403 else
10404 CFLAGS="$CFLAGS -Wused-but-marked-unused"
10405 fi
10406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10407 /* end confdefs.h. */
10408
10409 int
10410 main ()
10411 {
10412 return 0
10413 ;
10414 return 0;
10415 }
10416 _ACEOF
10417 if ac_fn_c_try_compile "$LINENO"; then :
10418
10419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10420 $as_echo "yes" >&6; }
10421 can_add_to_cflags=yes
10422 #
10423 # The compile supports this; do we have some C code for
10424 # which the warning should *not* appear?
10425 # We test the fourth argument because the third argument
10426 # could contain quotes, breaking the test.
10427 #
10428 if test "x" != "x"
10429 then
10430 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
10432 $as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
10433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10434 /* end confdefs.h. */
10435
10436 _ACEOF
10437 if ac_fn_c_try_compile "$LINENO"; then :
10438
10439 #
10440 # Not a problem.
10441 #
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443 $as_echo "no" >&6; }
10444
10445 else
10446
10447 #
10448 # A problem.
10449 #
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10451 $as_echo "yes" >&6; }
10452 can_add_to_cflags=no
10453
10454 fi
10455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10456 fi
10457 CFLAGS="$save_CFLAGS"
10458 if test x"$can_add_to_cflags" = "xyes"
10459 then
10460 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
10461 fi
10462
10463 else
10464
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10466 $as_echo "no" >&6; }
10467 CFLAGS="$save_CFLAGS"
10468
10469 fi
10470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10471
10472 # Warns about safeguards added in case the enums are
10473 # extended
10474 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
10475 #
10476 # This can cause problems with ntohs(), ntohl(),
10477 # htons(), and htonl() on some platforms, such
10478 # as OpenBSD 6.3 with Clang 5.0.1. I guess the
10479 # problem is that the macro that ultimately does
10480 # the byte-swapping involves a conditional
10481 # expression that tests whether the value being
10482 # swapped is a compile-time constant or not,
10483 # using __builtin_constant_p(), and, depending
10484 # on whether it is, does a compile-time swap or
10485 # a run-time swap; perhaps the compiler always
10486 # considers one of the two results of the
10487 # conditional expressin is never evaluated,
10488 # because the conditional check is done at
10489 # compile time, and thus always says "that
10490 # expression is never executed".
10491 #
10492 # (Perhaps there should be a way of flagging
10493 # an expression that you *want* evaluated at
10494 # compile time, so that the compiler 1) warns
10495 # if it *can't* be evaluated at compile time
10496 # and 2) *doesn't* warn that the true or false
10497 # branch will never be reached.)
10498 #
10499
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
10501 $as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
10502 save_CFLAGS="$CFLAGS"
10503 if expr "x-Wunreachable-code" : "x-W.*" >/dev/null
10504 then
10505 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code"
10506 elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null
10507 then
10508 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
10509 elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null
10510 then
10511 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
10512 else
10513 CFLAGS="$CFLAGS -Wunreachable-code"
10514 fi
10515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516 /* end confdefs.h. */
10517
10518 int
10519 main ()
10520 {
10521 return 0
10522 ;
10523 return 0;
10524 }
10525 _ACEOF
10526 if ac_fn_c_try_compile "$LINENO"; then :
10527
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10529 $as_echo "yes" >&6; }
10530 can_add_to_cflags=yes
10531 #
10532 # The compile supports this; do we have some C code for
10533 # which the warning should *not* appear?
10534 # We test the fourth argument because the third argument
10535 # could contain quotes, breaking the test.
10536 #
10537 if test "xgenerates warnings from ntohs()" != "x"
10538 then
10539 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
10541 $as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
10542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10543 /* end confdefs.h. */
10544 #include <arpa/inet.h>
10545
10546 unsigned short
10547 testme(unsigned short a)
10548 {
10549 return ntohs(a);
10550 }
10551
10552 _ACEOF
10553 if ac_fn_c_try_compile "$LINENO"; then :
10554
10555 #
10556 # Not a problem.
10557 #
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10559 $as_echo "no" >&6; }
10560
10561 else
10562
10563 #
10564 # A problem.
10565 #
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10567 $as_echo "yes" >&6; }
10568 can_add_to_cflags=no
10569
10570 fi
10571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10572 fi
10573 CFLAGS="$save_CFLAGS"
10574 if test x"$can_add_to_cflags" = "xyes"
10575 then
10576 V_CCOPT="$V_CCOPT -Wunreachable-code"
10577 fi
10578
10579 else
10580
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10582 $as_echo "no" >&6; }
10583 CFLAGS="$save_CFLAGS"
10584
10585 fi
10586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10587
10588
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
10590 $as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
10591 save_CFLAGS="$CFLAGS"
10592 if expr "x-Wshorten-64-to-32" : "x-W.*" >/dev/null
10593 then
10594 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshorten-64-to-32"
10595 elif expr "x-Wshorten-64-to-32" : "x-f.*" >/dev/null
10596 then
10597 CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10598 elif expr "x-Wshorten-64-to-32" : "x-m.*" >/dev/null
10599 then
10600 CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10601 else
10602 CFLAGS="$CFLAGS -Wshorten-64-to-32"
10603 fi
10604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10605 /* end confdefs.h. */
10606
10607 int
10608 main ()
10609 {
10610 return 0
10611 ;
10612 return 0;
10613 }
10614 _ACEOF
10615 if ac_fn_c_try_compile "$LINENO"; then :
10616
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10618 $as_echo "yes" >&6; }
10619 can_add_to_cflags=yes
10620 #
10621 # The compile supports this; do we have some C code for
10622 # which the warning should *not* appear?
10623 # We test the fourth argument because the third argument
10624 # could contain quotes, breaking the test.
10625 #
10626 if test "x" != "x"
10627 then
10628 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
10630 $as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
10631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632 /* end confdefs.h. */
10633
10634 _ACEOF
10635 if ac_fn_c_try_compile "$LINENO"; then :
10636
10637 #
10638 # Not a problem.
10639 #
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641 $as_echo "no" >&6; }
10642
10643 else
10644
10645 #
10646 # A problem.
10647 #
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10649 $as_echo "yes" >&6; }
10650 can_add_to_cflags=no
10651
10652 fi
10653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654 fi
10655 CFLAGS="$save_CFLAGS"
10656 if test x"$can_add_to_cflags" = "xyes"
10657 then
10658 V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
10659 fi
10660
10661 else
10662
10663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664 $as_echo "no" >&6; }
10665 CFLAGS="$save_CFLAGS"
10666
10667 fi
10668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10669
10670 fi
10671
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
10673 $as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
10674 if test "$GCC" = yes ; then
10675 #
10676 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
10677 # though it's not); we assume that, in this case, the flag
10678 # would be -M.
10679 #
10680 ac_lbl_dependency_flag="-M"
10681 else
10682 #
10683 # Not GCC or a compiler deemed to be GCC; what platform is
10684 # this? (We're assuming that if the compiler isn't GCC
10685 # it's the compiler from the vendor of the OS; that won't
10686 # necessarily be true for x86 platforms, where it might be
10687 # the Intel C compiler.)
10688 #
10689 case "$host_os" in
10690
10691 irix*|osf*|darwin*)
10692 #
10693 # MIPS C for IRIX, DEC C, and clang all use -M.
10694 #
10695 ac_lbl_dependency_flag="-M"
10696 ;;
10697
10698 solaris*)
10699 #
10700 # Sun C uses -xM.
10701 #
10702 ac_lbl_dependency_flag="-xM"
10703 ;;
10704
10705 hpux*)
10706 #
10707 # HP's older C compilers don't support this.
10708 # HP's newer C compilers support this with
10709 # either +M or +Make; the older compilers
10710 # interpret +M as something completely
10711 # different, so we use +Make so we don't
10712 # think it works with the older compilers.
10713 #
10714 ac_lbl_dependency_flag="+Make"
10715 ;;
10716
10717 *)
10718 #
10719 # Not one of the above; assume no support for
10720 # generating dependencies.
10721 #
10722 ac_lbl_dependency_flag=""
10723 ;;
10724 esac
10725 fi
10726
10727 #
10728 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
10729 # complain about it?
10730 #
10731 # Note: clang doesn't seem to exit with an error status when handed
10732 # an unknown non-warning error, even if you pass it
10733 # -Werror=unknown-warning-option. However, it always supports
10734 # -M, so the fact that this test always succeeds with clang
10735 # isn't an issue.
10736 #
10737 if test ! -z "$ac_lbl_dependency_flag"; then
10738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10739 /* end confdefs.h. */
10740 int main(void) { return 0; }
10741 _ACEOF
10742 if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
10743 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
10744 ac_status=$?
10745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10746 test $ac_status = 0; }; then
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
10748 $as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
10749 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
10750 MKDEP='${top_srcdir}/mkdep'
10751 else
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10753 $as_echo "no" >&6; }
10754 #
10755 # We can't run mkdep, so have "make depend" do
10756 # nothing.
10757 #
10758 MKDEP='${top_srcdir}/nomkdep'
10759 fi
10760 rm -rf conftest*
10761 else
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763 $as_echo "no" >&6; }
10764 #
10765 # We can't run mkdep, so have "make depend" do
10766 # nothing.
10767 #
10768 MKDEP='${top_srcdir}/nomkdep'
10769 fi
10770
10771
10772
10773 #
10774 # We used to set -n32 for IRIX 6 when not using GCC (presumed
10775 # to mean that we're using MIPS C or MIPSpro C); it specified
10776 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
10777 # not sure why that would be something to do *only* with a
10778 # .devel file; why should the ABI for which we produce code
10779 # depend on .devel?
10780 #
10781 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
10782 name="lbl/os-$os.h"
10783 if test -f $name ; then
10784 ln -s $name os-proto.h
10785
10786 $as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
10787
10788 else
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
10790 $as_echo "$as_me: WARNING: can't find $name" >&2;}
10791 fi
10792 fi
10793
10794 #
10795 # Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
10796 #
10797 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
10798 #include <sys/types.h>
10799 #include <sys/socket.h>
10800
10801 "
10802 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10803
10804 cat >>confdefs.h <<_ACEOF
10805 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10806 _ACEOF
10807
10808
10809 fi
10810
10811
10812 #
10813 # Check to see if there's a sockaddr_storage structure.
10814 #
10815 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10816 #include <sys/types.h>
10817 #include <sys/socket.h>
10818
10819 "
10820 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10821
10822 cat >>confdefs.h <<_ACEOF
10823 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10824 _ACEOF
10825
10826
10827 fi
10828
10829
10830 #
10831 # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
10832 # dl_module_id_1 member.
10833 #
10834 # NOTE: any failure means we conclude that it doesn't have that member,
10835 # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
10836 # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
10837 # it doesn't have that member (which is OK, as either we won't be
10838 # using code that would use that member, or we wouldn't compile in
10839 # any case).
10840 #
10841 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" "
10842 #include <sys/types.h>
10843 #include <sys/dlpi.h>
10844 #include <sys/dlpi_ext.h>
10845
10846 "
10847 if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
10848
10849 cat >>confdefs.h <<_ACEOF
10850 #define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
10851 _ACEOF
10852
10853
10854 fi
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888 #
10889 # Various Linux-specific mechanisms.
10890 #
10891 # Check whether --enable-usb was given.
10892 if test "${enable_usb+set}" = set; then :
10893 enableval=$enable_usb;
10894 else
10895 enable_usb=yes
10896 fi
10897
10898
10899 #
10900 # If somebody requested an XXX-only pcap, that doesn't include
10901 # additional mechanisms.
10902 #
10903 if test "xxx_only" != yes; then
10904 case "$host_os" in
10905 linux*)
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
10907 $as_echo_n "checking for Linux usbmon USB sniffing support... " >&6; }
10908 if test "x$enable_usb" != "xno" ; then
10909
10910 $as_echo "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
10911
10912 MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10914 $as_echo "yes" >&6; }
10915 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
10916 if test $? -ne 0 ; then
10917 ac_usb_dev_name="usbmon"
10918 fi
10919
10920 cat >>confdefs.h <<_ACEOF
10921 #define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
10922 _ACEOF
10923
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
10925 $as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
10926 #
10927 # Do we have a version of <linux/compiler.h> available?
10928 # If so, we might need it for <linux/usbdevice_fs.h>.
10929 #
10930 for ac_header in linux/compiler.h
10931 do :
10932 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
10933 if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
10934 cat >>confdefs.h <<_ACEOF
10935 #define HAVE_LINUX_COMPILER_H 1
10936 _ACEOF
10937
10938 fi
10939
10940 done
10941
10942 if test "$ac_cv_header_linux_compiler_h" = yes; then
10943 #
10944 # Yes - include it when testing for <linux/usbdevice_fs.h>.
10945 #
10946 for ac_header in linux/usbdevice_fs.h
10947 do :
10948 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
10949 "
10950 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
10951 cat >>confdefs.h <<_ACEOF
10952 #define HAVE_LINUX_USBDEVICE_FS_H 1
10953 _ACEOF
10954
10955 fi
10956
10957 done
10958
10959 else
10960 for ac_header in linux/usbdevice_fs.h
10961 do :
10962 ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
10963 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
10964 cat >>confdefs.h <<_ACEOF
10965 #define HAVE_LINUX_USBDEVICE_FS_H 1
10966 _ACEOF
10967
10968 fi
10969
10970 done
10971
10972 fi
10973 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
10974 #
10975 # OK, does it define bRequestType? Older versions of the kernel
10976 # define fields with names like "requesttype, "request", and
10977 # "value", rather than "bRequestType", "bRequest", and
10978 # "wValue".
10979 #
10980 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
10981 $ac_includes_default
10982 #ifdef HAVE_LINUX_COMPILER_H
10983 #include <linux/compiler.h>
10984 #endif
10985 #include <linux/usbdevice_fs.h>
10986
10987 "
10988 if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
10989
10990 cat >>confdefs.h <<_ACEOF
10991 #define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
10992 _ACEOF
10993
10994
10995 fi
10996
10997 fi
10998 else
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000 $as_echo "no" >&6; }
11001 fi
11002
11003 #
11004 # Life's too short to deal with trying to get this to compile
11005 # if you don't get the right types defined with
11006 # __KERNEL_STRICT_NAMES getting defined by some other include.
11007 #
11008 # Check whether the includes Just Work. If not, don't turn on
11009 # netfilter support.
11010 #
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
11012 $as_echo_n "checking whether we can compile the netfilter support... " >&6; }
11013 if ${ac_cv_netfilter_can_compile+:} false; then :
11014 $as_echo_n "(cached) " >&6
11015 else
11016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11017 /* end confdefs.h. */
11018
11019 $ac_includes_default
11020 #include <sys/socket.h>
11021 #include <netinet/in.h>
11022 #include <linux/types.h>
11023
11024 #include <linux/netlink.h>
11025 #include <linux/netfilter.h>
11026 #include <linux/netfilter/nfnetlink.h>
11027 #include <linux/netfilter/nfnetlink_log.h>
11028 #include <linux/netfilter/nfnetlink_queue.h>
11029 int
11030 main ()
11031 {
11032
11033 ;
11034 return 0;
11035 }
11036 _ACEOF
11037 if ac_fn_c_try_compile "$LINENO"; then :
11038 ac_cv_netfilter_can_compile=yes
11039 else
11040 ac_cv_netfilter_can_compile=no
11041 fi
11042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11043 fi
11044
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
11046 $as_echo "$ac_cv_netfilter_can_compile" >&6; }
11047 if test $ac_cv_netfilter_can_compile = yes ; then
11048
11049 $as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
11050
11051 MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
11052 fi
11053 ;;
11054 esac
11055 fi
11056
11057
11058
11059 # Check whether --enable-netmap was given.
11060 if test "${enable_netmap+set}" = set; then :
11061 enableval=$enable_netmap;
11062 else
11063 enable_netmap=yes
11064 fi
11065
11066
11067 if test "x$enable_netmap" != "xno" ; then
11068 #
11069 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
11070 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
11071 # is defined, for example, as it includes a non-existent malloc.h
11072 # header.
11073 #
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
11075 $as_echo_n "checking whether we can compile the netmap support... " >&6; }
11076 if ${ac_cv_net_netmap_user_can_compile+:} false; then :
11077 $as_echo_n "(cached) " >&6
11078 else
11079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11080 /* end confdefs.h. */
11081
11082 $ac_includes_default
11083 #define NETMAP_WITH_LIBS
11084 #include <net/netmap_user.h>
11085 int
11086 main ()
11087 {
11088
11089 ;
11090 return 0;
11091 }
11092 _ACEOF
11093 if ac_fn_c_try_compile "$LINENO"; then :
11094 ac_cv_net_netmap_user_can_compile=yes
11095 else
11096 ac_cv_net_netmap_user_can_compile=no
11097 fi
11098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11099 fi
11100
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
11102 $as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
11103 if test $ac_cv_net_netmap_user_can_compile = yes ; then
11104
11105 $as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
11106
11107 MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
11108 fi
11109
11110 fi
11111
11112 # Check for DPDK support.
11113
11114 # Check whether --with-dpdk was given.
11115 if test "${with_dpdk+set}" = set; then :
11116 withval=$with_dpdk;
11117 if test "$withval" = no
11118 then
11119 # User doesn't want DPDK support.
11120 want_dpdk=no
11121 elif test "$withval" = yes
11122 then
11123 # User wants DPDK support but hasn't specified a directory.
11124 want_dpdk=yes
11125 else
11126 # User wants DPDK support and has specified a directory,
11127 # so use the provided value.
11128 want_dpdk=yes
11129 dpdk_dir=$withval
11130 fi
11131
11132 else
11133
11134 if test "$V_PCAP" = dpdk; then
11135 # User requested DPDK-only libpcap, so we'd better have
11136 # the DPDK API.
11137 want_dpdk=yes
11138 elif test "xxx_only" = yes; then
11139 # User requested something-else-only pcap, so they don't
11140 # want DPDK support.
11141 want_dpdk=no
11142 else
11143 #
11144 # Use DPDK API if present, otherwise don't
11145 #
11146 want_dpdk=ifpresent
11147 fi
11148
11149 fi
11150
11151
11152 if test "$want_dpdk" != no; then
11153 if test "x$PKGCONFIG" != "xno"
11154 then
11155 #
11156 # We have pkg-config; see if we have DPDK installed
11157 # as a package.
11158 #
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPDK with pkg-config" >&5
11160 $as_echo_n "checking for DPDK with pkg-config... " >&6; }
11161 if "$PKGCONFIG" libdpdk
11162 then
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
11164 $as_echo "found" >&6; }
11165 found_dpdk_with_pkg_config=yes
11166 DPDK_CFLAGS=`"$PKGCONFIG" --cflags libdpdk`
11167 DPDK_LDFLAGS=`"$PKGCONFIG" --libs libdpdk`
11168 else
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11170 $as_echo "not found" >&6; }
11171 fi
11172 fi
11173
11174 #
11175 # If we didn't find it with pkg-config, try checking for
11176 # it manually.
11177 #
11178 if test "x$found_dpdk_with_pkg_config" != "xyes"
11179 then
11180 if test -z "$dpdk_dir"; then
11181 #
11182 # The user didn't specify a directory containing
11183 # the DPDK headers and libraries. If we find
11184 # a /usr/local/include/dpdk directory, assume
11185 # it's /usr/local, otherwise assume it's /usr.
11186 #
11187 if test -d "/usr/local/include/dpdk"; then
11188 dpdk_dir="/usr/local"
11189 else
11190 dpdk_dir="/usr"
11191 fi
11192 fi
11193 #
11194 # The convention appears to be that 1) there's a "dpdk"
11195 # subdirectory of the include directory, containing DPDK
11196 # headers (at least in the installation on Ubuntu with
11197 # the system DPDK packages) and 2) includes of DPDK
11198 # headers don't use "dpdk/{header}" (at least from the
11199 # way the DPDK documentation is written).
11200 #
11201 # So we add "/dpdk" to the include directory, and always
11202 # add that to the list of include directories to search.
11203 #
11204 dpdk_inc_dir="$dpdk_dir/include/dpdk"
11205 dpdk_inc_flags="-I$dpdk_inc_dir"
11206 dpdk_lib_dir="$dpdk_dir/lib"
11207 #
11208 # Handle multiarch systems.
11209 #
11210 # Step 1: run the C compiler with the -dumpmachine option;
11211 # if it succeeds, the output would be the multiarch directory
11212 # name if your system has multiarch directories.
11213 #
11214 multiarch_dir=`$CC -dumpmachine 2>/dev/null`
11215 if test ! -z "$multiarch_dir"
11216 then
11217 #
11218 # OK, we have a multiarch directory.
11219 #
11220 # Now deal with includes. On Ubuntu 20.04, for
11221 # example, we have /usr/include/dpdk *and*
11222 # /usr/include/$multiarch_dir/dpdk, and must
11223 # search both.
11224 #
11225 if test -d "$dpdk_dir/include/$multiarch_dir/dpdk"
11226 then
11227 dpdk_inc_flags="-I$dpdk_dir/include/$multiarch_dir/dpdk $dpdk_inc_flags"
11228 fi
11229
11230 #
11231 # Now deal with libraries.
11232 #
11233 if test -d "$dpdk_lib_dir/$multiarch_dir"
11234 then
11235 dpdk_lib_dir="$dpdk_lib_dir/$multiarch_dir"
11236 fi
11237 fi
11238 DPDK_MACHINE_CFLAGS="-march=native"
11239 DPDK_CFLAGS="$DPDK_MACHINE_CFLAGS $dpdk_inc_flags"
11240 DPDK_LDFLAGS="-L$dpdk_lib_dir -ldpdk -lrt -lm -lnuma -ldl -pthread"
11241 fi
11242
11243 save_CFLAGS="$CFLAGS"
11244 save_LIBS="$LIBS"
11245 save_LDFLAGS="$LDFLAGS"
11246 CFLAGS="$CFLAGS $DPDK_CFLAGS"
11247 LIBS="$LIBS $DPDK_LDFLAGS"
11248 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11249
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the DPDK support" >&5
11251 $as_echo_n "checking whether we can compile the DPDK support... " >&6; }
11252 if ${ac_cv_dpdk_can_compile+:} false; then :
11253 $as_echo_n "(cached) " >&6
11254 else
11255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256 /* end confdefs.h. */
11257
11258 $ac_includes_default
11259 #include <rte_common.h>
11260 int
11261 main ()
11262 {
11263
11264 ;
11265 return 0;
11266 }
11267 _ACEOF
11268 if ac_fn_c_try_compile "$LINENO"; then :
11269 ac_cv_dpdk_can_compile=yes
11270 else
11271 ac_cv_dpdk_can_compile=no
11272 fi
11273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11274 fi
11275
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dpdk_can_compile" >&5
11277 $as_echo "$ac_cv_dpdk_can_compile" >&6; }
11278
11279 #
11280 # We include rte_bus.h, and older versions of DPDK
11281 # didn't have it, so check for it.
11282 #
11283 if test "$ac_cv_dpdk_can_compile" = yes; then
11284 ac_fn_c_check_header_mongrel "$LINENO" "rte_bus.h" "ac_cv_header_rte_bus_h" "$ac_includes_default"
11285 if test "x$ac_cv_header_rte_bus_h" = xyes; then :
11286
11287 fi
11288
11289
11290 fi
11291
11292 #
11293 # We call rte_eth_dev_count_avail(), and older versions
11294 # of DPDK didn't have it, so check for it.
11295 #
11296 if test "$ac_cv_header_rte_bus_h" = yes; then
11297 ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
11298 if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes; then :
11299
11300 fi
11301
11302 fi
11303
11304 CFLAGS="$save_CFLAGS"
11305 LIBS="$save_LIBS"
11306 LDFLAGS="$save_LDFLAGS"
11307
11308 if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
11309 CFLAGS="$CFLAGS $DPDK_CFLAGS"
11310 LIBS="$LIBS $DPDK_LDFLAGS"
11311 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11312 V_INCLS="$V_INCLS $DPDK_CFLAGS"
11313
11314 $as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
11315
11316 if test $V_PCAP != dpdk ; then
11317 MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
11318 fi
11319
11320 #
11321 # Check whether the rte_ether.h file defines
11322 # struct ether_addr or struct rte_ether_addr.
11323 #
11324 # ("API compatibility? That's for losers!")
11325 #
11326 ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
11327 #include <rte_ether.h>
11328
11329 "
11330 if test "x$ac_cv_type_struct_rte_ether_addr" = xyes; then :
11331
11332 cat >>confdefs.h <<_ACEOF
11333 #define HAVE_STRUCT_RTE_ETHER_ADDR 1
11334 _ACEOF
11335
11336
11337 fi
11338
11339 else
11340 if test "$V_PCAP" = dpdk; then
11341 # User requested DPDK-only capture support, but
11342 # we couldn't the DPDK API support at all, or we
11343 # found it but it wasn't a sufficiently recent
11344 # version.
11345 if test "$ac_cv_dpdk_can_compile" != yes; then
11346 #
11347 # Couldn't even find the headers.
11348 #
11349 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
11350 else
11351 #
11352 # Found the headers, but we couldn't find
11353 # rte_bus.h or rte_eth_dev_count_avail(),
11354 # we don't have a sufficiently recent
11355 # version of DPDK.
11356 #
11357 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we require DPDK 18.x or later; install a newer version of DPDK, or don't request DPDK support" "$LINENO" 5
11358 fi
11359 fi
11360
11361 if test "$want_dpdk" = yes; then
11362 # User requested DPDK-only capture support, but
11363 # we couldn't the DPDK API support at all, or we
11364 # found it but it wasn't a sufficiently recent
11365 # version.
11366 if test "$ac_cv_dpdk_can_compile" != yes; then
11367 #
11368 # Couldn't even find the headers.
11369 #
11370 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
11371 else
11372 #
11373 # Found the headers, but we couldn't find
11374 # rte_bus.h or rte_eth_dev_count_avail(),
11375 # we don't have a sufficiently recent
11376 # version of DPDK.
11377 #
11378 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we require DPDK 18.x or later: install a newer version of DPDK, or don't request DPDK support" "$LINENO" 5
11379 fi
11380 fi
11381 fi
11382 fi
11383
11384
11385 # Check whether --enable-bluetooth was given.
11386 if test "${enable_bluetooth+set}" = set; then :
11387 enableval=$enable_bluetooth;
11388 else
11389 enable_bluetooth=ifsupportavailable
11390 fi
11391
11392
11393 if test "xxx_only" = yes; then
11394 # User requested something-else-only pcap, so they don't
11395 # want Bluetooth support.
11396 enable_bluetooth=no
11397 fi
11398
11399 if test "x$enable_bluetooth" != "xno" ; then
11400 case "$host_os" in
11401 linux*)
11402 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
11403 if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
11404
11405 #
11406 # We have bluetooth.h, so we support Bluetooth
11407 # sniffing.
11408 #
11409
11410 $as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
11411
11412 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
11414 $as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
11415 ac_lbl_bluetooth_available=yes
11416
11417 #
11418 # OK, does struct sockaddr_hci have an hci_channel
11419 # member?
11420 #
11421 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
11422 #include <bluetooth/bluetooth.h>
11423 #include <bluetooth/hci.h>
11424
11425 "
11426 if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
11427
11428 cat >>confdefs.h <<_ACEOF
11429 #define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
11430 _ACEOF
11431
11432
11433 #
11434 # Yes; is HCI_CHANNEL_MONITOR defined?
11435 #
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
11437 $as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
11438 if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
11439 $as_echo_n "(cached) " >&6
11440 else
11441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11442 /* end confdefs.h. */
11443
11444 #include <bluetooth/bluetooth.h>
11445 #include <bluetooth/hci.h>
11446
11447 int
11448 main ()
11449 {
11450
11451 u_int i = HCI_CHANNEL_MONITOR;
11452
11453 ;
11454 return 0;
11455 }
11456 _ACEOF
11457 if ac_fn_c_try_compile "$LINENO"; then :
11458
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11460 $as_echo "yes" >&6; }
11461
11462 $as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
11463
11464 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
11465
11466 else
11467
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 $as_echo "no" >&6; }
11470
11471 fi
11472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11473 fi
11474
11475
11476 fi
11477
11478
11479 else
11480
11481 #
11482 # We don't have bluetooth.h, so we don't support
11483 # Bluetooth sniffing.
11484 #
11485 if test "x$enable_bluetooth" = "xyes" ; then
11486 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
11487 else
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
11489 $as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
11490 fi
11491
11492 fi
11493
11494
11495 ;;
11496 *)
11497 if test "x$enable_bluetooth" = "xyes" ; then
11498 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
11499 else
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
11501 $as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
11502 fi
11503 ;;
11504 esac
11505
11506 fi
11507
11508 # Check whether --enable-dbus was given.
11509 if test "${enable_dbus+set}" = set; then :
11510 enableval=$enable_dbus;
11511 else
11512 enable_dbus=ifavailable
11513 fi
11514
11515
11516 if test "xxx_only" = yes; then
11517 # User requested something-else-only pcap, so they don't
11518 # want D-Bus support.
11519 enable_dbus=no
11520 fi
11521
11522 if test "x$enable_dbus" != "xno"; then
11523 if test "x$enable_dbus" = "xyes"; then
11524 case "$host_os" in
11525
11526 darwin*)
11527 #
11528 # We don't support D-Bus sniffing on macOS; see
11529 #
11530 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
11531 #
11532 # The user requested it, so fail.
11533 #
11534 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
11535 esac
11536 else
11537 case "$host_os" in
11538
11539 darwin*)
11540 #
11541 # We don't support D-Bus sniffing on macOS; see
11542 #
11543 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
11544 #
11545 # The user dind't explicitly request it, so just
11546 # silently refuse to enable it.
11547 #
11548 enable_dbus="no"
11549 ;;
11550 esac
11551 fi
11552 fi
11553
11554 if test "x$enable_dbus" != "xno"; then
11555 if test "x$PKGCONFIG" != "xno"; then
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
11557 $as_echo_n "checking for D-Bus... " >&6; }
11558 if "$PKGCONFIG" dbus-1; then
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11560 $as_echo "yes" >&6; }
11561 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
11562 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
11563 save_CFLAGS="$CFLAGS"
11564 save_LIBS="$LIBS"
11565 CFLAGS="$CFLAGS $DBUS_CFLAGS"
11566 LIBS="$LIBS $DBUS_LIBS"
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
11568 $as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
11569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570 /* end confdefs.h. */
11571 #include <string.h>
11572
11573 #include <time.h>
11574 #include <sys/time.h>
11575
11576 #include <dbus/dbus.h>
11577 int
11578 main ()
11579 {
11580 return dbus_connection_read_write(NULL, 0);
11581 ;
11582 return 0;
11583 }
11584 _ACEOF
11585 if ac_fn_c_try_link "$LINENO"; then :
11586
11587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11588 $as_echo "yes" >&6; }
11589
11590 $as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
11591
11592 MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
11593 V_INCLS="$V_INCLS $DBUS_CFLAGS"
11594
11595 else
11596
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11598 $as_echo "no" >&6; }
11599 if test "x$enable_dbus" = "xyes"; then
11600 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
11601 fi
11602 LIBS="$save_LIBS"
11603
11604 fi
11605 rm -f core conftest.err conftest.$ac_objext \
11606 conftest$ac_exeext conftest.$ac_ext
11607 CFLAGS="$save_CFLAGS"
11608 else
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610 $as_echo "no" >&6; }
11611 if test "x$enable_dbus" = "xyes"; then
11612 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
11613 fi
11614 fi
11615 fi
11616
11617 fi
11618
11619 # Check whether --enable-rdma was given.
11620 if test "${enable_rdma+set}" = set; then :
11621 enableval=$enable_rdma;
11622 else
11623 enable_rdma=ifavailable
11624 fi
11625
11626
11627 if test "xxx_only" = yes; then
11628 # User requested something-else-only pcap, so they don't
11629 # want RDMA support.
11630 enable_rdma=no
11631 fi
11632
11633 if test "x$enable_rdma" != "xno"; then
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
11635 $as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
11636 if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
11637 $as_echo_n "(cached) " >&6
11638 else
11639 ac_check_lib_save_LIBS=$LIBS
11640 LIBS="-libverbs $LIBS"
11641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11642 /* end confdefs.h. */
11643
11644 /* Override any GCC internal prototype to avoid an error.
11645 Use char because int might match the return type of a GCC
11646 builtin and then its argument prototype would still apply. */
11647 #ifdef __cplusplus
11648 extern "C"
11649 #endif
11650 char ibv_get_device_list ();
11651 int
11652 main ()
11653 {
11654 return ibv_get_device_list ();
11655 ;
11656 return 0;
11657 }
11658 _ACEOF
11659 if ac_fn_c_try_link "$LINENO"; then :
11660 ac_cv_lib_ibverbs_ibv_get_device_list=yes
11661 else
11662 ac_cv_lib_ibverbs_ibv_get_device_list=no
11663 fi
11664 rm -f core conftest.err conftest.$ac_objext \
11665 conftest$ac_exeext conftest.$ac_ext
11666 LIBS=$ac_check_lib_save_LIBS
11667 fi
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
11669 $as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
11670 if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
11671
11672 ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
11673 if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
11674
11675 #
11676 # ibv_create_flow may be defined as a static inline
11677 # function in infiniband/verbs.h, so we can't
11678 # use AC_CHECK_LIB.
11679 #
11680 # Too bad autoconf has no AC_SYMBOL_EXISTS()
11681 # macro that works like CMake's check_symbol_exists()
11682 # function, to check do a compile check like
11683 # this (they do a clever trick to avoid having
11684 # to know the function's signature).
11685 #
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
11687 $as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
11688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11689 /* end confdefs.h. */
11690
11691 #include <infiniband/verbs.h>
11692
11693 int
11694 main ()
11695 {
11696
11697 (void) ibv_create_flow((struct ibv_qp *) NULL,
11698 (struct ibv_flow_attr *) NULL);
11699
11700 ;
11701 return 0;
11702 }
11703 _ACEOF
11704 if ac_fn_c_try_link "$LINENO"; then :
11705
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11707 $as_echo "yes" >&6; }
11708
11709 $as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
11710
11711 MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
11712 LIBS="-libverbs $LIBS"
11713
11714 else
11715
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717 $as_echo "no" >&6; }
11718
11719
11720 fi
11721 rm -f core conftest.err conftest.$ac_objext \
11722 conftest$ac_exeext conftest.$ac_ext
11723
11724 fi
11725
11726
11727
11728 fi
11729
11730
11731 fi
11732
11733 # Find a good install program. We prefer a C program (faster),
11734 # so one script is as good as another. But avoid the broken or
11735 # incompatible versions:
11736 # SysV /etc/install, /usr/sbin/install
11737 # SunOS /usr/etc/install
11738 # IRIX /sbin/install
11739 # AIX /bin/install
11740 # AmigaOS /C/install, which installs bootblocks on floppy discs
11741 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
11742 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
11743 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
11744 # OS/2's system install, which has a completely different semantic
11745 # ./install, which can be erroneously created by make from ./install.sh.
11746 # Reject install programs that cannot install multiple files.
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
11748 $as_echo_n "checking for a BSD-compatible install... " >&6; }
11749 if test -z "$INSTALL"; then
11750 if ${ac_cv_path_install+:} false; then :
11751 $as_echo_n "(cached) " >&6
11752 else
11753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11754 for as_dir in $PATH
11755 do
11756 IFS=$as_save_IFS
11757 test -z "$as_dir" && as_dir=.
11758 # Account for people who put trailing slashes in PATH elements.
11759 case $as_dir/ in #((
11760 ./ | .// | /[cC]/* | \
11761 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
11762 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
11763 /usr/ucb/* ) ;;
11764 *)
11765 # OSF1 and SCO ODT 3.0 have their own names for install.
11766 # Don't use installbsd from OSF since it installs stuff as root
11767 # by default.
11768 for ac_prog in ginstall scoinst install; do
11769 for ac_exec_ext in '' $ac_executable_extensions; do
11770 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
11771 if test $ac_prog = install &&
11772 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11773 # AIX install. It has an incompatible calling convention.
11774 :
11775 elif test $ac_prog = install &&
11776 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11777 # program-specific install script used by HP pwplus--don't use.
11778 :
11779 else
11780 rm -rf conftest.one conftest.two conftest.dir
11781 echo one > conftest.one
11782 echo two > conftest.two
11783 mkdir conftest.dir
11784 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
11785 test -s conftest.one && test -s conftest.two &&
11786 test -s conftest.dir/conftest.one &&
11787 test -s conftest.dir/conftest.two
11788 then
11789 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
11790 break 3
11791 fi
11792 fi
11793 fi
11794 done
11795 done
11796 ;;
11797 esac
11798
11799 done
11800 IFS=$as_save_IFS
11801
11802 rm -rf conftest.one conftest.two conftest.dir
11803
11804 fi
11805 if test "${ac_cv_path_install+set}" = set; then
11806 INSTALL=$ac_cv_path_install
11807 else
11808 # As a last resort, use the slow shell script. Don't cache a
11809 # value for INSTALL within a source directory, because that will
11810 # break other packages using the cache if that directory is
11811 # removed, or if the value is a relative name.
11812 INSTALL=$ac_install_sh
11813 fi
11814 fi
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
11816 $as_echo "$INSTALL" >&6; }
11817
11818 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
11819 # It thinks the first close brace ends the variable substitution.
11820 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
11821
11822 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
11823
11824 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
11825
11826
11827 ac_config_headers="$ac_config_headers config.h"
11828
11829
11830 ac_config_commands="$ac_config_commands default-1"
11831
11832 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"
11833
11834 cat >confcache <<\_ACEOF
11835 # This file is a shell script that caches the results of configure
11836 # tests run on this system so they can be shared between configure
11837 # scripts and configure runs, see configure's option --config-cache.
11838 # It is not useful on other systems. If it contains results you don't
11839 # want to keep, you may remove or edit it.
11840 #
11841 # config.status only pays attention to the cache file if you give it
11842 # the --recheck option to rerun configure.
11843 #
11844 # `ac_cv_env_foo' variables (set or unset) will be overridden when
11845 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11846 # following values.
11847
11848 _ACEOF
11849
11850 # The following way of writing the cache mishandles newlines in values,
11851 # but we know of no workaround that is simple, portable, and efficient.
11852 # So, we kill variables containing newlines.
11853 # Ultrix sh set writes to stderr and can't be redirected directly,
11854 # and sets the high bit in the cache file unless we assign to the vars.
11855 (
11856 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11857 eval ac_val=\$$ac_var
11858 case $ac_val in #(
11859 *${as_nl}*)
11860 case $ac_var in #(
11861 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
11862 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11863 esac
11864 case $ac_var in #(
11865 _ | IFS | as_nl) ;; #(
11866 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11867 *) { eval $ac_var=; unset $ac_var;} ;;
11868 esac ;;
11869 esac
11870 done
11871
11872 (set) 2>&1 |
11873 case $as_nl`(ac_space=' '; set) 2>&1` in #(
11874 *${as_nl}ac_space=\ *)
11875 # `set' does not quote correctly, so add quotes: double-quote
11876 # substitution turns \\\\ into \\, and sed turns \\ into \.
11877 sed -n \
11878 "s/'/'\\\\''/g;
11879 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11880 ;; #(
11881 *)
11882 # `set' quotes correctly as required by POSIX, so do not add quotes.
11883 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11884 ;;
11885 esac |
11886 sort
11887 ) |
11888 sed '
11889 /^ac_cv_env_/b end
11890 t clear
11891 :clear
11892 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11893 t end
11894 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11895 :end' >>confcache
11896 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11897 if test -w "$cache_file"; then
11898 if test "x$cache_file" != "x/dev/null"; then
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
11900 $as_echo "$as_me: updating cache $cache_file" >&6;}
11901 if test ! -f "$cache_file" || test -h "$cache_file"; then
11902 cat confcache >"$cache_file"
11903 else
11904 case $cache_file in #(
11905 */* | ?:*)
11906 mv -f confcache "$cache_file"$$ &&
11907 mv -f "$cache_file"$$ "$cache_file" ;; #(
11908 *)
11909 mv -f confcache "$cache_file" ;;
11910 esac
11911 fi
11912 fi
11913 else
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
11915 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11916 fi
11917 fi
11918 rm -f confcache
11919
11920 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11921 # Let make expand exec_prefix.
11922 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11923
11924 DEFS=-DHAVE_CONFIG_H
11925
11926 ac_libobjs=
11927 ac_ltlibobjs=
11928 U=
11929 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11930 # 1. Remove the extension, and $U if already installed.
11931 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11932 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
11933 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
11934 # will be set to the directory where LIBOBJS objects are built.
11935 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11936 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
11937 done
11938 LIBOBJS=$ac_libobjs
11939
11940 LTLIBOBJS=$ac_ltlibobjs
11941
11942
11943
11944 : "${CONFIG_STATUS=./config.status}"
11945 ac_write_fail=0
11946 ac_clean_files_save=$ac_clean_files
11947 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11948 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
11949 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
11950 as_write_fail=0
11951 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
11952 #! $SHELL
11953 # Generated by $as_me.
11954 # Run this file to recreate the current configuration.
11955 # Compiler output produced by configure, useful for debugging
11956 # configure, is in config.log if it exists.
11957
11958 debug=false
11959 ac_cs_recheck=false
11960 ac_cs_silent=false
11961
11962 SHELL=\${CONFIG_SHELL-$SHELL}
11963 export SHELL
11964 _ASEOF
11965 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
11966 ## -------------------- ##
11967 ## M4sh Initialization. ##
11968 ## -------------------- ##
11969
11970 # Be more Bourne compatible
11971 DUALCASE=1; export DUALCASE # for MKS sh
11972 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
11973 emulate sh
11974 NULLCMD=:
11975 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
11976 # is contrary to our usage. Disable this feature.
11977 alias -g '${1+"$@"}'='"$@"'
11978 setopt NO_GLOB_SUBST
11979 else
11980 case `(set -o) 2>/dev/null` in #(
11981 *posix*) :
11982 set -o posix ;; #(
11983 *) :
11984 ;;
11985 esac
11986 fi
11987
11988
11989 as_nl='
11990 '
11991 export as_nl
11992 # Printing a long string crashes Solaris 7 /usr/bin/printf.
11993 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11994 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
11995 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
11996 # Prefer a ksh shell builtin over an external printf program on Solaris,
11997 # but without wasting forks for bash or zsh.
11998 if test -z "$BASH_VERSION$ZSH_VERSION" \
11999 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12000 as_echo='print -r --'
12001 as_echo_n='print -rn --'
12002 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12003 as_echo='printf %s\n'
12004 as_echo_n='printf %s'
12005 else
12006 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12007 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12008 as_echo_n='/usr/ucb/echo -n'
12009 else
12010 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12011 as_echo_n_body='eval
12012 arg=$1;
12013 case $arg in #(
12014 *"$as_nl"*)
12015 expr "X$arg" : "X\\(.*\\)$as_nl";
12016 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12017 esac;
12018 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12019 '
12020 export as_echo_n_body
12021 as_echo_n='sh -c $as_echo_n_body as_echo'
12022 fi
12023 export as_echo_body
12024 as_echo='sh -c $as_echo_body as_echo'
12025 fi
12026
12027 # The user is always right.
12028 if test "${PATH_SEPARATOR+set}" != set; then
12029 PATH_SEPARATOR=:
12030 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12031 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12032 PATH_SEPARATOR=';'
12033 }
12034 fi
12035
12036
12037 # IFS
12038 # We need space, tab and new line, in precisely that order. Quoting is
12039 # there to prevent editors from complaining about space-tab.
12040 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12041 # splitting by setting IFS to empty value.)
12042 IFS=" "" $as_nl"
12043
12044 # Find who we are. Look in the path if we contain no directory separator.
12045 as_myself=
12046 case $0 in #((
12047 *[\\/]* ) as_myself=$0 ;;
12048 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12049 for as_dir in $PATH
12050 do
12051 IFS=$as_save_IFS
12052 test -z "$as_dir" && as_dir=.
12053 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12054 done
12055 IFS=$as_save_IFS
12056
12057 ;;
12058 esac
12059 # We did not find ourselves, most probably we were run as `sh COMMAND'
12060 # in which case we are not to be found in the path.
12061 if test "x$as_myself" = x; then
12062 as_myself=$0
12063 fi
12064 if test ! -f "$as_myself"; then
12065 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12066 exit 1
12067 fi
12068
12069 # Unset variables that we do not need and which cause bugs (e.g. in
12070 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
12071 # suppresses any "Segmentation fault" message there. '((' could
12072 # trigger a bug in pdksh 5.2.14.
12073 for as_var in BASH_ENV ENV MAIL MAILPATH
12074 do eval test x\${$as_var+set} = xset \
12075 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12076 done
12077 PS1='$ '
12078 PS2='> '
12079 PS4='+ '
12080
12081 # NLS nuisances.
12082 LC_ALL=C
12083 export LC_ALL
12084 LANGUAGE=C
12085 export LANGUAGE
12086
12087 # CDPATH.
12088 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12089
12090
12091 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12092 # ----------------------------------------
12093 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12094 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12095 # script with STATUS, using 1 if that was 0.
12096 as_fn_error ()
12097 {
12098 as_status=$1; test $as_status -eq 0 && as_status=1
12099 if test "$4"; then
12100 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12101 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12102 fi
12103 $as_echo "$as_me: error: $2" >&2
12104 as_fn_exit $as_status
12105 } # as_fn_error
12106
12107
12108 # as_fn_set_status STATUS
12109 # -----------------------
12110 # Set $? to STATUS, without forking.
12111 as_fn_set_status ()
12112 {
12113 return $1
12114 } # as_fn_set_status
12115
12116 # as_fn_exit STATUS
12117 # -----------------
12118 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12119 as_fn_exit ()
12120 {
12121 set +e
12122 as_fn_set_status $1
12123 exit $1
12124 } # as_fn_exit
12125
12126 # as_fn_unset VAR
12127 # ---------------
12128 # Portably unset VAR.
12129 as_fn_unset ()
12130 {
12131 { eval $1=; unset $1;}
12132 }
12133 as_unset=as_fn_unset
12134 # as_fn_append VAR VALUE
12135 # ----------------------
12136 # Append the text in VALUE to the end of the definition contained in VAR. Take
12137 # advantage of any shell optimizations that allow amortized linear growth over
12138 # repeated appends, instead of the typical quadratic growth present in naive
12139 # implementations.
12140 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12141 eval 'as_fn_append ()
12142 {
12143 eval $1+=\$2
12144 }'
12145 else
12146 as_fn_append ()
12147 {
12148 eval $1=\$$1\$2
12149 }
12150 fi # as_fn_append
12151
12152 # as_fn_arith ARG...
12153 # ------------------
12154 # Perform arithmetic evaluation on the ARGs, and store the result in the
12155 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12156 # must be portable across $(()) and expr.
12157 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12158 eval 'as_fn_arith ()
12159 {
12160 as_val=$(( $* ))
12161 }'
12162 else
12163 as_fn_arith ()
12164 {
12165 as_val=`expr "$@" || test $? -eq 1`
12166 }
12167 fi # as_fn_arith
12168
12169
12170 if expr a : '\(a\)' >/dev/null 2>&1 &&
12171 test "X`expr 00001 : '.*\(...\)'`" = X001; then
12172 as_expr=expr
12173 else
12174 as_expr=false
12175 fi
12176
12177 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12178 as_basename=basename
12179 else
12180 as_basename=false
12181 fi
12182
12183 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12184 as_dirname=dirname
12185 else
12186 as_dirname=false
12187 fi
12188
12189 as_me=`$as_basename -- "$0" ||
12190 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12191 X"$0" : 'X\(//\)$' \| \
12192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12193 $as_echo X/"$0" |
12194 sed '/^.*\/\([^/][^/]*\)\/*$/{
12195 s//\1/
12196 q
12197 }
12198 /^X\/\(\/\/\)$/{
12199 s//\1/
12200 q
12201 }
12202 /^X\/\(\/\).*/{
12203 s//\1/
12204 q
12205 }
12206 s/.*/./; q'`
12207
12208 # Avoid depending upon Character Ranges.
12209 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12210 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12211 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12212 as_cr_digits='0123456789'
12213 as_cr_alnum=$as_cr_Letters$as_cr_digits
12214
12215 ECHO_C= ECHO_N= ECHO_T=
12216 case `echo -n x` in #(((((
12217 -n*)
12218 case `echo 'xy\c'` in
12219 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
12220 xy) ECHO_C='\c';;
12221 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
12222 ECHO_T=' ';;
12223 esac;;
12224 *)
12225 ECHO_N='-n';;
12226 esac
12227
12228 rm -f conf$$ conf$$.exe conf$$.file
12229 if test -d conf$$.dir; then
12230 rm -f conf$$.dir/conf$$.file
12231 else
12232 rm -f conf$$.dir
12233 mkdir conf$$.dir 2>/dev/null
12234 fi
12235 if (echo >conf$$.file) 2>/dev/null; then
12236 if ln -s conf$$.file conf$$ 2>/dev/null; then
12237 as_ln_s='ln -s'
12238 # ... but there are two gotchas:
12239 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12240 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12241 # In both cases, we have to default to `cp -pR'.
12242 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12243 as_ln_s='cp -pR'
12244 elif ln conf$$.file conf$$ 2>/dev/null; then
12245 as_ln_s=ln
12246 else
12247 as_ln_s='cp -pR'
12248 fi
12249 else
12250 as_ln_s='cp -pR'
12251 fi
12252 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12253 rmdir conf$$.dir 2>/dev/null
12254
12255
12256 # as_fn_mkdir_p
12257 # -------------
12258 # Create "$as_dir" as a directory, including parents if necessary.
12259 as_fn_mkdir_p ()
12260 {
12261
12262 case $as_dir in #(
12263 -*) as_dir=./$as_dir;;
12264 esac
12265 test -d "$as_dir" || eval $as_mkdir_p || {
12266 as_dirs=
12267 while :; do
12268 case $as_dir in #(
12269 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12270 *) as_qdir=$as_dir;;
12271 esac
12272 as_dirs="'$as_qdir' $as_dirs"
12273 as_dir=`$as_dirname -- "$as_dir" ||
12274 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12275 X"$as_dir" : 'X\(//\)[^/]' \| \
12276 X"$as_dir" : 'X\(//\)$' \| \
12277 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12278 $as_echo X"$as_dir" |
12279 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12280 s//\1/
12281 q
12282 }
12283 /^X\(\/\/\)[^/].*/{
12284 s//\1/
12285 q
12286 }
12287 /^X\(\/\/\)$/{
12288 s//\1/
12289 q
12290 }
12291 /^X\(\/\).*/{
12292 s//\1/
12293 q
12294 }
12295 s/.*/./; q'`
12296 test -d "$as_dir" && break
12297 done
12298 test -z "$as_dirs" || eval "mkdir $as_dirs"
12299 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
12300
12301
12302 } # as_fn_mkdir_p
12303 if mkdir -p . 2>/dev/null; then
12304 as_mkdir_p='mkdir -p "$as_dir"'
12305 else
12306 test -d ./-p && rmdir ./-p
12307 as_mkdir_p=false
12308 fi
12309
12310
12311 # as_fn_executable_p FILE
12312 # -----------------------
12313 # Test if FILE is an executable regular file.
12314 as_fn_executable_p ()
12315 {
12316 test -f "$1" && test -x "$1"
12317 } # as_fn_executable_p
12318 as_test_x='test -x'
12319 as_executable_p=as_fn_executable_p
12320
12321 # Sed expression to map a string onto a valid CPP name.
12322 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12323
12324 # Sed expression to map a string onto a valid variable name.
12325 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12326
12327
12328 exec 6>&1
12329 ## ----------------------------------- ##
12330 ## Main body of $CONFIG_STATUS script. ##
12331 ## ----------------------------------- ##
12332 _ASEOF
12333 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
12334
12335 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12336 # Save the log message, to keep $0 and so on meaningful, and to
12337 # report actual input values of CONFIG_FILES etc. instead of their
12338 # values after options handling.
12339 ac_log="
12340 This file was extended by pcap $as_me 1.10.0-PRE-GIT, which was
12341 generated by GNU Autoconf 2.69. Invocation command line was
12342
12343 CONFIG_FILES = $CONFIG_FILES
12344 CONFIG_HEADERS = $CONFIG_HEADERS
12345 CONFIG_LINKS = $CONFIG_LINKS
12346 CONFIG_COMMANDS = $CONFIG_COMMANDS
12347 $ $0 $@
12348
12349 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12350 "
12351
12352 _ACEOF
12353
12354 case $ac_config_files in *"
12355 "*) set x $ac_config_files; shift; ac_config_files=$*;;
12356 esac
12357
12358 case $ac_config_headers in *"
12359 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12360 esac
12361
12362
12363 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12364 # Files that config.status was made for.
12365 config_files="$ac_config_files"
12366 config_headers="$ac_config_headers"
12367 config_commands="$ac_config_commands"
12368
12369 _ACEOF
12370
12371 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12372 ac_cs_usage="\
12373 \`$as_me' instantiates files and other configuration actions
12374 from templates according to the current configuration. Unless the files
12375 and actions are specified as TAGs, all are instantiated by default.
12376
12377 Usage: $0 [OPTION]... [TAG]...
12378
12379 -h, --help print this help, then exit
12380 -V, --version print version number and configuration settings, then exit
12381 --config print configuration, then exit
12382 -q, --quiet, --silent
12383 do not print progress messages
12384 -d, --debug don't remove temporary files
12385 --recheck update $as_me by reconfiguring in the same conditions
12386 --file=FILE[:TEMPLATE]
12387 instantiate the configuration file FILE
12388 --header=FILE[:TEMPLATE]
12389 instantiate the configuration header FILE
12390
12391 Configuration files:
12392 $config_files
12393
12394 Configuration headers:
12395 $config_headers
12396
12397 Configuration commands:
12398 $config_commands
12399
12400 Report bugs to the package provider."
12401
12402 _ACEOF
12403 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12404 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
12405 ac_cs_version="\\
12406 pcap config.status 1.10.0-PRE-GIT
12407 configured by $0, generated by GNU Autoconf 2.69,
12408 with options \\"\$ac_cs_config\\"
12409
12410 Copyright (C) 2012 Free Software Foundation, Inc.
12411 This config.status script is free software; the Free Software Foundation
12412 gives unlimited permission to copy, distribute and modify it."
12413
12414 ac_pwd='$ac_pwd'
12415 srcdir='$srcdir'
12416 INSTALL='$INSTALL'
12417 test -n "\$AWK" || AWK=awk
12418 _ACEOF
12419
12420 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12421 # The default lists apply if the user does not specify any file.
12422 ac_need_defaults=:
12423 while test $# != 0
12424 do
12425 case $1 in
12426 --*=?*)
12427 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12428 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12429 ac_shift=:
12430 ;;
12431 --*=)
12432 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12433 ac_optarg=
12434 ac_shift=:
12435 ;;
12436 *)
12437 ac_option=$1
12438 ac_optarg=$2
12439 ac_shift=shift
12440 ;;
12441 esac
12442
12443 case $ac_option in
12444 # Handling of the options.
12445 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12446 ac_cs_recheck=: ;;
12447 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12448 $as_echo "$ac_cs_version"; exit ;;
12449 --config | --confi | --conf | --con | --co | --c )
12450 $as_echo "$ac_cs_config"; exit ;;
12451 --debug | --debu | --deb | --de | --d | -d )
12452 debug=: ;;
12453 --file | --fil | --fi | --f )
12454 $ac_shift
12455 case $ac_optarg in
12456 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12457 '') as_fn_error $? "missing file argument" ;;
12458 esac
12459 as_fn_append CONFIG_FILES " '$ac_optarg'"
12460 ac_need_defaults=false;;
12461 --header | --heade | --head | --hea )
12462 $ac_shift
12463 case $ac_optarg in
12464 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12465 esac
12466 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
12467 ac_need_defaults=false;;
12468 --he | --h)
12469 # Conflict between --help and --header
12470 as_fn_error $? "ambiguous option: \`$1'
12471 Try \`$0 --help' for more information.";;
12472 --help | --hel | -h )
12473 $as_echo "$ac_cs_usage"; exit ;;
12474 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12475 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12476 ac_cs_silent=: ;;
12477
12478 # This is an error.
12479 -*) as_fn_error $? "unrecognized option: \`$1'
12480 Try \`$0 --help' for more information." ;;
12481
12482 *) as_fn_append ac_config_targets " $1"
12483 ac_need_defaults=false ;;
12484
12485 esac
12486 shift
12487 done
12488
12489 ac_configure_extra_args=
12490
12491 if $ac_cs_silent; then
12492 exec 6>/dev/null
12493 ac_configure_extra_args="$ac_configure_extra_args --silent"
12494 fi
12495
12496 _ACEOF
12497 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12498 if \$ac_cs_recheck; then
12499 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12500 shift
12501 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
12502 CONFIG_SHELL='$SHELL'
12503 export CONFIG_SHELL
12504 exec "\$@"
12505 fi
12506
12507 _ACEOF
12508 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12509 exec 5>>config.log
12510 {
12511 echo
12512 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12513 ## Running $as_me. ##
12514 _ASBOX
12515 $as_echo "$ac_log"
12516 } >&5
12517
12518 _ACEOF
12519 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12520 #
12521 # INIT-COMMANDS
12522 #
12523
12524
12525 _ACEOF
12526
12527 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12528
12529 # Handling of arguments.
12530 for ac_config_target in $ac_config_targets
12531 do
12532 case $ac_config_target in
12533 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
12534 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
12535 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12536 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
12537 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
12538 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
12539 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
12540 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
12541 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
12542 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
12543 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
12544 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
12545 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
12546 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
12547 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
12548 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
12549 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
12550 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
12551 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
12552 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
12553 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
12554 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
12555 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
12556
12557 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
12558 esac
12559 done
12560
12561
12562 # If the user did not use the arguments to specify the items to instantiate,
12563 # then the envvar interface is used. Set only those that are not.
12564 # We use the long form for the default assignment because of an extremely
12565 # bizarre bug on SunOS 4.1.3.
12566 if $ac_need_defaults; then
12567 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12568 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12569 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12570 fi
12571
12572 # Have a temporary directory for convenience. Make it in the build tree
12573 # simply because there is no reason against having it here, and in addition,
12574 # creating and moving files from /tmp can sometimes cause problems.
12575 # Hook for its removal unless debugging.
12576 # Note that there is a small window in which the directory will not be cleaned:
12577 # after its creation but before its name has been assigned to `$tmp'.
12578 $debug ||
12579 {
12580 tmp= ac_tmp=
12581 trap 'exit_status=$?
12582 : "${ac_tmp:=$tmp}"
12583 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
12584 ' 0
12585 trap 'as_fn_exit 1' 1 2 13 15
12586 }
12587 # Create a (secure) tmp directory for tmp files.
12588
12589 {
12590 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12591 test -d "$tmp"
12592 } ||
12593 {
12594 tmp=./conf$$-$RANDOM
12595 (umask 077 && mkdir "$tmp")
12596 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
12597 ac_tmp=$tmp
12598
12599 # Set up the scripts for CONFIG_FILES section.
12600 # No need to generate them if there are no CONFIG_FILES.
12601 # This happens for instance with `./config.status config.h'.
12602 if test -n "$CONFIG_FILES"; then
12603
12604
12605 ac_cr=`echo X | tr X '\015'`
12606 # On cygwin, bash can eat \r inside `` if the user requested igncr.
12607 # But we know of no other shell where ac_cr would be empty at this
12608 # point, so we can use a bashism as a fallback.
12609 if test "x$ac_cr" = x; then
12610 eval ac_cr=\$\'\\r\'
12611 fi
12612 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
12613 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
12614 ac_cs_awk_cr='\\r'
12615 else
12616 ac_cs_awk_cr=$ac_cr
12617 fi
12618
12619 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
12620 _ACEOF
12621
12622
12623 {
12624 echo "cat >conf$$subs.awk <<_ACEOF" &&
12625 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
12626 echo "_ACEOF"
12627 } >conf$$subs.sh ||
12628 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12629 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
12630 ac_delim='%!_!# '
12631 for ac_last_try in false false false false false :; do
12632 . ./conf$$subs.sh ||
12633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12634
12635 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
12636 if test $ac_delim_n = $ac_delim_num; then
12637 break
12638 elif $ac_last_try; then
12639 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12640 else
12641 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12642 fi
12643 done
12644 rm -f conf$$subs.sh
12645
12646 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12647 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
12648 _ACEOF
12649 sed -n '
12650 h
12651 s/^/S["/; s/!.*/"]=/
12652 p
12653 g
12654 s/^[^!]*!//
12655 :repl
12656 t repl
12657 s/'"$ac_delim"'$//
12658 t delim
12659 :nl
12660 h
12661 s/\(.\{148\}\)..*/\1/
12662 t more1
12663 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
12664 p
12665 n
12666 b repl
12667 :more1
12668 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12669 p
12670 g
12671 s/.\{148\}//
12672 t nl
12673 :delim
12674 h
12675 s/\(.\{148\}\)..*/\1/
12676 t more2
12677 s/["\\]/\\&/g; s/^/"/; s/$/"/
12678 p
12679 b
12680 :more2
12681 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12682 p
12683 g
12684 s/.\{148\}//
12685 t delim
12686 ' <conf$$subs.awk | sed '
12687 /^[^""]/{
12688 N
12689 s/\n//
12690 }
12691 ' >>$CONFIG_STATUS || ac_write_fail=1
12692 rm -f conf$$subs.awk
12693 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12694 _ACAWK
12695 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
12696 for (key in S) S_is_set[key] = 1
12697 FS = "\a"
12698
12699 }
12700 {
12701 line = $ 0
12702 nfields = split(line, field, "@")
12703 substed = 0
12704 len = length(field[1])
12705 for (i = 2; i < nfields; i++) {
12706 key = field[i]
12707 keylen = length(key)
12708 if (S_is_set[key]) {
12709 value = S[key]
12710 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
12711 len += length(value) + length(field[++i])
12712 substed = 1
12713 } else
12714 len += 1 + keylen
12715 }
12716
12717 print line
12718 }
12719
12720 _ACAWK
12721 _ACEOF
12722 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12723 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
12724 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
12725 else
12726 cat
12727 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
12728 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
12729 _ACEOF
12730
12731 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
12732 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
12733 # trailing colons and then remove the whole line if VPATH becomes empty
12734 # (actually we leave an empty line to preserve line numbers).
12735 if test "x$srcdir" = x.; then
12736 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
12737 h
12738 s///
12739 s/^/:/
12740 s/[ ]*$/:/
12741 s/:\$(srcdir):/:/g
12742 s/:\${srcdir}:/:/g
12743 s/:@srcdir@:/:/g
12744 s/^:*//
12745 s/:*$//
12746 x
12747 s/\(=[ ]*\).*/\1/
12748 G
12749 s/\n//
12750 s/^[^=]*=[ ]*$//
12751 }'
12752 fi
12753
12754 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12755 fi # test -n "$CONFIG_FILES"
12756
12757 # Set up the scripts for CONFIG_HEADERS section.
12758 # No need to generate them if there are no CONFIG_HEADERS.
12759 # This happens for instance with `./config.status Makefile'.
12760 if test -n "$CONFIG_HEADERS"; then
12761 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
12762 BEGIN {
12763 _ACEOF
12764
12765 # Transform confdefs.h into an awk script `defines.awk', embedded as
12766 # here-document in config.status, that substitutes the proper values into
12767 # config.h.in to produce config.h.
12768
12769 # Create a delimiter string that does not exist in confdefs.h, to ease
12770 # handling of long lines.
12771 ac_delim='%!_!# '
12772 for ac_last_try in false false :; do
12773 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
12774 if test -z "$ac_tt"; then
12775 break
12776 elif $ac_last_try; then
12777 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
12778 else
12779 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12780 fi
12781 done
12782
12783 # For the awk script, D is an array of macro values keyed by name,
12784 # likewise P contains macro parameters if any. Preserve backslash
12785 # newline sequences.
12786
12787 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
12788 sed -n '
12789 s/.\{148\}/&'"$ac_delim"'/g
12790 t rset
12791 :rset
12792 s/^[ ]*#[ ]*define[ ][ ]*/ /
12793 t def
12794 d
12795 :def
12796 s/\\$//
12797 t bsnl
12798 s/["\\]/\\&/g
12799 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12800 D["\1"]=" \3"/p
12801 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
12802 d
12803 :bsnl
12804 s/["\\]/\\&/g
12805 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12806 D["\1"]=" \3\\\\\\n"\\/p
12807 t cont
12808 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
12809 t cont
12810 d
12811 :cont
12812 n
12813 s/.\{148\}/&'"$ac_delim"'/g
12814 t clear
12815 :clear
12816 s/\\$//
12817 t bsnlc
12818 s/["\\]/\\&/g; s/^/"/; s/$/"/p
12819 d
12820 :bsnlc
12821 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
12822 b cont
12823 ' <confdefs.h | sed '
12824 s/'"$ac_delim"'/"\\\
12825 "/g' >>$CONFIG_STATUS || ac_write_fail=1
12826
12827 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12828 for (key in D) D_is_set[key] = 1
12829 FS = "\a"
12830 }
12831 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
12832 line = \$ 0
12833 split(line, arg, " ")
12834 if (arg[1] == "#") {
12835 defundef = arg[2]
12836 mac1 = arg[3]
12837 } else {
12838 defundef = substr(arg[1], 2)
12839 mac1 = arg[2]
12840 }
12841 split(mac1, mac2, "(") #)
12842 macro = mac2[1]
12843 prefix = substr(line, 1, index(line, defundef) - 1)
12844 if (D_is_set[macro]) {
12845 # Preserve the white space surrounding the "#".
12846 print prefix "define", macro P[macro] D[macro]
12847 next
12848 } else {
12849 # Replace #undef with comments. This is necessary, for example,
12850 # in the case of _POSIX_SOURCE, which is predefined and required
12851 # on some systems where configure will not decide to define it.
12852 if (defundef == "undef") {
12853 print "/*", prefix defundef, macro, "*/"
12854 next
12855 }
12856 }
12857 }
12858 { print }
12859 _ACAWK
12860 _ACEOF
12861 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12862 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
12863 fi # test -n "$CONFIG_HEADERS"
12864
12865
12866 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
12867 shift
12868 for ac_tag
12869 do
12870 case $ac_tag in
12871 :[FHLC]) ac_mode=$ac_tag; continue;;
12872 esac
12873 case $ac_mode$ac_tag in
12874 :[FHL]*:*);;
12875 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
12876 :[FH]-) ac_tag=-:-;;
12877 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12878 esac
12879 ac_save_IFS=$IFS
12880 IFS=:
12881 set x $ac_tag
12882 IFS=$ac_save_IFS
12883 shift
12884 ac_file=$1
12885 shift
12886
12887 case $ac_mode in
12888 :L) ac_source=$1;;
12889 :[FH])
12890 ac_file_inputs=
12891 for ac_f
12892 do
12893 case $ac_f in
12894 -) ac_f="$ac_tmp/stdin";;
12895 *) # Look for the file first in the build tree, then in the source tree
12896 # (if the path is not absolute). The absolute path cannot be DOS-style,
12897 # because $ac_f cannot contain `:'.
12898 test -f "$ac_f" ||
12899 case $ac_f in
12900 [\\/$]*) false;;
12901 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12902 esac ||
12903 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
12904 esac
12905 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
12906 as_fn_append ac_file_inputs " '$ac_f'"
12907 done
12908
12909 # Let's still pretend it is `configure' which instantiates (i.e., don't
12910 # use $as_me), people would be surprised to read:
12911 # /* config.h. Generated by config.status. */
12912 configure_input='Generated from '`
12913 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
12914 `' by configure.'
12915 if test x"$ac_file" != x-; then
12916 configure_input="$ac_file. $configure_input"
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
12918 $as_echo "$as_me: creating $ac_file" >&6;}
12919 fi
12920 # Neutralize special characters interpreted by sed in replacement strings.
12921 case $configure_input in #(
12922 *\&* | *\|* | *\\* )
12923 ac_sed_conf_input=`$as_echo "$configure_input" |
12924 sed 's/[\\\\&|]/\\\\&/g'`;; #(
12925 *) ac_sed_conf_input=$configure_input;;
12926 esac
12927
12928 case $ac_tag in
12929 *:-:* | *:-) cat >"$ac_tmp/stdin" \
12930 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
12931 esac
12932 ;;
12933 esac
12934
12935 ac_dir=`$as_dirname -- "$ac_file" ||
12936 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12937 X"$ac_file" : 'X\(//\)[^/]' \| \
12938 X"$ac_file" : 'X\(//\)$' \| \
12939 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12940 $as_echo X"$ac_file" |
12941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12942 s//\1/
12943 q
12944 }
12945 /^X\(\/\/\)[^/].*/{
12946 s//\1/
12947 q
12948 }
12949 /^X\(\/\/\)$/{
12950 s//\1/
12951 q
12952 }
12953 /^X\(\/\).*/{
12954 s//\1/
12955 q
12956 }
12957 s/.*/./; q'`
12958 as_dir="$ac_dir"; as_fn_mkdir_p
12959 ac_builddir=.
12960
12961 case "$ac_dir" in
12962 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12963 *)
12964 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
12965 # A ".." for each directory in $ac_dir_suffix.
12966 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
12967 case $ac_top_builddir_sub in
12968 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12969 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12970 esac ;;
12971 esac
12972 ac_abs_top_builddir=$ac_pwd
12973 ac_abs_builddir=$ac_pwd$ac_dir_suffix
12974 # for backward compatibility:
12975 ac_top_builddir=$ac_top_build_prefix
12976
12977 case $srcdir in
12978 .) # We are building in place.
12979 ac_srcdir=.
12980 ac_top_srcdir=$ac_top_builddir_sub
12981 ac_abs_top_srcdir=$ac_pwd ;;
12982 [\\/]* | ?:[\\/]* ) # Absolute name.
12983 ac_srcdir=$srcdir$ac_dir_suffix;
12984 ac_top_srcdir=$srcdir
12985 ac_abs_top_srcdir=$srcdir ;;
12986 *) # Relative name.
12987 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12988 ac_top_srcdir=$ac_top_build_prefix$srcdir
12989 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12990 esac
12991 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12992
12993
12994 case $ac_mode in
12995 :F)
12996 #
12997 # CONFIG_FILE
12998 #
12999
13000 case $INSTALL in
13001 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13002 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13003 esac
13004 _ACEOF
13005
13006 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13007 # If the template does not know about datarootdir, expand it.
13008 # FIXME: This hack should be removed a few years after 2.60.
13009 ac_datarootdir_hack=; ac_datarootdir_seen=
13010 ac_sed_dataroot='
13011 /datarootdir/ {
13012 p
13013 q
13014 }
13015 /@datadir@/p
13016 /@docdir@/p
13017 /@infodir@/p
13018 /@localedir@/p
13019 /@mandir@/p'
13020 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13021 *datarootdir*) ac_datarootdir_seen=yes;;
13022 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13024 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13025 _ACEOF
13026 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13027 ac_datarootdir_hack='
13028 s&@datadir@&$datadir&g
13029 s&@docdir@&$docdir&g
13030 s&@infodir@&$infodir&g
13031 s&@localedir@&$localedir&g
13032 s&@mandir@&$mandir&g
13033 s&\\\${datarootdir}&$datarootdir&g' ;;
13034 esac
13035 _ACEOF
13036
13037 # Neutralize VPATH when `$srcdir' = `.'.
13038 # Shell code in configure.ac might set extrasub.
13039 # FIXME: do we really want to maintain this feature?
13040 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13041 ac_sed_extra="$ac_vpsub
13042 $extrasub
13043 _ACEOF
13044 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13045 :t
13046 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13047 s|@configure_input@|$ac_sed_conf_input|;t t
13048 s&@top_builddir@&$ac_top_builddir_sub&;t t
13049 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13050 s&@srcdir@&$ac_srcdir&;t t
13051 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13052 s&@top_srcdir@&$ac_top_srcdir&;t t
13053 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13054 s&@builddir@&$ac_builddir&;t t
13055 s&@abs_builddir@&$ac_abs_builddir&;t t
13056 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13057 s&@INSTALL@&$ac_INSTALL&;t t
13058 $ac_datarootdir_hack
13059 "
13060 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13061 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13062
13063 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13064 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13065 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
13066 "$ac_tmp/out"`; test -z "$ac_out"; } &&
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13068 which seems to be undefined. Please make sure it is defined" >&5
13069 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13070 which seems to be undefined. Please make sure it is defined" >&2;}
13071
13072 rm -f "$ac_tmp/stdin"
13073 case $ac_file in
13074 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13075 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13076 esac \
13077 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13078 ;;
13079 :H)
13080 #
13081 # CONFIG_HEADER
13082 #
13083 if test x"$ac_file" != x-; then
13084 {
13085 $as_echo "/* $configure_input */" \
13086 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13087 } >"$ac_tmp/config.h" \
13088 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13089 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13091 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13092 else
13093 rm -f "$ac_file"
13094 mv "$ac_tmp/config.h" "$ac_file" \
13095 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13096 fi
13097 else
13098 $as_echo "/* $configure_input */" \
13099 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13100 || as_fn_error $? "could not create -" "$LINENO" 5
13101 fi
13102 ;;
13103
13104 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13105 $as_echo "$as_me: executing $ac_file commands" >&6;}
13106 ;;
13107 esac
13108
13109
13110 case $ac_file$ac_mode in
13111 "default-1":C) if test -f .devel; then
13112 echo timestamp > stamp-h
13113 cat $srcdir/Makefile-devel-adds >> Makefile
13114 make depend
13115 fi ;;
13116
13117 esac
13118 done # for ac_tag
13119
13120
13121 as_fn_exit 0
13122 _ACEOF
13123 ac_clean_files=$ac_clean_files_save
13124
13125 test $ac_write_fail = 0 ||
13126 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13127
13128
13129 # configure is writing to config.log, and then calls config.status.
13130 # config.status does its own redirection, appending to config.log.
13131 # Unfortunately, on DOS this fails, as config.log is still kept open
13132 # by configure, so config.status won't be able to write to it; its
13133 # output is simply discarded. So we exec the FD to /dev/null,
13134 # effectively closing config.log, so it can be properly (re)opened and
13135 # appended to by config.status. When coming back to configure, we
13136 # need to make the FD available again.
13137 if test "$no_create" != yes; then
13138 ac_cs_success=:
13139 ac_config_status_args=
13140 test "$silent" = yes &&
13141 ac_config_status_args="$ac_config_status_args --quiet"
13142 exec 5>/dev/null
13143 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13144 exec 5>>config.log
13145 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13146 # would make configure fail if this is the last instruction.
13147 $ac_cs_success || as_fn_exit 1
13148 fi
13149 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13151 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13152 fi
13153
13154 exit 0