]> The Tcpdump Group git mirrors - libpcap/blob - configure
Handle older OSes without DLT_PRISM_HEADER/DLT_AIRONET_HEADER/DLT_PPI.
[libpcap] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for pcap 1.10.0-PRE-GIT.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='pcap'
579 PACKAGE_TARNAME='pcap'
580 PACKAGE_VERSION='1.10.0-PRE-GIT'
581 PACKAGE_STRING='pcap 1.10.0-PRE-GIT'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="pcap.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_subst_vars='LTLIBOBJS
623 INSTALL_DATA
624 INSTALL_SCRIPT
625 INSTALL_PROGRAM
626 PCAP_SUPPORT_RDMASNIFF
627 PCAP_SUPPORT_DBUS
628 PCAP_SUPPORT_BT
629 PCAP_SUPPORT_DPDK
630 PCAP_SUPPORT_NETMAP
631 PCAP_SUPPORT_NETFILTER
632 PCAP_SUPPORT_USB
633 EXTRA_NETWORK_LIBS
634 RPCAPD_LIBS
635 INSTALL_RPCAPD
636 BUILD_RPCAPD
637 PTHREAD_LIBS
638 MAN_ADMIN_COMMANDS
639 MAN_MISC_INFO
640 MAN_FILE_FORMATS
641 MAN_DEVICES
642 DYEXT
643 SSRC
644 MSRC
645 ADDLARCHIVEOBJS
646 ADDLOBJS
647 V_YACC
648 V_RPATH_OPT
649 V_SONAME_OPT
650 V_SHLIB_OPT
651 V_SHLIB_CMD
652 V_SHLIB_CCOPT
653 V_PCAP
654 V_LEX
655 V_INCLS
656 V_FINDALLDEVS
657 V_DEFS
658 V_PROG_LDFLAGS_FAT
659 V_PROG_CCOPT_FAT
660 V_LIB_LDFLAGS_FAT
661 V_LIB_CCOPT_FAT
662 V_CCOPT
663 MKDEP
664 DEPENDENCY_CFLAG
665 LN_S
666 AR
667 RANLIB
668 YFLAGS
669 YACC
670 LEXLIB
671 LEX_OUTPUT_ROOT
672 LEX
673 PKGCONFIG
674 PCAP_SUPPORT_PACKET_RING
675 VALGRINDTEST_SRC
676 LIBOBJS
677 EGREP
678 GREP
679 CPP
680 OBJEXT
681 EXEEXT
682 ac_ct_CC
683 CPPFLAGS
684 LDFLAGS
685 CFLAGS
686 CC
687 SHLICC2
688 target_os
689 target_vendor
690 target_cpu
691 target
692 host_os
693 host_vendor
694 host_cpu
695 host
696 build_os
697 build_vendor
698 build_cpu
699 build
700 target_alias
701 host_alias
702 build_alias
703 LIBS
704 ECHO_T
705 ECHO_N
706 ECHO_C
707 DEFS
708 mandir
709 localedir
710 libdir
711 psdir
712 pdfdir
713 dvidir
714 htmldir
715 infodir
716 docdir
717 oldincludedir
718 includedir
719 localstatedir
720 sharedstatedir
721 sysconfdir
722 datadir
723 datarootdir
724 libexecdir
725 sbindir
726 bindir
727 program_transform_name
728 prefix
729 exec_prefix
730 PACKAGE_URL
731 PACKAGE_BUGREPORT
732 PACKAGE_STRING
733 PACKAGE_VERSION
734 PACKAGE_TARNAME
735 PACKAGE_NAME
736 PATH_SEPARATOR
737 SHELL'
738 ac_subst_files=''
739 ac_user_opts='
740 enable_option_checking
741 with_gcc
742 enable_largefile
743 enable_protochain
744 with_pcap
745 with_libnl
746 enable_packet_ring
747 enable_ipv6
748 with_dag
749 with_dag_includes
750 with_dag_libraries
751 with_septel
752 with_snf
753 with_snf_includes
754 with_snf_libraries
755 with_turbocap
756 enable_remote
757 enable_optimizer_dbg
758 enable_yydebug
759 enable_universal
760 enable_shared
761 enable_usb
762 enable_netmap
763 with_dpdk
764 enable_bluetooth
765 enable_dbus
766 enable_rdma
767 '
768 ac_precious_vars='build_alias
769 host_alias
770 target_alias
771 CC
772 CFLAGS
773 LDFLAGS
774 LIBS
775 CPPFLAGS
776 CPP
777 YACC
778 YFLAGS'
779
780
781 # Initialize some variables set by options.
782 ac_init_help=
783 ac_init_version=false
784 ac_unrecognized_opts=
785 ac_unrecognized_sep=
786 # The variables have the same names as the options, with
787 # dashes changed to underlines.
788 cache_file=/dev/null
789 exec_prefix=NONE
790 no_create=
791 no_recursion=
792 prefix=NONE
793 program_prefix=NONE
794 program_suffix=NONE
795 program_transform_name=s,x,x,
796 silent=
797 site=
798 srcdir=
799 verbose=
800 x_includes=NONE
801 x_libraries=NONE
802
803 # Installation directory options.
804 # These are left unexpanded so users can "make install exec_prefix=/foo"
805 # and all the variables that are supposed to be based on exec_prefix
806 # by default will actually change.
807 # Use braces instead of parens because sh, perl, etc. also accept them.
808 # (The list follows the same order as the GNU Coding Standards.)
809 bindir='${exec_prefix}/bin'
810 sbindir='${exec_prefix}/sbin'
811 libexecdir='${exec_prefix}/libexec'
812 datarootdir='${prefix}/share'
813 datadir='${datarootdir}'
814 sysconfdir='${prefix}/etc'
815 sharedstatedir='${prefix}/com'
816 localstatedir='${prefix}/var'
817 includedir='${prefix}/include'
818 oldincludedir='/usr/include'
819 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
820 infodir='${datarootdir}/info'
821 htmldir='${docdir}'
822 dvidir='${docdir}'
823 pdfdir='${docdir}'
824 psdir='${docdir}'
825 libdir='${exec_prefix}/lib'
826 localedir='${datarootdir}/locale'
827 mandir='${datarootdir}/man'
828
829 ac_prev=
830 ac_dashdash=
831 for ac_option
832 do
833 # If the previous option needs an argument, assign it.
834 if test -n "$ac_prev"; then
835 eval $ac_prev=\$ac_option
836 ac_prev=
837 continue
838 fi
839
840 case $ac_option in
841 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
842 *=) ac_optarg= ;;
843 *) ac_optarg=yes ;;
844 esac
845
846 # Accept the important Cygnus configure options, so we can diagnose typos.
847
848 case $ac_dashdash$ac_option in
849 --)
850 ac_dashdash=yes ;;
851
852 -bindir | --bindir | --bindi | --bind | --bin | --bi)
853 ac_prev=bindir ;;
854 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
855 bindir=$ac_optarg ;;
856
857 -build | --build | --buil | --bui | --bu)
858 ac_prev=build_alias ;;
859 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
860 build_alias=$ac_optarg ;;
861
862 -cache-file | --cache-file | --cache-fil | --cache-fi \
863 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
864 ac_prev=cache_file ;;
865 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
866 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
867 cache_file=$ac_optarg ;;
868
869 --config-cache | -C)
870 cache_file=config.cache ;;
871
872 -datadir | --datadir | --datadi | --datad)
873 ac_prev=datadir ;;
874 -datadir=* | --datadir=* | --datadi=* | --datad=*)
875 datadir=$ac_optarg ;;
876
877 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
878 | --dataroo | --dataro | --datar)
879 ac_prev=datarootdir ;;
880 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
881 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
882 datarootdir=$ac_optarg ;;
883
884 -disable-* | --disable-*)
885 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
886 # Reject names that are not valid shell variable names.
887 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
888 as_fn_error $? "invalid feature name: $ac_useropt"
889 ac_useropt_orig=$ac_useropt
890 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
891 case $ac_user_opts in
892 *"
893 "enable_$ac_useropt"
894 "*) ;;
895 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
896 ac_unrecognized_sep=', ';;
897 esac
898 eval enable_$ac_useropt=no ;;
899
900 -docdir | --docdir | --docdi | --doc | --do)
901 ac_prev=docdir ;;
902 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
903 docdir=$ac_optarg ;;
904
905 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
906 ac_prev=dvidir ;;
907 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
908 dvidir=$ac_optarg ;;
909
910 -enable-* | --enable-*)
911 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
912 # Reject names that are not valid shell variable names.
913 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
914 as_fn_error $? "invalid feature name: $ac_useropt"
915 ac_useropt_orig=$ac_useropt
916 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
917 case $ac_user_opts in
918 *"
919 "enable_$ac_useropt"
920 "*) ;;
921 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
922 ac_unrecognized_sep=', ';;
923 esac
924 eval enable_$ac_useropt=\$ac_optarg ;;
925
926 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
927 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
928 | --exec | --exe | --ex)
929 ac_prev=exec_prefix ;;
930 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
931 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
932 | --exec=* | --exe=* | --ex=*)
933 exec_prefix=$ac_optarg ;;
934
935 -gas | --gas | --ga | --g)
936 # Obsolete; use --with-gas.
937 with_gas=yes ;;
938
939 -help | --help | --hel | --he | -h)
940 ac_init_help=long ;;
941 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
942 ac_init_help=recursive ;;
943 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
944 ac_init_help=short ;;
945
946 -host | --host | --hos | --ho)
947 ac_prev=host_alias ;;
948 -host=* | --host=* | --hos=* | --ho=*)
949 host_alias=$ac_optarg ;;
950
951 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
952 ac_prev=htmldir ;;
953 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
954 | --ht=*)
955 htmldir=$ac_optarg ;;
956
957 -includedir | --includedir | --includedi | --included | --include \
958 | --includ | --inclu | --incl | --inc)
959 ac_prev=includedir ;;
960 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
961 | --includ=* | --inclu=* | --incl=* | --inc=*)
962 includedir=$ac_optarg ;;
963
964 -infodir | --infodir | --infodi | --infod | --info | --inf)
965 ac_prev=infodir ;;
966 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
967 infodir=$ac_optarg ;;
968
969 -libdir | --libdir | --libdi | --libd)
970 ac_prev=libdir ;;
971 -libdir=* | --libdir=* | --libdi=* | --libd=*)
972 libdir=$ac_optarg ;;
973
974 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
975 | --libexe | --libex | --libe)
976 ac_prev=libexecdir ;;
977 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
978 | --libexe=* | --libex=* | --libe=*)
979 libexecdir=$ac_optarg ;;
980
981 -localedir | --localedir | --localedi | --localed | --locale)
982 ac_prev=localedir ;;
983 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
984 localedir=$ac_optarg ;;
985
986 -localstatedir | --localstatedir | --localstatedi | --localstated \
987 | --localstate | --localstat | --localsta | --localst | --locals)
988 ac_prev=localstatedir ;;
989 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
990 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
991 localstatedir=$ac_optarg ;;
992
993 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
994 ac_prev=mandir ;;
995 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
996 mandir=$ac_optarg ;;
997
998 -nfp | --nfp | --nf)
999 # Obsolete; use --without-fp.
1000 with_fp=no ;;
1001
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n)
1004 no_create=yes ;;
1005
1006 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1007 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1008 no_recursion=yes ;;
1009
1010 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1011 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1012 | --oldin | --oldi | --old | --ol | --o)
1013 ac_prev=oldincludedir ;;
1014 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1015 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1016 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1017 oldincludedir=$ac_optarg ;;
1018
1019 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1020 ac_prev=prefix ;;
1021 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1022 prefix=$ac_optarg ;;
1023
1024 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1025 | --program-pre | --program-pr | --program-p)
1026 ac_prev=program_prefix ;;
1027 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1028 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1029 program_prefix=$ac_optarg ;;
1030
1031 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1032 | --program-suf | --program-su | --program-s)
1033 ac_prev=program_suffix ;;
1034 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1035 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1036 program_suffix=$ac_optarg ;;
1037
1038 -program-transform-name | --program-transform-name \
1039 | --program-transform-nam | --program-transform-na \
1040 | --program-transform-n | --program-transform- \
1041 | --program-transform | --program-transfor \
1042 | --program-transfo | --program-transf \
1043 | --program-trans | --program-tran \
1044 | --progr-tra | --program-tr | --program-t)
1045 ac_prev=program_transform_name ;;
1046 -program-transform-name=* | --program-transform-name=* \
1047 | --program-transform-nam=* | --program-transform-na=* \
1048 | --program-transform-n=* | --program-transform-=* \
1049 | --program-transform=* | --program-transfor=* \
1050 | --program-transfo=* | --program-transf=* \
1051 | --program-trans=* | --program-tran=* \
1052 | --progr-tra=* | --program-tr=* | --program-t=*)
1053 program_transform_name=$ac_optarg ;;
1054
1055 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1056 ac_prev=pdfdir ;;
1057 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1058 pdfdir=$ac_optarg ;;
1059
1060 -psdir | --psdir | --psdi | --psd | --ps)
1061 ac_prev=psdir ;;
1062 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1063 psdir=$ac_optarg ;;
1064
1065 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1066 | -silent | --silent | --silen | --sile | --sil)
1067 silent=yes ;;
1068
1069 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1070 ac_prev=sbindir ;;
1071 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1072 | --sbi=* | --sb=*)
1073 sbindir=$ac_optarg ;;
1074
1075 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1076 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1077 | --sharedst | --shareds | --shared | --share | --shar \
1078 | --sha | --sh)
1079 ac_prev=sharedstatedir ;;
1080 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1081 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1082 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1083 | --sha=* | --sh=*)
1084 sharedstatedir=$ac_optarg ;;
1085
1086 -site | --site | --sit)
1087 ac_prev=site ;;
1088 -site=* | --site=* | --sit=*)
1089 site=$ac_optarg ;;
1090
1091 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1092 ac_prev=srcdir ;;
1093 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1094 srcdir=$ac_optarg ;;
1095
1096 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1097 | --syscon | --sysco | --sysc | --sys | --sy)
1098 ac_prev=sysconfdir ;;
1099 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1100 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1101 sysconfdir=$ac_optarg ;;
1102
1103 -target | --target | --targe | --targ | --tar | --ta | --t)
1104 ac_prev=target_alias ;;
1105 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1106 target_alias=$ac_optarg ;;
1107
1108 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1109 verbose=yes ;;
1110
1111 -version | --version | --versio | --versi | --vers | -V)
1112 ac_init_version=: ;;
1113
1114 -with-* | --with-*)
1115 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1116 # Reject names that are not valid shell variable names.
1117 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1118 as_fn_error $? "invalid package name: $ac_useropt"
1119 ac_useropt_orig=$ac_useropt
1120 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1121 case $ac_user_opts in
1122 *"
1123 "with_$ac_useropt"
1124 "*) ;;
1125 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1126 ac_unrecognized_sep=', ';;
1127 esac
1128 eval with_$ac_useropt=\$ac_optarg ;;
1129
1130 -without-* | --without-*)
1131 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1132 # Reject names that are not valid shell variable names.
1133 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1134 as_fn_error $? "invalid package name: $ac_useropt"
1135 ac_useropt_orig=$ac_useropt
1136 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1137 case $ac_user_opts in
1138 *"
1139 "with_$ac_useropt"
1140 "*) ;;
1141 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1142 ac_unrecognized_sep=', ';;
1143 esac
1144 eval with_$ac_useropt=no ;;
1145
1146 --x)
1147 # Obsolete; use --with-x.
1148 with_x=yes ;;
1149
1150 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1151 | --x-incl | --x-inc | --x-in | --x-i)
1152 ac_prev=x_includes ;;
1153 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1154 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1155 x_includes=$ac_optarg ;;
1156
1157 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1158 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1159 ac_prev=x_libraries ;;
1160 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1161 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1162 x_libraries=$ac_optarg ;;
1163
1164 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1165 Try \`$0 --help' for more information"
1166 ;;
1167
1168 *=*)
1169 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1170 # Reject names that are not valid shell variable names.
1171 case $ac_envvar in #(
1172 '' | [0-9]* | *[!_$as_cr_alnum]* )
1173 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1174 esac
1175 eval $ac_envvar=\$ac_optarg
1176 export $ac_envvar ;;
1177
1178 *)
1179 # FIXME: should be removed in autoconf 3.0.
1180 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1181 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1182 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1183 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1184 ;;
1185
1186 esac
1187 done
1188
1189 if test -n "$ac_prev"; then
1190 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1191 as_fn_error $? "missing argument to $ac_option"
1192 fi
1193
1194 if test -n "$ac_unrecognized_opts"; then
1195 case $enable_option_checking in
1196 no) ;;
1197 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1198 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1199 esac
1200 fi
1201
1202 # Check all directory arguments for consistency.
1203 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1204 datadir sysconfdir sharedstatedir localstatedir includedir \
1205 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1206 libdir localedir mandir
1207 do
1208 eval ac_val=\$$ac_var
1209 # Remove trailing slashes.
1210 case $ac_val in
1211 */ )
1212 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1213 eval $ac_var=\$ac_val;;
1214 esac
1215 # Be sure to have absolute directory names.
1216 case $ac_val in
1217 [\\/$]* | ?:[\\/]* ) continue;;
1218 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1219 esac
1220 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1221 done
1222
1223 # There might be people who depend on the old broken behavior: `$host'
1224 # used to hold the argument of --host etc.
1225 # FIXME: To remove some day.
1226 build=$build_alias
1227 host=$host_alias
1228 target=$target_alias
1229
1230 # FIXME: To remove some day.
1231 if test "x$host_alias" != x; then
1232 if test "x$build_alias" = x; then
1233 cross_compiling=maybe
1234 elif test "x$build_alias" != "x$host_alias"; then
1235 cross_compiling=yes
1236 fi
1237 fi
1238
1239 ac_tool_prefix=
1240 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242 test "$silent" = yes && exec 6>/dev/null
1243
1244
1245 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246 ac_ls_di=`ls -di .` &&
1247 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1248 as_fn_error $? "working directory cannot be determined"
1249 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1250 as_fn_error $? "pwd does not report name of working directory"
1251
1252
1253 # Find the source files, if location was not specified.
1254 if test -z "$srcdir"; then
1255 ac_srcdir_defaulted=yes
1256 # Try the directory containing this script, then the parent directory.
1257 ac_confdir=`$as_dirname -- "$as_myself" ||
1258 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1259 X"$as_myself" : 'X\(//\)[^/]' \| \
1260 X"$as_myself" : 'X\(//\)$' \| \
1261 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1262 $as_echo X"$as_myself" |
1263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)[^/].*/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\).*/{
1276 s//\1/
1277 q
1278 }
1279 s/.*/./; q'`
1280 srcdir=$ac_confdir
1281 if test ! -r "$srcdir/$ac_unique_file"; then
1282 srcdir=..
1283 fi
1284 else
1285 ac_srcdir_defaulted=no
1286 fi
1287 if test ! -r "$srcdir/$ac_unique_file"; then
1288 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1289 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1290 fi
1291 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1292 ac_abs_confdir=`(
1293 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1294 pwd)`
1295 # When building in place, set srcdir=.
1296 if test "$ac_abs_confdir" = "$ac_pwd"; then
1297 srcdir=.
1298 fi
1299 # Remove unnecessary trailing slashes from srcdir.
1300 # Double slashes in file names in object file debugging info
1301 # mess up M-x gdb in Emacs.
1302 case $srcdir in
1303 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1304 esac
1305 for ac_var in $ac_precious_vars; do
1306 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1307 eval ac_env_${ac_var}_value=\$${ac_var}
1308 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1309 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1310 done
1311
1312 #
1313 # Report the --help message.
1314 #
1315 if test "$ac_init_help" = "long"; then
1316 # Omit some internal or obsolete options to make the list less imposing.
1317 # This message is too long to be a string in the A/UX 3.1 sh.
1318 cat <<_ACEOF
1319 \`configure' configures pcap 1.10.0-PRE-GIT to adapt to many kinds of systems.
1320
1321 Usage: $0 [OPTION]... [VAR=VALUE]...
1322
1323 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1324 VAR=VALUE. See below for descriptions of some of the useful variables.
1325
1326 Defaults for the options are specified in brackets.
1327
1328 Configuration:
1329 -h, --help display this help and exit
1330 --help=short display options specific to this package
1331 --help=recursive display the short help of all the included packages
1332 -V, --version display version information and exit
1333 -q, --quiet, --silent do not print \`checking ...' messages
1334 --cache-file=FILE cache test results in FILE [disabled]
1335 -C, --config-cache alias for \`--cache-file=config.cache'
1336 -n, --no-create do not create output files
1337 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1338
1339 Installation directories:
1340 --prefix=PREFIX install architecture-independent files in PREFIX
1341 [$ac_default_prefix]
1342 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1343 [PREFIX]
1344
1345 By default, \`make install' will install all the files in
1346 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1347 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1348 for instance \`--prefix=\$HOME'.
1349
1350 For better control, use the options below.
1351
1352 Fine tuning of the installation directories:
1353 --bindir=DIR user executables [EPREFIX/bin]
1354 --sbindir=DIR system admin executables [EPREFIX/sbin]
1355 --libexecdir=DIR program executables [EPREFIX/libexec]
1356 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1357 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1358 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1359 --libdir=DIR object code libraries [EPREFIX/lib]
1360 --includedir=DIR C header files [PREFIX/include]
1361 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1362 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1363 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1364 --infodir=DIR info documentation [DATAROOTDIR/info]
1365 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1366 --mandir=DIR man documentation [DATAROOTDIR/man]
1367 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap]
1368 --htmldir=DIR html documentation [DOCDIR]
1369 --dvidir=DIR dvi documentation [DOCDIR]
1370 --pdfdir=DIR pdf documentation [DOCDIR]
1371 --psdir=DIR ps documentation [DOCDIR]
1372 _ACEOF
1373
1374 cat <<\_ACEOF
1375
1376 System types:
1377 --build=BUILD configure for building on BUILD [guessed]
1378 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1379 --target=TARGET configure for building compilers for TARGET [HOST]
1380 _ACEOF
1381 fi
1382
1383 if test -n "$ac_init_help"; then
1384 case $ac_init_help in
1385 short | recursive ) echo "Configuration of pcap 1.10.0-PRE-GIT:";;
1386 esac
1387 cat <<\_ACEOF
1388
1389 Optional Features:
1390 --disable-option-checking ignore unrecognized --enable/--with options
1391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1393 --disable-largefile omit support for large files
1394 --disable-protochain disable \"protochain\" insn
1395 --enable-packet-ring enable packet ring support on Linux [default=yes]
1396 --enable-ipv6 build IPv6-capable version [default=yes]
1397 --enable-remote enable remote packet capture [default=no]
1398 --disable-remote disable remote packet capture
1399 --enable-optimizer-dbg build optimizer debugging code
1400 --enable-yydebug build parser debugging code
1401 --disable-universal don't build universal on macOS
1402 --enable-shared build shared libraries [default=yes, if support
1403 available]
1404 --enable-usb enable USB capture support [default=yes, if support
1405 available]
1406 --enable-netmap enable netmap support [default=yes, if support
1407 available]
1408 --enable-bluetooth enable Bluetooth support [default=yes, if support
1409 available]
1410 --enable-dbus enable D-Bus capture support [default=yes, if
1411 support available]
1412 --enable-rdma enable RDMA capture support [default=yes, if support
1413 available]
1414
1415 Optional Packages:
1416 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1417 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1418 --without-gcc don't use gcc
1419 --with-pcap=TYPE use packet capture TYPE
1420 --without-libnl disable libnl support [default=yes, on Linux, if
1421 present]
1422 --with-dag[=DIR] include Endace DAG support (located in directory
1423 DIR, if supplied). [default=yes, if present]
1424 --with-dag-includes=IDIR
1425 Endace DAG include directory, if not DIR/include
1426 --with-dag-libraries=LDIR
1427 Endace DAG library directory, if not DIR/lib
1428 --with-septel[=DIR] include Septel support (located in directory DIR, if
1429 supplied). [default=yes, if present]
1430 --with-snf[=DIR] include Myricom SNF support (located in directory
1431 DIR, if supplied). [default=yes, if present]
1432 --with-snf-includes=IDIR
1433 Myricom SNF include directory, if not DIR/include
1434 --with-snf-libraries=LDIR
1435 Myricom SNF library directory, if not DIR/lib
1436 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1437 directory DIR, if supplied). [default=yes, if
1438 present]
1439 --with-dpdk[=DIR] include DPDK support (located in directory DIR, if
1440 supplied). [default=yes, if present]
1441
1442 Some influential environment variables:
1443 CC C compiler command
1444 CFLAGS C compiler flags
1445 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1446 nonstandard directory <lib dir>
1447 LIBS libraries to pass to the linker, e.g. -l<library>
1448 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1449 you have headers in a nonstandard directory <include dir>
1450 CPP C preprocessor
1451 YACC The `Yet Another Compiler Compiler' implementation to use.
1452 Defaults to the first program found out of: `bison -y', `byacc',
1453 `yacc'.
1454 YFLAGS The list of arguments that will be passed by default to $YACC.
1455 This script will default YFLAGS to the empty string to avoid a
1456 default value of `-d' given by some make applications.
1457
1458 Use these variables to override the choices made by `configure' or to help
1459 it to find libraries and programs with nonstandard names/locations.
1460
1461 Report bugs to the package provider.
1462 _ACEOF
1463 ac_status=$?
1464 fi
1465
1466 if test "$ac_init_help" = "recursive"; then
1467 # If there are subdirs, report their specific --help.
1468 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1469 test -d "$ac_dir" ||
1470 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1471 continue
1472 ac_builddir=.
1473
1474 case "$ac_dir" in
1475 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1476 *)
1477 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1478 # A ".." for each directory in $ac_dir_suffix.
1479 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1480 case $ac_top_builddir_sub in
1481 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1482 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1483 esac ;;
1484 esac
1485 ac_abs_top_builddir=$ac_pwd
1486 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1487 # for backward compatibility:
1488 ac_top_builddir=$ac_top_build_prefix
1489
1490 case $srcdir in
1491 .) # We are building in place.
1492 ac_srcdir=.
1493 ac_top_srcdir=$ac_top_builddir_sub
1494 ac_abs_top_srcdir=$ac_pwd ;;
1495 [\\/]* | ?:[\\/]* ) # Absolute name.
1496 ac_srcdir=$srcdir$ac_dir_suffix;
1497 ac_top_srcdir=$srcdir
1498 ac_abs_top_srcdir=$srcdir ;;
1499 *) # Relative name.
1500 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1501 ac_top_srcdir=$ac_top_build_prefix$srcdir
1502 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1503 esac
1504 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1505
1506 cd "$ac_dir" || { ac_status=$?; continue; }
1507 # Check for guested configure.
1508 if test -f "$ac_srcdir/configure.gnu"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1511 elif test -f "$ac_srcdir/configure"; then
1512 echo &&
1513 $SHELL "$ac_srcdir/configure" --help=recursive
1514 else
1515 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1516 fi || ac_status=$?
1517 cd "$ac_pwd" || { ac_status=$?; break; }
1518 done
1519 fi
1520
1521 test -n "$ac_init_help" && exit $ac_status
1522 if $ac_init_version; then
1523 cat <<\_ACEOF
1524 pcap configure 1.10.0-PRE-GIT
1525 generated by GNU Autoconf 2.69
1526
1527 Copyright (C) 2012 Free Software Foundation, Inc.
1528 This configure script is free software; the Free Software Foundation
1529 gives unlimited permission to copy, distribute and modify it.
1530 _ACEOF
1531 exit
1532 fi
1533
1534 ## ------------------------ ##
1535 ## Autoconf initialization. ##
1536 ## ------------------------ ##
1537
1538 # ac_fn_c_try_compile LINENO
1539 # --------------------------
1540 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1541 ac_fn_c_try_compile ()
1542 {
1543 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1544 rm -f conftest.$ac_objext
1545 if { { ac_try="$ac_compile"
1546 case "(($ac_try" in
1547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1548 *) ac_try_echo=$ac_try;;
1549 esac
1550 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1551 $as_echo "$ac_try_echo"; } >&5
1552 (eval "$ac_compile") 2>conftest.err
1553 ac_status=$?
1554 if test -s conftest.err; then
1555 grep -v '^ *+' conftest.err >conftest.er1
1556 cat conftest.er1 >&5
1557 mv -f conftest.er1 conftest.err
1558 fi
1559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1560 test $ac_status = 0; } && {
1561 test -z "$ac_c_werror_flag" ||
1562 test ! -s conftest.err
1563 } && test -s conftest.$ac_objext; then :
1564 ac_retval=0
1565 else
1566 $as_echo "$as_me: failed program was:" >&5
1567 sed 's/^/| /' conftest.$ac_ext >&5
1568
1569 ac_retval=1
1570 fi
1571 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1572 as_fn_set_status $ac_retval
1573
1574 } # ac_fn_c_try_compile
1575
1576 # ac_fn_c_try_link LINENO
1577 # -----------------------
1578 # Try to link conftest.$ac_ext, and return whether this succeeded.
1579 ac_fn_c_try_link ()
1580 {
1581 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1582 rm -f conftest.$ac_objext conftest$ac_exeext
1583 if { { ac_try="$ac_link"
1584 case "(($ac_try" in
1585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1586 *) ac_try_echo=$ac_try;;
1587 esac
1588 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1589 $as_echo "$ac_try_echo"; } >&5
1590 (eval "$ac_link") 2>conftest.err
1591 ac_status=$?
1592 if test -s conftest.err; then
1593 grep -v '^ *+' conftest.err >conftest.er1
1594 cat conftest.er1 >&5
1595 mv -f conftest.er1 conftest.err
1596 fi
1597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1598 test $ac_status = 0; } && {
1599 test -z "$ac_c_werror_flag" ||
1600 test ! -s conftest.err
1601 } && test -s conftest$ac_exeext && {
1602 test "$cross_compiling" = yes ||
1603 test -x conftest$ac_exeext
1604 }; then :
1605 ac_retval=0
1606 else
1607 $as_echo "$as_me: failed program was:" >&5
1608 sed 's/^/| /' conftest.$ac_ext >&5
1609
1610 ac_retval=1
1611 fi
1612 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1613 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1614 # interfere with the next link command; also delete a directory that is
1615 # left behind by Apple's compiler. We do this before executing the actions.
1616 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1617 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1618 as_fn_set_status $ac_retval
1619
1620 } # ac_fn_c_try_link
1621
1622 # ac_fn_c_try_cpp LINENO
1623 # ----------------------
1624 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1625 ac_fn_c_try_cpp ()
1626 {
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 if { { ac_try="$ac_cpp conftest.$ac_ext"
1629 case "(($ac_try" in
1630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1631 *) ac_try_echo=$ac_try;;
1632 esac
1633 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1634 $as_echo "$ac_try_echo"; } >&5
1635 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1636 ac_status=$?
1637 if test -s conftest.err; then
1638 grep -v '^ *+' conftest.err >conftest.er1
1639 cat conftest.er1 >&5
1640 mv -f conftest.er1 conftest.err
1641 fi
1642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1643 test $ac_status = 0; } > conftest.i && {
1644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1645 test ! -s conftest.err
1646 }; then :
1647 ac_retval=0
1648 else
1649 $as_echo "$as_me: failed program was:" >&5
1650 sed 's/^/| /' conftest.$ac_ext >&5
1651
1652 ac_retval=1
1653 fi
1654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1655 as_fn_set_status $ac_retval
1656
1657 } # ac_fn_c_try_cpp
1658
1659 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1660 # -------------------------------------------------------
1661 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1662 # the include files in INCLUDES and setting the cache variable VAR
1663 # accordingly.
1664 ac_fn_c_check_header_mongrel ()
1665 {
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 if eval \${$3+:} false; then :
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1669 $as_echo_n "checking for $2... " >&6; }
1670 if eval \${$3+:} false; then :
1671 $as_echo_n "(cached) " >&6
1672 fi
1673 eval ac_res=\$$3
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1675 $as_echo "$ac_res" >&6; }
1676 else
1677 # Is the header compilable?
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1679 $as_echo_n "checking $2 usability... " >&6; }
1680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1681 /* end confdefs.h. */
1682 $4
1683 #include <$2>
1684 _ACEOF
1685 if ac_fn_c_try_compile "$LINENO"; then :
1686 ac_header_compiler=yes
1687 else
1688 ac_header_compiler=no
1689 fi
1690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1692 $as_echo "$ac_header_compiler" >&6; }
1693
1694 # Is the header present?
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1696 $as_echo_n "checking $2 presence... " >&6; }
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698 /* end confdefs.h. */
1699 #include <$2>
1700 _ACEOF
1701 if ac_fn_c_try_cpp "$LINENO"; then :
1702 ac_header_preproc=yes
1703 else
1704 ac_header_preproc=no
1705 fi
1706 rm -f conftest.err conftest.i conftest.$ac_ext
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1708 $as_echo "$ac_header_preproc" >&6; }
1709
1710 # So? What about this header?
1711 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1712 yes:no: )
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1714 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1717 ;;
1718 no:yes:* )
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1720 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1722 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1724 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1726 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1728 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1729 ;;
1730 esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732 $as_echo_n "checking for $2... " >&6; }
1733 if eval \${$3+:} false; then :
1734 $as_echo_n "(cached) " >&6
1735 else
1736 eval "$3=\$ac_header_compiler"
1737 fi
1738 eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740 $as_echo "$ac_res" >&6; }
1741 fi
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1743
1744 } # ac_fn_c_check_header_mongrel
1745
1746 # ac_fn_c_try_run LINENO
1747 # ----------------------
1748 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749 # that executables *can* be run.
1750 ac_fn_c_try_run ()
1751 {
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1764 { { case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767 esac
1768 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769 $as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778 sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781 fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1784 as_fn_set_status $ac_retval
1785
1786 } # ac_fn_c_try_run
1787
1788 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1789 # -------------------------------------------------------
1790 # Tests whether HEADER exists and can be compiled using the include files in
1791 # INCLUDES, setting the cache variable VAR accordingly.
1792 ac_fn_c_check_header_compile ()
1793 {
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796 $as_echo_n "checking for $2... " >&6; }
1797 if eval \${$3+:} false; then :
1798 $as_echo_n "(cached) " >&6
1799 else
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801 /* end confdefs.h. */
1802 $4
1803 #include <$2>
1804 _ACEOF
1805 if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807 else
1808 eval "$3=no"
1809 fi
1810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811 fi
1812 eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814 $as_echo "$ac_res" >&6; }
1815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816
1817 } # ac_fn_c_check_header_compile
1818
1819 # ac_fn_c_check_func LINENO FUNC VAR
1820 # ----------------------------------
1821 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1822 ac_fn_c_check_func ()
1823 {
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1826 $as_echo_n "checking for $2... " >&6; }
1827 if eval \${$3+:} false; then :
1828 $as_echo_n "(cached) " >&6
1829 else
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831 /* end confdefs.h. */
1832 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1833 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1834 #define $2 innocuous_$2
1835
1836 /* System header to define __stub macros and hopefully few prototypes,
1837 which can conflict with char $2 (); below.
1838 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1839 <limits.h> exists even on freestanding compilers. */
1840
1841 #ifdef __STDC__
1842 # include <limits.h>
1843 #else
1844 # include <assert.h>
1845 #endif
1846
1847 #undef $2
1848
1849 /* Override any GCC internal prototype to avoid an error.
1850 Use char because int might match the return type of a GCC
1851 builtin and then its argument prototype would still apply. */
1852 #ifdef __cplusplus
1853 extern "C"
1854 #endif
1855 char $2 ();
1856 /* The GNU C library defines this for functions which it implements
1857 to always fail with ENOSYS. Some functions are actually named
1858 something starting with __ and the normal name is an alias. */
1859 #if defined __stub_$2 || defined __stub___$2
1860 choke me
1861 #endif
1862
1863 int
1864 main ()
1865 {
1866 return $2 ();
1867 ;
1868 return 0;
1869 }
1870 _ACEOF
1871 if ac_fn_c_try_link "$LINENO"; then :
1872 eval "$3=yes"
1873 else
1874 eval "$3=no"
1875 fi
1876 rm -f core conftest.err conftest.$ac_objext \
1877 conftest$ac_exeext conftest.$ac_ext
1878 fi
1879 eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881 $as_echo "$ac_res" >&6; }
1882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883
1884 } # ac_fn_c_check_func
1885
1886 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1887 # ---------------------------------------------
1888 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1889 # accordingly.
1890 ac_fn_c_check_decl ()
1891 {
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 as_decl_name=`echo $2|sed 's/ *(.*//'`
1894 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1896 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1897 if eval \${$3+:} false; then :
1898 $as_echo_n "(cached) " >&6
1899 else
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901 /* end confdefs.h. */
1902 $4
1903 int
1904 main ()
1905 {
1906 #ifndef $as_decl_name
1907 #ifdef __cplusplus
1908 (void) $as_decl_use;
1909 #else
1910 (void) $as_decl_name;
1911 #endif
1912 #endif
1913
1914 ;
1915 return 0;
1916 }
1917 _ACEOF
1918 if ac_fn_c_try_compile "$LINENO"; then :
1919 eval "$3=yes"
1920 else
1921 eval "$3=no"
1922 fi
1923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924 fi
1925 eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927 $as_echo "$ac_res" >&6; }
1928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1929
1930 } # ac_fn_c_check_decl
1931
1932 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1933 # -------------------------------------------
1934 # Tests whether TYPE exists after having included INCLUDES, setting cache
1935 # variable VAR accordingly.
1936 ac_fn_c_check_type ()
1937 {
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940 $as_echo_n "checking for $2... " >&6; }
1941 if eval \${$3+:} false; then :
1942 $as_echo_n "(cached) " >&6
1943 else
1944 eval "$3=no"
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946 /* end confdefs.h. */
1947 $4
1948 int
1949 main ()
1950 {
1951 if (sizeof ($2))
1952 return 0;
1953 ;
1954 return 0;
1955 }
1956 _ACEOF
1957 if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959 /* end confdefs.h. */
1960 $4
1961 int
1962 main ()
1963 {
1964 if (sizeof (($2)))
1965 return 0;
1966 ;
1967 return 0;
1968 }
1969 _ACEOF
1970 if ac_fn_c_try_compile "$LINENO"; then :
1971
1972 else
1973 eval "$3=yes"
1974 fi
1975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976 fi
1977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978 fi
1979 eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981 $as_echo "$ac_res" >&6; }
1982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1983
1984 } # ac_fn_c_check_type
1985
1986 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1987 # ----------------------------------------------------
1988 # Tries to find if the field MEMBER exists in type AGGR, after including
1989 # INCLUDES, setting cache variable VAR accordingly.
1990 ac_fn_c_check_member ()
1991 {
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1994 $as_echo_n "checking for $2.$3... " >&6; }
1995 if eval \${$4+:} false; then :
1996 $as_echo_n "(cached) " >&6
1997 else
1998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999 /* end confdefs.h. */
2000 $5
2001 int
2002 main ()
2003 {
2004 static $2 ac_aggr;
2005 if (ac_aggr.$3)
2006 return 0;
2007 ;
2008 return 0;
2009 }
2010 _ACEOF
2011 if ac_fn_c_try_compile "$LINENO"; then :
2012 eval "$4=yes"
2013 else
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015 /* end confdefs.h. */
2016 $5
2017 int
2018 main ()
2019 {
2020 static $2 ac_aggr;
2021 if (sizeof ac_aggr.$3)
2022 return 0;
2023 ;
2024 return 0;
2025 }
2026 _ACEOF
2027 if ac_fn_c_try_compile "$LINENO"; then :
2028 eval "$4=yes"
2029 else
2030 eval "$4=no"
2031 fi
2032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033 fi
2034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 fi
2036 eval ac_res=\$$4
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2038 $as_echo "$ac_res" >&6; }
2039 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2040
2041 } # ac_fn_c_check_member
2042 cat >config.log <<_ACEOF
2043 This file contains any messages produced by compilers while
2044 running configure, to aid debugging if configure makes a mistake.
2045
2046 It was created by pcap $as_me 1.10.0-PRE-GIT, which was
2047 generated by GNU Autoconf 2.69. Invocation command line was
2048
2049 $ $0 $@
2050
2051 _ACEOF
2052 exec 5>>config.log
2053 {
2054 cat <<_ASUNAME
2055 ## --------- ##
2056 ## Platform. ##
2057 ## --------- ##
2058
2059 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2060 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2061 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2062 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2063 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2064
2065 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2066 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2067
2068 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2069 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2070 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2071 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2072 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2073 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2074 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2075
2076 _ASUNAME
2077
2078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2079 for as_dir in $PATH
2080 do
2081 IFS=$as_save_IFS
2082 test -z "$as_dir" && as_dir=.
2083 $as_echo "PATH: $as_dir"
2084 done
2085 IFS=$as_save_IFS
2086
2087 } >&5
2088
2089 cat >&5 <<_ACEOF
2090
2091
2092 ## ----------- ##
2093 ## Core tests. ##
2094 ## ----------- ##
2095
2096 _ACEOF
2097
2098
2099 # Keep a trace of the command line.
2100 # Strip out --no-create and --no-recursion so they do not pile up.
2101 # Strip out --silent because we don't want to record it for future runs.
2102 # Also quote any args containing shell meta-characters.
2103 # Make two passes to allow for proper duplicate-argument suppression.
2104 ac_configure_args=
2105 ac_configure_args0=
2106 ac_configure_args1=
2107 ac_must_keep_next=false
2108 for ac_pass in 1 2
2109 do
2110 for ac_arg
2111 do
2112 case $ac_arg in
2113 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2114 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2115 | -silent | --silent | --silen | --sile | --sil)
2116 continue ;;
2117 *\'*)
2118 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2119 esac
2120 case $ac_pass in
2121 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2122 2)
2123 as_fn_append ac_configure_args1 " '$ac_arg'"
2124 if test $ac_must_keep_next = true; then
2125 ac_must_keep_next=false # Got value, back to normal.
2126 else
2127 case $ac_arg in
2128 *=* | --config-cache | -C | -disable-* | --disable-* \
2129 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2130 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2131 | -with-* | --with-* | -without-* | --without-* | --x)
2132 case "$ac_configure_args0 " in
2133 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2134 esac
2135 ;;
2136 -* ) ac_must_keep_next=true ;;
2137 esac
2138 fi
2139 as_fn_append ac_configure_args " '$ac_arg'"
2140 ;;
2141 esac
2142 done
2143 done
2144 { ac_configure_args0=; unset ac_configure_args0;}
2145 { ac_configure_args1=; unset ac_configure_args1;}
2146
2147 # When interrupted or exit'd, cleanup temporary files, and complete
2148 # config.log. We remove comments because anyway the quotes in there
2149 # would cause problems or look ugly.
2150 # WARNING: Use '\'' to represent an apostrophe within the trap.
2151 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2152 trap 'exit_status=$?
2153 # Save into config.log some information that might help in debugging.
2154 {
2155 echo
2156
2157 $as_echo "## ---------------- ##
2158 ## Cache variables. ##
2159 ## ---------------- ##"
2160 echo
2161 # The following way of writing the cache mishandles newlines in values,
2162 (
2163 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2164 eval ac_val=\$$ac_var
2165 case $ac_val in #(
2166 *${as_nl}*)
2167 case $ac_var in #(
2168 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2169 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2170 esac
2171 case $ac_var in #(
2172 _ | IFS | as_nl) ;; #(
2173 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2174 *) { eval $ac_var=; unset $ac_var;} ;;
2175 esac ;;
2176 esac
2177 done
2178 (set) 2>&1 |
2179 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2180 *${as_nl}ac_space=\ *)
2181 sed -n \
2182 "s/'\''/'\''\\\\'\'''\''/g;
2183 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2184 ;; #(
2185 *)
2186 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2187 ;;
2188 esac |
2189 sort
2190 )
2191 echo
2192
2193 $as_echo "## ----------------- ##
2194 ## Output variables. ##
2195 ## ----------------- ##"
2196 echo
2197 for ac_var in $ac_subst_vars
2198 do
2199 eval ac_val=\$$ac_var
2200 case $ac_val in
2201 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2202 esac
2203 $as_echo "$ac_var='\''$ac_val'\''"
2204 done | sort
2205 echo
2206
2207 if test -n "$ac_subst_files"; then
2208 $as_echo "## ------------------- ##
2209 ## File substitutions. ##
2210 ## ------------------- ##"
2211 echo
2212 for ac_var in $ac_subst_files
2213 do
2214 eval ac_val=\$$ac_var
2215 case $ac_val in
2216 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2217 esac
2218 $as_echo "$ac_var='\''$ac_val'\''"
2219 done | sort
2220 echo
2221 fi
2222
2223 if test -s confdefs.h; then
2224 $as_echo "## ----------- ##
2225 ## confdefs.h. ##
2226 ## ----------- ##"
2227 echo
2228 cat confdefs.h
2229 echo
2230 fi
2231 test "$ac_signal" != 0 &&
2232 $as_echo "$as_me: caught signal $ac_signal"
2233 $as_echo "$as_me: exit $exit_status"
2234 } >&5
2235 rm -f core *.core core.conftest.* &&
2236 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2237 exit $exit_status
2238 ' 0
2239 for ac_signal in 1 2 13 15; do
2240 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2241 done
2242 ac_signal=0
2243
2244 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2245 rm -f -r conftest* confdefs.h
2246
2247 $as_echo "/* confdefs.h */" > confdefs.h
2248
2249 # Predefined preprocessor variables.
2250
2251 cat >>confdefs.h <<_ACEOF
2252 #define PACKAGE_NAME "$PACKAGE_NAME"
2253 _ACEOF
2254
2255 cat >>confdefs.h <<_ACEOF
2256 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2257 _ACEOF
2258
2259 cat >>confdefs.h <<_ACEOF
2260 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2261 _ACEOF
2262
2263 cat >>confdefs.h <<_ACEOF
2264 #define PACKAGE_STRING "$PACKAGE_STRING"
2265 _ACEOF
2266
2267 cat >>confdefs.h <<_ACEOF
2268 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2269 _ACEOF
2270
2271 cat >>confdefs.h <<_ACEOF
2272 #define PACKAGE_URL "$PACKAGE_URL"
2273 _ACEOF
2274
2275
2276 # Let the site file select an alternate cache file if it wants to.
2277 # Prefer an explicitly selected file to automatically selected ones.
2278 ac_site_file1=NONE
2279 ac_site_file2=NONE
2280 if test -n "$CONFIG_SITE"; then
2281 # We do not want a PATH search for config.site.
2282 case $CONFIG_SITE in #((
2283 -*) ac_site_file1=./$CONFIG_SITE;;
2284 */*) ac_site_file1=$CONFIG_SITE;;
2285 *) ac_site_file1=./$CONFIG_SITE;;
2286 esac
2287 elif test "x$prefix" != xNONE; then
2288 ac_site_file1=$prefix/share/config.site
2289 ac_site_file2=$prefix/etc/config.site
2290 else
2291 ac_site_file1=$ac_default_prefix/share/config.site
2292 ac_site_file2=$ac_default_prefix/etc/config.site
2293 fi
2294 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2295 do
2296 test "x$ac_site_file" = xNONE && continue
2297 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2299 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2300 sed 's/^/| /' "$ac_site_file" >&5
2301 . "$ac_site_file" \
2302 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2303 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2304 as_fn_error $? "failed to load site script $ac_site_file
2305 See \`config.log' for more details" "$LINENO" 5; }
2306 fi
2307 done
2308
2309 if test -r "$cache_file"; then
2310 # Some versions of bash will fail to source /dev/null (special files
2311 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2312 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2314 $as_echo "$as_me: loading cache $cache_file" >&6;}
2315 case $cache_file in
2316 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2317 *) . "./$cache_file";;
2318 esac
2319 fi
2320 else
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2322 $as_echo "$as_me: creating cache $cache_file" >&6;}
2323 >$cache_file
2324 fi
2325
2326 # Check that the precious variables saved in the cache have kept the same
2327 # value.
2328 ac_cache_corrupted=false
2329 for ac_var in $ac_precious_vars; do
2330 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2331 eval ac_new_set=\$ac_env_${ac_var}_set
2332 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2333 eval ac_new_val=\$ac_env_${ac_var}_value
2334 case $ac_old_set,$ac_new_set in
2335 set,)
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2337 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2338 ac_cache_corrupted=: ;;
2339 ,set)
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2341 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2342 ac_cache_corrupted=: ;;
2343 ,);;
2344 *)
2345 if test "x$ac_old_val" != "x$ac_new_val"; then
2346 # differences in whitespace do not lead to failure.
2347 ac_old_val_w=`echo x $ac_old_val`
2348 ac_new_val_w=`echo x $ac_new_val`
2349 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2351 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2352 ac_cache_corrupted=:
2353 else
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2355 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2356 eval $ac_var=\$ac_old_val
2357 fi
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2359 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2361 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2362 fi;;
2363 esac
2364 # Pass precious variables to config.status.
2365 if test "$ac_new_set" = set; then
2366 case $ac_new_val in
2367 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2368 *) ac_arg=$ac_var=$ac_new_val ;;
2369 esac
2370 case " $ac_configure_args " in
2371 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2372 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2373 esac
2374 fi
2375 done
2376 if $ac_cache_corrupted; then
2377 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2378 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2380 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2381 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2382 fi
2383 ## -------------------- ##
2384 ## Main body of script. ##
2385 ## -------------------- ##
2386
2387 ac_ext=c
2388 ac_cpp='$CPP $CPPFLAGS'
2389 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2390 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2391 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2392
2393
2394
2395
2396
2397 ac_aux_dir=
2398 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2399 if test -f "$ac_dir/install-sh"; then
2400 ac_aux_dir=$ac_dir
2401 ac_install_sh="$ac_aux_dir/install-sh -c"
2402 break
2403 elif test -f "$ac_dir/install.sh"; then
2404 ac_aux_dir=$ac_dir
2405 ac_install_sh="$ac_aux_dir/install.sh -c"
2406 break
2407 elif test -f "$ac_dir/shtool"; then
2408 ac_aux_dir=$ac_dir
2409 ac_install_sh="$ac_aux_dir/shtool install -c"
2410 break
2411 fi
2412 done
2413 if test -z "$ac_aux_dir"; then
2414 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2415 fi
2416
2417 # These three variables are undocumented and unsupported,
2418 # and are intended to be withdrawn in a future Autoconf release.
2419 # They can cause serious problems if a builder's source tree is in a directory
2420 # whose full name contains unusual characters.
2421 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2422 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2423 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2424
2425
2426 # Make sure we can run config.sub.
2427 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2428 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2429
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2431 $as_echo_n "checking build system type... " >&6; }
2432 if ${ac_cv_build+:} false; then :
2433 $as_echo_n "(cached) " >&6
2434 else
2435 ac_build_alias=$build_alias
2436 test "x$ac_build_alias" = x &&
2437 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2438 test "x$ac_build_alias" = x &&
2439 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2440 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2441 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2442
2443 fi
2444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2445 $as_echo "$ac_cv_build" >&6; }
2446 case $ac_cv_build in
2447 *-*-*) ;;
2448 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2449 esac
2450 build=$ac_cv_build
2451 ac_save_IFS=$IFS; IFS='-'
2452 set x $ac_cv_build
2453 shift
2454 build_cpu=$1
2455 build_vendor=$2
2456 shift; shift
2457 # Remember, the first character of IFS is used to create $*,
2458 # except with old shells:
2459 build_os=$*
2460 IFS=$ac_save_IFS
2461 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2462
2463
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2465 $as_echo_n "checking host system type... " >&6; }
2466 if ${ac_cv_host+:} false; then :
2467 $as_echo_n "(cached) " >&6
2468 else
2469 if test "x$host_alias" = x; then
2470 ac_cv_host=$ac_cv_build
2471 else
2472 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2473 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2474 fi
2475
2476 fi
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2478 $as_echo "$ac_cv_host" >&6; }
2479 case $ac_cv_host in
2480 *-*-*) ;;
2481 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2482 esac
2483 host=$ac_cv_host
2484 ac_save_IFS=$IFS; IFS='-'
2485 set x $ac_cv_host
2486 shift
2487 host_cpu=$1
2488 host_vendor=$2
2489 shift; shift
2490 # Remember, the first character of IFS is used to create $*,
2491 # except with old shells:
2492 host_os=$*
2493 IFS=$ac_save_IFS
2494 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2495
2496
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2498 $as_echo_n "checking target system type... " >&6; }
2499 if ${ac_cv_target+:} false; then :
2500 $as_echo_n "(cached) " >&6
2501 else
2502 if test "x$target_alias" = x; then
2503 ac_cv_target=$ac_cv_host
2504 else
2505 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2506 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2507 fi
2508
2509 fi
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2511 $as_echo "$ac_cv_target" >&6; }
2512 case $ac_cv_target in
2513 *-*-*) ;;
2514 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2515 esac
2516 target=$ac_cv_target
2517 ac_save_IFS=$IFS; IFS='-'
2518 set x $ac_cv_target
2519 shift
2520 target_cpu=$1
2521 target_vendor=$2
2522 shift; shift
2523 # Remember, the first character of IFS is used to create $*,
2524 # except with old shells:
2525 target_os=$*
2526 IFS=$ac_save_IFS
2527 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2528
2529
2530 # The aliases save the names the user supplied, while $host etc.
2531 # will get canonicalized.
2532 test -n "$target_alias" &&
2533 test "$program_prefix$program_suffix$program_transform_name" = \
2534 NONENONEs,x,x, &&
2535 program_prefix=${target_alias}-
2536
2537
2538
2539
2540
2541
2542
2543
2544 # Check whether --with-gcc was given.
2545 if test "${with_gcc+set}" = set; then :
2546 withval=$with_gcc;
2547 fi
2548
2549 V_CCOPT=""
2550 if test "${srcdir}" != "." ; then
2551 V_CCOPT="-I\$(srcdir)"
2552 fi
2553 if test "${CFLAGS+set}" = set; then
2554 LBL_CFLAGS="$CFLAGS"
2555 fi
2556 if test -z "$CC" ; then
2557 case "$host_os" in
2558
2559 bsdi*)
2560 # Extract the first word of "shlicc2", so it can be a program name with args.
2561 set dummy shlicc2; ac_word=$2
2562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2563 $as_echo_n "checking for $ac_word... " >&6; }
2564 if ${ac_cv_prog_SHLICC2+:} false; then :
2565 $as_echo_n "(cached) " >&6
2566 else
2567 if test -n "$SHLICC2"; then
2568 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2569 else
2570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2571 for as_dir in $PATH
2572 do
2573 IFS=$as_save_IFS
2574 test -z "$as_dir" && as_dir=.
2575 for ac_exec_ext in '' $ac_executable_extensions; do
2576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2577 ac_cv_prog_SHLICC2="yes"
2578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2579 break 2
2580 fi
2581 done
2582 done
2583 IFS=$as_save_IFS
2584
2585 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2586 fi
2587 fi
2588 SHLICC2=$ac_cv_prog_SHLICC2
2589 if test -n "$SHLICC2"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2591 $as_echo "$SHLICC2" >&6; }
2592 else
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2594 $as_echo "no" >&6; }
2595 fi
2596
2597
2598 if test $SHLICC2 = yes ; then
2599 CC=shlicc2
2600 export CC
2601 fi
2602 ;;
2603 esac
2604 fi
2605 if test -z "$CC" -a "$with_gcc" = no ; then
2606 CC=cc
2607 export CC
2608 fi
2609
2610 #
2611 # Try to enable as many C99 features as we can.
2612 # At minimum, we want C++/C99-style // comments.
2613 #
2614 ac_ext=c
2615 ac_cpp='$CPP $CPPFLAGS'
2616 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2617 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2618 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2619 if test -n "$ac_tool_prefix"; then
2620 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2621 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2623 $as_echo_n "checking for $ac_word... " >&6; }
2624 if ${ac_cv_prog_CC+:} false; then :
2625 $as_echo_n "(cached) " >&6
2626 else
2627 if test -n "$CC"; then
2628 ac_cv_prog_CC="$CC" # Let the user override the test.
2629 else
2630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2631 for as_dir in $PATH
2632 do
2633 IFS=$as_save_IFS
2634 test -z "$as_dir" && as_dir=.
2635 for ac_exec_ext in '' $ac_executable_extensions; do
2636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2637 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2639 break 2
2640 fi
2641 done
2642 done
2643 IFS=$as_save_IFS
2644
2645 fi
2646 fi
2647 CC=$ac_cv_prog_CC
2648 if test -n "$CC"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2650 $as_echo "$CC" >&6; }
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2653 $as_echo "no" >&6; }
2654 fi
2655
2656
2657 fi
2658 if test -z "$ac_cv_prog_CC"; then
2659 ac_ct_CC=$CC
2660 # Extract the first word of "gcc", so it can be a program name with args.
2661 set dummy gcc; ac_word=$2
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2663 $as_echo_n "checking for $ac_word... " >&6; }
2664 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2665 $as_echo_n "(cached) " >&6
2666 else
2667 if test -n "$ac_ct_CC"; then
2668 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2669 else
2670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671 for as_dir in $PATH
2672 do
2673 IFS=$as_save_IFS
2674 test -z "$as_dir" && as_dir=.
2675 for ac_exec_ext in '' $ac_executable_extensions; do
2676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2677 ac_cv_prog_ac_ct_CC="gcc"
2678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2679 break 2
2680 fi
2681 done
2682 done
2683 IFS=$as_save_IFS
2684
2685 fi
2686 fi
2687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2688 if test -n "$ac_ct_CC"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2690 $as_echo "$ac_ct_CC" >&6; }
2691 else
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2693 $as_echo "no" >&6; }
2694 fi
2695
2696 if test "x$ac_ct_CC" = x; then
2697 CC=""
2698 else
2699 case $cross_compiling:$ac_tool_warned in
2700 yes:)
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2702 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2703 ac_tool_warned=yes ;;
2704 esac
2705 CC=$ac_ct_CC
2706 fi
2707 else
2708 CC="$ac_cv_prog_CC"
2709 fi
2710
2711 if test -z "$CC"; then
2712 if test -n "$ac_tool_prefix"; then
2713 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2714 set dummy ${ac_tool_prefix}cc; ac_word=$2
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716 $as_echo_n "checking for $ac_word... " >&6; }
2717 if ${ac_cv_prog_CC+:} false; then :
2718 $as_echo_n "(cached) " >&6
2719 else
2720 if test -n "$CC"; then
2721 ac_cv_prog_CC="$CC" # Let the user override the test.
2722 else
2723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724 for as_dir in $PATH
2725 do
2726 IFS=$as_save_IFS
2727 test -z "$as_dir" && as_dir=.
2728 for ac_exec_ext in '' $ac_executable_extensions; do
2729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2730 ac_cv_prog_CC="${ac_tool_prefix}cc"
2731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732 break 2
2733 fi
2734 done
2735 done
2736 IFS=$as_save_IFS
2737
2738 fi
2739 fi
2740 CC=$ac_cv_prog_CC
2741 if test -n "$CC"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2743 $as_echo "$CC" >&6; }
2744 else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746 $as_echo "no" >&6; }
2747 fi
2748
2749
2750 fi
2751 fi
2752 if test -z "$CC"; then
2753 # Extract the first word of "cc", so it can be a program name with args.
2754 set dummy cc; ac_word=$2
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2756 $as_echo_n "checking for $ac_word... " >&6; }
2757 if ${ac_cv_prog_CC+:} false; then :
2758 $as_echo_n "(cached) " >&6
2759 else
2760 if test -n "$CC"; then
2761 ac_cv_prog_CC="$CC" # Let the user override the test.
2762 else
2763 ac_prog_rejected=no
2764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2765 for as_dir in $PATH
2766 do
2767 IFS=$as_save_IFS
2768 test -z "$as_dir" && as_dir=.
2769 for ac_exec_ext in '' $ac_executable_extensions; do
2770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2771 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2772 ac_prog_rejected=yes
2773 continue
2774 fi
2775 ac_cv_prog_CC="cc"
2776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2777 break 2
2778 fi
2779 done
2780 done
2781 IFS=$as_save_IFS
2782
2783 if test $ac_prog_rejected = yes; then
2784 # We found a bogon in the path, so make sure we never use it.
2785 set dummy $ac_cv_prog_CC
2786 shift
2787 if test $# != 0; then
2788 # We chose a different compiler from the bogus one.
2789 # However, it has the same basename, so the bogon will be chosen
2790 # first if we set CC to just the basename; use the full file name.
2791 shift
2792 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2793 fi
2794 fi
2795 fi
2796 fi
2797 CC=$ac_cv_prog_CC
2798 if test -n "$CC"; then
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2800 $as_echo "$CC" >&6; }
2801 else
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803 $as_echo "no" >&6; }
2804 fi
2805
2806
2807 fi
2808 if test -z "$CC"; then
2809 if test -n "$ac_tool_prefix"; then
2810 for ac_prog in cl.exe
2811 do
2812 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2813 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815 $as_echo_n "checking for $ac_word... " >&6; }
2816 if ${ac_cv_prog_CC+:} false; then :
2817 $as_echo_n "(cached) " >&6
2818 else
2819 if test -n "$CC"; then
2820 ac_cv_prog_CC="$CC" # Let the user override the test.
2821 else
2822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823 for as_dir in $PATH
2824 do
2825 IFS=$as_save_IFS
2826 test -z "$as_dir" && as_dir=.
2827 for ac_exec_ext in '' $ac_executable_extensions; do
2828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2829 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2831 break 2
2832 fi
2833 done
2834 done
2835 IFS=$as_save_IFS
2836
2837 fi
2838 fi
2839 CC=$ac_cv_prog_CC
2840 if test -n "$CC"; then
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2842 $as_echo "$CC" >&6; }
2843 else
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845 $as_echo "no" >&6; }
2846 fi
2847
2848
2849 test -n "$CC" && break
2850 done
2851 fi
2852 if test -z "$CC"; then
2853 ac_ct_CC=$CC
2854 for ac_prog in cl.exe
2855 do
2856 # Extract the first word of "$ac_prog", so it can be a program name with args.
2857 set dummy $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_ac_ct_CC+:} false; then :
2861 $as_echo_n "(cached) " >&6
2862 else
2863 if test -n "$ac_ct_CC"; then
2864 ac_cv_prog_ac_ct_CC="$ac_ct_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_ac_ct_CC="$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 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2884 if test -n "$ac_ct_CC"; then
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2886 $as_echo "$ac_ct_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 "$ac_ct_CC" && break
2894 done
2895
2896 if test "x$ac_ct_CC" = x; then
2897 CC=""
2898 else
2899 case $cross_compiling:$ac_tool_warned in
2900 yes:)
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2903 ac_tool_warned=yes ;;
2904 esac
2905 CC=$ac_ct_CC
2906 fi
2907 fi
2908
2909 fi
2910
2911
2912 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2914 as_fn_error $? "no acceptable C compiler found in \$PATH
2915 See \`config.log' for more details" "$LINENO" 5; }
2916
2917 # Provide some information about the compiler.
2918 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2919 set X $ac_compile
2920 ac_compiler=$2
2921 for ac_option in --version -v -V -qversion; do
2922 { { ac_try="$ac_compiler $ac_option >&5"
2923 case "(($ac_try" in
2924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2925 *) ac_try_echo=$ac_try;;
2926 esac
2927 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2928 $as_echo "$ac_try_echo"; } >&5
2929 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2930 ac_status=$?
2931 if test -s conftest.err; then
2932 sed '10a\
2933 ... rest of stderr output deleted ...
2934 10q' conftest.err >conftest.er1
2935 cat conftest.er1 >&5
2936 fi
2937 rm -f conftest.er1 conftest.err
2938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2939 test $ac_status = 0; }
2940 done
2941
2942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943 /* end confdefs.h. */
2944
2945 int
2946 main ()
2947 {
2948
2949 ;
2950 return 0;
2951 }
2952 _ACEOF
2953 ac_clean_files_save=$ac_clean_files
2954 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2955 # Try to create an executable without -o first, disregard a.out.
2956 # It will help us diagnose broken compilers, and finding out an intuition
2957 # of exeext.
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2959 $as_echo_n "checking whether the C compiler works... " >&6; }
2960 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2961
2962 # The possible output files:
2963 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2964
2965 ac_rmfiles=
2966 for ac_file in $ac_files
2967 do
2968 case $ac_file in
2969 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2970 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2971 esac
2972 done
2973 rm -f $ac_rmfiles
2974
2975 if { { ac_try="$ac_link_default"
2976 case "(($ac_try" in
2977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2978 *) ac_try_echo=$ac_try;;
2979 esac
2980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2981 $as_echo "$ac_try_echo"; } >&5
2982 (eval "$ac_link_default") 2>&5
2983 ac_status=$?
2984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2985 test $ac_status = 0; }; then :
2986 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2987 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2988 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2989 # so that the user can short-circuit this test for compilers unknown to
2990 # Autoconf.
2991 for ac_file in $ac_files ''
2992 do
2993 test -f "$ac_file" || continue
2994 case $ac_file in
2995 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2996 ;;
2997 [ab].out )
2998 # We found the default executable, but exeext='' is most
2999 # certainly right.
3000 break;;
3001 *.* )
3002 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3003 then :; else
3004 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3005 fi
3006 # We set ac_cv_exeext here because the later test for it is not
3007 # safe: cross compilers may not add the suffix if given an `-o'
3008 # argument, so we may need to know it at that point already.
3009 # Even if this section looks crufty: it has the advantage of
3010 # actually working.
3011 break;;
3012 * )
3013 break;;
3014 esac
3015 done
3016 test "$ac_cv_exeext" = no && ac_cv_exeext=
3017
3018 else
3019 ac_file=''
3020 fi
3021 if test -z "$ac_file"; then :
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023 $as_echo "no" >&6; }
3024 $as_echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3029 as_fn_error 77 "C compiler cannot create executables
3030 See \`config.log' for more details" "$LINENO" 5; }
3031 else
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3033 $as_echo "yes" >&6; }
3034 fi
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3036 $as_echo_n "checking for C compiler default output file name... " >&6; }
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3038 $as_echo "$ac_file" >&6; }
3039 ac_exeext=$ac_cv_exeext
3040
3041 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3042 ac_clean_files=$ac_clean_files_save
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3044 $as_echo_n "checking for suffix of executables... " >&6; }
3045 if { { ac_try="$ac_link"
3046 case "(($ac_try" in
3047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3048 *) ac_try_echo=$ac_try;;
3049 esac
3050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3051 $as_echo "$ac_try_echo"; } >&5
3052 (eval "$ac_link") 2>&5
3053 ac_status=$?
3054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3055 test $ac_status = 0; }; then :
3056 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3057 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3058 # work properly (i.e., refer to `conftest.exe'), while it won't with
3059 # `rm'.
3060 for ac_file in conftest.exe conftest conftest.*; do
3061 test -f "$ac_file" || continue
3062 case $ac_file in
3063 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3064 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3065 break;;
3066 * ) break;;
3067 esac
3068 done
3069 else
3070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3072 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3073 See \`config.log' for more details" "$LINENO" 5; }
3074 fi
3075 rm -f conftest conftest$ac_cv_exeext
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3077 $as_echo "$ac_cv_exeext" >&6; }
3078
3079 rm -f conftest.$ac_ext
3080 EXEEXT=$ac_cv_exeext
3081 ac_exeext=$EXEEXT
3082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3083 /* end confdefs.h. */
3084 #include <stdio.h>
3085 int
3086 main ()
3087 {
3088 FILE *f = fopen ("conftest.out", "w");
3089 return ferror (f) || fclose (f) != 0;
3090
3091 ;
3092 return 0;
3093 }
3094 _ACEOF
3095 ac_clean_files="$ac_clean_files conftest.out"
3096 # Check that the compiler produces executables we can run. If not, either
3097 # the compiler is broken, or we cross compile.
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3099 $as_echo_n "checking whether we are cross compiling... " >&6; }
3100 if test "$cross_compiling" != yes; then
3101 { { ac_try="$ac_link"
3102 case "(($ac_try" in
3103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3104 *) ac_try_echo=$ac_try;;
3105 esac
3106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3107 $as_echo "$ac_try_echo"; } >&5
3108 (eval "$ac_link") 2>&5
3109 ac_status=$?
3110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3111 test $ac_status = 0; }
3112 if { ac_try='./conftest$ac_cv_exeext'
3113 { { case "(($ac_try" in
3114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3115 *) ac_try_echo=$ac_try;;
3116 esac
3117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3118 $as_echo "$ac_try_echo"; } >&5
3119 (eval "$ac_try") 2>&5
3120 ac_status=$?
3121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3122 test $ac_status = 0; }; }; then
3123 cross_compiling=no
3124 else
3125 if test "$cross_compiling" = maybe; then
3126 cross_compiling=yes
3127 else
3128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3129 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3130 as_fn_error $? "cannot run C compiled programs.
3131 If you meant to cross compile, use \`--host'.
3132 See \`config.log' for more details" "$LINENO" 5; }
3133 fi
3134 fi
3135 fi
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3137 $as_echo "$cross_compiling" >&6; }
3138
3139 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3140 ac_clean_files=$ac_clean_files_save
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3142 $as_echo_n "checking for suffix of object files... " >&6; }
3143 if ${ac_cv_objext+:} false; then :
3144 $as_echo_n "(cached) " >&6
3145 else
3146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3147 /* end confdefs.h. */
3148
3149 int
3150 main ()
3151 {
3152
3153 ;
3154 return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.o conftest.obj
3158 if { { ac_try="$ac_compile"
3159 case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162 esac
3163 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164 $as_echo "$ac_try_echo"; } >&5
3165 (eval "$ac_compile") 2>&5
3166 ac_status=$?
3167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168 test $ac_status = 0; }; then :
3169 for ac_file in conftest.o conftest.obj conftest.*; do
3170 test -f "$ac_file" || continue;
3171 case $ac_file in
3172 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3173 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3174 break;;
3175 esac
3176 done
3177 else
3178 $as_echo "$as_me: failed program was:" >&5
3179 sed 's/^/| /' conftest.$ac_ext >&5
3180
3181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3183 as_fn_error $? "cannot compute suffix of object files: cannot compile
3184 See \`config.log' for more details" "$LINENO" 5; }
3185 fi
3186 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3187 fi
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3189 $as_echo "$ac_cv_objext" >&6; }
3190 OBJEXT=$ac_cv_objext
3191 ac_objext=$OBJEXT
3192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3193 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3194 if ${ac_cv_c_compiler_gnu+:} false; then :
3195 $as_echo_n "(cached) " >&6
3196 else
3197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3198 /* end confdefs.h. */
3199
3200 int
3201 main ()
3202 {
3203 #ifndef __GNUC__
3204 choke me
3205 #endif
3206
3207 ;
3208 return 0;
3209 }
3210 _ACEOF
3211 if ac_fn_c_try_compile "$LINENO"; then :
3212 ac_compiler_gnu=yes
3213 else
3214 ac_compiler_gnu=no
3215 fi
3216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3217 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3218
3219 fi
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3221 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3222 if test $ac_compiler_gnu = yes; then
3223 GCC=yes
3224 else
3225 GCC=
3226 fi
3227 ac_test_CFLAGS=${CFLAGS+set}
3228 ac_save_CFLAGS=$CFLAGS
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3230 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3231 if ${ac_cv_prog_cc_g+:} false; then :
3232 $as_echo_n "(cached) " >&6
3233 else
3234 ac_save_c_werror_flag=$ac_c_werror_flag
3235 ac_c_werror_flag=yes
3236 ac_cv_prog_cc_g=no
3237 CFLAGS="-g"
3238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3239 /* end confdefs.h. */
3240
3241 int
3242 main ()
3243 {
3244
3245 ;
3246 return 0;
3247 }
3248 _ACEOF
3249 if ac_fn_c_try_compile "$LINENO"; then :
3250 ac_cv_prog_cc_g=yes
3251 else
3252 CFLAGS=""
3253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3254 /* end confdefs.h. */
3255
3256 int
3257 main ()
3258 {
3259
3260 ;
3261 return 0;
3262 }
3263 _ACEOF
3264 if ac_fn_c_try_compile "$LINENO"; then :
3265
3266 else
3267 ac_c_werror_flag=$ac_save_c_werror_flag
3268 CFLAGS="-g"
3269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3270 /* end confdefs.h. */
3271
3272 int
3273 main ()
3274 {
3275
3276 ;
3277 return 0;
3278 }
3279 _ACEOF
3280 if ac_fn_c_try_compile "$LINENO"; then :
3281 ac_cv_prog_cc_g=yes
3282 fi
3283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3284 fi
3285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3286 fi
3287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3288 ac_c_werror_flag=$ac_save_c_werror_flag
3289 fi
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3291 $as_echo "$ac_cv_prog_cc_g" >&6; }
3292 if test "$ac_test_CFLAGS" = set; then
3293 CFLAGS=$ac_save_CFLAGS
3294 elif test $ac_cv_prog_cc_g = yes; then
3295 if test "$GCC" = yes; then
3296 CFLAGS="-g -O2"
3297 else
3298 CFLAGS="-g"
3299 fi
3300 else
3301 if test "$GCC" = yes; then
3302 CFLAGS="-O2"
3303 else
3304 CFLAGS=
3305 fi
3306 fi
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3308 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3309 if ${ac_cv_prog_cc_c89+:} false; then :
3310 $as_echo_n "(cached) " >&6
3311 else
3312 ac_cv_prog_cc_c89=no
3313 ac_save_CC=$CC
3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3315 /* end confdefs.h. */
3316 #include <stdarg.h>
3317 #include <stdio.h>
3318 struct stat;
3319 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3320 struct buf { int x; };
3321 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3322 static char *e (p, i)
3323 char **p;
3324 int i;
3325 {
3326 return p[i];
3327 }
3328 static char *f (char * (*g) (char **, int), char **p, ...)
3329 {
3330 char *s;
3331 va_list v;
3332 va_start (v,p);
3333 s = g (p, va_arg (v,int));
3334 va_end (v);
3335 return s;
3336 }
3337
3338 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3339 function prototypes and stuff, but not '\xHH' hex character constants.
3340 These don't provoke an error unfortunately, instead are silently treated
3341 as 'x'. The following induces an error, until -std is added to get
3342 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3343 array size at least. It's necessary to write '\x00'==0 to get something
3344 that's true only with -std. */
3345 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3346
3347 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3348 inside strings and character constants. */
3349 #define FOO(x) 'x'
3350 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3351
3352 int test (int i, double x);
3353 struct s1 {int (*f) (int a);};
3354 struct s2 {int (*f) (double a);};
3355 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3356 int argc;
3357 char **argv;
3358 int
3359 main ()
3360 {
3361 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3362 ;
3363 return 0;
3364 }
3365 _ACEOF
3366 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3367 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3368 do
3369 CC="$ac_save_CC $ac_arg"
3370 if ac_fn_c_try_compile "$LINENO"; then :
3371 ac_cv_prog_cc_c89=$ac_arg
3372 fi
3373 rm -f core conftest.err conftest.$ac_objext
3374 test "x$ac_cv_prog_cc_c89" != "xno" && break
3375 done
3376 rm -f conftest.$ac_ext
3377 CC=$ac_save_CC
3378
3379 fi
3380 # AC_CACHE_VAL
3381 case "x$ac_cv_prog_cc_c89" in
3382 x)
3383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3384 $as_echo "none needed" >&6; } ;;
3385 xno)
3386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3387 $as_echo "unsupported" >&6; } ;;
3388 *)
3389 CC="$CC $ac_cv_prog_cc_c89"
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3391 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3392 esac
3393 if test "x$ac_cv_prog_cc_c89" != xno; then :
3394
3395 fi
3396
3397 ac_ext=c
3398 ac_cpp='$CPP $CPPFLAGS'
3399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3402
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3404 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3405 if ${ac_cv_prog_cc_c99+:} false; then :
3406 $as_echo_n "(cached) " >&6
3407 else
3408 ac_cv_prog_cc_c99=no
3409 ac_save_CC=$CC
3410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3411 /* end confdefs.h. */
3412 #include <stdarg.h>
3413 #include <stdbool.h>
3414 #include <stdlib.h>
3415 #include <wchar.h>
3416 #include <stdio.h>
3417
3418 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3419 #define debug(...) fprintf (stderr, __VA_ARGS__)
3420 #define showlist(...) puts (#__VA_ARGS__)
3421 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3422 static void
3423 test_varargs_macros (void)
3424 {
3425 int x = 1234;
3426 int y = 5678;
3427 debug ("Flag");
3428 debug ("X = %d\n", x);
3429 showlist (The first, second, and third items.);
3430 report (x>y, "x is %d but y is %d", x, y);
3431 }
3432
3433 // Check long long types.
3434 #define BIG64 18446744073709551615ull
3435 #define BIG32 4294967295ul
3436 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3437 #if !BIG_OK
3438 your preprocessor is broken;
3439 #endif
3440 #if BIG_OK
3441 #else
3442 your preprocessor is broken;
3443 #endif
3444 static long long int bignum = -9223372036854775807LL;
3445 static unsigned long long int ubignum = BIG64;
3446
3447 struct incomplete_array
3448 {
3449 int datasize;
3450 double data[];
3451 };
3452
3453 struct named_init {
3454 int number;
3455 const wchar_t *name;
3456 double average;
3457 };
3458
3459 typedef const char *ccp;
3460
3461 static inline int
3462 test_restrict (ccp restrict text)
3463 {
3464 // See if C++-style comments work.
3465 // Iterate through items via the restricted pointer.
3466 // Also check for declarations in for loops.
3467 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3468 continue;
3469 return 0;
3470 }
3471
3472 // Check varargs and va_copy.
3473 static void
3474 test_varargs (const char *format, ...)
3475 {
3476 va_list args;
3477 va_start (args, format);
3478 va_list args_copy;
3479 va_copy (args_copy, args);
3480
3481 const char *str;
3482 int number;
3483 float fnumber;
3484
3485 while (*format)
3486 {
3487 switch (*format++)
3488 {
3489 case 's': // string
3490 str = va_arg (args_copy, const char *);
3491 break;
3492 case 'd': // int
3493 number = va_arg (args_copy, int);
3494 break;
3495 case 'f': // float
3496 fnumber = va_arg (args_copy, double);
3497 break;
3498 default:
3499 break;
3500 }
3501 }
3502 va_end (args_copy);
3503 va_end (args);
3504 }
3505
3506 int
3507 main ()
3508 {
3509
3510 // Check bool.
3511 _Bool success = false;
3512
3513 // Check restrict.
3514 if (test_restrict ("String literal") == 0)
3515 success = true;
3516 char *restrict newvar = "Another string";
3517
3518 // Check varargs.
3519 test_varargs ("s, d' f .", "string", 65, 34.234);
3520 test_varargs_macros ();
3521
3522 // Check flexible array members.
3523 struct incomplete_array *ia =
3524 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3525 ia->datasize = 10;
3526 for (int i = 0; i < ia->datasize; ++i)
3527 ia->data[i] = i * 1.234;
3528
3529 // Check named initializers.
3530 struct named_init ni = {
3531 .number = 34,
3532 .name = L"Test wide string",
3533 .average = 543.34343,
3534 };
3535
3536 ni.number = 58;
3537
3538 int dynamic_array[ni.number];
3539 dynamic_array[ni.number - 1] = 543;
3540
3541 // work around unused variable warnings
3542 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3543 || dynamic_array[ni.number - 1] != 543);
3544
3545 ;
3546 return 0;
3547 }
3548 _ACEOF
3549 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3550 do
3551 CC="$ac_save_CC $ac_arg"
3552 if ac_fn_c_try_compile "$LINENO"; then :
3553 ac_cv_prog_cc_c99=$ac_arg
3554 fi
3555 rm -f core conftest.err conftest.$ac_objext
3556 test "x$ac_cv_prog_cc_c99" != "xno" && break
3557 done
3558 rm -f conftest.$ac_ext
3559 CC=$ac_save_CC
3560
3561 fi
3562 # AC_CACHE_VAL
3563 case "x$ac_cv_prog_cc_c99" in
3564 x)
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3566 $as_echo "none needed" >&6; } ;;
3567 xno)
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3569 $as_echo "unsupported" >&6; } ;;
3570 *)
3571 CC="$CC $ac_cv_prog_cc_c99"
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3573 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3574 esac
3575 if test "x$ac_cv_prog_cc_c99" != xno; then :
3576
3577 fi
3578
3579
3580 if test "$ac_cv_prog_cc_c99" = "no"; then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
3582 $as_echo "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
3583 fi
3584
3585
3586
3587
3588
3589 if test "$GCC" = yes ; then
3590 #
3591 # -Werror forces warnings to be errors.
3592 #
3593 ac_lbl_cc_force_warning_errors=-Werror
3594
3595 #
3596 # Try to have the compiler default to hiding symbols,
3597 # so that only symbols explicitly exported with
3598 # PCAP_API will be visible outside (shared) libraries.
3599 #
3600
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3602 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3603 save_CFLAGS="$CFLAGS"
3604 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3605 then
3606 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3607 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3608 then
3609 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3610 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3611 then
3612 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3613 else
3614 CFLAGS="$CFLAGS -fvisibility=hidden"
3615 fi
3616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3617 /* end confdefs.h. */
3618
3619 int
3620 main ()
3621 {
3622 return 0
3623 ;
3624 return 0;
3625 }
3626 _ACEOF
3627 if ac_fn_c_try_compile "$LINENO"; then :
3628
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3630 $as_echo "yes" >&6; }
3631 can_add_to_cflags=yes
3632 #
3633 # The compile supports this; do we have some C code for
3634 # which the warning should *not* appear?
3635 # We test the fourth argument because the third argument
3636 # could contain quotes, breaking the test.
3637 #
3638 if test "x" != "x"
3639 then
3640 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3642 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3644 /* end confdefs.h. */
3645
3646 _ACEOF
3647 if ac_fn_c_try_compile "$LINENO"; then :
3648
3649 #
3650 # Not a problem.
3651 #
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653 $as_echo "no" >&6; }
3654
3655 else
3656
3657 #
3658 # A problem.
3659 #
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3661 $as_echo "yes" >&6; }
3662 can_add_to_cflags=no
3663
3664 fi
3665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3666 fi
3667 CFLAGS="$save_CFLAGS"
3668 if test x"$can_add_to_cflags" = "xyes"
3669 then
3670 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3671 fi
3672
3673 else
3674
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3676 $as_echo "no" >&6; }
3677 CFLAGS="$save_CFLAGS"
3678
3679 fi
3680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3681
3682 else
3683 V_INCLS="$V_INCLS -I/usr/local/include"
3684 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3685
3686 case "$host_os" in
3687
3688 darwin*)
3689 #
3690 # This is assumed either to be GCC or clang, both
3691 # of which use -Werror to force warnings to be errors.
3692 #
3693 ac_lbl_cc_force_warning_errors=-Werror
3694
3695 #
3696 # Try to have the compiler default to hiding symbols,
3697 # so that only symbols explicitly exported with
3698 # PCAP_API will be visible outside (shared) libraries.
3699 #
3700
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3702 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3703 save_CFLAGS="$CFLAGS"
3704 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3705 then
3706 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3707 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3708 then
3709 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3710 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3711 then
3712 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3713 else
3714 CFLAGS="$CFLAGS -fvisibility=hidden"
3715 fi
3716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3717 /* end confdefs.h. */
3718
3719 int
3720 main ()
3721 {
3722 return 0
3723 ;
3724 return 0;
3725 }
3726 _ACEOF
3727 if ac_fn_c_try_compile "$LINENO"; then :
3728
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3730 $as_echo "yes" >&6; }
3731 can_add_to_cflags=yes
3732 #
3733 # The compile supports this; do we have some C code for
3734 # which the warning should *not* appear?
3735 # We test the fourth argument because the third argument
3736 # could contain quotes, breaking the test.
3737 #
3738 if test "x" != "x"
3739 then
3740 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3742 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3744 /* end confdefs.h. */
3745
3746 _ACEOF
3747 if ac_fn_c_try_compile "$LINENO"; then :
3748
3749 #
3750 # Not a problem.
3751 #
3752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753 $as_echo "no" >&6; }
3754
3755 else
3756
3757 #
3758 # A problem.
3759 #
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3761 $as_echo "yes" >&6; }
3762 can_add_to_cflags=no
3763
3764 fi
3765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3766 fi
3767 CFLAGS="$save_CFLAGS"
3768 if test x"$can_add_to_cflags" = "xyes"
3769 then
3770 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3771 fi
3772
3773 else
3774
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3776 $as_echo "no" >&6; }
3777 CFLAGS="$save_CFLAGS"
3778
3779 fi
3780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3781
3782 ;;
3783
3784 hpux*)
3785 #
3786 # HP C, which is what we presume we're using, doesn't
3787 # exit with a non-zero exit status if we hand it an
3788 # invalid -W flag, can't be forced to do so even with
3789 # +We, and doesn't handle GCC-style -W flags, so we
3790 # don't want to try using GCC-style -W flags.
3791 #
3792 ac_lbl_cc_dont_try_gcc_dashW=yes
3793 ;;
3794
3795 irix*)
3796 #
3797 # MIPS C, which is what we presume we're using, doesn't
3798 # necessarily exit with a non-zero exit status if we
3799 # hand it an invalid -W flag, can't be forced to do
3800 # so, and doesn't handle GCC-style -W flags, so we
3801 # don't want to try using GCC-style -W flags.
3802 #
3803 ac_lbl_cc_dont_try_gcc_dashW=yes
3804 #
3805 # It also, apparently, defaults to "char" being
3806 # unsigned, unlike most other C implementations;
3807 # I suppose we could say "signed char" whenever
3808 # we want to guarantee a signed "char", but let's
3809 # just force signed chars.
3810 #
3811 # -xansi is normally the default, but the
3812 # configure script was setting it; perhaps -cckr
3813 # was the default in the Old Days. (Then again,
3814 # that would probably be for backwards compatibility
3815 # in the days when ANSI C was Shiny and New, i.e.
3816 # 1989 and the early '90's, so maybe we can just
3817 # drop support for those compilers.)
3818 #
3819 # -g is equivalent to -g2, which turns off
3820 # optimization; we choose -g3, which generates
3821 # debugging information but doesn't turn off
3822 # optimization (even if the optimization would
3823 # cause inaccuracies in debugging).
3824 #
3825 V_CCOPT="$V_CCOPT -xansi -signed -g3"
3826 ;;
3827
3828 osf*)
3829 #
3830 # Presumed to be DEC OSF/1, Digital UNIX, or
3831 # Tru64 UNIX.
3832 #
3833 # The DEC C compiler, which is what we presume we're
3834 # using, doesn't exit with a non-zero exit status if we
3835 # hand it an invalid -W flag, can't be forced to do
3836 # so, and doesn't handle GCC-style -W flags, so we
3837 # don't want to try using GCC-style -W flags.
3838 #
3839 ac_lbl_cc_dont_try_gcc_dashW=yes
3840 #
3841 # -g is equivalent to -g2, which turns off
3842 # optimization; we choose -g3, which generates
3843 # debugging information but doesn't turn off
3844 # optimization (even if the optimization would
3845 # cause inaccuracies in debugging).
3846 #
3847 V_CCOPT="$V_CCOPT -g3"
3848 ;;
3849
3850 solaris*)
3851 #
3852 # Assumed to be Sun C, which requires -errwarn to force
3853 # warnings to be treated as errors.
3854 #
3855 ac_lbl_cc_force_warning_errors=-errwarn
3856
3857 #
3858 # Try to have the compiler default to hiding symbols,
3859 # so that only symbols explicitly exported with
3860 # PCAP_API will be visible outside (shared) libraries.
3861 #
3862
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
3864 $as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
3865 save_CFLAGS="$CFLAGS"
3866 if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
3867 then
3868 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
3869 elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
3870 then
3871 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
3872 elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
3873 then
3874 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
3875 else
3876 CFLAGS="$CFLAGS -xldscope=hidden"
3877 fi
3878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3879 /* end confdefs.h. */
3880
3881 int
3882 main ()
3883 {
3884 return 0
3885 ;
3886 return 0;
3887 }
3888 _ACEOF
3889 if ac_fn_c_try_compile "$LINENO"; then :
3890
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3892 $as_echo "yes" >&6; }
3893 can_add_to_cflags=yes
3894 #
3895 # The compile supports this; do we have some C code for
3896 # which the warning should *not* appear?
3897 # We test the fourth argument because the third argument
3898 # could contain quotes, breaking the test.
3899 #
3900 if test "x" != "x"
3901 then
3902 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
3904 $as_echo_n "checking whether -xldscope=hidden ... " >&6; }
3905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3906 /* end confdefs.h. */
3907
3908 _ACEOF
3909 if ac_fn_c_try_compile "$LINENO"; then :
3910
3911 #
3912 # Not a problem.
3913 #
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915 $as_echo "no" >&6; }
3916
3917 else
3918
3919 #
3920 # A problem.
3921 #
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3923 $as_echo "yes" >&6; }
3924 can_add_to_cflags=no
3925
3926 fi
3927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3928 fi
3929 CFLAGS="$save_CFLAGS"
3930 if test x"$can_add_to_cflags" = "xyes"
3931 then
3932 V_CCOPT="$V_CCOPT -xldscope=hidden"
3933 fi
3934
3935 else
3936
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938 $as_echo "no" >&6; }
3939 CFLAGS="$save_CFLAGS"
3940
3941 fi
3942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3943
3944 ;;
3945
3946 ultrix*)
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
3948 $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
3949 if ${ac_cv_lbl_cc_const_proto+:} false; then :
3950 $as_echo_n "(cached) " >&6
3951 else
3952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3953 /* end confdefs.h. */
3954 #include <sys/types.h>
3955 int
3956 main ()
3957 {
3958 struct a { int b; };
3959 void c(const struct a *)
3960 ;
3961 return 0;
3962 }
3963 _ACEOF
3964 if ac_fn_c_try_compile "$LINENO"; then :
3965 ac_cv_lbl_cc_const_proto=yes
3966 else
3967 ac_cv_lbl_cc_const_proto=no
3968 fi
3969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3970 fi
3971
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
3973 $as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
3974 if test $ac_cv_lbl_cc_const_proto = no ; then
3975
3976 $as_echo "#define const /**/" >>confdefs.h
3977
3978 fi
3979 ;;
3980 esac
3981 V_CCOPT="$V_CCOPT -O"
3982 fi
3983
3984
3985 if test "$GCC" = yes ; then
3986 #
3987 # On platforms where we build a shared library:
3988 #
3989 # add options to generate position-independent code,
3990 # if necessary (it's the default in AIX and Darwin/macOS);
3991 #
3992 # define option to set the soname of the shared library,
3993 # if the OS supports that;
3994 #
3995 # add options to specify, at link time, a directory to
3996 # add to the run-time search path, if that's necessary.
3997 #
3998 V_SHLIB_CMD="\$(CC)"
3999 V_SHLIB_OPT="-shared"
4000 case "$host_os" in
4001
4002 aix*)
4003 ;;
4004
4005 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*)
4006 #
4007 # Platforms where the linker is the GNU linker
4008 # or accepts command-line arguments like
4009 # those the GNU linker accepts.
4010 #
4011 # Some instruction sets require -fPIC on some
4012 # operating systems. Check for them. If you
4013 # have a combination that requires it, add it
4014 # here.
4015 #
4016 PIC_OPT=-fpic
4017 case "$host_cpu" in
4018
4019 sparc64*)
4020 case "$host_os" in
4021
4022 freebsd*|openbsd*)
4023 PIC_OPT=-fPIC
4024 ;;
4025 esac
4026 ;;
4027 esac
4028 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
4029 V_SONAME_OPT="-Wl,-soname,"
4030 V_RPATH_OPT="-Wl,-rpath,"
4031 ;;
4032
4033 hpux*)
4034 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4035 #
4036 # XXX - this assumes GCC is using the HP linker,
4037 # rather than the GNU linker, and that the "+h"
4038 # option is used on all HP-UX platforms, both .sl
4039 # and .so.
4040 #
4041 V_SONAME_OPT="-Wl,+h,"
4042 #
4043 # By default, directories specifed with -L
4044 # are added to the run-time search path, so
4045 # we don't add them in pcap-config.
4046 #
4047 ;;
4048
4049 solaris*)
4050 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4051 #
4052 # XXX - this assumes GCC is using the Sun linker,
4053 # rather than the GNU linker.
4054 #
4055 V_SONAME_OPT="-Wl,-h,"
4056 V_RPATH_OPT="-Wl,-R,"
4057 ;;
4058 esac
4059 else
4060 #
4061 # Set the appropriate compiler flags and, on platforms
4062 # where we build a shared library:
4063 #
4064 # add options to generate position-independent code,
4065 # if necessary (it's the default in Darwin/macOS);
4066 #
4067 # if we generate ".so" shared libraries, define the
4068 # appropriate options for building the shared library;
4069 #
4070 # add options to specify, at link time, a directory to
4071 # add to the run-time search path, if that's necessary.
4072 #
4073 # Note: spaces after V_SONAME_OPT are significant; on
4074 # some platforms the soname is passed with a GCC-like
4075 # "-Wl,-soname,{soname}" option, with the soname part
4076 # of the option, while on other platforms the C compiler
4077 # driver takes it as a regular option with the soname
4078 # following the option. The same applies to V_RPATH_OPT.
4079 #
4080 case "$host_os" in
4081
4082 aix*)
4083 V_SHLIB_CMD="\$(CC)"
4084 V_SHLIB_OPT="-G -bnoentry -bexpall"
4085 ;;
4086
4087 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
4088 #
4089 # "cc" is GCC.
4090 #
4091 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4092 V_SHLIB_CMD="\$(CC)"
4093 V_SHLIB_OPT="-shared"
4094 V_SONAME_OPT="-Wl,-soname,"
4095 V_RPATH_OPT="-Wl,-rpath,"
4096 ;;
4097
4098 hpux*)
4099 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
4100 V_SHLIB_CMD="\$(LD)"
4101 V_SHLIB_OPT="-b"
4102 V_SONAME_OPT="+h "
4103 #
4104 # By default, directories specifed with -L
4105 # are added to the run-time search path, so
4106 # we don't add them in pcap-config.
4107 #
4108 ;;
4109
4110 osf*)
4111 #
4112 # Presumed to be DEC OSF/1, Digital UNIX, or
4113 # Tru64 UNIX.
4114 #
4115 V_SHLIB_CMD="\$(CC)"
4116 V_SHLIB_OPT="-shared"
4117 V_SONAME_OPT="-soname "
4118 V_RPATH_OPT="-rpath "
4119 ;;
4120
4121 solaris*)
4122 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
4123 V_SHLIB_CMD="\$(CC)"
4124 V_SHLIB_OPT="-G"
4125 V_SONAME_OPT="-h "
4126 V_RPATH_OPT="-R"
4127 ;;
4128 esac
4129 fi
4130
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4132 $as_echo_n "checking for inline... " >&6; }
4133 save_CFLAGS="$CFLAGS"
4134 CFLAGS="$V_CCOPT"
4135 if ${ac_cv_lbl_inline+:} false; then :
4136 $as_echo_n "(cached) " >&6
4137 else
4138
4139 ac_cv_lbl_inline=""
4140 ac_lbl_cc_inline=no
4141 for ac_lbl_inline in inline __inline__ __inline
4142 do
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144 /* end confdefs.h. */
4145 #define inline $ac_lbl_inline
4146 static inline struct iltest *foo(void);
4147 struct iltest {
4148 int iltest1;
4149 int iltest2;
4150 };
4151
4152 static inline struct iltest *
4153 foo()
4154 {
4155 static struct iltest xxx;
4156
4157 return &xxx;
4158 }
4159 int
4160 main ()
4161 {
4162
4163 ;
4164 return 0;
4165 }
4166 _ACEOF
4167 if ac_fn_c_try_compile "$LINENO"; then :
4168 ac_lbl_cc_inline=yes
4169 fi
4170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4171 if test "$ac_lbl_cc_inline" = yes ; then
4172 break;
4173 fi
4174 done
4175 if test "$ac_lbl_cc_inline" = yes ; then
4176 ac_cv_lbl_inline=$ac_lbl_inline
4177 fi
4178 fi
4179
4180 CFLAGS="$save_CFLAGS"
4181 if test ! -z "$ac_cv_lbl_inline" ; then
4182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4183 $as_echo "$ac_cv_lbl_inline" >&6; }
4184 else
4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186 $as_echo "no" >&6; }
4187 fi
4188
4189 cat >>confdefs.h <<_ACEOF
4190 #define inline $ac_cv_lbl_inline
4191 _ACEOF
4192
4193
4194 #
4195 # Try to arrange for large file support.
4196 #
4197 # Check whether --enable-largefile was given.
4198 if test "${enable_largefile+set}" = set; then :
4199 enableval=$enable_largefile;
4200 fi
4201
4202 if test "$enable_largefile" != no; then
4203
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4205 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4206 if ${ac_cv_sys_largefile_CC+:} false; then :
4207 $as_echo_n "(cached) " >&6
4208 else
4209 ac_cv_sys_largefile_CC=no
4210 if test "$GCC" != yes; then
4211 ac_save_CC=$CC
4212 while :; do
4213 # IRIX 6.2 and later do not support large files by default,
4214 # so use the C compiler's -n32 option if that helps.
4215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4216 /* end confdefs.h. */
4217 #include <sys/types.h>
4218 /* Check that off_t can represent 2**63 - 1 correctly.
4219 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4220 since some C++ compilers masquerading as C compilers
4221 incorrectly reject 9223372036854775807. */
4222 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4223 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4224 && LARGE_OFF_T % 2147483647 == 1)
4225 ? 1 : -1];
4226 int
4227 main ()
4228 {
4229
4230 ;
4231 return 0;
4232 }
4233 _ACEOF
4234 if ac_fn_c_try_compile "$LINENO"; then :
4235 break
4236 fi
4237 rm -f core conftest.err conftest.$ac_objext
4238 CC="$CC -n32"
4239 if ac_fn_c_try_compile "$LINENO"; then :
4240 ac_cv_sys_largefile_CC=' -n32'; break
4241 fi
4242 rm -f core conftest.err conftest.$ac_objext
4243 break
4244 done
4245 CC=$ac_save_CC
4246 rm -f conftest.$ac_ext
4247 fi
4248 fi
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4250 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4251 if test "$ac_cv_sys_largefile_CC" != no; then
4252 CC=$CC$ac_cv_sys_largefile_CC
4253 fi
4254
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4256 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4257 if ${ac_cv_sys_file_offset_bits+:} false; then :
4258 $as_echo_n "(cached) " >&6
4259 else
4260 while :; do
4261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4262 /* end confdefs.h. */
4263 #include <sys/types.h>
4264 /* Check that off_t can represent 2**63 - 1 correctly.
4265 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4266 since some C++ compilers masquerading as C compilers
4267 incorrectly reject 9223372036854775807. */
4268 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4269 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4270 && LARGE_OFF_T % 2147483647 == 1)
4271 ? 1 : -1];
4272 int
4273 main ()
4274 {
4275
4276 ;
4277 return 0;
4278 }
4279 _ACEOF
4280 if ac_fn_c_try_compile "$LINENO"; then :
4281 ac_cv_sys_file_offset_bits=no; break
4282 fi
4283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h. */
4286 #define _FILE_OFFSET_BITS 64
4287 #include <sys/types.h>
4288 /* Check that off_t can represent 2**63 - 1 correctly.
4289 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4290 since some C++ compilers masquerading as C compilers
4291 incorrectly reject 9223372036854775807. */
4292 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4293 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4294 && LARGE_OFF_T % 2147483647 == 1)
4295 ? 1 : -1];
4296 int
4297 main ()
4298 {
4299
4300 ;
4301 return 0;
4302 }
4303 _ACEOF
4304 if ac_fn_c_try_compile "$LINENO"; then :
4305 ac_cv_sys_file_offset_bits=64; break
4306 fi
4307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4308 ac_cv_sys_file_offset_bits=unknown
4309 break
4310 done
4311 fi
4312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4313 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4314 case $ac_cv_sys_file_offset_bits in #(
4315 no | unknown) ;;
4316 *)
4317 cat >>confdefs.h <<_ACEOF
4318 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4319 _ACEOF
4320 ;;
4321 esac
4322 rm -rf conftest*
4323 if test $ac_cv_sys_file_offset_bits = unknown; then
4324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4325 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4326 if ${ac_cv_sys_large_files+:} false; then :
4327 $as_echo_n "(cached) " >&6
4328 else
4329 while :; do
4330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4331 /* end confdefs.h. */
4332 #include <sys/types.h>
4333 /* Check that off_t can represent 2**63 - 1 correctly.
4334 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4335 since some C++ compilers masquerading as C compilers
4336 incorrectly reject 9223372036854775807. */
4337 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4338 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4339 && LARGE_OFF_T % 2147483647 == 1)
4340 ? 1 : -1];
4341 int
4342 main ()
4343 {
4344
4345 ;
4346 return 0;
4347 }
4348 _ACEOF
4349 if ac_fn_c_try_compile "$LINENO"; then :
4350 ac_cv_sys_large_files=no; break
4351 fi
4352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h. */
4355 #define _LARGE_FILES 1
4356 #include <sys/types.h>
4357 /* Check that off_t can represent 2**63 - 1 correctly.
4358 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4359 since some C++ compilers masquerading as C compilers
4360 incorrectly reject 9223372036854775807. */
4361 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4362 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4363 && LARGE_OFF_T % 2147483647 == 1)
4364 ? 1 : -1];
4365 int
4366 main ()
4367 {
4368
4369 ;
4370 return 0;
4371 }
4372 _ACEOF
4373 if ac_fn_c_try_compile "$LINENO"; then :
4374 ac_cv_sys_large_files=1; break
4375 fi
4376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4377 ac_cv_sys_large_files=unknown
4378 break
4379 done
4380 fi
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4382 $as_echo "$ac_cv_sys_large_files" >&6; }
4383 case $ac_cv_sys_large_files in #(
4384 no | unknown) ;;
4385 *)
4386 cat >>confdefs.h <<_ACEOF
4387 #define _LARGE_FILES $ac_cv_sys_large_files
4388 _ACEOF
4389 ;;
4390 esac
4391 rm -rf conftest*
4392 fi
4393
4394
4395 fi
4396
4397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4398 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4399 if ${ac_cv_sys_largefile_source+:} false; then :
4400 $as_echo_n "(cached) " >&6
4401 else
4402 while :; do
4403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4404 /* end confdefs.h. */
4405 #include <sys/types.h> /* for off_t */
4406 #include <stdio.h>
4407 int
4408 main ()
4409 {
4410 int (*fp) (FILE *, off_t, int) = fseeko;
4411 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4412 ;
4413 return 0;
4414 }
4415 _ACEOF
4416 if ac_fn_c_try_link "$LINENO"; then :
4417 ac_cv_sys_largefile_source=no; break
4418 fi
4419 rm -f core conftest.err conftest.$ac_objext \
4420 conftest$ac_exeext conftest.$ac_ext
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422 /* end confdefs.h. */
4423 #define _LARGEFILE_SOURCE 1
4424 #include <sys/types.h> /* for off_t */
4425 #include <stdio.h>
4426 int
4427 main ()
4428 {
4429 int (*fp) (FILE *, off_t, int) = fseeko;
4430 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4431 ;
4432 return 0;
4433 }
4434 _ACEOF
4435 if ac_fn_c_try_link "$LINENO"; then :
4436 ac_cv_sys_largefile_source=1; break
4437 fi
4438 rm -f core conftest.err conftest.$ac_objext \
4439 conftest$ac_exeext conftest.$ac_ext
4440 ac_cv_sys_largefile_source=unknown
4441 break
4442 done
4443 fi
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4445 $as_echo "$ac_cv_sys_largefile_source" >&6; }
4446 case $ac_cv_sys_largefile_source in #(
4447 no | unknown) ;;
4448 *)
4449 cat >>confdefs.h <<_ACEOF
4450 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4451 _ACEOF
4452 ;;
4453 esac
4454 rm -rf conftest*
4455
4456 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4457 # in glibc 2.1.3, but that breaks too many other things.
4458 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4459 if test $ac_cv_sys_largefile_source != unknown; then
4460
4461 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
4462
4463 fi
4464
4465
4466 ac_ext=c
4467 ac_cpp='$CPP $CPPFLAGS'
4468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4472 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4473 # On Suns, sometimes $CPP names a directory.
4474 if test -n "$CPP" && test -d "$CPP"; then
4475 CPP=
4476 fi
4477 if test -z "$CPP"; then
4478 if ${ac_cv_prog_CPP+:} false; then :
4479 $as_echo_n "(cached) " >&6
4480 else
4481 # Double quotes because CPP needs to be expanded
4482 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4483 do
4484 ac_preproc_ok=false
4485 for ac_c_preproc_warn_flag in '' yes
4486 do
4487 # Use a header file that comes with gcc, so configuring glibc
4488 # with a fresh cross-compiler works.
4489 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4490 # <limits.h> exists even on freestanding compilers.
4491 # On the NeXT, cc -E runs the code through the compiler's parser,
4492 # not just through cpp. "Syntax error" is here to catch this case.
4493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4494 /* end confdefs.h. */
4495 #ifdef __STDC__
4496 # include <limits.h>
4497 #else
4498 # include <assert.h>
4499 #endif
4500 Syntax error
4501 _ACEOF
4502 if ac_fn_c_try_cpp "$LINENO"; then :
4503
4504 else
4505 # Broken: fails on valid input.
4506 continue
4507 fi
4508 rm -f conftest.err conftest.i conftest.$ac_ext
4509
4510 # OK, works on sane cases. Now check whether nonexistent headers
4511 # can be detected and how.
4512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4513 /* end confdefs.h. */
4514 #include <ac_nonexistent.h>
4515 _ACEOF
4516 if ac_fn_c_try_cpp "$LINENO"; then :
4517 # Broken: success on invalid input.
4518 continue
4519 else
4520 # Passes both tests.
4521 ac_preproc_ok=:
4522 break
4523 fi
4524 rm -f conftest.err conftest.i conftest.$ac_ext
4525
4526 done
4527 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4528 rm -f conftest.i conftest.err conftest.$ac_ext
4529 if $ac_preproc_ok; then :
4530 break
4531 fi
4532
4533 done
4534 ac_cv_prog_CPP=$CPP
4535
4536 fi
4537 CPP=$ac_cv_prog_CPP
4538 else
4539 ac_cv_prog_CPP=$CPP
4540 fi
4541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4542 $as_echo "$CPP" >&6; }
4543 ac_preproc_ok=false
4544 for ac_c_preproc_warn_flag in '' yes
4545 do
4546 # Use a header file that comes with gcc, so configuring glibc
4547 # with a fresh cross-compiler works.
4548 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4549 # <limits.h> exists even on freestanding compilers.
4550 # On the NeXT, cc -E runs the code through the compiler's parser,
4551 # not just through cpp. "Syntax error" is here to catch this case.
4552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4553 /* end confdefs.h. */
4554 #ifdef __STDC__
4555 # include <limits.h>
4556 #else
4557 # include <assert.h>
4558 #endif
4559 Syntax error
4560 _ACEOF
4561 if ac_fn_c_try_cpp "$LINENO"; then :
4562
4563 else
4564 # Broken: fails on valid input.
4565 continue
4566 fi
4567 rm -f conftest.err conftest.i conftest.$ac_ext
4568
4569 # OK, works on sane cases. Now check whether nonexistent headers
4570 # can be detected and how.
4571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4572 /* end confdefs.h. */
4573 #include <ac_nonexistent.h>
4574 _ACEOF
4575 if ac_fn_c_try_cpp "$LINENO"; then :
4576 # Broken: success on invalid input.
4577 continue
4578 else
4579 # Passes both tests.
4580 ac_preproc_ok=:
4581 break
4582 fi
4583 rm -f conftest.err conftest.i conftest.$ac_ext
4584
4585 done
4586 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4587 rm -f conftest.i conftest.err conftest.$ac_ext
4588 if $ac_preproc_ok; then :
4589
4590 else
4591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4592 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4593 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4594 See \`config.log' for more details" "$LINENO" 5; }
4595 fi
4596
4597 ac_ext=c
4598 ac_cpp='$CPP $CPPFLAGS'
4599 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4600 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4601 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4602
4603
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4605 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4606 if ${ac_cv_path_GREP+:} false; then :
4607 $as_echo_n "(cached) " >&6
4608 else
4609 if test -z "$GREP"; then
4610 ac_path_GREP_found=false
4611 # Loop through the user's path and test for each of PROGNAME-LIST
4612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4613 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4614 do
4615 IFS=$as_save_IFS
4616 test -z "$as_dir" && as_dir=.
4617 for ac_prog in grep ggrep; do
4618 for ac_exec_ext in '' $ac_executable_extensions; do
4619 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4620 as_fn_executable_p "$ac_path_GREP" || continue
4621 # Check for GNU ac_path_GREP and select it if it is found.
4622 # Check for GNU $ac_path_GREP
4623 case `"$ac_path_GREP" --version 2>&1` in
4624 *GNU*)
4625 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4626 *)
4627 ac_count=0
4628 $as_echo_n 0123456789 >"conftest.in"
4629 while :
4630 do
4631 cat "conftest.in" "conftest.in" >"conftest.tmp"
4632 mv "conftest.tmp" "conftest.in"
4633 cp "conftest.in" "conftest.nl"
4634 $as_echo 'GREP' >> "conftest.nl"
4635 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4636 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4637 as_fn_arith $ac_count + 1 && ac_count=$as_val
4638 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4639 # Best one so far, save it but keep looking for a better one
4640 ac_cv_path_GREP="$ac_path_GREP"
4641 ac_path_GREP_max=$ac_count
4642 fi
4643 # 10*(2^10) chars as input seems more than enough
4644 test $ac_count -gt 10 && break
4645 done
4646 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4647 esac
4648
4649 $ac_path_GREP_found && break 3
4650 done
4651 done
4652 done
4653 IFS=$as_save_IFS
4654 if test -z "$ac_cv_path_GREP"; then
4655 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4656 fi
4657 else
4658 ac_cv_path_GREP=$GREP
4659 fi
4660
4661 fi
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4663 $as_echo "$ac_cv_path_GREP" >&6; }
4664 GREP="$ac_cv_path_GREP"
4665
4666
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4668 $as_echo_n "checking for egrep... " >&6; }
4669 if ${ac_cv_path_EGREP+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671 else
4672 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4673 then ac_cv_path_EGREP="$GREP -E"
4674 else
4675 if test -z "$EGREP"; then
4676 ac_path_EGREP_found=false
4677 # Loop through the user's path and test for each of PROGNAME-LIST
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4680 do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
4683 for ac_prog in egrep; do
4684 for ac_exec_ext in '' $ac_executable_extensions; do
4685 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4686 as_fn_executable_p "$ac_path_EGREP" || continue
4687 # Check for GNU ac_path_EGREP and select it if it is found.
4688 # Check for GNU $ac_path_EGREP
4689 case `"$ac_path_EGREP" --version 2>&1` in
4690 *GNU*)
4691 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4692 *)
4693 ac_count=0
4694 $as_echo_n 0123456789 >"conftest.in"
4695 while :
4696 do
4697 cat "conftest.in" "conftest.in" >"conftest.tmp"
4698 mv "conftest.tmp" "conftest.in"
4699 cp "conftest.in" "conftest.nl"
4700 $as_echo 'EGREP' >> "conftest.nl"
4701 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4702 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4703 as_fn_arith $ac_count + 1 && ac_count=$as_val
4704 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4705 # Best one so far, save it but keep looking for a better one
4706 ac_cv_path_EGREP="$ac_path_EGREP"
4707 ac_path_EGREP_max=$ac_count
4708 fi
4709 # 10*(2^10) chars as input seems more than enough
4710 test $ac_count -gt 10 && break
4711 done
4712 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4713 esac
4714
4715 $ac_path_EGREP_found && break 3
4716 done
4717 done
4718 done
4719 IFS=$as_save_IFS
4720 if test -z "$ac_cv_path_EGREP"; then
4721 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4722 fi
4723 else
4724 ac_cv_path_EGREP=$EGREP
4725 fi
4726
4727 fi
4728 fi
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4730 $as_echo "$ac_cv_path_EGREP" >&6; }
4731 EGREP="$ac_cv_path_EGREP"
4732
4733
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4735 $as_echo_n "checking for ANSI C header files... " >&6; }
4736 if ${ac_cv_header_stdc+:} false; then :
4737 $as_echo_n "(cached) " >&6
4738 else
4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740 /* end confdefs.h. */
4741 #include <stdlib.h>
4742 #include <stdarg.h>
4743 #include <string.h>
4744 #include <float.h>
4745
4746 int
4747 main ()
4748 {
4749
4750 ;
4751 return 0;
4752 }
4753 _ACEOF
4754 if ac_fn_c_try_compile "$LINENO"; then :
4755 ac_cv_header_stdc=yes
4756 else
4757 ac_cv_header_stdc=no
4758 fi
4759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760
4761 if test $ac_cv_header_stdc = yes; then
4762 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4764 /* end confdefs.h. */
4765 #include <string.h>
4766
4767 _ACEOF
4768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4769 $EGREP "memchr" >/dev/null 2>&1; then :
4770
4771 else
4772 ac_cv_header_stdc=no
4773 fi
4774 rm -f conftest*
4775
4776 fi
4777
4778 if test $ac_cv_header_stdc = yes; then
4779 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4781 /* end confdefs.h. */
4782 #include <stdlib.h>
4783
4784 _ACEOF
4785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4786 $EGREP "free" >/dev/null 2>&1; then :
4787
4788 else
4789 ac_cv_header_stdc=no
4790 fi
4791 rm -f conftest*
4792
4793 fi
4794
4795 if test $ac_cv_header_stdc = yes; then
4796 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4797 if test "$cross_compiling" = yes; then :
4798 :
4799 else
4800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4801 /* end confdefs.h. */
4802 #include <ctype.h>
4803 #include <stdlib.h>
4804 #if ((' ' & 0x0FF) == 0x020)
4805 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4806 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4807 #else
4808 # define ISLOWER(c) \
4809 (('a' <= (c) && (c) <= 'i') \
4810 || ('j' <= (c) && (c) <= 'r') \
4811 || ('s' <= (c) && (c) <= 'z'))
4812 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4813 #endif
4814
4815 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4816 int
4817 main ()
4818 {
4819 int i;
4820 for (i = 0; i < 256; i++)
4821 if (XOR (islower (i), ISLOWER (i))
4822 || toupper (i) != TOUPPER (i))
4823 return 2;
4824 return 0;
4825 }
4826 _ACEOF
4827 if ac_fn_c_try_run "$LINENO"; then :
4828
4829 else
4830 ac_cv_header_stdc=no
4831 fi
4832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4833 conftest.$ac_objext conftest.beam conftest.$ac_ext
4834 fi
4835
4836 fi
4837 fi
4838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4839 $as_echo "$ac_cv_header_stdc" >&6; }
4840 if test $ac_cv_header_stdc = yes; then
4841
4842 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4843
4844 fi
4845
4846 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4847 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4848 inttypes.h stdint.h unistd.h
4849 do :
4850 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4851 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4852 "
4853 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4854 cat >>confdefs.h <<_ACEOF
4855 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4856 _ACEOF
4857
4858 fi
4859
4860 done
4861
4862
4863 for ac_header in sys/ioccom.h sys/sockio.h
4864 do :
4865 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4866 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4867 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4868 cat >>confdefs.h <<_ACEOF
4869 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4870 _ACEOF
4871
4872 fi
4873
4874 done
4875
4876 for ac_header in netpacket/packet.h
4877 do :
4878 ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
4879 if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
4880 cat >>confdefs.h <<_ACEOF
4881 #define HAVE_NETPACKET_PACKET_H 1
4882 _ACEOF
4883
4884 fi
4885
4886 done
4887
4888 for ac_header in net/pfvar.h
4889 do :
4890 ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
4891 #include <sys/socket.h>
4892 #include <net/if.h>
4893 "
4894 if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
4895 cat >>confdefs.h <<_ACEOF
4896 #define HAVE_NET_PFVAR_H 1
4897 _ACEOF
4898
4899 fi
4900
4901 done
4902
4903 if test "$ac_cv_header_net_pfvar_h" = yes; then
4904 #
4905 # Check for various PF actions.
4906 #
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
4908 $as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
4909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4910 /* end confdefs.h. */
4911 #include <sys/types.h>
4912 #include <sys/socket.h>
4913 #include <net/if.h>
4914 #include <net/pfvar.h>
4915 int
4916 main ()
4917 {
4918 return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
4919 ;
4920 return 0;
4921 }
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4926 $as_echo "yes" >&6; }
4927
4928 $as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
4929
4930
4931 else
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4933 $as_echo "no" >&6; }
4934 fi
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 fi
4937
4938 case "$host_os" in
4939 linux*|uclinux*)
4940 #
4941 # linux/if_bonding.h requires sys/socket.h.
4942 #
4943 for ac_header in linux/sockios.h linux/if_bonding.h
4944 do :
4945 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4946 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4947 #include <sys/socket.h>
4948 #include <linux/if.h>
4949
4950 "
4951 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4952 cat >>confdefs.h <<_ACEOF
4953 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4954 _ACEOF
4955
4956 fi
4957
4958 done
4959
4960
4961 #
4962 # Check for the eventfd header.
4963 #
4964 for ac_header in sys/eventfd.h
4965 do :
4966 ac_fn_c_check_header_mongrel "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
4967 if test "x$ac_cv_header_sys_eventfd_h" = xyes; then :
4968 cat >>confdefs.h <<_ACEOF
4969 #define HAVE_SYS_EVENTFD_H 1
4970 _ACEOF
4971
4972 fi
4973
4974 done
4975
4976 ;;
4977 esac
4978
4979 if test "$GCC" = yes ; then
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
4981 $as_echo_n "checking for ANSI ioctl definitions... " >&6; }
4982 if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984 else
4985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4986 /* end confdefs.h. */
4987 /*
4988 * This generates a "duplicate case value" when fixincludes
4989 * has not be run.
4990 */
4991 # include <sys/types.h>
4992 # include <sys/time.h>
4993 # include <sys/ioctl.h>
4994 # ifdef HAVE_SYS_IOCCOM_H
4995 # include <sys/ioccom.h>
4996 # endif
4997 int
4998 main ()
4999 {
5000 switch (0) {
5001 case _IO('A', 1):;
5002 case _IO('B', 1):;
5003 }
5004 ;
5005 return 0;
5006 }
5007 _ACEOF
5008 if ac_fn_c_try_compile "$LINENO"; then :
5009 ac_cv_lbl_gcc_fixincludes=yes
5010 else
5011 ac_cv_lbl_gcc_fixincludes=no
5012 fi
5013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5014 fi
5015
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
5017 $as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
5018 if test $ac_cv_lbl_gcc_fixincludes = no ; then
5019 # Don't cache failure
5020 unset ac_cv_lbl_gcc_fixincludes
5021 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
5022 fi
5023 fi
5024
5025 for ac_func in strerror strerror_r strerror_s
5026 do :
5027 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5028 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5029 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5030 cat >>confdefs.h <<_ACEOF
5031 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5032 _ACEOF
5033
5034 fi
5035 done
5036
5037
5038 #
5039 # Thanks, IBM, for not providing vsyslog() in AIX!
5040 #
5041 for ac_func in vsyslog
5042 do :
5043 ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5044 if test "x$ac_cv_func_vsyslog" = xyes; then :
5045 cat >>confdefs.h <<_ACEOF
5046 #define HAVE_VSYSLOG 1
5047 _ACEOF
5048
5049 fi
5050 done
5051
5052
5053 needsnprintf=no
5054 for ac_func in vsnprintf snprintf
5055 do :
5056 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5057 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5058 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5059 cat >>confdefs.h <<_ACEOF
5060 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5061 _ACEOF
5062
5063 else
5064 needsnprintf=yes
5065 fi
5066 done
5067
5068 if test $needsnprintf = yes; then
5069 case " $LIBOBJS " in
5070 *" snprintf.$ac_objext "* ) ;;
5071 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
5072 ;;
5073 esac
5074
5075 fi
5076
5077 needstrlcat=no
5078 for ac_func in strlcat
5079 do :
5080 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5081 if test "x$ac_cv_func_strlcat" = xyes; then :
5082 cat >>confdefs.h <<_ACEOF
5083 #define HAVE_STRLCAT 1
5084 _ACEOF
5085
5086 else
5087 needstrlcat=yes
5088 fi
5089 done
5090
5091 if test $needstrlcat = yes; then
5092 case " $LIBOBJS " in
5093 *" strlcat.$ac_objext "* ) ;;
5094 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5095 ;;
5096 esac
5097
5098 fi
5099
5100 needstrlcpy=no
5101 for ac_func in strlcpy
5102 do :
5103 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5104 if test "x$ac_cv_func_strlcpy" = xyes; then :
5105 cat >>confdefs.h <<_ACEOF
5106 #define HAVE_STRLCPY 1
5107 _ACEOF
5108
5109 else
5110 needstrlcpy=yes
5111 fi
5112 done
5113
5114 if test $needstrlcpy = yes; then
5115 case " $LIBOBJS " in
5116 *" strlcpy.$ac_objext "* ) ;;
5117 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5118 ;;
5119 esac
5120
5121 fi
5122
5123 needstrtok_r=no
5124 for ac_func in strtok_r
5125 do :
5126 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5127 if test "x$ac_cv_func_strtok_r" = xyes; then :
5128 cat >>confdefs.h <<_ACEOF
5129 #define HAVE_STRTOK_R 1
5130 _ACEOF
5131
5132 else
5133 needstrtok_r=yes
5134 fi
5135 done
5136
5137 if test $needstrtok_r = yes; then
5138 case " $LIBOBJS " in
5139 *" strtok_r.$ac_objext "* ) ;;
5140 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5141 ;;
5142 esac
5143
5144 fi
5145
5146 #
5147 # Do we have ffs(), and is it declared in <strings.h>?
5148 #
5149 for ac_func in ffs
5150 do :
5151 ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5152 if test "x$ac_cv_func_ffs" = xyes; then :
5153 cat >>confdefs.h <<_ACEOF
5154 #define HAVE_FFS 1
5155 _ACEOF
5156
5157 fi
5158 done
5159
5160 if test "$ac_cv_func_ffs" = yes; then
5161 #
5162 # We have ffs(); is it declared in <strings.h>?
5163 #
5164 # This test fails if we don't have <strings.h> or if we do
5165 # but it doesn't declare ffs().
5166 #
5167 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5168 #include <strings.h>
5169
5170 "
5171 if test "x$ac_cv_have_decl_ffs" = xyes; then :
5172
5173
5174 $as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5175
5176
5177 fi
5178
5179 fi
5180
5181 #
5182 # Do this before checking for ether_hostton(), as it's a
5183 # "getaddrinfo()-ish function".
5184 #
5185
5186 #
5187 # Most operating systems have getaddrinfo() in the default searched
5188 # libraries (i.e. libc). Check there first.
5189 #
5190 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5191 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5192
5193 else
5194
5195 #
5196 # Not found in the standard system libraries.
5197 # Try libsocket, which requires libnsl.
5198 #
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5200 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
5201 if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
5202 $as_echo_n "(cached) " >&6
5203 else
5204 ac_check_lib_save_LIBS=$LIBS
5205 LIBS="-lsocket -lnsl $LIBS"
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207 /* end confdefs.h. */
5208
5209 /* Override any GCC internal prototype to avoid an error.
5210 Use char because int might match the return type of a GCC
5211 builtin and then its argument prototype would still apply. */
5212 #ifdef __cplusplus
5213 extern "C"
5214 #endif
5215 char getaddrinfo ();
5216 int
5217 main ()
5218 {
5219 return getaddrinfo ();
5220 ;
5221 return 0;
5222 }
5223 _ACEOF
5224 if ac_fn_c_try_link "$LINENO"; then :
5225 ac_cv_lib_socket_getaddrinfo=yes
5226 else
5227 ac_cv_lib_socket_getaddrinfo=no
5228 fi
5229 rm -f core conftest.err conftest.$ac_objext \
5230 conftest$ac_exeext conftest.$ac_ext
5231 LIBS=$ac_check_lib_save_LIBS
5232 fi
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5234 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
5235 if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
5236
5237 #
5238 # OK, we found it in libsocket.
5239 #
5240 LIBS="-lsocket -lnsl $LIBS"
5241
5242 else
5243
5244 #
5245 # We didn't find it.
5246 #
5247 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5248
5249 fi
5250
5251
5252 #
5253 # OK, do we have recvmsg() in libxnet?
5254 # We also link with libsocket and libnsl.
5255 #
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5257 $as_echo_n "checking for recvmsg in -lxnet... " >&6; }
5258 if ${ac_cv_lib_xnet_recvmsg+:} false; then :
5259 $as_echo_n "(cached) " >&6
5260 else
5261 ac_check_lib_save_LIBS=$LIBS
5262 LIBS="-lxnet -lsocket -lnsl $LIBS"
5263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5264 /* end confdefs.h. */
5265
5266 /* Override any GCC internal prototype to avoid an error.
5267 Use char because int might match the return type of a GCC
5268 builtin and then its argument prototype would still apply. */
5269 #ifdef __cplusplus
5270 extern "C"
5271 #endif
5272 char recvmsg ();
5273 int
5274 main ()
5275 {
5276 return recvmsg ();
5277 ;
5278 return 0;
5279 }
5280 _ACEOF
5281 if ac_fn_c_try_link "$LINENO"; then :
5282 ac_cv_lib_xnet_recvmsg=yes
5283 else
5284 ac_cv_lib_xnet_recvmsg=no
5285 fi
5286 rm -f core conftest.err conftest.$ac_objext \
5287 conftest$ac_exeext conftest.$ac_ext
5288 LIBS=$ac_check_lib_save_LIBS
5289 fi
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
5291 $as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
5292 if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
5293
5294 #
5295 # Yes - link with it as well.
5296 #
5297 LIBS="-lxnet $LIBS"
5298
5299 fi
5300
5301
5302 fi
5303
5304 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5306 $as_echo_n "checking for library containing putmsg... " >&6; }
5307 if ${ac_cv_search_putmsg+:} false; then :
5308 $as_echo_n "(cached) " >&6
5309 else
5310 ac_func_search_save_LIBS=$LIBS
5311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5312 /* end confdefs.h. */
5313
5314 /* Override any GCC internal prototype to avoid an error.
5315 Use char because int might match the return type of a GCC
5316 builtin and then its argument prototype would still apply. */
5317 #ifdef __cplusplus
5318 extern "C"
5319 #endif
5320 char putmsg ();
5321 int
5322 main ()
5323 {
5324 return putmsg ();
5325 ;
5326 return 0;
5327 }
5328 _ACEOF
5329 for ac_lib in '' str; do
5330 if test -z "$ac_lib"; then
5331 ac_res="none required"
5332 else
5333 ac_res=-l$ac_lib
5334 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5335 fi
5336 if ac_fn_c_try_link "$LINENO"; then :
5337 ac_cv_search_putmsg=$ac_res
5338 fi
5339 rm -f core conftest.err conftest.$ac_objext \
5340 conftest$ac_exeext
5341 if ${ac_cv_search_putmsg+:} false; then :
5342 break
5343 fi
5344 done
5345 if ${ac_cv_search_putmsg+:} false; then :
5346
5347 else
5348 ac_cv_search_putmsg=no
5349 fi
5350 rm conftest.$ac_ext
5351 LIBS=$ac_func_search_save_LIBS
5352 fi
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5354 $as_echo "$ac_cv_search_putmsg" >&6; }
5355 ac_res=$ac_cv_search_putmsg
5356 if test "$ac_res" != no; then :
5357 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5358
5359 fi
5360
5361
5362
5363 #
5364 # Check for reentrant versions of getnetbyname_r(), as provided by
5365 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5366 # If we don't find one, we just use getnetbyname(), which uses
5367 # thread-specific data on many platforms, but doesn't use it on
5368 # NetBSD or OpenBSD, and may not use it on older versions of other
5369 # platforms.
5370 #
5371 # Only do the check if we have a declaration of getnetbyname_r();
5372 # without it, we can't check which API it has. (We assume that
5373 # if there's a declaration, it has a prototype, so that the API
5374 # can be checked.)
5375 #
5376 ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
5377 "
5378 if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
5379
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
5381 $as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
5382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5383 /* end confdefs.h. */
5384 #include <netdb.h>
5385 int
5386 main ()
5387 {
5388
5389 struct netent netent_buf;
5390 char buf[1024];
5391 struct netent *resultp;
5392 int h_errnoval;
5393
5394 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
5395
5396 ;
5397 return 0;
5398 }
5399 _ACEOF
5400 if ac_fn_c_try_link "$LINENO"; then :
5401
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5403 $as_echo "yes" >&6; }
5404
5405 $as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
5406
5407
5408 else
5409
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411 $as_echo "no" >&6; }
5412
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
5414 $as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
5415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5416 /* end confdefs.h. */
5417 #include <netdb.h>
5418 int
5419 main ()
5420 {
5421
5422 struct netent netent_buf;
5423 char buf[1024];
5424
5425 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
5426
5427 ;
5428 return 0;
5429 }
5430 _ACEOF
5431 if ac_fn_c_try_link "$LINENO"; then :
5432
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5434 $as_echo "yes" >&6; }
5435
5436 $as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
5437
5438
5439 else
5440
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5442 $as_echo "no" >&6; }
5443
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
5445 $as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447 /* end confdefs.h. */
5448 #include <netdb.h>
5449 int
5450 main ()
5451 {
5452
5453 struct netent netent_buf;
5454 struct netent_data net_data;
5455
5456 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
5457
5458 ;
5459 return 0;
5460 }
5461 _ACEOF
5462 if ac_fn_c_try_link "$LINENO"; then :
5463
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5465 $as_echo "yes" >&6; }
5466
5467 $as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
5468
5469
5470 else
5471
5472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5473 $as_echo "no" >&6; }
5474
5475 fi
5476 rm -f core conftest.err conftest.$ac_objext \
5477 conftest$ac_exeext conftest.$ac_ext
5478
5479 fi
5480 rm -f core conftest.err conftest.$ac_objext \
5481 conftest$ac_exeext conftest.$ac_ext
5482
5483 fi
5484 rm -f core conftest.err conftest.$ac_objext \
5485 conftest$ac_exeext conftest.$ac_ext
5486
5487 fi
5488
5489
5490 #
5491 # Check for reentrant versions of getprotobyname_r(), as provided by
5492 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5493 # If we don't find one, we just use getprotobyname(), which uses
5494 # thread-specific data on many platforms, but doesn't use it on
5495 # NetBSD or OpenBSD, and may not use it on older versions of other
5496 # platforms.
5497 #
5498 # Only do the check if we have a declaration of getprotobyname_r();
5499 # without it, we can't check which API it has. (We assume that
5500 # if there's a declaration, it has a prototype, so that the API
5501 # can be checked.)
5502 #
5503 ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
5504 "
5505 if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
5506
5507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
5508 $as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
5509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510 /* end confdefs.h. */
5511 #include <netdb.h>
5512 int
5513 main ()
5514 {
5515
5516 struct protoent protoent_buf;
5517 char buf[1024];
5518 struct protoent *resultp;
5519
5520 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
5521
5522 ;
5523 return 0;
5524 }
5525 _ACEOF
5526 if ac_fn_c_try_link "$LINENO"; then :
5527
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5529 $as_echo "yes" >&6; }
5530
5531 $as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
5532
5533
5534 else
5535
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537 $as_echo "no" >&6; }
5538
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
5540 $as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
5541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5542 /* end confdefs.h. */
5543 #include <netdb.h>
5544 int
5545 main ()
5546 {
5547
5548 struct protoent protoent_buf;
5549 char buf[1024];
5550
5551 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
5552
5553 ;
5554 return 0;
5555 }
5556 _ACEOF
5557 if ac_fn_c_try_link "$LINENO"; then :
5558
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5560 $as_echo "yes" >&6; }
5561
5562 $as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
5563
5564
5565 else
5566
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568 $as_echo "no" >&6; }
5569
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
5571 $as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573 /* end confdefs.h. */
5574 #include <netdb.h>
5575 int
5576 main ()
5577 {
5578
5579 struct protoent protoent_buf;
5580 struct protoent_data proto_data;
5581
5582 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
5583
5584 ;
5585 return 0;
5586 }
5587 _ACEOF
5588 if ac_fn_c_try_link "$LINENO"; then :
5589
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5591 $as_echo "yes" >&6; }
5592
5593 $as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
5594
5595
5596 else
5597
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5599 $as_echo "no" >&6; }
5600
5601 fi
5602 rm -f core conftest.err conftest.$ac_objext \
5603 conftest$ac_exeext conftest.$ac_ext
5604
5605 fi
5606 rm -f core conftest.err conftest.$ac_objext \
5607 conftest$ac_exeext conftest.$ac_ext
5608
5609 fi
5610 rm -f core conftest.err conftest.$ac_objext \
5611 conftest$ac_exeext conftest.$ac_ext
5612
5613 fi
5614
5615
5616 #
5617 # You are in a twisty little maze of UN*Xes, all different.
5618 # Some might not have ether_hostton().
5619 # Some might have it and declare it in <net/ethernet.h>.
5620 # Some might have it and declare it in <netinet/ether.h>
5621 # Some might have it and declare it in <sys/ethernet.h>.
5622 # Some might have it and declare it in <arpa/inet.h>.
5623 # Some might have it and declare it in <netinet/if_ether.h>.
5624 # Some might have it and not declare it in any header file.
5625 #
5626 # Before you is a C compiler.
5627 #
5628 for ac_func in ether_hostton
5629 do :
5630 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
5631 if test "x$ac_cv_func_ether_hostton" = xyes; then :
5632 cat >>confdefs.h <<_ACEOF
5633 #define HAVE_ETHER_HOSTTON 1
5634 _ACEOF
5635
5636 fi
5637 done
5638
5639 if test "$ac_cv_func_ether_hostton" = yes; then
5640 #
5641 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
5642 #
5643 # This test fails if we don't have <net/ethernet.h> or if we do
5644 # but it doesn't declare ether_hostton().
5645 #
5646 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5647 #include <net/ethernet.h>
5648
5649 "
5650 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5651
5652
5653 $as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5654
5655
5656 fi
5657
5658 #
5659 # Did that succeed?
5660 #
5661 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5662 #
5663 # No, how about <netinet/ether.h>, as on Linux?
5664 #
5665 # This test fails if we don't have <netinet/ether.h>
5666 # or if we do but it doesn't declare ether_hostton().
5667 #
5668 # Unset ac_cv_have_decl_ether_hostton so we don't
5669 # treat the previous failure as a cached value and
5670 # suppress the next test.
5671 #
5672 unset ac_cv_have_decl_ether_hostton
5673 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5674 #include <netinet/ether.h>
5675
5676 "
5677 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5678
5679
5680 $as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5681
5682
5683 fi
5684
5685 fi
5686 #
5687 # Did that succeed?
5688 #
5689 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5690 #
5691 # No, how about <sys/ethernet.h>, as on Solaris 10
5692 # and later?
5693 #
5694 # This test fails if we don't have <sys/ethernet.h>
5695 # or if we do but it doesn't declare ether_hostton().
5696 #
5697 # Unset ac_cv_have_decl_ether_hostton so we don't
5698 # treat the previous failure as a cached value and
5699 # suppress the next test.
5700 #
5701 unset ac_cv_have_decl_ether_hostton
5702 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5703 #include <sys/ethernet.h>
5704
5705 "
5706 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5707
5708
5709 $as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5710
5711
5712 fi
5713
5714 fi
5715 #
5716 # Did that succeed?
5717 #
5718 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5719 #
5720 # No, how about <arpa/inet.h>, as in AIX?
5721 #
5722 # This test fails if we don't have <arpa/inet.h>
5723 # (if we have ether_hostton(), we should have
5724 # networking, and if we have networking, we should
5725 # have <arapa/inet.h>) or if we do but it doesn't
5726 # declare ether_hostton().
5727 #
5728 # Unset ac_cv_have_decl_ether_hostton so we don't
5729 # treat the previous failure as a cached value and
5730 # suppress the next test.
5731 #
5732 unset ac_cv_have_decl_ether_hostton
5733 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5734 #include <arpa/inet.h>
5735
5736 "
5737 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5738
5739
5740 $as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5741
5742
5743 fi
5744
5745 fi
5746 #
5747 # Did that succeed?
5748 #
5749 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5750 #
5751 # No, how about <netinet/if_ether.h>?
5752 # On some platforms, it requires <net/if.h> and
5753 # <netinet/in.h>, and we always include it with
5754 # both of them, so test it with both of them.
5755 #
5756 # This test fails if we don't have <netinet/if_ether.h>
5757 # and the headers we include before it, or if we do but
5758 # <netinet/if_ether.h> doesn't declare ether_hostton().
5759 #
5760 # Unset ac_cv_have_decl_ether_hostton so we don't
5761 # treat the previous failure as a cached value and
5762 # suppress the next test.
5763 #
5764 unset ac_cv_have_decl_ether_hostton
5765 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5766 #include <sys/types.h>
5767 #include <sys/socket.h>
5768 #include <net/if.h>
5769 #include <netinet/in.h>
5770 #include <netinet/if_ether.h>
5771
5772 "
5773 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5774
5775
5776 $as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5777
5778
5779 fi
5780
5781 fi
5782 #
5783 # After all that, is ether_hostton() declared?
5784 #
5785 if test "$ac_cv_have_decl_ether_hostton" = yes; then
5786 #
5787 # Yes.
5788 #
5789
5790 $as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
5791
5792 else
5793 #
5794 # No, we'll have to declare it ourselves.
5795 # Do we have "struct ether_addr" if we include
5796 # <netinet/if_ether.h>?
5797 #
5798 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
5799 #include <sys/types.h>
5800 #include <sys/socket.h>
5801 #include <net/if.h>
5802 #include <netinet/in.h>
5803 #include <netinet/if_ether.h>
5804
5805 "
5806 if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
5807
5808 cat >>confdefs.h <<_ACEOF
5809 #define HAVE_STRUCT_ETHER_ADDR 1
5810 _ACEOF
5811
5812
5813 fi
5814
5815 fi
5816 fi
5817
5818 #
5819 # For various things that might use pthreads.
5820 #
5821 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
5822 if test "x$ac_cv_header_pthread_h" = xyes; then :
5823
5824 #
5825 # OK, we have pthread.h. Do we have pthread_create in the
5826 # system libraries?
5827 #
5828 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
5829 if test "x$ac_cv_func_pthread_create" = xyes; then :
5830
5831 #
5832 # Yes.
5833 #
5834 ac_lbl_have_pthreads="found"
5835
5836 else
5837
5838 #
5839 # No - do we have it in -lpthreads?
5840 #
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
5842 $as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
5843 if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
5844 $as_echo_n "(cached) " >&6
5845 else
5846 ac_check_lib_save_LIBS=$LIBS
5847 LIBS="-lpthreads $LIBS"
5848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5849 /* end confdefs.h. */
5850
5851 /* Override any GCC internal prototype to avoid an error.
5852 Use char because int might match the return type of a GCC
5853 builtin and then its argument prototype would still apply. */
5854 #ifdef __cplusplus
5855 extern "C"
5856 #endif
5857 char pthread_create ();
5858 int
5859 main ()
5860 {
5861 return pthread_create ();
5862 ;
5863 return 0;
5864 }
5865 _ACEOF
5866 if ac_fn_c_try_link "$LINENO"; then :
5867 ac_cv_lib_pthreads_pthread_create=yes
5868 else
5869 ac_cv_lib_pthreads_pthread_create=no
5870 fi
5871 rm -f core conftest.err conftest.$ac_objext \
5872 conftest$ac_exeext conftest.$ac_ext
5873 LIBS=$ac_check_lib_save_LIBS
5874 fi
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
5876 $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
5877 if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
5878
5879 #
5880 # Yes - add -lpthreads.
5881 #
5882 ac_lbl_have_pthreads="found"
5883 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
5884
5885 else
5886
5887 #
5888 # No - do we have it in -lpthread?
5889 #
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
5891 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
5892 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
5893 $as_echo_n "(cached) " >&6
5894 else
5895 ac_check_lib_save_LIBS=$LIBS
5896 LIBS="-lpthread $LIBS"
5897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5898 /* end confdefs.h. */
5899
5900 /* Override any GCC internal prototype to avoid an error.
5901 Use char because int might match the return type of a GCC
5902 builtin and then its argument prototype would still apply. */
5903 #ifdef __cplusplus
5904 extern "C"
5905 #endif
5906 char pthread_create ();
5907 int
5908 main ()
5909 {
5910 return pthread_create ();
5911 ;
5912 return 0;
5913 }
5914 _ACEOF
5915 if ac_fn_c_try_link "$LINENO"; then :
5916 ac_cv_lib_pthread_pthread_create=yes
5917 else
5918 ac_cv_lib_pthread_pthread_create=no
5919 fi
5920 rm -f core conftest.err conftest.$ac_objext \
5921 conftest$ac_exeext conftest.$ac_ext
5922 LIBS=$ac_check_lib_save_LIBS
5923 fi
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
5925 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
5926 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
5927
5928 #
5929 # Yes - add -lpthread.
5930 #
5931 ac_lbl_have_pthreads="found"
5932 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
5933
5934 else
5935
5936 #
5937 # No.
5938 #
5939 ac_lbl_have_pthreads="not found"
5940
5941 fi
5942
5943
5944 fi
5945
5946
5947 fi
5948
5949
5950 else
5951
5952 #
5953 # We didn't find pthread.h.
5954 #
5955 ac_lbl_have_pthreads="not found"
5956
5957
5958 fi
5959
5960
5961
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
5963 $as_echo_n "checking if --disable-protochain option is specified... " >&6; }
5964 # Check whether --enable-protochain was given.
5965 if test "${enable_protochain+set}" = set; then :
5966 enableval=$enable_protochain;
5967 fi
5968
5969 case "x$enable_protochain" in
5970 xyes) enable_protochain=enabled ;;
5971 xno) enable_protochain=disabled ;;
5972 x) enable_protochain=enabled ;;
5973 esac
5974
5975 if test "$enable_protochain" = "disabled"; then
5976
5977 $as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
5978
5979 fi
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
5981 $as_echo "${enable_protochain}" >&6; }
5982
5983 #
5984 # valgrindtest directly uses the native capture mechanism, but
5985 # only tests with BPF and PF_PACKET sockets; only enable it if
5986 # we have BPF or PF_PACKET sockets.
5987 #
5988 VALGRINDTEST_SRC=
5989
5990
5991 # Check whether --with-pcap was given.
5992 if test "${with_pcap+set}" = set; then :
5993 withval=$with_pcap;
5994 fi
5995
5996 if test ! -z "$with_pcap" ; then
5997 V_PCAP="$withval"
5998 else
5999 #
6000 # Check for a bunch of headers for various packet
6001 # capture mechanisms.
6002 #
6003 for ac_header in net/bpf.h
6004 do :
6005 ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
6006 if test "x$ac_cv_header_net_bpf_h" = xyes; then :
6007 cat >>confdefs.h <<_ACEOF
6008 #define HAVE_NET_BPF_H 1
6009 _ACEOF
6010
6011 fi
6012
6013 done
6014
6015 if test "$ac_cv_header_net_bpf_h" = yes; then
6016 #
6017 # Does it define BIOCSETIF?
6018 # I.e., is it a header for an LBL/BSD-style capture
6019 # mechanism, or is it just a header for a BPF filter
6020 # engine? Some versions of Arch Linux, for example,
6021 # have a net/bpf.h that doesn't define BIOCSETIF;
6022 # as it's a Linux, it should use packet sockets,
6023 # instead.
6024 #
6025 # We need:
6026 #
6027 # sys/types.h, because FreeBSD 10's net/bpf.h
6028 # requires that various BSD-style integer types
6029 # be defined;
6030 #
6031 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
6032 # doesn't include it but does use struct timeval
6033 # in ioctl definitions;
6034 #
6035 # sys/ioctl.h and, if we have it, sys/ioccom.h,
6036 # because net/bpf.h defines ioctls;
6037 #
6038 # net/if.h, because it defines some structures
6039 # used in ioctls defined by net/bpf.h;
6040 #
6041 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
6042 # defines some structure fields as being
6043 # struct sockaddrs;
6044 #
6045 # and net/bpf.h doesn't necessarily include all
6046 # of those headers itself.
6047 #
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
6049 $as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
6050 if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
6051 $as_echo_n "(cached) " >&6
6052 else
6053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6054 /* end confdefs.h. */
6055
6056 #include <sys/types.h>
6057 #include <sys/time.h>
6058 #include <sys/ioctl.h>
6059 #include <sys/socket.h>
6060 #ifdef HAVE_SYS_IOCCOM_H
6061 #include <sys/ioccom.h>
6062 #endif
6063 #include <net/bpf.h>
6064 #include <net/if.h>
6065
6066 int
6067 main ()
6068 {
6069 u_int i = BIOCSETIF;
6070 ;
6071 return 0;
6072 }
6073 _ACEOF
6074 if ac_fn_c_try_compile "$LINENO"; then :
6075 ac_cv_lbl_bpf_h_defines_biocsetif=yes
6076 else
6077 ac_cv_lbl_bpf_h_defines_biocsetif=no
6078 fi
6079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6080 fi
6081
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6083 $as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6084 fi
6085 for ac_header in net/pfilt.h net/enet.h
6086 do :
6087 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6088 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6089 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6090 cat >>confdefs.h <<_ACEOF
6091 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6092 _ACEOF
6093
6094 fi
6095
6096 done
6097
6098 for ac_header in net/nit.h sys/net/nit.h
6099 do :
6100 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6101 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6102 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6103 cat >>confdefs.h <<_ACEOF
6104 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6105 _ACEOF
6106
6107 fi
6108
6109 done
6110
6111 for ac_header in linux/socket.h net/raw.h sys/dlpi.h
6112 do :
6113 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6114 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6115 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6116 cat >>confdefs.h <<_ACEOF
6117 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6118 _ACEOF
6119
6120 fi
6121
6122 done
6123
6124
6125 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6126 #
6127 # BPF.
6128 # Check this before DLPI, so that we pick BPF on
6129 # Solaris 11 and later.
6130 #
6131 V_PCAP=bpf
6132
6133 #
6134 # We have BPF, so build valgrindtest with "make test"
6135 # on macOS and FreeBSD (add your OS once there's a
6136 # valgrind for it).
6137 #
6138 case "$host_os" in
6139
6140 freebsd*|darwin*|linux*)
6141 VALGRINDTEST_SRC=valgrindtest.c
6142 ;;
6143 esac
6144 elif test "$ac_cv_header_linux_socket_h" = yes; then
6145 #
6146 # No prizes for guessing this one.
6147 #
6148 V_PCAP=linux
6149
6150 #
6151 # XXX - this won't work with older kernels that have
6152 # SOCK_PACKET sockets but not PF_PACKET sockets.
6153 #
6154 VALGRINDTEST_SRC=valgrindtest.c
6155 elif test "$ac_cv_header_net_pfilt_h" = yes; then
6156 #
6157 # DEC OSF/1, Digital UNIX, Tru64 UNIX
6158 #
6159 V_PCAP=pf
6160 elif test "$ac_cv_header_net_enet_h" = yes; then
6161 #
6162 # Stanford Enetfilter.
6163 #
6164 V_PCAP=enet
6165 elif test "$ac_cv_header_net_nit_h" = yes; then
6166 #
6167 # SunOS 4.x STREAMS NIT.
6168 #
6169 V_PCAP=snit
6170 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6171 #
6172 # Pre-SunOS 4.x non-STREAMS NIT.
6173 #
6174 V_PCAP=nit
6175 elif test "$ac_cv_header_net_raw_h" = yes; then
6176 #
6177 # IRIX snoop.
6178 #
6179 V_PCAP=snoop
6180 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6181 #
6182 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6183 #
6184 V_PCAP=dlpi
6185 else
6186 #
6187 # Nothing we support.
6188 #
6189 V_PCAP=null
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6191 $as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6193 $as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6194 fi
6195 fi
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6197 $as_echo_n "checking packet capture type... " >&6; }
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6199 $as_echo "$V_PCAP" >&6; }
6200
6201
6202 #
6203 # Do capture-mechanism-dependent tests.
6204 #
6205 case "$V_PCAP" in
6206 dlpi)
6207 #
6208 # Needed for common functions used by pcap-[dlpi,libdlpi].c
6209 #
6210 SSRC="dlpisubs.c"
6211
6212 #
6213 # Checks for some header files.
6214 #
6215 for ac_header in sys/bufmod.h sys/dlpi_ext.h
6216 do :
6217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6218 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6219 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6220 cat >>confdefs.h <<_ACEOF
6221 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6222 _ACEOF
6223
6224 fi
6225
6226 done
6227
6228
6229 #
6230 # Checks to see if Solaris has the public libdlpi(3LIB) library.
6231 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
6232 # public libdlpi(3LIB) version. Before libdlpi was made public, a
6233 # private version also existed, which did not have the same APIs.
6234 # Due to a gcc bug, the default search path for 32-bit libraries does
6235 # not include /lib, we add it explicitly here.
6236 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
6237 # Also, due to the bug above applications that link to libpcap with
6238 # libdlpi will have to add "-L/lib" option to "configure".
6239 #
6240 saved_ldflags=$LDFLAGS
6241 LDFLAGS="$LIBS -L/lib"
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6243 $as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
6244 if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
6245 $as_echo_n "(cached) " >&6
6246 else
6247 ac_check_lib_save_LIBS=$LIBS
6248 LIBS="-ldlpi $LIBS"
6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250 /* end confdefs.h. */
6251
6252 /* Override any GCC internal prototype to avoid an error.
6253 Use char because int might match the return type of a GCC
6254 builtin and then its argument prototype would still apply. */
6255 #ifdef __cplusplus
6256 extern "C"
6257 #endif
6258 char dlpi_walk ();
6259 int
6260 main ()
6261 {
6262 return dlpi_walk ();
6263 ;
6264 return 0;
6265 }
6266 _ACEOF
6267 if ac_fn_c_try_link "$LINENO"; then :
6268 ac_cv_lib_dlpi_dlpi_walk=yes
6269 else
6270 ac_cv_lib_dlpi_dlpi_walk=no
6271 fi
6272 rm -f core conftest.err conftest.$ac_objext \
6273 conftest$ac_exeext conftest.$ac_ext
6274 LIBS=$ac_check_lib_save_LIBS
6275 fi
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6277 $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6278 if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6279
6280 LIBS="-ldlpi $LIBS"
6281 V_PCAP=libdlpi
6282
6283 $as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
6284
6285
6286 else
6287 V_PCAP=dlpi
6288 fi
6289
6290 LDFLAGS=$saved_ldflags
6291
6292 #
6293 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
6294 # versions of DLPI.
6295 #
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
6297 $as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
6298 if ${ac_cv_sys_dlpi_usable+:} false; then :
6299 $as_echo_n "(cached) " >&6
6300 else
6301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6302 /* end confdefs.h. */
6303
6304 #include <sys/types.h>
6305 #include <sys/time.h>
6306 #include <sys/dlpi.h>
6307
6308 int
6309 main ()
6310 {
6311 int i = DL_PROMISC_PHYS;
6312 ;
6313 return 0;
6314 }
6315 _ACEOF
6316 if ac_fn_c_try_compile "$LINENO"; then :
6317 ac_cv_sys_dlpi_usable=yes
6318 else
6319 ac_cv_sys_dlpi_usable=no
6320 fi
6321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6322 fi
6323
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
6325 $as_echo "$ac_cv_sys_dlpi_usable" >&6; }
6326 if test $ac_cv_sys_dlpi_usable = no ; then
6327 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
6328 fi
6329
6330 #
6331 # Check to see if Solaris has the dl_passive_req_t struct defined
6332 # in <sys/dlpi.h>.
6333 # This check is for DLPI support for passive modes.
6334 # See dlpi(7P) for more details.
6335 #
6336 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
6337 #include <sys/types.h>
6338 #include <sys/dlpi.h>
6339
6340 "
6341 if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
6342
6343 cat >>confdefs.h <<_ACEOF
6344 #define HAVE_DL_PASSIVE_REQ_T 1
6345 _ACEOF
6346
6347
6348 fi
6349
6350 ;;
6351
6352 linux)
6353 #
6354 # Do we have the wireless extensions?
6355 #
6356 for ac_header in linux/wireless.h
6357 do :
6358 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
6359 #include <sys/socket.h>
6360 #include <linux/if.h>
6361 #include <linux/types.h>
6362
6363 "
6364 if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
6365 cat >>confdefs.h <<_ACEOF
6366 #define HAVE_LINUX_WIRELESS_H 1
6367 _ACEOF
6368
6369 fi
6370
6371 done
6372
6373
6374 #
6375 # Do we have libnl?
6376 #
6377
6378 # Check whether --with-libnl was given.
6379 if test "${with_libnl+set}" = set; then :
6380 withval=$with_libnl; with_libnl=$withval
6381 else
6382 with_libnl=if_available
6383 fi
6384
6385
6386 if test x$with_libnl != xno ; then
6387 have_any_nl="no"
6388
6389 incdir=-I/usr/include/libnl3
6390 libnldir=
6391 case "$with_libnl" in
6392
6393 yes|if_available)
6394 ;;
6395
6396 *)
6397 if test -d $withval; then
6398 libnldir=-L${withval}/lib/.libs
6399 incdir=-I${withval}/include
6400 fi
6401 ;;
6402 esac
6403
6404 #
6405 # Try libnl 3.x first.
6406 #
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
6408 $as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
6409 if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
6410 $as_echo_n "(cached) " >&6
6411 else
6412 ac_check_lib_save_LIBS=$LIBS
6413 LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
6414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6415 /* end confdefs.h. */
6416
6417 /* Override any GCC internal prototype to avoid an error.
6418 Use char because int might match the return type of a GCC
6419 builtin and then its argument prototype would still apply. */
6420 #ifdef __cplusplus
6421 extern "C"
6422 #endif
6423 char nl_socket_alloc ();
6424 int
6425 main ()
6426 {
6427 return nl_socket_alloc ();
6428 ;
6429 return 0;
6430 }
6431 _ACEOF
6432 if ac_fn_c_try_link "$LINENO"; then :
6433 ac_cv_lib_nl_3_nl_socket_alloc=yes
6434 else
6435 ac_cv_lib_nl_3_nl_socket_alloc=no
6436 fi
6437 rm -f core conftest.err conftest.$ac_objext \
6438 conftest$ac_exeext conftest.$ac_ext
6439 LIBS=$ac_check_lib_save_LIBS
6440 fi
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
6442 $as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
6443 if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
6444
6445 #
6446 # Yes, we have libnl 3.x.
6447 #
6448 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
6449
6450 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6451
6452
6453 $as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h
6454
6455
6456 $as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
6457
6458
6459 $as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
6460
6461 V_INCLS="$V_INCLS ${incdir}"
6462 have_any_nl="yes"
6463
6464 fi
6465
6466
6467 if test x$have_any_nl = xno ; then
6468 #
6469 # Try libnl 2.x
6470 #
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
6472 $as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; }
6473 if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then :
6474 $as_echo_n "(cached) " >&6
6475 else
6476 ac_check_lib_save_LIBS=$LIBS
6477 LIBS="-lnl $LIBS"
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h. */
6480
6481 /* Override any GCC internal prototype to avoid an error.
6482 Use char because int might match the return type of a GCC
6483 builtin and then its argument prototype would still apply. */
6484 #ifdef __cplusplus
6485 extern "C"
6486 #endif
6487 char nl_socket_alloc ();
6488 int
6489 main ()
6490 {
6491 return nl_socket_alloc ();
6492 ;
6493 return 0;
6494 }
6495 _ACEOF
6496 if ac_fn_c_try_link "$LINENO"; then :
6497 ac_cv_lib_nl_nl_socket_alloc=yes
6498 else
6499 ac_cv_lib_nl_nl_socket_alloc=no
6500 fi
6501 rm -f core conftest.err conftest.$ac_objext \
6502 conftest$ac_exeext conftest.$ac_ext
6503 LIBS=$ac_check_lib_save_LIBS
6504 fi
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_socket_alloc" >&5
6506 $as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; }
6507 if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then :
6508
6509 #
6510 # Yes, we have libnl 2.x.
6511 #
6512 LIBS="${libnldir} -lnl-genl -lnl $LIBS"
6513
6514 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6515
6516
6517 $as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h
6518
6519
6520 $as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
6521
6522
6523 $as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
6524
6525 have_any_nl="yes"
6526
6527 fi
6528
6529 fi
6530
6531 if test x$have_any_nl = xno ; then
6532 #
6533 # No, we don't; do we have libnl 1.x?
6534 #
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_handle_alloc in -lnl" >&5
6536 $as_echo_n "checking for nl_handle_alloc in -lnl... " >&6; }
6537 if ${ac_cv_lib_nl_nl_handle_alloc+:} false; then :
6538 $as_echo_n "(cached) " >&6
6539 else
6540 ac_check_lib_save_LIBS=$LIBS
6541 LIBS="-lnl $LIBS"
6542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6543 /* end confdefs.h. */
6544
6545 /* Override any GCC internal prototype to avoid an error.
6546 Use char because int might match the return type of a GCC
6547 builtin and then its argument prototype would still apply. */
6548 #ifdef __cplusplus
6549 extern "C"
6550 #endif
6551 char nl_handle_alloc ();
6552 int
6553 main ()
6554 {
6555 return nl_handle_alloc ();
6556 ;
6557 return 0;
6558 }
6559 _ACEOF
6560 if ac_fn_c_try_link "$LINENO"; then :
6561 ac_cv_lib_nl_nl_handle_alloc=yes
6562 else
6563 ac_cv_lib_nl_nl_handle_alloc=no
6564 fi
6565 rm -f core conftest.err conftest.$ac_objext \
6566 conftest$ac_exeext conftest.$ac_ext
6567 LIBS=$ac_check_lib_save_LIBS
6568 fi
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_handle_alloc" >&5
6570 $as_echo "$ac_cv_lib_nl_nl_handle_alloc" >&6; }
6571 if test "x$ac_cv_lib_nl_nl_handle_alloc" = xyes; then :
6572
6573 #
6574 # Yes.
6575 #
6576 LIBS="${libnldir} -lnl $LIBS"
6577
6578 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6579
6580 have_any_nl="yes"
6581
6582 fi
6583
6584 fi
6585
6586 if test x$have_any_nl = xno ; then
6587 #
6588 # No, we don't have libnl at all.
6589 #
6590 if test x$with_libnl = xyes ; then
6591 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
6592 fi
6593 fi
6594 fi
6595
6596 for ac_header in linux/ethtool.h
6597 do :
6598 ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "
6599 $ac_includes_default
6600 #include <linux/types.h>
6601
6602 "
6603 if test "x$ac_cv_header_linux_ethtool_h" = xyes; then :
6604 cat >>confdefs.h <<_ACEOF
6605 #define HAVE_LINUX_ETHTOOL_H 1
6606 _ACEOF
6607
6608 fi
6609
6610 done
6611
6612
6613 #
6614 # Check to see if struct tpacket_stats is defined in
6615 # <linux/if_packet.h>. If so, then pcap-linux.c can use this
6616 # to report proper statistics.
6617 #
6618 # -Scott Barron
6619 #
6620 ac_fn_c_check_type "$LINENO" "struct tpacket_stats" "ac_cv_type_struct_tpacket_stats" "
6621 #include <linux/if_packet.h>
6622
6623 "
6624 if test "x$ac_cv_type_struct_tpacket_stats" = xyes; then :
6625
6626 cat >>confdefs.h <<_ACEOF
6627 #define HAVE_STRUCT_TPACKET_STATS 1
6628 _ACEOF
6629
6630
6631 fi
6632
6633
6634 #
6635 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
6636 #
6637 # NOTE: any failure means we conclude that it doesn't have that
6638 # member, so if we don't have tpacket_auxdata, we conclude it
6639 # doesn't have that member (which is OK, as either we won't be
6640 # using code that would use that member, or we wouldn't compile
6641 # in any case).
6642 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
6643 #include <sys/types.h>
6644 #include <linux/if_packet.h>
6645
6646 "
6647 if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
6648
6649 cat >>confdefs.h <<_ACEOF
6650 #define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
6651 _ACEOF
6652
6653
6654 fi
6655
6656 ;;
6657
6658 bpf)
6659 #
6660 # Check whether we have the *BSD-style ioctls.
6661 #
6662 for ac_header in net/if_media.h
6663 do :
6664 ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
6665 if test "x$ac_cv_header_net_if_media_h" = xyes; then :
6666 cat >>confdefs.h <<_ACEOF
6667 #define HAVE_NET_IF_MEDIA_H 1
6668 _ACEOF
6669
6670 fi
6671
6672 done
6673
6674
6675 #
6676 # Check whether we have struct BPF_TIMEVAL.
6677 #
6678 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
6679 #include <sys/types.h>
6680 #include <sys/ioctl.h>
6681 #ifdef HAVE_SYS_IOCCOM_H
6682 #include <sys/ioccom.h>
6683 #endif
6684 #include <net/bpf.h>
6685
6686 "
6687 if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
6688
6689 cat >>confdefs.h <<_ACEOF
6690 #define HAVE_STRUCT_BPF_TIMEVAL 1
6691 _ACEOF
6692
6693
6694 fi
6695
6696 ;;
6697
6698 dag)
6699 #
6700 # --with-pcap=dag is the only way to get here, and it means
6701 # "DAG support but nothing else"
6702 #
6703 V_DEFS="$V_DEFS -DDAG_ONLY"
6704 xxx_only=yes
6705 ;;
6706
6707 dpdk)
6708 #
6709 # --with-pcap=dpdk is the only way to get here, and it means
6710 # "DPDK support but nothing else"
6711 #
6712 V_DEFS="$V_DEFS -DDPDK_ONLY"
6713 xxx_only=yes
6714 ;;
6715
6716 septel)
6717 #
6718 # --with-pcap=septel is the only way to get here, and it means
6719 # "Septel support but nothing else"
6720 #
6721 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
6722 xxx_only=yes
6723 ;;
6724
6725 snf)
6726 #
6727 # --with-pcap=snf is the only way to get here, and it means
6728 # "SNF support but nothing else"
6729 #
6730 V_DEFS="$V_DEFS -DSNF_ONLY"
6731 xxx_only=yes
6732 ;;
6733
6734 null)
6735 ;;
6736
6737 *)
6738 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
6739 ;;
6740 esac
6741
6742 if test "$V_PCAP" != null
6743 then
6744 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
6745 if test "x$ac_cv_func_getifaddrs" = xyes; then :
6746
6747 #
6748 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
6749 # as well, just in case some platform is really weird.
6750 #
6751 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
6752 if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
6753
6754 #
6755 # We have the header, so we use "getifaddrs()" to
6756 # get the list of interfaces.
6757 #
6758 V_FINDALLDEVS=fad-getad.c
6759
6760 else
6761
6762 #
6763 # We don't have the header - give up.
6764 # XXX - we could also fall back on some other
6765 # mechanism, but, for now, this'll catch this
6766 # problem so that we can at least try to figure
6767 # out something to do on systems with "getifaddrs()"
6768 # but without "ifaddrs.h", if there is something
6769 # we can do on those systems.
6770 #
6771 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
6772
6773 fi
6774
6775
6776
6777 else
6778
6779 #
6780 # Well, we don't have "getifaddrs()", at least not with the
6781 # libraries with which we've decided we need to link
6782 # libpcap with, so we have to use some other mechanism.
6783 #
6784 # Note that this may happen on Solaris, which has
6785 # getifaddrs(), but in -lsocket, not in -lxnet, so we
6786 # won't find it if we link with -lxnet, which we want
6787 # to do for other reasons.
6788 #
6789 # For now, we use either the SIOCGIFCONF ioctl or the
6790 # SIOCGLIFCONF ioctl, preferring the latter if we have
6791 # it; the latter is a Solarisism that first appeared
6792 # in Solaris 8. (Solaris's getifaddrs() appears to
6793 # be built atop SIOCGLIFCONF; using it directly
6794 # avoids a not-all-that-useful middleman.)
6795 #
6796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
6797 $as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
6798 if ${ac_cv_lbl_have_siocglifconf+:} false; then :
6799 $as_echo_n "(cached) " >&6
6800 else
6801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6802 /* end confdefs.h. */
6803 #include <sys/param.h>
6804 #include <sys/file.h>
6805 #include <sys/ioctl.h>
6806 #include <sys/socket.h>
6807 #include <sys/sockio.h>
6808 int
6809 main ()
6810 {
6811 ioctl(0, SIOCGLIFCONF, (char *)0);
6812 ;
6813 return 0;
6814 }
6815 _ACEOF
6816 if ac_fn_c_try_compile "$LINENO"; then :
6817 ac_cv_lbl_have_siocglifconf=yes
6818 else
6819 ac_cv_lbl_have_siocglifconf=no
6820 fi
6821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6822 fi
6823
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
6825 $as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
6826 if test $ac_cv_lbl_have_siocglifconf = yes ; then
6827 V_FINDALLDEVS=fad-glifc.c
6828 else
6829 V_FINDALLDEVS=fad-gifc.c
6830 fi
6831
6832 fi
6833
6834 fi
6835
6836 case "$host_os" in
6837 linux*)
6838 for ac_header in linux/net_tstamp.h
6839 do :
6840 ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
6841 if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
6842 cat >>confdefs.h <<_ACEOF
6843 #define HAVE_LINUX_NET_TSTAMP_H 1
6844 _ACEOF
6845
6846 fi
6847
6848 done
6849
6850 ;;
6851 *)
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
6853 $as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
6854 ;;
6855 esac
6856
6857 # Check whether --enable-packet-ring was given.
6858 if test "${enable_packet_ring+set}" = set; then :
6859 enableval=$enable_packet_ring;
6860 else
6861 enable_packet_ring=yes
6862 fi
6863
6864
6865 if test "x$enable_packet_ring" != "xno" ; then
6866
6867 $as_echo "#define PCAP_SUPPORT_PACKET_RING 1" >>confdefs.h
6868
6869
6870 fi
6871
6872 #
6873 # Check for socklen_t.
6874 #
6875 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
6876 #include <sys/types.h>
6877 #include <sys/socket.h>
6878
6879 "
6880 if test "x$ac_cv_type_socklen_t" = xyes; then :
6881
6882 cat >>confdefs.h <<_ACEOF
6883 #define HAVE_SOCKLEN_T 1
6884 _ACEOF
6885
6886
6887 fi
6888
6889
6890 # Check whether --enable-ipv6 was given.
6891 if test "${enable_ipv6+set}" = set; then :
6892 enableval=$enable_ipv6;
6893 else
6894 enable_ipv6=yes
6895 fi
6896
6897 if test "$enable_ipv6" != "no"; then
6898 #
6899 # We've already made sure we have getaddrinfo above in
6900 # AC_LBL_LIBRARY_NET.
6901 #
6902
6903 $as_echo "#define INET6 1" >>confdefs.h
6904
6905 fi
6906
6907 #
6908 # Do we have pkg-config?
6909 #
6910 # Extract the first word of "pkg-config", so it can be a program name with args.
6911 set dummy pkg-config; ac_word=$2
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6913 $as_echo_n "checking for $ac_word... " >&6; }
6914 if ${ac_cv_prog_PKGCONFIG+:} false; then :
6915 $as_echo_n "(cached) " >&6
6916 else
6917 if test -n "$PKGCONFIG"; then
6918 ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
6919 else
6920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6921 for as_dir in $PATH
6922 do
6923 IFS=$as_save_IFS
6924 test -z "$as_dir" && as_dir=.
6925 for ac_exec_ext in '' $ac_executable_extensions; do
6926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6927 ac_cv_prog_PKGCONFIG="pkg-config"
6928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6929 break 2
6930 fi
6931 done
6932 done
6933 IFS=$as_save_IFS
6934
6935 test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
6936 fi
6937 fi
6938 PKGCONFIG=$ac_cv_prog_PKGCONFIG
6939 if test -n "$PKGCONFIG"; then
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
6941 $as_echo "$PKGCONFIG" >&6; }
6942 else
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6944 $as_echo "no" >&6; }
6945 fi
6946
6947
6948
6949 # Check for Endace DAG card support.
6950
6951 # Check whether --with-dag was given.
6952 if test "${with_dag+set}" = set; then :
6953 withval=$with_dag;
6954 if test "$withval" = no
6955 then
6956 # User doesn't want DAG support.
6957 want_dag=no
6958 elif test "$withval" = yes
6959 then
6960 # User wants DAG support but hasn't specified a directory.
6961 want_dag=yes
6962 else
6963 # User wants DAG support and has specified a directory, so use the provided value.
6964 want_dag=yes
6965 dag_root=$withval
6966 fi
6967
6968 else
6969
6970 if test "$V_PCAP" = dag; then
6971 # User requested DAG-only libpcap, so we'd better have
6972 # the DAG API.
6973 want_dag=yes
6974 elif test "xxx_only" = yes; then
6975 # User requested something-else-only pcap, so they don't
6976 # want DAG support.
6977 want_dag=no
6978 else
6979 #
6980 # Use DAG API if present, otherwise don't
6981 #
6982 want_dag=ifpresent
6983 fi
6984
6985 fi
6986
6987
6988
6989 # Check whether --with-dag-includes was given.
6990 if test "${with_dag_includes+set}" = set; then :
6991 withval=$with_dag_includes;
6992 # User wants DAG support and has specified a header directory, so use the provided value.
6993 want_dag=yes
6994 dag_include_dir=$withval
6995
6996 fi
6997
6998
6999
7000 # Check whether --with-dag-libraries was given.
7001 if test "${with_dag_libraries+set}" = set; then :
7002 withval=$with_dag_libraries;
7003 # User wants DAG support and has specified a library directory, so use the provided value.
7004 want_dag=yes
7005 dag_lib_dir=$withval
7006
7007 fi
7008
7009
7010 if test "$want_dag" != no; then
7011
7012 # If necessary, set default paths for DAG API headers and libraries.
7013 if test -z "$dag_root"; then
7014 dag_root=/usr/local
7015 fi
7016
7017 if test -z "$dag_include_dir"; then
7018 dag_include_dir="$dag_root/include"
7019 fi
7020
7021 if test -z "$dag_lib_dir"; then
7022 dag_lib_dir="$dag_root/lib"
7023 fi
7024
7025 V_INCLS="$V_INCLS -I$dag_include_dir"
7026
7027 for ac_header in dagapi.h
7028 do :
7029 ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
7030 if test "x$ac_cv_header_dagapi_h" = xyes; then :
7031 cat >>confdefs.h <<_ACEOF
7032 #define HAVE_DAGAPI_H 1
7033 _ACEOF
7034
7035 fi
7036
7037 done
7038
7039
7040 if test "$ac_cv_header_dagapi_h" = yes; then
7041
7042 if test $V_PCAP != dag ; then
7043 MSRC="$MSRC pcap-dag.c"
7044 fi
7045
7046 # Check for various DAG API functions.
7047 # Don't need to save and restore LIBS to prevent -ldag being
7048 # included if there's a found-action (arg 3).
7049 saved_ldflags=$LDFLAGS
7050 LDFLAGS="-L$dag_lib_dir"
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
7052 $as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
7053 if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
7054 $as_echo_n "(cached) " >&6
7055 else
7056 ac_check_lib_save_LIBS=$LIBS
7057 LIBS="-ldag $LIBS"
7058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7059 /* end confdefs.h. */
7060
7061 /* Override any GCC internal prototype to avoid an error.
7062 Use char because int might match the return type of a GCC
7063 builtin and then its argument prototype would still apply. */
7064 #ifdef __cplusplus
7065 extern "C"
7066 #endif
7067 char dag_attach_stream ();
7068 int
7069 main ()
7070 {
7071 return dag_attach_stream ();
7072 ;
7073 return 0;
7074 }
7075 _ACEOF
7076 if ac_fn_c_try_link "$LINENO"; then :
7077 ac_cv_lib_dag_dag_attach_stream=yes
7078 else
7079 ac_cv_lib_dag_dag_attach_stream=no
7080 fi
7081 rm -f core conftest.err conftest.$ac_objext \
7082 conftest$ac_exeext conftest.$ac_ext
7083 LIBS=$ac_check_lib_save_LIBS
7084 fi
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
7086 $as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
7087 if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
7088 cat >>confdefs.h <<_ACEOF
7089 #define HAVE_LIBDAG 1
7090 _ACEOF
7091
7092 LIBS="-ldag $LIBS"
7093
7094 else
7095 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
7096 fi
7097
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
7099 $as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
7100 if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
7101 $as_echo_n "(cached) " >&6
7102 else
7103 ac_check_lib_save_LIBS=$LIBS
7104 LIBS="-ldag $LIBS"
7105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7106 /* end confdefs.h. */
7107
7108 /* Override any GCC internal prototype to avoid an error.
7109 Use char because int might match the return type of a GCC
7110 builtin and then its argument prototype would still apply. */
7111 #ifdef __cplusplus
7112 extern "C"
7113 #endif
7114 char dag_attach_stream64 ();
7115 int
7116 main ()
7117 {
7118 return dag_attach_stream64 ();
7119 ;
7120 return 0;
7121 }
7122 _ACEOF
7123 if ac_fn_c_try_link "$LINENO"; then :
7124 ac_cv_lib_dag_dag_attach_stream64=yes
7125 else
7126 ac_cv_lib_dag_dag_attach_stream64=no
7127 fi
7128 rm -f core conftest.err conftest.$ac_objext \
7129 conftest$ac_exeext conftest.$ac_ext
7130 LIBS=$ac_check_lib_save_LIBS
7131 fi
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
7133 $as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
7134 if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
7135 dag_large_streams="1"
7136 else
7137 dag_large_streams="0"
7138 fi
7139
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
7141 $as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
7142 if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
7143 $as_echo_n "(cached) " >&6
7144 else
7145 ac_check_lib_save_LIBS=$LIBS
7146 LIBS="-ldag $LIBS"
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148 /* end confdefs.h. */
7149
7150 /* Override any GCC internal prototype to avoid an error.
7151 Use char because int might match the return type of a GCC
7152 builtin and then its argument prototype would still apply. */
7153 #ifdef __cplusplus
7154 extern "C"
7155 #endif
7156 char dag_get_erf_types ();
7157 int
7158 main ()
7159 {
7160 return dag_get_erf_types ();
7161 ;
7162 return 0;
7163 }
7164 _ACEOF
7165 if ac_fn_c_try_link "$LINENO"; then :
7166 ac_cv_lib_dag_dag_get_erf_types=yes
7167 else
7168 ac_cv_lib_dag_dag_get_erf_types=no
7169 fi
7170 rm -f core conftest.err conftest.$ac_objext \
7171 conftest$ac_exeext conftest.$ac_ext
7172 LIBS=$ac_check_lib_save_LIBS
7173 fi
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
7175 $as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
7176 if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
7177
7178
7179 $as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
7180
7181 fi
7182
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
7184 $as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
7185 if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
7186 $as_echo_n "(cached) " >&6
7187 else
7188 ac_check_lib_save_LIBS=$LIBS
7189 LIBS="-ldag $LIBS"
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191 /* end confdefs.h. */
7192
7193 /* Override any GCC internal prototype to avoid an error.
7194 Use char because int might match the return type of a GCC
7195 builtin and then its argument prototype would still apply. */
7196 #ifdef __cplusplus
7197 extern "C"
7198 #endif
7199 char dag_get_stream_erf_types ();
7200 int
7201 main ()
7202 {
7203 return dag_get_stream_erf_types ();
7204 ;
7205 return 0;
7206 }
7207 _ACEOF
7208 if ac_fn_c_try_link "$LINENO"; then :
7209 ac_cv_lib_dag_dag_get_stream_erf_types=yes
7210 else
7211 ac_cv_lib_dag_dag_get_stream_erf_types=no
7212 fi
7213 rm -f core conftest.err conftest.$ac_objext \
7214 conftest$ac_exeext conftest.$ac_ext
7215 LIBS=$ac_check_lib_save_LIBS
7216 fi
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
7218 $as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
7219 if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
7220
7221
7222 $as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
7223
7224 fi
7225
7226
7227 LDFLAGS=$saved_ldflags
7228
7229 #
7230 # We assume that if we have libdag we have libdagconf,
7231 # as they're installed at the same time from the same
7232 # package.
7233 #
7234 LIBS="$LIBS -ldag -ldagconf"
7235 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
7236
7237 if test "$dag_large_streams" = 1; then
7238
7239 $as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
7240
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
7242 $as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
7243 if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
7244 $as_echo_n "(cached) " >&6
7245 else
7246 ac_check_lib_save_LIBS=$LIBS
7247 LIBS="-lvdag $LIBS"
7248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7249 /* end confdefs.h. */
7250
7251 /* Override any GCC internal prototype to avoid an error.
7252 Use char because int might match the return type of a GCC
7253 builtin and then its argument prototype would still apply. */
7254 #ifdef __cplusplus
7255 extern "C"
7256 #endif
7257 char vdag_set_device_info ();
7258 int
7259 main ()
7260 {
7261 return vdag_set_device_info ();
7262 ;
7263 return 0;
7264 }
7265 _ACEOF
7266 if ac_fn_c_try_link "$LINENO"; then :
7267 ac_cv_lib_vdag_vdag_set_device_info=yes
7268 else
7269 ac_cv_lib_vdag_vdag_set_device_info=no
7270 fi
7271 rm -f core conftest.err conftest.$ac_objext \
7272 conftest$ac_exeext conftest.$ac_ext
7273 LIBS=$ac_check_lib_save_LIBS
7274 fi
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
7276 $as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
7277 if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
7278 ac_dag_have_vdag="1"
7279 else
7280 ac_dag_have_vdag="0"
7281 fi
7282
7283 if test "$ac_dag_have_vdag" = 1; then
7284
7285 $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
7286
7287 if test "$ac_lbl_have_pthreads" != "found"; then
7288 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
7289 fi
7290 LIBS="$LIBS $PTHREAD_LIBS"
7291 fi
7292 fi
7293
7294
7295 $as_echo "#define HAVE_DAG_API 1" >>confdefs.h
7296
7297 else
7298
7299 if test "$V_PCAP" = dag; then
7300 # User requested "dag" capture type but we couldn't
7301 # find the DAG API support.
7302 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
7303 fi
7304
7305 if test "$want_dag" = yes; then
7306 # User wanted DAG support but we couldn't find it.
7307 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
7308 fi
7309 fi
7310 fi
7311
7312
7313 # Check whether --with-septel was given.
7314 if test "${with_septel+set}" = set; then :
7315 withval=$with_septel;
7316 if test "$withval" = no
7317 then
7318 want_septel=no
7319 elif test "$withval" = yes
7320 then
7321 want_septel=yes
7322 septel_root=
7323 else
7324 want_septel=yes
7325 septel_root=$withval
7326 fi
7327
7328 else
7329
7330 if test "$V_PCAP" = septel; then
7331 # User requested Septel-only libpcap, so we'd better have
7332 # the Septel API.
7333 want_septel=yes
7334 elif test "xxx_only" = yes; then
7335 # User requested something-else-only pcap, so they don't
7336 # want Septel support.
7337 want_septel=no
7338 else
7339 #
7340 # Use Septel API if present, otherwise don't
7341 #
7342 want_septel=ifpresent
7343 fi
7344
7345 fi
7346
7347
7348 ac_cv_lbl_septel_api=no
7349 if test "$with_septel" != no; then
7350
7351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
7352 $as_echo_n "checking whether we have Septel API headers... " >&6; }
7353
7354 # If necessary, set default paths for Septel API headers and libraries.
7355 if test -z "$septel_root"; then
7356 septel_root=$srcdir/../septel
7357 fi
7358
7359 septel_tools_dir="$septel_root"
7360 septel_include_dir="$septel_root/INC"
7361
7362 if test -r "$septel_include_dir/msg.h"; then
7363 ac_cv_lbl_septel_api=yes
7364 fi
7365
7366 if test "$ac_cv_lbl_septel_api" = yes; then
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
7368 $as_echo "yes ($septel_include_dir)" >&6; }
7369
7370 V_INCLS="$V_INCLS -I$septel_include_dir"
7371 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"
7372 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"
7373
7374 if test "$V_PCAP" != septel ; then
7375 MSRC="$MSRC pcap-septel.c"
7376 fi
7377
7378
7379 $as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
7380
7381 else
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7383 $as_echo "no" >&6; }
7384
7385 if test "$V_PCAP" = septel; then
7386 # User requested "septel" capture type but
7387 # we couldn't find the Septel API support.
7388 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
7389 fi
7390
7391 if test "$want_septel" = yes; then
7392 # User wanted Septel support but we couldn't find it.
7393 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
7394 fi
7395 fi
7396 fi
7397
7398 # Check for Myricom SNF support.
7399
7400 # Check whether --with-snf was given.
7401 if test "${with_snf+set}" = set; then :
7402 withval=$with_snf;
7403 if test "$withval" = no
7404 then
7405 # User explicitly doesn't want SNF
7406 want_snf=no
7407 elif test "$withval" = yes
7408 then
7409 # User wants SNF support but hasn't specified a directory.
7410 want_snf=yes
7411 else
7412 # User wants SNF support with a specified directory.
7413 want_snf=yes
7414 snf_root=$withval
7415 fi
7416
7417 else
7418
7419 if test "$V_PCAP" = snf; then
7420 # User requested Sniffer-only libpcap, so we'd better have
7421 # the Sniffer API.
7422 want_snf=yes
7423 elif test "xxx_only" = yes; then
7424 # User requested something-else-only pcap, so they don't
7425 # want SNF support.
7426 want_snf=no
7427 else
7428 #
7429 # Use Sniffer API if present, otherwise don't
7430 #
7431 want_snf=ifpresent
7432 fi
7433
7434 fi
7435
7436
7437
7438 # Check whether --with-snf-includes was given.
7439 if test "${with_snf_includes+set}" = set; then :
7440 withval=$with_snf_includes;
7441 # User wants SNF with specific header directory
7442 want_snf=yes
7443 snf_include_dir=$withval
7444
7445 fi
7446
7447
7448
7449 # Check whether --with-snf-libraries was given.
7450 if test "${with_snf_libraries+set}" = set; then :
7451 withval=$with_snf_libraries;
7452 # User wants SNF with specific lib directory
7453 want_snf=yes
7454 snf_lib_dir=$withval
7455
7456 fi
7457
7458
7459 ac_cv_lbl_snf_api=no
7460 if test "$with_snf" != no; then
7461
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
7463 $as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
7464
7465 # If necessary, set default paths for Sniffer headers and libraries.
7466 if test -z "$snf_root"; then
7467 snf_root=/opt/snf
7468 fi
7469
7470 if test -z "$snf_include_dir"; then
7471 snf_include_dir="$snf_root/include"
7472 fi
7473
7474 if test -z "$snf_lib_dir"; then
7475 snf_lib_dir="$snf_root/lib"
7476 fi
7477
7478 if test -f "$snf_include_dir/snf.h"; then
7479 # We found a header; make sure we can link with the library
7480 saved_ldflags=$LDFLAGS
7481 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
7483 $as_echo_n "checking for snf_init in -lsnf... " >&6; }
7484 if ${ac_cv_lib_snf_snf_init+:} false; then :
7485 $as_echo_n "(cached) " >&6
7486 else
7487 ac_check_lib_save_LIBS=$LIBS
7488 LIBS="-lsnf $LIBS"
7489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7490 /* end confdefs.h. */
7491
7492 /* Override any GCC internal prototype to avoid an error.
7493 Use char because int might match the return type of a GCC
7494 builtin and then its argument prototype would still apply. */
7495 #ifdef __cplusplus
7496 extern "C"
7497 #endif
7498 char snf_init ();
7499 int
7500 main ()
7501 {
7502 return snf_init ();
7503 ;
7504 return 0;
7505 }
7506 _ACEOF
7507 if ac_fn_c_try_link "$LINENO"; then :
7508 ac_cv_lib_snf_snf_init=yes
7509 else
7510 ac_cv_lib_snf_snf_init=no
7511 fi
7512 rm -f core conftest.err conftest.$ac_objext \
7513 conftest$ac_exeext conftest.$ac_ext
7514 LIBS=$ac_check_lib_save_LIBS
7515 fi
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
7517 $as_echo "$ac_cv_lib_snf_snf_init" >&6; }
7518 if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
7519 ac_cv_lbl_snf_api="yes"
7520 fi
7521
7522 LDFLAGS="$saved_ldflags"
7523 if test "$ac_cv_lbl_snf_api" = no; then
7524 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
7525 fi
7526 fi
7527
7528 if test "$ac_cv_lbl_snf_api" = yes; then
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
7530 $as_echo "yes ($snf_root)" >&6; }
7531
7532 V_INCLS="$V_INCLS -I$snf_include_dir"
7533 LIBS="$LIBS -lsnf"
7534 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7535
7536 if test "$V_PCAP" != snf ; then
7537 MSRC="$MSRC pcap-snf.c"
7538 fi
7539
7540
7541 $as_echo "#define HAVE_SNF_API 1" >>confdefs.h
7542
7543 else
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545 $as_echo "no" >&6; }
7546
7547 if test "$want_snf" = yes; then
7548 # User requested "snf" capture type but
7549 # we couldn't find the Sniffer API support.
7550 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
7551 fi
7552
7553 if test "$want_snf" = yes; then
7554 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
7555 fi
7556 fi
7557 fi
7558
7559 # Check for Riverbed TurboCap support.
7560
7561 # Check whether --with-turbocap was given.
7562 if test "${with_turbocap+set}" = set; then :
7563 withval=$with_turbocap;
7564 if test "$withval" = no
7565 then
7566 # User explicitly doesn't want TurboCap
7567 want_turbocap=no
7568 elif test "$withval" = yes
7569 then
7570 # User wants TurboCap support but hasn't specified a directory.
7571 want_turbocap=yes
7572 else
7573 # User wants TurboCap support with a specified directory.
7574 want_turbocap=yes
7575 turbocap_root=$withval
7576 fi
7577
7578 else
7579
7580 if test "xxx_only" = yes; then
7581 # User requested something-else-only pcap, so they don't
7582 # want TurboCap support.
7583 want_turbocap=no
7584 else
7585 #
7586 # Use TurboCap API if present, otherwise don't
7587 #
7588 want_turbocap=ifpresent
7589 fi
7590
7591 fi
7592
7593
7594 ac_cv_lbl_turbocap_api=no
7595 if test "$want_turbocap" != no; then
7596
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
7598 $as_echo_n "checking whether TurboCap is supported... " >&6; }
7599
7600 save_CFLAGS="$CFLAGS"
7601 save_LIBS="$LIBS"
7602 if test ! -z "$turbocap_root"; then
7603 TURBOCAP_CFLAGS="-I$turbocap_root/include"
7604 TURBOCAP_LIBS="-L$turbocap_root/lib"
7605 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
7606 fi
7607
7608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7609 /* end confdefs.h. */
7610
7611 #include <TcApi.h>
7612
7613 int
7614 main ()
7615 {
7616
7617 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
7618 TC_INSTANCE i;
7619 (void)TcInstanceCreateByName("foo", &i);
7620
7621 ;
7622 return 0;
7623 }
7624 _ACEOF
7625 if ac_fn_c_try_compile "$LINENO"; then :
7626 ac_cv_lbl_turbocap_api=yes
7627 fi
7628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7629
7630 CFLAGS="$save_CFLAGS"
7631 if test $ac_cv_lbl_turbocap_api = yes; then
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7633 $as_echo "yes" >&6; }
7634
7635 MSRC="$MSRC pcap-tc.c"
7636 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
7637 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
7638
7639
7640 $as_echo "#define HAVE_TC_API 1" >>confdefs.h
7641
7642 else
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644 $as_echo "no" >&6; }
7645
7646 if test "$want_turbocap" = yes; then
7647 # User wanted Turbo support but we couldn't find it.
7648 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
7649 fi
7650 fi
7651 fi
7652
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
7654 $as_echo_n "checking whether to enable remote packet capture... " >&6; }
7655 # Check whether --enable-remote was given.
7656 if test "${enable_remote+set}" = set; then :
7657 enableval=$enable_remote;
7658 else
7659 enableval=no
7660 fi
7661
7662 case "$enableval" in
7663 yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7664 $as_echo "yes" >&6; }
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
7666 $as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
7667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
7668 $as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
7669 #
7670 # rpcapd requires pthreads on UN*X.
7671 #
7672 if test "$ac_lbl_have_pthreads" != "found"; then
7673 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
7674 fi
7675 #
7676 # It also requires crypt().
7677 # Do we have it in the system libraries?
7678 #
7679 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
7680 if test "x$ac_cv_func_crypt" = xyes; then :
7681
7682 else
7683
7684 #
7685 # No. Do we have it in -lcrypt?
7686 #
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
7688 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
7689 if ${ac_cv_lib_crypt_crypt+:} false; then :
7690 $as_echo_n "(cached) " >&6
7691 else
7692 ac_check_lib_save_LIBS=$LIBS
7693 LIBS="-lcrypt $LIBS"
7694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7695 /* end confdefs.h. */
7696
7697 /* Override any GCC internal prototype to avoid an error.
7698 Use char because int might match the return type of a GCC
7699 builtin and then its argument prototype would still apply. */
7700 #ifdef __cplusplus
7701 extern "C"
7702 #endif
7703 char crypt ();
7704 int
7705 main ()
7706 {
7707 return crypt ();
7708 ;
7709 return 0;
7710 }
7711 _ACEOF
7712 if ac_fn_c_try_link "$LINENO"; then :
7713 ac_cv_lib_crypt_crypt=yes
7714 else
7715 ac_cv_lib_crypt_crypt=no
7716 fi
7717 rm -f core conftest.err conftest.$ac_objext \
7718 conftest$ac_exeext conftest.$ac_ext
7719 LIBS=$ac_check_lib_save_LIBS
7720 fi
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
7722 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
7723 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
7724
7725 #
7726 # Yes; add -lcrypt to the libraries for rpcapd.
7727 #
7728 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
7729
7730 else
7731
7732 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
7733
7734 fi
7735
7736
7737 fi
7738
7739
7740 #
7741 # OK, we have crypt(). Do we have getspnam()?
7742 #
7743 for ac_func in getspnam
7744 do :
7745 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
7746 if test "x$ac_cv_func_getspnam" = xyes; then :
7747 cat >>confdefs.h <<_ACEOF
7748 #define HAVE_GETSPNAM 1
7749 _ACEOF
7750
7751 fi
7752 done
7753
7754
7755 #
7756 # Check for various members of struct msghdr.
7757 #
7758 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
7759 #include \"ftmacros.h\"
7760 #include <sys/socket.h>
7761
7762 "
7763 if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
7764
7765 cat >>confdefs.h <<_ACEOF
7766 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
7767 _ACEOF
7768
7769
7770 fi
7771
7772 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
7773 #include \"ftmacros.h\"
7774 #include <sys/socket.h>
7775
7776 "
7777 if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
7778
7779 cat >>confdefs.h <<_ACEOF
7780 #define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
7781 _ACEOF
7782
7783
7784 fi
7785
7786
7787 #
7788 # Optionally, we may want to support SSL.
7789 # Check for OpenSSL/libressl.
7790 #
7791 # We check for it first with pkg-config, in case you're
7792 # unlucky enough to be running on one of the versions
7793 # of macOS where Apple decided to get everybody to use
7794 # their Shiny New SSL and took away the OpenSSL header
7795 # files, even though they keep the shared libraries
7796 # around for binary compatibility, and installed your
7797 # own version.
7798 #
7799 if test "x$PKGCONFIG" != "xno"; then
7800 #
7801 # We have pkg-config; see if we have it installed
7802 # as a package.
7803 #
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL/libressl with pkg-config" >&5
7805 $as_echo_n "checking for OpenSSL/libressl with pkg-config... " >&6; }
7806 if "$PKGCONFIG" openssl; then
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
7808 $as_echo "found" >&6; }
7809 OPENSSL_CFLAGS=`"$PKGCONFIG" --cflags openssl`
7810 OPENSSL_LIBS=`"$PKGCONFIG" --libs openssl`
7811 HAVE_OPENSSL=yes
7812 else
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7814 $as_echo "not found" >&6; }
7815 fi
7816 fi
7817 if test "x$HAVE_OPENSSL" != "xyes"; then
7818 #
7819 # We didn't find it as a package; try looking for
7820 # it as a regular system library.
7821 #
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
7823 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
7824 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
7825 $as_echo_n "(cached) " >&6
7826 else
7827 ac_check_lib_save_LIBS=$LIBS
7828 LIBS="-lssl $LIBS"
7829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7830 /* end confdefs.h. */
7831
7832 /* Override any GCC internal prototype to avoid an error.
7833 Use char because int might match the return type of a GCC
7834 builtin and then its argument prototype would still apply. */
7835 #ifdef __cplusplus
7836 extern "C"
7837 #endif
7838 char SSL_library_init ();
7839 int
7840 main ()
7841 {
7842 return SSL_library_init ();
7843 ;
7844 return 0;
7845 }
7846 _ACEOF
7847 if ac_fn_c_try_link "$LINENO"; then :
7848 ac_cv_lib_ssl_SSL_library_init=yes
7849 else
7850 ac_cv_lib_ssl_SSL_library_init=no
7851 fi
7852 rm -f core conftest.err conftest.$ac_objext \
7853 conftest$ac_exeext conftest.$ac_ext
7854 LIBS=$ac_check_lib_save_LIBS
7855 fi
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7857 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
7858 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
7859
7860 #
7861 # Yes - add -lssl.
7862 #
7863 HAVE_OPENSSL=yes
7864 OPENSSL_LIBS="-lssl -lcrypto"
7865
7866 else
7867 -lcrypto
7868 fi
7869
7870 fi
7871 if test "x$HAVE_OPENSSL" = "xyes"; then
7872
7873 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
7874
7875 CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
7876 LIBS="$LIBS $OPENSSL_LIBS"
7877 else
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
7879 $as_echo "$as_me: OpenSSL not found" >&6;}
7880 fi
7881
7882
7883 $as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
7884
7885 MSRC="$MSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
7886 BUILD_RPCAPD=build-rpcapd
7887 INSTALL_RPCAPD=install-rpcapd
7888 ;;
7889 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890 $as_echo "no" >&6; }
7891 ;;
7892 esac
7893
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
7895 $as_echo_n "checking whether to build optimizer debugging code... " >&6; }
7896 # Check whether --enable-optimizer-dbg was given.
7897 if test "${enable_optimizer_dbg+set}" = set; then :
7898 enableval=$enable_optimizer_dbg;
7899 fi
7900
7901 if test "$enable_optimizer_dbg" = "yes"; then
7902
7903 $as_echo "#define BDEBUG 1" >>confdefs.h
7904
7905 fi
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
7907 $as_echo "${enable_optimizer_dbg-no}" >&6; }
7908
7909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
7910 $as_echo_n "checking whether to build parser debugging code... " >&6; }
7911 # Check whether --enable-yydebug was given.
7912 if test "${enable_yydebug+set}" = set; then :
7913 enableval=$enable_yydebug;
7914 fi
7915
7916 if test "$enable_yydebug" = "yes"; then
7917
7918 $as_echo "#define YYDEBUG 1" >>confdefs.h
7919
7920 fi
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
7922 $as_echo "${enable_yydebug-no}" >&6; }
7923
7924 #
7925 # Look for {f}lex.
7926 #
7927 for ac_prog in flex lex
7928 do
7929 # Extract the first word of "$ac_prog", so it can be a program name with args.
7930 set dummy $ac_prog; ac_word=$2
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7932 $as_echo_n "checking for $ac_word... " >&6; }
7933 if ${ac_cv_prog_LEX+:} false; then :
7934 $as_echo_n "(cached) " >&6
7935 else
7936 if test -n "$LEX"; then
7937 ac_cv_prog_LEX="$LEX" # Let the user override the test.
7938 else
7939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7940 for as_dir in $PATH
7941 do
7942 IFS=$as_save_IFS
7943 test -z "$as_dir" && as_dir=.
7944 for ac_exec_ext in '' $ac_executable_extensions; do
7945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7946 ac_cv_prog_LEX="$ac_prog"
7947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7948 break 2
7949 fi
7950 done
7951 done
7952 IFS=$as_save_IFS
7953
7954 fi
7955 fi
7956 LEX=$ac_cv_prog_LEX
7957 if test -n "$LEX"; then
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7959 $as_echo "$LEX" >&6; }
7960 else
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7962 $as_echo "no" >&6; }
7963 fi
7964
7965
7966 test -n "$LEX" && break
7967 done
7968 test -n "$LEX" || LEX=":"
7969
7970 if test "x$LEX" != "x:"; then
7971 cat >conftest.l <<_ACEOF
7972 %%
7973 a { ECHO; }
7974 b { REJECT; }
7975 c { yymore (); }
7976 d { yyless (1); }
7977 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
7978 yyless ((input () != 0)); }
7979 f { unput (yytext[0]); }
7980 . { BEGIN INITIAL; }
7981 %%
7982 #ifdef YYTEXT_POINTER
7983 extern char *yytext;
7984 #endif
7985 int
7986 main (void)
7987 {
7988 return ! yylex () + ! yywrap ();
7989 }
7990 _ACEOF
7991 { { ac_try="$LEX conftest.l"
7992 case "(($ac_try" in
7993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7994 *) ac_try_echo=$ac_try;;
7995 esac
7996 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7997 $as_echo "$ac_try_echo"; } >&5
7998 (eval "$LEX conftest.l") 2>&5
7999 ac_status=$?
8000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8001 test $ac_status = 0; }
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8003 $as_echo_n "checking lex output file root... " >&6; }
8004 if ${ac_cv_prog_lex_root+:} false; then :
8005 $as_echo_n "(cached) " >&6
8006 else
8007
8008 if test -f lex.yy.c; then
8009 ac_cv_prog_lex_root=lex.yy
8010 elif test -f lexyy.c; then
8011 ac_cv_prog_lex_root=lexyy
8012 else
8013 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8014 fi
8015 fi
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8017 $as_echo "$ac_cv_prog_lex_root" >&6; }
8018 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8019
8020 if test -z "${LEXLIB+set}"; then
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8022 $as_echo_n "checking lex library... " >&6; }
8023 if ${ac_cv_lib_lex+:} false; then :
8024 $as_echo_n "(cached) " >&6
8025 else
8026
8027 ac_save_LIBS=$LIBS
8028 ac_cv_lib_lex='none needed'
8029 for ac_lib in '' -lfl -ll; do
8030 LIBS="$ac_lib $ac_save_LIBS"
8031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8032 /* end confdefs.h. */
8033 `cat $LEX_OUTPUT_ROOT.c`
8034 _ACEOF
8035 if ac_fn_c_try_link "$LINENO"; then :
8036 ac_cv_lib_lex=$ac_lib
8037 fi
8038 rm -f core conftest.err conftest.$ac_objext \
8039 conftest$ac_exeext conftest.$ac_ext
8040 test "$ac_cv_lib_lex" != 'none needed' && break
8041 done
8042 LIBS=$ac_save_LIBS
8043
8044 fi
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8046 $as_echo "$ac_cv_lib_lex" >&6; }
8047 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8048 fi
8049
8050
8051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8052 $as_echo_n "checking whether yytext is a pointer... " >&6; }
8053 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8054 $as_echo_n "(cached) " >&6
8055 else
8056 # POSIX says lex can declare yytext either as a pointer or an array; the
8057 # default is implementation-dependent. Figure out which it is, since
8058 # not all implementations provide the %pointer and %array declarations.
8059 ac_cv_prog_lex_yytext_pointer=no
8060 ac_save_LIBS=$LIBS
8061 LIBS="$LEXLIB $ac_save_LIBS"
8062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8063 /* end confdefs.h. */
8064
8065 #define YYTEXT_POINTER 1
8066 `cat $LEX_OUTPUT_ROOT.c`
8067 _ACEOF
8068 if ac_fn_c_try_link "$LINENO"; then :
8069 ac_cv_prog_lex_yytext_pointer=yes
8070 fi
8071 rm -f core conftest.err conftest.$ac_objext \
8072 conftest$ac_exeext conftest.$ac_ext
8073 LIBS=$ac_save_LIBS
8074
8075 fi
8076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8077 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8078 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8079
8080 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8081
8082 fi
8083 rm -f conftest.l $LEX_OUTPUT_ROOT.c
8084
8085 fi
8086 if test "$LEX" = ":"; then
8087 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
8088 fi
8089
8090 #
8091 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
8092 # and supports processing our scanner.l.
8093 #
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
8095 $as_echo_n "checking for capable lex... " >&6; }
8096 if ${tcpdump_cv_capable_lex+:} false; then :
8097 $as_echo_n "(cached) " >&6
8098 else
8099 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
8100 tcpdump_cv_capable_lex=yes
8101 else
8102 tcpdump_cv_capable_lex=insufficient
8103 fi
8104 fi
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
8106 $as_echo "$tcpdump_cv_capable_lex" >&6; }
8107 if test $tcpdump_cv_capable_lex = insufficient ; then
8108 as_fn_error $? "$LEX is insufficient to compile libpcap.
8109 libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
8110 fi
8111
8112 #
8113 # Look for yacc/bison/byacc.
8114 #
8115 for ac_prog in 'bison -y' byacc
8116 do
8117 # Extract the first word of "$ac_prog", so it can be a program name with args.
8118 set dummy $ac_prog; ac_word=$2
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120 $as_echo_n "checking for $ac_word... " >&6; }
8121 if ${ac_cv_prog_YACC+:} false; then :
8122 $as_echo_n "(cached) " >&6
8123 else
8124 if test -n "$YACC"; then
8125 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8126 else
8127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128 for as_dir in $PATH
8129 do
8130 IFS=$as_save_IFS
8131 test -z "$as_dir" && as_dir=.
8132 for ac_exec_ext in '' $ac_executable_extensions; do
8133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134 ac_cv_prog_YACC="$ac_prog"
8135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136 break 2
8137 fi
8138 done
8139 done
8140 IFS=$as_save_IFS
8141
8142 fi
8143 fi
8144 YACC=$ac_cv_prog_YACC
8145 if test -n "$YACC"; then
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8147 $as_echo "$YACC" >&6; }
8148 else
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8150 $as_echo "no" >&6; }
8151 fi
8152
8153
8154 test -n "$YACC" && break
8155 done
8156 test -n "$YACC" || YACC="yacc"
8157
8158
8159 #
8160 # Make sure it supports the -p flag and supports processing our
8161 # grammar.y.
8162 #
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5
8164 $as_echo_n "checking for capable yacc/bison... " >&6; }
8165 if ${tcpdump_cv_capable_yacc+:} false; then :
8166 $as_echo_n "(cached) " >&6
8167 else
8168 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
8169 tcpdump_cv_capable_yacc=yes
8170 else
8171 tcpdump_cv_capable_yacc=insufficient
8172 fi
8173 fi
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
8175 $as_echo "$tcpdump_cv_capable_yacc" >&6; }
8176 if test $tcpdump_cv_capable_yacc = insufficient ; then
8177 as_fn_error $? "$YACC is insufficient to compile libpcap.
8178 libpcap requires Bison, a newer version of Berkeley YACC with support
8179 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8180 fi
8181
8182 #
8183 # Do various checks for various OSes and versions of those OSes.
8184 #
8185 # Assume, by default, no support for shared libraries and V7/BSD
8186 # convention for man pages (devices in section 4, file formats in
8187 # section 5, miscellaneous info in section 7, administrative commands
8188 # and daemons in section 8). Individual cases can override this.
8189 #
8190 DYEXT="none"
8191 MAN_DEVICES=4
8192 MAN_FILE_FORMATS=5
8193 MAN_MISC_INFO=7
8194 MAN_ADMIN_COMMANDS=8
8195 case "$host_os" in
8196
8197 aix*)
8198
8199 $as_echo "#define _SUN 1" >>confdefs.h
8200
8201
8202 #
8203 # AIX makes it fun to build shared and static libraries,
8204 # because they're *both* ".a" archive libraries. We
8205 # build the static library for the benefit of the traditional
8206 # scheme of building libpcap and tcpdump in subdirectories of
8207 # the same directory, with tcpdump statically linked with the
8208 # libpcap in question, but we also build a shared library as
8209 # "libpcap.shareda" and install *it*, rather than the static
8210 # library, as "libpcap.a".
8211 #
8212 DYEXT="shareda"
8213
8214 case "$V_PCAP" in
8215
8216 dlpi)
8217 #
8218 # If we're using DLPI, applications will need to
8219 # use /lib/pse.exp if present, as we use the
8220 # STREAMS routines.
8221 #
8222 pseexe="/lib/pse.exp"
8223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
8224 $as_echo_n "checking for $pseexe... " >&6; }
8225 if test -f $pseexe ; then
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8227 $as_echo "yes" >&6; }
8228 LIBS="-I:$pseexe"
8229 fi
8230 ;;
8231
8232 bpf)
8233 #
8234 # If we're using BPF, we need "-lodm" and "-lcfg", as
8235 # we use them to load the BPF module.
8236 #
8237 LIBS="-lodm -lcfg"
8238 ;;
8239 esac
8240 ;;
8241
8242 darwin*)
8243 DYEXT="dylib"
8244 V_CCOPT="$V_CCOPT -fno-common"
8245 # Check whether --enable-universal was given.
8246 if test "${enable_universal+set}" = set; then :
8247 enableval=$enable_universal;
8248 fi
8249
8250 if test "$enable_universal" != "no"; then
8251 case "$host_os" in
8252
8253 darwin[0-7].*)
8254 #
8255 # Pre-Tiger. Build only for 32-bit PowerPC; no
8256 # need for any special compiler or linker flags.
8257 #
8258 ;;
8259
8260 darwin8.[0123]|darwin8.[0123].*)
8261 #
8262 # Tiger, prior to Intel support. Build
8263 # libraries and executables for 32-bit PowerPC
8264 # and 64-bit PowerPC, with 32-bit PowerPC first.
8265 # (I'm guessing that's what Apple does.)
8266 #
8267 # (The double brackets are needed because
8268 # autotools/m4 use brackets as a quoting
8269 # character; the double brackets turn into
8270 # single brackets in the generated configure
8271 # file.)
8272 #
8273 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
8274 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
8275 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
8276 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
8277 ;;
8278
8279 darwin8.[456]|darwin.[456].*)
8280 #
8281 # Tiger, subsequent to Intel support but prior
8282 # to x86-64 support. Build libraries and
8283 # executables for 32-bit PowerPC, 64-bit
8284 # PowerPC, and 32-bit x86, with 32-bit PowerPC
8285 # first. (I'm guessing that's what Apple does.)
8286 #
8287 # (The double brackets are needed because
8288 # autotools/m4 use brackets as a quoting
8289 # character; the double brackets turn into
8290 # single brackets in the generated configure
8291 # file.)
8292 #
8293 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8294 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8295 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8296 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8297 ;;
8298
8299 darwin8.*)
8300 #
8301 # All other Tiger, so subsequent to x86-64
8302 # support. Build libraries and executables for
8303 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
8304 # and x86-64, with 32-bit PowerPC first. (I'm
8305 # guessing that's what Apple does.)
8306 #
8307 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8308 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8309 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8310 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8311 ;;
8312
8313 darwin9.*)
8314 #
8315 # Leopard. Build libraries for 32-bit PowerPC,
8316 # 64-bit PowerPC, 32-bit x86, and x86-64, with
8317 # 32-bit PowerPC first, and build executables
8318 # for 32-bit x86 and 32-bit PowerPC, with 32-bit
8319 # x86 first. (That's what Apple does.)
8320 #
8321 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8322 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8323 V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
8324 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
8325 ;;
8326
8327 darwin10.*)
8328 #
8329 # Snow Leopard. Build libraries for x86-64,
8330 # 32-bit x86, and 32-bit PowerPC, with x86-64
8331 # first, and build executables for x86-64 and
8332 # 32-bit x86, with x86-64 first. (That's what
8333 # Apple does, even though Snow Leopard doesn't
8334 # run on PPC, so PPC libpcap runs under Rosetta,
8335 # and Rosetta doesn't support BPF ioctls, so PPC
8336 # programs can't do live captures.)
8337 #
8338 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
8339 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
8340 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
8341 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
8342 ;;
8343
8344 darwin*)
8345 #
8346 # Post-Snow Leopard. Build libraries for x86-64
8347 # and 32-bit x86, with x86-64 first, and build
8348 # executables only for x86-64. (That's what
8349 # Apple does.) This requires no special flags
8350 # for programs.
8351 # XXX - update if and when Apple drops support
8352 # for 32-bit x86 code and if and when Apple adds
8353 # ARM-based Macs. (You're on your own for iOS
8354 # etc.)
8355 #
8356 # XXX - check whether we *can* build for
8357 # i386 and, if not, suggest that the user
8358 # install the /usr/include headers if they
8359 # want to build fat.
8360 #
8361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
8362 $as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
8363 save_CFLAGS="$CFLAGS"
8364 CFLAGS="$CFLAGS -arch i386"
8365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8366 /* end confdefs.h. */
8367
8368 int
8369 main ()
8370 {
8371 return 0;
8372 ;
8373 return 0;
8374 }
8375 _ACEOF
8376 if ac_fn_c_try_compile "$LINENO"; then :
8377
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8379 $as_echo "yes" >&6; }
8380 V_LIB_CCOPT_FAT="-arch x86_64"
8381 V_LIB_LDFLAGS_FAT="-arch x86_64"
8382
8383 #
8384 # OpenSSL installation on macOS seems
8385 # to install only the libs for 64-bit
8386 # x86 - at least that's what Brew does:
8387 # only configure 32-bit builds if we
8388 # don't have OpenSSL.
8389 #
8390 if test "$HAVE_OPENSSL" != yes; then
8391 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
8392 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
8393 fi
8394
8395 else
8396
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398 $as_echo "no" >&6; }
8399 V_LIB_CCOPT_FAT="-arch x86_64"
8400 V_LIB_LDFLAGS_FAT="-arch x86_64"
8401 case "$host_os" in
8402
8403 darwin18.*)
8404 #
8405 # Mojave; you need to install the
8406 # /usr/include headers to get
8407 # 32-bit x86 builds to work.
8408 #
8409 { $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
8410 $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;}
8411 ;;
8412
8413 *)
8414 #
8415 # Pre-Mojave; the command-line
8416 # tools should be sufficient to
8417 # enable 32-bit x86 builds.
8418 #
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
8420 $as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
8421 ;;
8422 esac
8423
8424 fi
8425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8426 CFLAGS="$save_CFLAGS"
8427 if test "$HAVE_OPENSSL" = yes; then
8428 #
8429 # If all else fails, look for OpenSSL in
8430 # /usr/local/opt.
8431 #
8432 CFLAGS="$CFLAGS -I/usr/local/opt/openssl/include"
8433 LIBS="$LIBS -L/usr/local/opt/openssl/lib"
8434 fi
8435 ;;
8436 esac
8437 fi
8438 ;;
8439
8440 hpux9*)
8441
8442 $as_echo "#define HAVE_HPUX9 1" >>confdefs.h
8443
8444
8445 #
8446 # Use System V conventions for man pages.
8447 #
8448 MAN_ADMIN_COMMANDS=1m
8449 MAN_FILE_FORMATS=4
8450 MAN_MISC_INFO=5
8451 ;;
8452
8453 hpux10.0*)
8454
8455 #
8456 # Use System V conventions for man pages.
8457 #
8458 MAN_ADMIN_COMMANDS=1m
8459 MAN_FILE_FORMATS=4
8460 MAN_MISC_INFO=5
8461 ;;
8462
8463 hpux10.1*)
8464
8465 #
8466 # Use System V conventions for man pages.
8467 #
8468 MAN_ADMIN_COMMANDS=1m
8469 MAN_FILE_FORMATS=4
8470 MAN_MISC_INFO=5
8471 ;;
8472
8473 hpux*)
8474
8475 $as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
8476
8477 if test "`uname -m`" = "ia64"; then
8478 DYEXT="so"
8479 else
8480 DYEXT="sl"
8481 fi
8482
8483 #
8484 # "-b" builds a shared library; "+h" sets the soname.
8485 #
8486 SHLIB_OPT="-b"
8487 SONAME_OPT="+h"
8488
8489 #
8490 # Use System V conventions for man pages.
8491 #
8492 MAN_FILE_FORMATS=4
8493 MAN_MISC_INFO=5
8494 ;;
8495
8496 irix*)
8497 #
8498 # Use IRIX conventions for man pages; they're the same as the
8499 # System V conventions, except that they use section 8 for
8500 # administrative commands and daemons.
8501 #
8502 MAN_FILE_FORMATS=4
8503 MAN_MISC_INFO=5
8504 ;;
8505
8506 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*)
8507 DYEXT="so"
8508
8509 #
8510 # Compiler assumed to be GCC; run-time linker may require a -R
8511 # flag.
8512 #
8513 if test "$libdir" != "/usr/lib"; then
8514 V_RFLAGS=-Wl,-R$libdir
8515 fi
8516 ;;
8517
8518 osf*)
8519 DYEXT="so"
8520
8521 #
8522 # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
8523 # Use Tru64 UNIX conventions for man pages; they're the same as
8524 # the System V conventions except that they use section 8 for
8525 # administrative commands and daemons.
8526 #
8527 MAN_FILE_FORMATS=4
8528 MAN_MISC_INFO=5
8529 MAN_DEVICES=7
8530 ;;
8531
8532 sinix*)
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
8534 $as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
8535 if ${ac_cv_cc_sinix_defined+:} false; then :
8536 $as_echo_n "(cached) " >&6
8537 else
8538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8539 /* end confdefs.h. */
8540
8541 int
8542 main ()
8543 {
8544 int i = sinix;
8545 ;
8546 return 0;
8547 }
8548 _ACEOF
8549 if ac_fn_c_try_compile "$LINENO"; then :
8550 ac_cv_cc_sinix_defined=yes
8551 else
8552 ac_cv_cc_sinix_defined=no
8553 fi
8554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8555 fi
8556
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
8558 $as_echo "$ac_cv_cc_sinix_defined" >&6; }
8559 if test $ac_cv_cc_sinix_defined = no ; then
8560
8561 $as_echo "#define sinix 1" >>confdefs.h
8562
8563 fi
8564 ;;
8565
8566 solaris*)
8567
8568 $as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
8569
8570
8571 DYEXT="so"
8572
8573 #
8574 # Make sure errno is thread-safe, in case we're called in
8575 # a multithreaded program. We don't guarantee that two
8576 # threads can use the *same* pcap_t safely, but the
8577 # current version does guarantee that you can use different
8578 # pcap_t's in different threads, and even that pcap_compile()
8579 # is thread-safe (it wasn't thread-safe in some older versions).
8580 #
8581 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
8582
8583 case "`uname -r`" in
8584
8585 5.12)
8586 ;;
8587
8588 *)
8589 #
8590 # Use System V conventions for man pages.
8591 #
8592 MAN_ADMIN_COMMANDS=1m
8593 MAN_FILE_FORMATS=4
8594 MAN_MISC_INFO=5
8595 MAN_DEVICES=7D
8596 esac
8597 ;;
8598 esac
8599
8600 # Check whether --enable-shared was given.
8601 if test "${enable_shared+set}" = set; then :
8602 enableval=$enable_shared;
8603 fi
8604
8605 test "x$enable_shared" = "xno" && DYEXT="none"
8606
8607 if test -n "$ac_tool_prefix"; then
8608 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8609 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611 $as_echo_n "checking for $ac_word... " >&6; }
8612 if ${ac_cv_prog_RANLIB+:} false; then :
8613 $as_echo_n "(cached) " >&6
8614 else
8615 if test -n "$RANLIB"; then
8616 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8617 else
8618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8619 for as_dir in $PATH
8620 do
8621 IFS=$as_save_IFS
8622 test -z "$as_dir" && as_dir=.
8623 for ac_exec_ext in '' $ac_executable_extensions; do
8624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8625 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8627 break 2
8628 fi
8629 done
8630 done
8631 IFS=$as_save_IFS
8632
8633 fi
8634 fi
8635 RANLIB=$ac_cv_prog_RANLIB
8636 if test -n "$RANLIB"; then
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8638 $as_echo "$RANLIB" >&6; }
8639 else
8640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641 $as_echo "no" >&6; }
8642 fi
8643
8644
8645 fi
8646 if test -z "$ac_cv_prog_RANLIB"; then
8647 ac_ct_RANLIB=$RANLIB
8648 # Extract the first word of "ranlib", so it can be a program name with args.
8649 set dummy ranlib; ac_word=$2
8650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8651 $as_echo_n "checking for $ac_word... " >&6; }
8652 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8653 $as_echo_n "(cached) " >&6
8654 else
8655 if test -n "$ac_ct_RANLIB"; then
8656 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8657 else
8658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8659 for as_dir in $PATH
8660 do
8661 IFS=$as_save_IFS
8662 test -z "$as_dir" && as_dir=.
8663 for ac_exec_ext in '' $ac_executable_extensions; do
8664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8665 ac_cv_prog_ac_ct_RANLIB="ranlib"
8666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8667 break 2
8668 fi
8669 done
8670 done
8671 IFS=$as_save_IFS
8672
8673 fi
8674 fi
8675 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8676 if test -n "$ac_ct_RANLIB"; then
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8678 $as_echo "$ac_ct_RANLIB" >&6; }
8679 else
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8681 $as_echo "no" >&6; }
8682 fi
8683
8684 if test "x$ac_ct_RANLIB" = x; then
8685 RANLIB=":"
8686 else
8687 case $cross_compiling:$ac_tool_warned in
8688 yes:)
8689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8690 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8691 ac_tool_warned=yes ;;
8692 esac
8693 RANLIB=$ac_ct_RANLIB
8694 fi
8695 else
8696 RANLIB="$ac_cv_prog_RANLIB"
8697 fi
8698
8699 if test -n "$ac_tool_prefix"; then
8700 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8701 set dummy ${ac_tool_prefix}ar; ac_word=$2
8702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8703 $as_echo_n "checking for $ac_word... " >&6; }
8704 if ${ac_cv_prog_AR+:} false; then :
8705 $as_echo_n "(cached) " >&6
8706 else
8707 if test -n "$AR"; then
8708 ac_cv_prog_AR="$AR" # Let the user override the test.
8709 else
8710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711 for as_dir in $PATH
8712 do
8713 IFS=$as_save_IFS
8714 test -z "$as_dir" && as_dir=.
8715 for ac_exec_ext in '' $ac_executable_extensions; do
8716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8717 ac_cv_prog_AR="${ac_tool_prefix}ar"
8718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8719 break 2
8720 fi
8721 done
8722 done
8723 IFS=$as_save_IFS
8724
8725 fi
8726 fi
8727 AR=$ac_cv_prog_AR
8728 if test -n "$AR"; then
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8730 $as_echo "$AR" >&6; }
8731 else
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8733 $as_echo "no" >&6; }
8734 fi
8735
8736
8737 fi
8738 if test -z "$ac_cv_prog_AR"; then
8739 ac_ct_AR=$AR
8740 # Extract the first word of "ar", so it can be a program name with args.
8741 set dummy ar; ac_word=$2
8742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8743 $as_echo_n "checking for $ac_word... " >&6; }
8744 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8745 $as_echo_n "(cached) " >&6
8746 else
8747 if test -n "$ac_ct_AR"; then
8748 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8749 else
8750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8751 for as_dir in $PATH
8752 do
8753 IFS=$as_save_IFS
8754 test -z "$as_dir" && as_dir=.
8755 for ac_exec_ext in '' $ac_executable_extensions; do
8756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8757 ac_cv_prog_ac_ct_AR="ar"
8758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8759 break 2
8760 fi
8761 done
8762 done
8763 IFS=$as_save_IFS
8764
8765 fi
8766 fi
8767 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8768 if test -n "$ac_ct_AR"; then
8769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8770 $as_echo "$ac_ct_AR" >&6; }
8771 else
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8773 $as_echo "no" >&6; }
8774 fi
8775
8776 if test "x$ac_ct_AR" = x; then
8777 AR=""
8778 else
8779 case $cross_compiling:$ac_tool_warned in
8780 yes:)
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8782 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8783 ac_tool_warned=yes ;;
8784 esac
8785 AR=$ac_ct_AR
8786 fi
8787 else
8788 AR="$ac_cv_prog_AR"
8789 fi
8790
8791
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8793 $as_echo_n "checking whether ln -s works... " >&6; }
8794 LN_S=$as_ln_s
8795 if test "$LN_S" = "ln -s"; then
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8797 $as_echo "yes" >&6; }
8798 else
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8800 $as_echo "no, using $LN_S" >&6; }
8801 fi
8802
8803
8804
8805 rm -f os-proto.h
8806 if test "${LBL_CFLAGS+set}" = set; then
8807 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
8808 fi
8809 if test -f .devel ; then
8810 #
8811 # Skip all the warning option stuff on some compilers.
8812 #
8813 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
8814
8815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
8816 $as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
8817 save_CFLAGS="$CFLAGS"
8818 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
8819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8820 /* end confdefs.h. */
8821
8822 int
8823 main ()
8824 {
8825 return 0
8826 ;
8827 return 0;
8828 }
8829 _ACEOF
8830 if ac_fn_c_try_compile "$LINENO"; then :
8831
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8833 $as_echo "no" >&6; }
8834 #
8835 # We're assuming this is clang, where
8836 # -Werror=unknown-warning-option is the appropriate
8837 # option to force the compiler to fail.
8838 #
8839 ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
8840
8841 else
8842
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8844 $as_echo "yes" >&6; }
8845
8846 fi
8847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8848 CFLAGS="$save_CFLAGS"
8849
8850
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
8852 $as_echo_n "checking whether the compiler supports the -W option... " >&6; }
8853 save_CFLAGS="$CFLAGS"
8854 if expr "x-W" : "x-W.*" >/dev/null
8855 then
8856 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
8857 elif expr "x-W" : "x-f.*" >/dev/null
8858 then
8859 CFLAGS="$CFLAGS -Werror -W"
8860 elif expr "x-W" : "x-m.*" >/dev/null
8861 then
8862 CFLAGS="$CFLAGS -Werror -W"
8863 else
8864 CFLAGS="$CFLAGS -W"
8865 fi
8866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8867 /* end confdefs.h. */
8868
8869 int
8870 main ()
8871 {
8872 return 0
8873 ;
8874 return 0;
8875 }
8876 _ACEOF
8877 if ac_fn_c_try_compile "$LINENO"; then :
8878
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8880 $as_echo "yes" >&6; }
8881 can_add_to_cflags=yes
8882 #
8883 # The compile supports this; do we have some C code for
8884 # which the warning should *not* appear?
8885 # We test the fourth argument because the third argument
8886 # could contain quotes, breaking the test.
8887 #
8888 if test "x" != "x"
8889 then
8890 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
8892 $as_echo_n "checking whether -W ... " >&6; }
8893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8894 /* end confdefs.h. */
8895
8896 _ACEOF
8897 if ac_fn_c_try_compile "$LINENO"; then :
8898
8899 #
8900 # Not a problem.
8901 #
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8903 $as_echo "no" >&6; }
8904
8905 else
8906
8907 #
8908 # A problem.
8909 #
8910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8911 $as_echo "yes" >&6; }
8912 can_add_to_cflags=no
8913
8914 fi
8915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8916 fi
8917 CFLAGS="$save_CFLAGS"
8918 if test x"$can_add_to_cflags" = "xyes"
8919 then
8920 V_CCOPT="$V_CCOPT -W"
8921 fi
8922
8923 else
8924
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8926 $as_echo "no" >&6; }
8927 CFLAGS="$save_CFLAGS"
8928
8929 fi
8930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8931
8932
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
8934 $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
8935 save_CFLAGS="$CFLAGS"
8936 if expr "x-Wall" : "x-W.*" >/dev/null
8937 then
8938 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
8939 elif expr "x-Wall" : "x-f.*" >/dev/null
8940 then
8941 CFLAGS="$CFLAGS -Werror -Wall"
8942 elif expr "x-Wall" : "x-m.*" >/dev/null
8943 then
8944 CFLAGS="$CFLAGS -Werror -Wall"
8945 else
8946 CFLAGS="$CFLAGS -Wall"
8947 fi
8948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8949 /* end confdefs.h. */
8950
8951 int
8952 main ()
8953 {
8954 return 0
8955 ;
8956 return 0;
8957 }
8958 _ACEOF
8959 if ac_fn_c_try_compile "$LINENO"; then :
8960
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8962 $as_echo "yes" >&6; }
8963 can_add_to_cflags=yes
8964 #
8965 # The compile supports this; do we have some C code for
8966 # which the warning should *not* appear?
8967 # We test the fourth argument because the third argument
8968 # could contain quotes, breaking the test.
8969 #
8970 if test "x" != "x"
8971 then
8972 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
8974 $as_echo_n "checking whether -Wall ... " >&6; }
8975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8976 /* end confdefs.h. */
8977
8978 _ACEOF
8979 if ac_fn_c_try_compile "$LINENO"; then :
8980
8981 #
8982 # Not a problem.
8983 #
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985 $as_echo "no" >&6; }
8986
8987 else
8988
8989 #
8990 # A problem.
8991 #
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8993 $as_echo "yes" >&6; }
8994 can_add_to_cflags=no
8995
8996 fi
8997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998 fi
8999 CFLAGS="$save_CFLAGS"
9000 if test x"$can_add_to_cflags" = "xyes"
9001 then
9002 V_CCOPT="$V_CCOPT -Wall"
9003 fi
9004
9005 else
9006
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9008 $as_echo "no" >&6; }
9009 CFLAGS="$save_CFLAGS"
9010
9011 fi
9012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9013
9014
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
9016 $as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
9017 save_CFLAGS="$CFLAGS"
9018 if expr "x-Wcomma" : "x-W.*" >/dev/null
9019 then
9020 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
9021 elif expr "x-Wcomma" : "x-f.*" >/dev/null
9022 then
9023 CFLAGS="$CFLAGS -Werror -Wcomma"
9024 elif expr "x-Wcomma" : "x-m.*" >/dev/null
9025 then
9026 CFLAGS="$CFLAGS -Werror -Wcomma"
9027 else
9028 CFLAGS="$CFLAGS -Wcomma"
9029 fi
9030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031 /* end confdefs.h. */
9032
9033 int
9034 main ()
9035 {
9036 return 0
9037 ;
9038 return 0;
9039 }
9040 _ACEOF
9041 if ac_fn_c_try_compile "$LINENO"; then :
9042
9043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9044 $as_echo "yes" >&6; }
9045 can_add_to_cflags=yes
9046 #
9047 # The compile supports this; do we have some C code for
9048 # which the warning should *not* appear?
9049 # We test the fourth argument because the third argument
9050 # could contain quotes, breaking the test.
9051 #
9052 if test "x" != "x"
9053 then
9054 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
9056 $as_echo_n "checking whether -Wcomma ... " >&6; }
9057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9058 /* end confdefs.h. */
9059
9060 _ACEOF
9061 if ac_fn_c_try_compile "$LINENO"; then :
9062
9063 #
9064 # Not a problem.
9065 #
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067 $as_echo "no" >&6; }
9068
9069 else
9070
9071 #
9072 # A problem.
9073 #
9074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075 $as_echo "yes" >&6; }
9076 can_add_to_cflags=no
9077
9078 fi
9079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9080 fi
9081 CFLAGS="$save_CFLAGS"
9082 if test x"$can_add_to_cflags" = "xyes"
9083 then
9084 V_CCOPT="$V_CCOPT -Wcomma"
9085 fi
9086
9087 else
9088
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090 $as_echo "no" >&6; }
9091 CFLAGS="$save_CFLAGS"
9092
9093 fi
9094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9095
9096
9097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
9098 $as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
9099 save_CFLAGS="$CFLAGS"
9100 if expr "x-Wdocumentation" : "x-W.*" >/dev/null
9101 then
9102 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation"
9103 elif expr "x-Wdocumentation" : "x-f.*" >/dev/null
9104 then
9105 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9106 elif expr "x-Wdocumentation" : "x-m.*" >/dev/null
9107 then
9108 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9109 else
9110 CFLAGS="$CFLAGS -Wdocumentation"
9111 fi
9112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113 /* end confdefs.h. */
9114
9115 int
9116 main ()
9117 {
9118 return 0
9119 ;
9120 return 0;
9121 }
9122 _ACEOF
9123 if ac_fn_c_try_compile "$LINENO"; then :
9124
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126 $as_echo "yes" >&6; }
9127 can_add_to_cflags=yes
9128 #
9129 # The compile supports this; do we have some C code for
9130 # which the warning should *not* appear?
9131 # We test the fourth argument because the third argument
9132 # could contain quotes, breaking the test.
9133 #
9134 if test "x" != "x"
9135 then
9136 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
9138 $as_echo_n "checking whether -Wdocumentation ... " >&6; }
9139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9140 /* end confdefs.h. */
9141
9142 _ACEOF
9143 if ac_fn_c_try_compile "$LINENO"; then :
9144
9145 #
9146 # Not a problem.
9147 #
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149 $as_echo "no" >&6; }
9150
9151 else
9152
9153 #
9154 # A problem.
9155 #
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9157 $as_echo "yes" >&6; }
9158 can_add_to_cflags=no
9159
9160 fi
9161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162 fi
9163 CFLAGS="$save_CFLAGS"
9164 if test x"$can_add_to_cflags" = "xyes"
9165 then
9166 V_CCOPT="$V_CCOPT -Wdocumentation"
9167 fi
9168
9169 else
9170
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9172 $as_echo "no" >&6; }
9173 CFLAGS="$save_CFLAGS"
9174
9175 fi
9176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9177
9178
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
9180 $as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
9181 save_CFLAGS="$CFLAGS"
9182 if expr "x-Wformat-nonliteral" : "x-W.*" >/dev/null
9183 then
9184 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral"
9185 elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null
9186 then
9187 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9188 elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null
9189 then
9190 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9191 else
9192 CFLAGS="$CFLAGS -Wformat-nonliteral"
9193 fi
9194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9195 /* end confdefs.h. */
9196
9197 int
9198 main ()
9199 {
9200 return 0
9201 ;
9202 return 0;
9203 }
9204 _ACEOF
9205 if ac_fn_c_try_compile "$LINENO"; then :
9206
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9208 $as_echo "yes" >&6; }
9209 can_add_to_cflags=yes
9210 #
9211 # The compile supports this; do we have some C code for
9212 # which the warning should *not* appear?
9213 # We test the fourth argument because the third argument
9214 # could contain quotes, breaking the test.
9215 #
9216 if test "x" != "x"
9217 then
9218 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
9220 $as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
9221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9222 /* end confdefs.h. */
9223
9224 _ACEOF
9225 if ac_fn_c_try_compile "$LINENO"; then :
9226
9227 #
9228 # Not a problem.
9229 #
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231 $as_echo "no" >&6; }
9232
9233 else
9234
9235 #
9236 # A problem.
9237 #
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9239 $as_echo "yes" >&6; }
9240 can_add_to_cflags=no
9241
9242 fi
9243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9244 fi
9245 CFLAGS="$save_CFLAGS"
9246 if test x"$can_add_to_cflags" = "xyes"
9247 then
9248 V_CCOPT="$V_CCOPT -Wformat-nonliteral"
9249 fi
9250
9251 else
9252
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9254 $as_echo "no" >&6; }
9255 CFLAGS="$save_CFLAGS"
9256
9257 fi
9258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9259
9260
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
9262 $as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
9263 save_CFLAGS="$CFLAGS"
9264 if expr "x-Wmissing-noreturn" : "x-W.*" >/dev/null
9265 then
9266 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn"
9267 elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null
9268 then
9269 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9270 elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null
9271 then
9272 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9273 else
9274 CFLAGS="$CFLAGS -Wmissing-noreturn"
9275 fi
9276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9277 /* end confdefs.h. */
9278
9279 int
9280 main ()
9281 {
9282 return 0
9283 ;
9284 return 0;
9285 }
9286 _ACEOF
9287 if ac_fn_c_try_compile "$LINENO"; then :
9288
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9290 $as_echo "yes" >&6; }
9291 can_add_to_cflags=yes
9292 #
9293 # The compile supports this; do we have some C code for
9294 # which the warning should *not* appear?
9295 # We test the fourth argument because the third argument
9296 # could contain quotes, breaking the test.
9297 #
9298 if test "x" != "x"
9299 then
9300 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
9302 $as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
9303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9304 /* end confdefs.h. */
9305
9306 _ACEOF
9307 if ac_fn_c_try_compile "$LINENO"; then :
9308
9309 #
9310 # Not a problem.
9311 #
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313 $as_echo "no" >&6; }
9314
9315 else
9316
9317 #
9318 # A problem.
9319 #
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9321 $as_echo "yes" >&6; }
9322 can_add_to_cflags=no
9323
9324 fi
9325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9326 fi
9327 CFLAGS="$save_CFLAGS"
9328 if test x"$can_add_to_cflags" = "xyes"
9329 then
9330 V_CCOPT="$V_CCOPT -Wmissing-noreturn"
9331 fi
9332
9333 else
9334
9335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336 $as_echo "no" >&6; }
9337 CFLAGS="$save_CFLAGS"
9338
9339 fi
9340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9341
9342
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
9344 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
9345 save_CFLAGS="$CFLAGS"
9346 if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
9347 then
9348 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
9349 elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
9350 then
9351 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9352 elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
9353 then
9354 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9355 else
9356 CFLAGS="$CFLAGS -Wmissing-prototypes"
9357 fi
9358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9359 /* end confdefs.h. */
9360
9361 int
9362 main ()
9363 {
9364 return 0
9365 ;
9366 return 0;
9367 }
9368 _ACEOF
9369 if ac_fn_c_try_compile "$LINENO"; then :
9370
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9372 $as_echo "yes" >&6; }
9373 can_add_to_cflags=yes
9374 #
9375 # The compile supports this; do we have some C code for
9376 # which the warning should *not* appear?
9377 # We test the fourth argument because the third argument
9378 # could contain quotes, breaking the test.
9379 #
9380 if test "x" != "x"
9381 then
9382 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
9384 $as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
9385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9386 /* end confdefs.h. */
9387
9388 _ACEOF
9389 if ac_fn_c_try_compile "$LINENO"; then :
9390
9391 #
9392 # Not a problem.
9393 #
9394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9395 $as_echo "no" >&6; }
9396
9397 else
9398
9399 #
9400 # A problem.
9401 #
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9403 $as_echo "yes" >&6; }
9404 can_add_to_cflags=no
9405
9406 fi
9407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9408 fi
9409 CFLAGS="$save_CFLAGS"
9410 if test x"$can_add_to_cflags" = "xyes"
9411 then
9412 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
9413 fi
9414
9415 else
9416
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418 $as_echo "no" >&6; }
9419 CFLAGS="$save_CFLAGS"
9420
9421 fi
9422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9423
9424
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
9426 $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
9427 save_CFLAGS="$CFLAGS"
9428 if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
9429 then
9430 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
9431 elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
9432 then
9433 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9434 elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
9435 then
9436 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9437 else
9438 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
9439 fi
9440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9441 /* end confdefs.h. */
9442
9443 int
9444 main ()
9445 {
9446 return 0
9447 ;
9448 return 0;
9449 }
9450 _ACEOF
9451 if ac_fn_c_try_compile "$LINENO"; then :
9452
9453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9454 $as_echo "yes" >&6; }
9455 can_add_to_cflags=yes
9456 #
9457 # The compile supports this; do we have some C code for
9458 # which the warning should *not* appear?
9459 # We test the fourth argument because the third argument
9460 # could contain quotes, breaking the test.
9461 #
9462 if test "x" != "x"
9463 then
9464 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
9466 $as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
9467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9468 /* end confdefs.h. */
9469
9470 _ACEOF
9471 if ac_fn_c_try_compile "$LINENO"; then :
9472
9473 #
9474 # Not a problem.
9475 #
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477 $as_echo "no" >&6; }
9478
9479 else
9480
9481 #
9482 # A problem.
9483 #
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9485 $as_echo "yes" >&6; }
9486 can_add_to_cflags=no
9487
9488 fi
9489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9490 fi
9491 CFLAGS="$save_CFLAGS"
9492 if test x"$can_add_to_cflags" = "xyes"
9493 then
9494 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
9495 fi
9496
9497 else
9498
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9500 $as_echo "no" >&6; }
9501 CFLAGS="$save_CFLAGS"
9502
9503 fi
9504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9505
9506
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
9508 $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
9509 save_CFLAGS="$CFLAGS"
9510 if expr "x-Wshadow" : "x-W.*" >/dev/null
9511 then
9512 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
9513 elif expr "x-Wshadow" : "x-f.*" >/dev/null
9514 then
9515 CFLAGS="$CFLAGS -Werror -Wshadow"
9516 elif expr "x-Wshadow" : "x-m.*" >/dev/null
9517 then
9518 CFLAGS="$CFLAGS -Werror -Wshadow"
9519 else
9520 CFLAGS="$CFLAGS -Wshadow"
9521 fi
9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9523 /* end confdefs.h. */
9524
9525 int
9526 main ()
9527 {
9528 return 0
9529 ;
9530 return 0;
9531 }
9532 _ACEOF
9533 if ac_fn_c_try_compile "$LINENO"; then :
9534
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9536 $as_echo "yes" >&6; }
9537 can_add_to_cflags=yes
9538 #
9539 # The compile supports this; do we have some C code for
9540 # which the warning should *not* appear?
9541 # We test the fourth argument because the third argument
9542 # could contain quotes, breaking the test.
9543 #
9544 if test "x" != "x"
9545 then
9546 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
9548 $as_echo_n "checking whether -Wshadow ... " >&6; }
9549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9550 /* end confdefs.h. */
9551
9552 _ACEOF
9553 if ac_fn_c_try_compile "$LINENO"; then :
9554
9555 #
9556 # Not a problem.
9557 #
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9559 $as_echo "no" >&6; }
9560
9561 else
9562
9563 #
9564 # A problem.
9565 #
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9567 $as_echo "yes" >&6; }
9568 can_add_to_cflags=no
9569
9570 fi
9571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9572 fi
9573 CFLAGS="$save_CFLAGS"
9574 if test x"$can_add_to_cflags" = "xyes"
9575 then
9576 V_CCOPT="$V_CCOPT -Wshadow"
9577 fi
9578
9579 else
9580
9581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9582 $as_echo "no" >&6; }
9583 CFLAGS="$save_CFLAGS"
9584
9585 fi
9586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9587
9588
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
9590 $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
9591 save_CFLAGS="$CFLAGS"
9592 if expr "x-Wsign-compare" : "x-W.*" >/dev/null
9593 then
9594 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
9595 elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
9596 then
9597 CFLAGS="$CFLAGS -Werror -Wsign-compare"
9598 elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
9599 then
9600 CFLAGS="$CFLAGS -Werror -Wsign-compare"
9601 else
9602 CFLAGS="$CFLAGS -Wsign-compare"
9603 fi
9604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9605 /* end confdefs.h. */
9606
9607 int
9608 main ()
9609 {
9610 return 0
9611 ;
9612 return 0;
9613 }
9614 _ACEOF
9615 if ac_fn_c_try_compile "$LINENO"; then :
9616
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9618 $as_echo "yes" >&6; }
9619 can_add_to_cflags=yes
9620 #
9621 # The compile supports this; do we have some C code for
9622 # which the warning should *not* appear?
9623 # We test the fourth argument because the third argument
9624 # could contain quotes, breaking the test.
9625 #
9626 if test "x" != "x"
9627 then
9628 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
9630 $as_echo_n "checking whether -Wsign-compare ... " >&6; }
9631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9632 /* end confdefs.h. */
9633
9634 _ACEOF
9635 if ac_fn_c_try_compile "$LINENO"; then :
9636
9637 #
9638 # Not a problem.
9639 #
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641 $as_echo "no" >&6; }
9642
9643 else
9644
9645 #
9646 # A problem.
9647 #
9648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9649 $as_echo "yes" >&6; }
9650 can_add_to_cflags=no
9651
9652 fi
9653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9654 fi
9655 CFLAGS="$save_CFLAGS"
9656 if test x"$can_add_to_cflags" = "xyes"
9657 then
9658 V_CCOPT="$V_CCOPT -Wsign-compare"
9659 fi
9660
9661 else
9662
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664 $as_echo "no" >&6; }
9665 CFLAGS="$save_CFLAGS"
9666
9667 fi
9668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9669
9670
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
9672 $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
9673 save_CFLAGS="$CFLAGS"
9674 if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
9675 then
9676 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
9677 elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
9678 then
9679 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
9680 elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
9681 then
9682 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
9683 else
9684 CFLAGS="$CFLAGS -Wstrict-prototypes"
9685 fi
9686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9687 /* end confdefs.h. */
9688
9689 int
9690 main ()
9691 {
9692 return 0
9693 ;
9694 return 0;
9695 }
9696 _ACEOF
9697 if ac_fn_c_try_compile "$LINENO"; then :
9698
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9700 $as_echo "yes" >&6; }
9701 can_add_to_cflags=yes
9702 #
9703 # The compile supports this; do we have some C code for
9704 # which the warning should *not* appear?
9705 # We test the fourth argument because the third argument
9706 # could contain quotes, breaking the test.
9707 #
9708 if test "x" != "x"
9709 then
9710 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
9712 $as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
9713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714 /* end confdefs.h. */
9715
9716 _ACEOF
9717 if ac_fn_c_try_compile "$LINENO"; then :
9718
9719 #
9720 # Not a problem.
9721 #
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9723 $as_echo "no" >&6; }
9724
9725 else
9726
9727 #
9728 # A problem.
9729 #
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9731 $as_echo "yes" >&6; }
9732 can_add_to_cflags=no
9733
9734 fi
9735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9736 fi
9737 CFLAGS="$save_CFLAGS"
9738 if test x"$can_add_to_cflags" = "xyes"
9739 then
9740 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
9741 fi
9742
9743 else
9744
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746 $as_echo "no" >&6; }
9747 CFLAGS="$save_CFLAGS"
9748
9749 fi
9750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9751
9752
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
9754 $as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
9755 save_CFLAGS="$CFLAGS"
9756 if expr "x-Wunused-parameter" : "x-W.*" >/dev/null
9757 then
9758 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter"
9759 elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null
9760 then
9761 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
9762 elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null
9763 then
9764 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
9765 else
9766 CFLAGS="$CFLAGS -Wunused-parameter"
9767 fi
9768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9769 /* end confdefs.h. */
9770
9771 int
9772 main ()
9773 {
9774 return 0
9775 ;
9776 return 0;
9777 }
9778 _ACEOF
9779 if ac_fn_c_try_compile "$LINENO"; then :
9780
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9782 $as_echo "yes" >&6; }
9783 can_add_to_cflags=yes
9784 #
9785 # The compile supports this; do we have some C code for
9786 # which the warning should *not* appear?
9787 # We test the fourth argument because the third argument
9788 # could contain quotes, breaking the test.
9789 #
9790 if test "x" != "x"
9791 then
9792 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
9794 $as_echo_n "checking whether -Wunused-parameter ... " >&6; }
9795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9796 /* end confdefs.h. */
9797
9798 _ACEOF
9799 if ac_fn_c_try_compile "$LINENO"; then :
9800
9801 #
9802 # Not a problem.
9803 #
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805 $as_echo "no" >&6; }
9806
9807 else
9808
9809 #
9810 # A problem.
9811 #
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813 $as_echo "yes" >&6; }
9814 can_add_to_cflags=no
9815
9816 fi
9817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9818 fi
9819 CFLAGS="$save_CFLAGS"
9820 if test x"$can_add_to_cflags" = "xyes"
9821 then
9822 V_CCOPT="$V_CCOPT -Wunused-parameter"
9823 fi
9824
9825 else
9826
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828 $as_echo "no" >&6; }
9829 CFLAGS="$save_CFLAGS"
9830
9831 fi
9832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9833
9834
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
9836 $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
9837 save_CFLAGS="$CFLAGS"
9838 if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
9839 then
9840 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
9841 elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
9842 then
9843 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
9844 elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
9845 then
9846 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
9847 else
9848 CFLAGS="$CFLAGS -Wused-but-marked-unused"
9849 fi
9850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9851 /* end confdefs.h. */
9852
9853 int
9854 main ()
9855 {
9856 return 0
9857 ;
9858 return 0;
9859 }
9860 _ACEOF
9861 if ac_fn_c_try_compile "$LINENO"; then :
9862
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9864 $as_echo "yes" >&6; }
9865 can_add_to_cflags=yes
9866 #
9867 # The compile supports this; do we have some C code for
9868 # which the warning should *not* appear?
9869 # We test the fourth argument because the third argument
9870 # could contain quotes, breaking the test.
9871 #
9872 if test "x" != "x"
9873 then
9874 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
9876 $as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
9877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9878 /* end confdefs.h. */
9879
9880 _ACEOF
9881 if ac_fn_c_try_compile "$LINENO"; then :
9882
9883 #
9884 # Not a problem.
9885 #
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887 $as_echo "no" >&6; }
9888
9889 else
9890
9891 #
9892 # A problem.
9893 #
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9895 $as_echo "yes" >&6; }
9896 can_add_to_cflags=no
9897
9898 fi
9899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9900 fi
9901 CFLAGS="$save_CFLAGS"
9902 if test x"$can_add_to_cflags" = "xyes"
9903 then
9904 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
9905 fi
9906
9907 else
9908
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9910 $as_echo "no" >&6; }
9911 CFLAGS="$save_CFLAGS"
9912
9913 fi
9914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9915
9916 # Warns about safeguards added in case the enums are
9917 # extended
9918 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
9919 #
9920 # This can cause problems with ntohs(), ntohl(),
9921 # htons(), and htonl() on some platforms, such
9922 # as OpenBSD 6.3 with Clang 5.0.1. I guess the
9923 # problem is that the macro that ultimately does
9924 # the byte-swapping involves a conditional
9925 # expression that tests whether the value being
9926 # swapped is a compile-time constant or not,
9927 # using __builtin_constant_p(), and, depending
9928 # on whether it is, does a compile-time swap or
9929 # a run-time swap; perhaps the compiler always
9930 # considers one of the two results of the
9931 # conditional expressin is never evaluated,
9932 # because the conditional check is done at
9933 # compile time, and thus always says "that
9934 # expression is never executed".
9935 #
9936 # (Perhaps there should be a way of flagging
9937 # an expression that you *want* evaluated at
9938 # compile time, so that the compiler 1) warns
9939 # if it *can't* be evaluated at compile time
9940 # and 2) *doesn't* warn that the true or false
9941 # branch will never be reached.)
9942 #
9943
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
9945 $as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
9946 save_CFLAGS="$CFLAGS"
9947 if expr "x-Wunreachable-code" : "x-W.*" >/dev/null
9948 then
9949 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code"
9950 elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null
9951 then
9952 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
9953 elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null
9954 then
9955 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
9956 else
9957 CFLAGS="$CFLAGS -Wunreachable-code"
9958 fi
9959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9960 /* end confdefs.h. */
9961
9962 int
9963 main ()
9964 {
9965 return 0
9966 ;
9967 return 0;
9968 }
9969 _ACEOF
9970 if ac_fn_c_try_compile "$LINENO"; then :
9971
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9973 $as_echo "yes" >&6; }
9974 can_add_to_cflags=yes
9975 #
9976 # The compile supports this; do we have some C code for
9977 # which the warning should *not* appear?
9978 # We test the fourth argument because the third argument
9979 # could contain quotes, breaking the test.
9980 #
9981 if test "xgenerates warnings from ntohs()" != "x"
9982 then
9983 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
9985 $as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
9986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9987 /* end confdefs.h. */
9988 #include <arpa/inet.h>
9989
9990 unsigned short
9991 testme(unsigned short a)
9992 {
9993 return ntohs(a);
9994 }
9995
9996 _ACEOF
9997 if ac_fn_c_try_compile "$LINENO"; then :
9998
9999 #
10000 # Not a problem.
10001 #
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003 $as_echo "no" >&6; }
10004
10005 else
10006
10007 #
10008 # A problem.
10009 #
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10011 $as_echo "yes" >&6; }
10012 can_add_to_cflags=no
10013
10014 fi
10015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10016 fi
10017 CFLAGS="$save_CFLAGS"
10018 if test x"$can_add_to_cflags" = "xyes"
10019 then
10020 V_CCOPT="$V_CCOPT -Wunreachable-code"
10021 fi
10022
10023 else
10024
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10026 $as_echo "no" >&6; }
10027 CFLAGS="$save_CFLAGS"
10028
10029 fi
10030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10031
10032
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
10034 $as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
10035 save_CFLAGS="$CFLAGS"
10036 if expr "x-Wshorten-64-to-32" : "x-W.*" >/dev/null
10037 then
10038 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshorten-64-to-32"
10039 elif expr "x-Wshorten-64-to-32" : "x-f.*" >/dev/null
10040 then
10041 CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10042 elif expr "x-Wshorten-64-to-32" : "x-m.*" >/dev/null
10043 then
10044 CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10045 else
10046 CFLAGS="$CFLAGS -Wshorten-64-to-32"
10047 fi
10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049 /* end confdefs.h. */
10050
10051 int
10052 main ()
10053 {
10054 return 0
10055 ;
10056 return 0;
10057 }
10058 _ACEOF
10059 if ac_fn_c_try_compile "$LINENO"; then :
10060
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10062 $as_echo "yes" >&6; }
10063 can_add_to_cflags=yes
10064 #
10065 # The compile supports this; do we have some C code for
10066 # which the warning should *not* appear?
10067 # We test the fourth argument because the third argument
10068 # could contain quotes, breaking the test.
10069 #
10070 if test "x" != "x"
10071 then
10072 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
10074 $as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
10075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10076 /* end confdefs.h. */
10077
10078 _ACEOF
10079 if ac_fn_c_try_compile "$LINENO"; then :
10080
10081 #
10082 # Not a problem.
10083 #
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085 $as_echo "no" >&6; }
10086
10087 else
10088
10089 #
10090 # A problem.
10091 #
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10093 $as_echo "yes" >&6; }
10094 can_add_to_cflags=no
10095
10096 fi
10097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10098 fi
10099 CFLAGS="$save_CFLAGS"
10100 if test x"$can_add_to_cflags" = "xyes"
10101 then
10102 V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
10103 fi
10104
10105 else
10106
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108 $as_echo "no" >&6; }
10109 CFLAGS="$save_CFLAGS"
10110
10111 fi
10112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10113
10114 fi
10115
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
10117 $as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
10118 if test "$GCC" = yes ; then
10119 #
10120 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
10121 # though it's not); we assume that, in this case, the flag
10122 # would be -M.
10123 #
10124 ac_lbl_dependency_flag="-M"
10125 else
10126 #
10127 # Not GCC or a compiler deemed to be GCC; what platform is
10128 # this? (We're assuming that if the compiler isn't GCC
10129 # it's the compiler from the vendor of the OS; that won't
10130 # necessarily be true for x86 platforms, where it might be
10131 # the Intel C compiler.)
10132 #
10133 case "$host_os" in
10134
10135 irix*|osf*|darwin*)
10136 #
10137 # MIPS C for IRIX, DEC C, and clang all use -M.
10138 #
10139 ac_lbl_dependency_flag="-M"
10140 ;;
10141
10142 solaris*)
10143 #
10144 # Sun C uses -xM.
10145 #
10146 ac_lbl_dependency_flag="-xM"
10147 ;;
10148
10149 hpux*)
10150 #
10151 # HP's older C compilers don't support this.
10152 # HP's newer C compilers support this with
10153 # either +M or +Make; the older compilers
10154 # interpret +M as something completely
10155 # different, so we use +Make so we don't
10156 # think it works with the older compilers.
10157 #
10158 ac_lbl_dependency_flag="+Make"
10159 ;;
10160
10161 *)
10162 #
10163 # Not one of the above; assume no support for
10164 # generating dependencies.
10165 #
10166 ac_lbl_dependency_flag=""
10167 ;;
10168 esac
10169 fi
10170
10171 #
10172 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
10173 # complain about it?
10174 #
10175 # Note: clang doesn't seem to exit with an error status when handed
10176 # an unknown non-warning error, even if you pass it
10177 # -Werror=unknown-warning-option. However, it always supports
10178 # -M, so the fact that this test always succeeds with clang
10179 # isn't an issue.
10180 #
10181 if test ! -z "$ac_lbl_dependency_flag"; then
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183 /* end confdefs.h. */
10184 int main(void) { return 0; }
10185 _ACEOF
10186 if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
10187 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
10188 ac_status=$?
10189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10190 test $ac_status = 0; }; then
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
10192 $as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
10193 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
10194 MKDEP='${srcdir}/mkdep'
10195 else
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197 $as_echo "no" >&6; }
10198 #
10199 # We can't run mkdep, so have "make depend" do
10200 # nothing.
10201 #
10202 MKDEP='${srcdir}/nomkdep'
10203 fi
10204 rm -rf conftest*
10205 else
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10207 $as_echo "no" >&6; }
10208 #
10209 # We can't run mkdep, so have "make depend" do
10210 # nothing.
10211 #
10212 MKDEP='${srcdir}/nomkdep'
10213 fi
10214
10215
10216
10217 #
10218 # We used to set -n32 for IRIX 6 when not using GCC (presumed
10219 # to mean that we're using MIPS C or MIPSpro C); it specified
10220 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
10221 # not sure why that would be something to do *only* with a
10222 # .devel file; why should the ABI for which we produce code
10223 # depend on .devel?
10224 #
10225 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
10226 name="lbl/os-$os.h"
10227 if test -f $name ; then
10228 ln -s $name os-proto.h
10229
10230 $as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
10231
10232 else
10233 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
10234 $as_echo "$as_me: WARNING: can't find $name" >&2;}
10235 fi
10236 fi
10237
10238 #
10239 # Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
10240 #
10241 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
10242 #include <sys/types.h>
10243 #include <sys/socket.h>
10244
10245 "
10246 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10247
10248 cat >>confdefs.h <<_ACEOF
10249 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10250 _ACEOF
10251
10252
10253 fi
10254
10255
10256 #
10257 # Check to see if there's a sockaddr_storage structure.
10258 #
10259 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10260 #include <sys/types.h>
10261 #include <sys/socket.h>
10262
10263 "
10264 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10265
10266 cat >>confdefs.h <<_ACEOF
10267 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10268 _ACEOF
10269
10270
10271 fi
10272
10273
10274 #
10275 # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
10276 # dl_module_id_1 member.
10277 #
10278 # NOTE: any failure means we conclude that it doesn't have that member,
10279 # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
10280 # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
10281 # it doesn't have that member (which is OK, as either we won't be
10282 # using code that would use that member, or we wouldn't compile in
10283 # any case).
10284 #
10285 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" "
10286 #include <sys/types.h>
10287 #include <sys/dlpi.h>
10288 #include <sys/dlpi_ext.h>
10289
10290 "
10291 if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
10292
10293 cat >>confdefs.h <<_ACEOF
10294 #define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
10295 _ACEOF
10296
10297
10298 fi
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332 # Check whether --enable-usb was given.
10333 if test "${enable_usb+set}" = set; then :
10334 enableval=$enable_usb;
10335 else
10336 enable_usb=yes
10337 fi
10338
10339
10340 if test "xxx_only" = yes; then
10341 # User requested something-else-only pcap, so they don't
10342 # want USB support.
10343 enable_usb=no
10344 fi
10345
10346 if test "x$enable_usb" != "xno" ; then
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB sniffing support" >&5
10348 $as_echo_n "checking for USB sniffing support... " >&6; }
10349 case "$host_os" in
10350 linux*)
10351
10352 $as_echo "#define PCAP_SUPPORT_USB 1" >>confdefs.h
10353
10354 MSRC="$MSRC pcap-usb-linux.c"
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10356 $as_echo "yes" >&6; }
10357 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
10358 if test $? -ne 0 ; then
10359 ac_usb_dev_name="usbmon"
10360 fi
10361
10362 cat >>confdefs.h <<_ACEOF
10363 #define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
10364 _ACEOF
10365
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
10367 $as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
10368 #
10369 # Do we have a version of <linux/compiler.h> available?
10370 # If so, we might need it for <linux/usbdevice_fs.h>.
10371 #
10372 for ac_header in linux/compiler.h
10373 do :
10374 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
10375 if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
10376 cat >>confdefs.h <<_ACEOF
10377 #define HAVE_LINUX_COMPILER_H 1
10378 _ACEOF
10379
10380 fi
10381
10382 done
10383
10384 if test "$ac_cv_header_linux_compiler_h" = yes; then
10385 #
10386 # Yes - include it when testing for <linux/usbdevice_fs.h>.
10387 #
10388 for ac_header in linux/usbdevice_fs.h
10389 do :
10390 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
10391 "
10392 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
10393 cat >>confdefs.h <<_ACEOF
10394 #define HAVE_LINUX_USBDEVICE_FS_H 1
10395 _ACEOF
10396
10397 fi
10398
10399 done
10400
10401 else
10402 for ac_header in linux/usbdevice_fs.h
10403 do :
10404 ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
10405 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
10406 cat >>confdefs.h <<_ACEOF
10407 #define HAVE_LINUX_USBDEVICE_FS_H 1
10408 _ACEOF
10409
10410 fi
10411
10412 done
10413
10414 fi
10415 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
10416 #
10417 # OK, does it define bRequestType? Older versions of the kernel
10418 # define fields with names like "requesttype, "request", and
10419 # "value", rather than "bRequestType", "bRequest", and
10420 # "wValue".
10421 #
10422 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
10423 $ac_includes_default
10424 #ifdef HAVE_LINUX_COMPILER_H
10425 #include <linux/compiler.h>
10426 #endif
10427 #include <linux/usbdevice_fs.h>
10428
10429 "
10430 if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
10431
10432 cat >>confdefs.h <<_ACEOF
10433 #define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
10434 _ACEOF
10435
10436
10437 fi
10438
10439 fi
10440 ;;
10441 freebsd*)
10442 #
10443 # This just uses BPF in FreeBSD 8.4 and later; we don't need
10444 # to check for anything special for capturing.
10445 #
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in FreeBSD 8.4 and later" >&5
10447 $as_echo "yes, in FreeBSD 8.4 and later" >&6; }
10448 ;;
10449
10450 *)
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452 $as_echo "no" >&6; }
10453 ;;
10454 esac
10455 fi
10456
10457
10458 if test "xxx_only" != yes; then
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the platform could support netfilter sniffing" >&5
10460 $as_echo_n "checking whether the platform could support netfilter sniffing... " >&6; }
10461 case "$host_os" in
10462 linux*)
10463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10464 $as_echo "yes" >&6; }
10465 #
10466 # Life's too short to deal with trying to get this to compile
10467 # if you don't get the right types defined with
10468 # __KERNEL_STRICT_NAMES getting defined by some other include.
10469 #
10470 # Check whether the includes Just Work. If not, don't turn on
10471 # netfilter support.
10472 #
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
10474 $as_echo_n "checking whether we can compile the netfilter support... " >&6; }
10475 if ${ac_cv_netfilter_can_compile+:} false; then :
10476 $as_echo_n "(cached) " >&6
10477 else
10478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10479 /* end confdefs.h. */
10480
10481 $ac_includes_default
10482 #include <sys/socket.h>
10483 #include <netinet/in.h>
10484 #include <linux/types.h>
10485
10486 #include <linux/netlink.h>
10487 #include <linux/netfilter.h>
10488 #include <linux/netfilter/nfnetlink.h>
10489 #include <linux/netfilter/nfnetlink_log.h>
10490 #include <linux/netfilter/nfnetlink_queue.h>
10491 int
10492 main ()
10493 {
10494
10495 ;
10496 return 0;
10497 }
10498 _ACEOF
10499 if ac_fn_c_try_compile "$LINENO"; then :
10500 ac_cv_netfilter_can_compile=yes
10501 else
10502 ac_cv_netfilter_can_compile=no
10503 fi
10504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10505 fi
10506
10507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
10508 $as_echo "$ac_cv_netfilter_can_compile" >&6; }
10509 if test $ac_cv_netfilter_can_compile = yes ; then
10510
10511 $as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
10512
10513 MSRC="$MSRC pcap-netfilter-linux.c"
10514 fi
10515 ;;
10516 *)
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518 $as_echo "no" >&6; }
10519 ;;
10520 esac
10521 fi
10522
10523
10524 # Check whether --enable-netmap was given.
10525 if test "${enable_netmap+set}" = set; then :
10526 enableval=$enable_netmap;
10527 else
10528 enable_netmap=yes
10529 fi
10530
10531
10532 if test "x$enable_netmap" != "xno" ; then
10533 #
10534 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
10535 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
10536 # is defined, for example, as it includes a non-existent malloc.h
10537 # header.
10538 #
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
10540 $as_echo_n "checking whether we can compile the netmap support... " >&6; }
10541 if ${ac_cv_net_netmap_user_can_compile+:} false; then :
10542 $as_echo_n "(cached) " >&6
10543 else
10544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10545 /* end confdefs.h. */
10546
10547 $ac_includes_default
10548 #define NETMAP_WITH_LIBS
10549 #include <net/netmap_user.h>
10550 int
10551 main ()
10552 {
10553
10554 ;
10555 return 0;
10556 }
10557 _ACEOF
10558 if ac_fn_c_try_compile "$LINENO"; then :
10559 ac_cv_net_netmap_user_can_compile=yes
10560 else
10561 ac_cv_net_netmap_user_can_compile=no
10562 fi
10563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10564 fi
10565
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
10567 $as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
10568 if test $ac_cv_net_netmap_user_can_compile = yes ; then
10569
10570 $as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
10571
10572 MSRC="$MSRC pcap-netmap.c"
10573 fi
10574
10575 fi
10576
10577 # Check for DPDK support.
10578
10579 # Check whether --with-dpdk was given.
10580 if test "${with_dpdk+set}" = set; then :
10581 withval=$with_dpdk;
10582 if test "$withval" = no
10583 then
10584 # User doesn't want DPDK support.
10585 want_dpdk=no
10586 elif test "$withval" = yes
10587 then
10588 # User wants DPDK support but hasn't specified a directory.
10589 want_dpdk=yes
10590 else
10591 # User wants DPDK support and has specified a directory, so use the provided value.
10592 want_dpdk=yes
10593 dpdk_dir=$withval
10594 dpdk_inc_dir="$dpdk_dir/include"
10595 dpdk_lib_dir="$dpdk_dir/lib"
10596 fi
10597
10598 else
10599
10600 if test "$V_PCAP" = dpdk; then
10601 # User requested DPDK-only libpcap, so we'd better have
10602 # the DPDK API.
10603 want_dpdk=yes
10604 elif test "xxx_only" = yes; then
10605 # User requested something-else-only pcap, so they don't
10606 # want DPDK support.
10607 want_dpdk=no
10608 else
10609 #
10610 # Use DPDK API if present, otherwise don't
10611 #
10612 want_dpdk=ifpresent
10613 fi
10614
10615 fi
10616
10617
10618 if test "$want_dpdk" != no; then
10619 if test -z "$dpdk_dir"; then
10620 dpdk_inc_dir="/usr/local/include/dpdk"
10621 dpdk_lib_dir="/usr/local/lib"
10622 fi
10623 DPDK_MACHINE_CFLAGS="-march=native"
10624 DPDK_CFLAGS="$DPDK_MACHINE_CFLAGS -I$dpdk_inc_dir"
10625 DPDK_LDFLAGS="-L$dpdk_lib_dir -ldpdk -lrt -lm -lnuma -ldl -pthread"
10626
10627 save_CFLAGS="$CFLAGS"
10628 save_LIBS="$LIBS"
10629 save_LDFLAGS="$LDFLAGS"
10630 CFLAGS="$CFLAGS $DPDK_CFLAGS"
10631 LIBS="$LIBS $DPDK_LDFLAGS"
10632 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
10633
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the DPDK support" >&5
10635 $as_echo_n "checking whether we can compile the DPDK support... " >&6; }
10636 if ${ac_cv_dpdk_can_compile+:} false; then :
10637 $as_echo_n "(cached) " >&6
10638 else
10639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10640 /* end confdefs.h. */
10641
10642 $ac_includes_default
10643 #include <rte_common.h>
10644 int
10645 main ()
10646 {
10647
10648 ;
10649 return 0;
10650 }
10651 _ACEOF
10652 if ac_fn_c_try_compile "$LINENO"; then :
10653 ac_cv_dpdk_can_compile=yes
10654 else
10655 ac_cv_dpdk_can_compile=no
10656 fi
10657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10658 fi
10659
10660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dpdk_can_compile" >&5
10661 $as_echo "$ac_cv_dpdk_can_compile" >&6; }
10662
10663 CFLAGS="$save_CFLAGS"
10664 LIBS="$save_LIBS"
10665 LDFLAGS="$save_LDFLAGS"
10666
10667 if test "$ac_cv_dpdk_can_compile" = yes; then
10668 CFLAGS="$CFLAGS $DPDK_CFLAGS"
10669 LIBS="$LIBS $DPDK_LDFLAGS"
10670 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
10671 V_INCLS="$V_INCLS $DPDK_CFLAGS"
10672
10673 $as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
10674
10675 if test $V_PCAP != dpdk ; then
10676 MSRC="$MSRC pcap-dpdk.c"
10677 fi
10678 else
10679 if test "$V_PCAP" = dpdk; then
10680 # User requested "dpdk" capture type but we couldn't
10681 # find the DPDK API support.
10682 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
10683 fi
10684
10685 if test "$want_dpdk" = yes; then
10686 # User wanted DPDK support but we couldn't find it.
10687 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
10688 fi
10689 fi
10690 fi
10691
10692
10693 # Check whether --enable-bluetooth was given.
10694 if test "${enable_bluetooth+set}" = set; then :
10695 enableval=$enable_bluetooth;
10696 else
10697 enable_bluetooth=ifsupportavailable
10698 fi
10699
10700
10701 if test "xxx_only" = yes; then
10702 # User requested something-else-only pcap, so they don't
10703 # want Bluetooth support.
10704 enable_bluetooth=no
10705 fi
10706
10707 if test "x$enable_bluetooth" != "xno" ; then
10708 case "$host_os" in
10709 linux*)
10710 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
10711 if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
10712
10713 #
10714 # We have bluetooth.h, so we support Bluetooth
10715 # sniffing.
10716 #
10717
10718 $as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
10719
10720 MSRC="$MSRC pcap-bt-linux.c"
10721 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
10722 $as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
10723 ac_lbl_bluetooth_available=yes
10724
10725 #
10726 # OK, does struct sockaddr_hci have an hci_channel
10727 # member?
10728 #
10729 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
10730 #include <bluetooth/bluetooth.h>
10731 #include <bluetooth/hci.h>
10732
10733 "
10734 if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
10735
10736 cat >>confdefs.h <<_ACEOF
10737 #define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
10738 _ACEOF
10739
10740
10741 #
10742 # Yes; is HCI_CHANNEL_MONITOR defined?
10743 #
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
10745 $as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
10746 if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
10747 $as_echo_n "(cached) " >&6
10748 else
10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10750 /* end confdefs.h. */
10751
10752 #include <bluetooth/bluetooth.h>
10753 #include <bluetooth/hci.h>
10754
10755 int
10756 main ()
10757 {
10758
10759 u_int i = HCI_CHANNEL_MONITOR;
10760
10761 ;
10762 return 0;
10763 }
10764 _ACEOF
10765 if ac_fn_c_try_compile "$LINENO"; then :
10766
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10768 $as_echo "yes" >&6; }
10769
10770 $as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
10771
10772 MSRC="$MSRC pcap-bt-monitor-linux.c"
10773
10774 else
10775
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777 $as_echo "no" >&6; }
10778
10779 fi
10780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10781 fi
10782
10783
10784 fi
10785
10786
10787 else
10788
10789 #
10790 # We don't have bluetooth.h, so we don't support
10791 # Bluetooth sniffing.
10792 #
10793 if test "x$enable_bluetooth" = "xyes" ; then
10794 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
10795 else
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
10797 $as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
10798 fi
10799
10800 fi
10801
10802
10803 ;;
10804 *)
10805 if test "x$enable_bluetooth" = "xyes" ; then
10806 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
10807 else
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
10809 $as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
10810 fi
10811 ;;
10812 esac
10813
10814 fi
10815
10816 # Check whether --enable-dbus was given.
10817 if test "${enable_dbus+set}" = set; then :
10818 enableval=$enable_dbus;
10819 else
10820 enable_dbus=ifavailable
10821 fi
10822
10823
10824 if test "xxx_only" = yes; then
10825 # User requested something-else-only pcap, so they don't
10826 # want D-Bus support.
10827 enable_dbus=no
10828 fi
10829
10830 if test "x$enable_dbus" != "xno"; then
10831 if test "x$enable_dbus" = "xyes"; then
10832 case "$host_os" in
10833
10834 darwin*)
10835 #
10836 # We don't support D-Bus sniffing on macOS; see
10837 #
10838 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
10839 #
10840 # The user requested it, so fail.
10841 #
10842 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
10843 esac
10844 else
10845 case "$host_os" in
10846
10847 darwin*)
10848 #
10849 # We don't support D-Bus sniffing on macOS; see
10850 #
10851 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
10852 #
10853 # The user dind't explicitly request it, so just
10854 # silently refuse to enable it.
10855 #
10856 enable_dbus="no"
10857 ;;
10858 esac
10859 fi
10860 fi
10861
10862 if test "x$enable_dbus" != "xno"; then
10863 if test "x$PKGCONFIG" != "xno"; then
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
10865 $as_echo_n "checking for D-Bus... " >&6; }
10866 if "$PKGCONFIG" dbus-1; then
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10868 $as_echo "yes" >&6; }
10869 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
10870 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
10871 save_CFLAGS="$CFLAGS"
10872 save_LIBS="$LIBS"
10873 CFLAGS="$CFLAGS $DBUS_CFLAGS"
10874 LIBS="$LIBS $DBUS_LIBS"
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
10876 $as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
10877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10878 /* end confdefs.h. */
10879 #include <string.h>
10880
10881 #include <time.h>
10882 #include <sys/time.h>
10883
10884 #include <dbus/dbus.h>
10885 int
10886 main ()
10887 {
10888 return dbus_connection_read_write(NULL, 0);
10889 ;
10890 return 0;
10891 }
10892 _ACEOF
10893 if ac_fn_c_try_link "$LINENO"; then :
10894
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10896 $as_echo "yes" >&6; }
10897
10898 $as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
10899
10900 MSRC="$MSRC pcap-dbus.c"
10901 V_INCLS="$V_INCLS $DBUS_CFLAGS"
10902
10903 else
10904
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906 $as_echo "no" >&6; }
10907 if test "x$enable_dbus" = "xyes"; then
10908 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
10909 fi
10910 LIBS="$save_LIBS"
10911
10912 fi
10913 rm -f core conftest.err conftest.$ac_objext \
10914 conftest$ac_exeext conftest.$ac_ext
10915 CFLAGS="$save_CFLAGS"
10916 else
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10918 $as_echo "no" >&6; }
10919 if test "x$enable_dbus" = "xyes"; then
10920 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
10921 fi
10922 fi
10923 fi
10924
10925 fi
10926
10927 # Check whether --enable-rdma was given.
10928 if test "${enable_rdma+set}" = set; then :
10929 enableval=$enable_rdma;
10930 else
10931 enable_rdma=ifavailable
10932 fi
10933
10934
10935 if test "xxx_only" = yes; then
10936 # User requested something-else-only pcap, so they don't
10937 # want RDMA support.
10938 enable_rdma=no
10939 fi
10940
10941 if test "x$enable_rdma" != "xno"; then
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
10943 $as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
10944 if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
10945 $as_echo_n "(cached) " >&6
10946 else
10947 ac_check_lib_save_LIBS=$LIBS
10948 LIBS="-libverbs $LIBS"
10949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10950 /* end confdefs.h. */
10951
10952 /* Override any GCC internal prototype to avoid an error.
10953 Use char because int might match the return type of a GCC
10954 builtin and then its argument prototype would still apply. */
10955 #ifdef __cplusplus
10956 extern "C"
10957 #endif
10958 char ibv_get_device_list ();
10959 int
10960 main ()
10961 {
10962 return ibv_get_device_list ();
10963 ;
10964 return 0;
10965 }
10966 _ACEOF
10967 if ac_fn_c_try_link "$LINENO"; then :
10968 ac_cv_lib_ibverbs_ibv_get_device_list=yes
10969 else
10970 ac_cv_lib_ibverbs_ibv_get_device_list=no
10971 fi
10972 rm -f core conftest.err conftest.$ac_objext \
10973 conftest$ac_exeext conftest.$ac_ext
10974 LIBS=$ac_check_lib_save_LIBS
10975 fi
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
10977 $as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
10978 if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
10979
10980 ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
10981 if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
10982
10983 #
10984 # ibv_create_flow may be defined as a static inline
10985 # function in infiniband/verbs.h, so we can't
10986 # use AC_CHECK_LIB.
10987 #
10988 # Too bad autoconf has no AC_SYMBOL_EXISTS()
10989 # macro that works like CMake's check_symbol_exists()
10990 # function, to check do a compile check like
10991 # this (they do a clever trick to avoid having
10992 # to know the function's signature).
10993 #
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
10995 $as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10997 /* end confdefs.h. */
10998
10999 #include <infiniband/verbs.h>
11000
11001 int
11002 main ()
11003 {
11004
11005 (void) ibv_create_flow((struct ibv_qp *) NULL,
11006 (struct ibv_flow_attr *) NULL);
11007
11008 ;
11009 return 0;
11010 }
11011 _ACEOF
11012 if ac_fn_c_try_link "$LINENO"; then :
11013
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11015 $as_echo "yes" >&6; }
11016
11017 $as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
11018
11019 MSRC="$MSRC pcap-rdmasniff.c"
11020 LIBS="-libverbs $LIBS"
11021
11022 else
11023
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025 $as_echo "no" >&6; }
11026
11027
11028 fi
11029 rm -f core conftest.err conftest.$ac_objext \
11030 conftest$ac_exeext conftest.$ac_ext
11031
11032 fi
11033
11034
11035
11036 fi
11037
11038
11039 fi
11040
11041 # Find a good install program. We prefer a C program (faster),
11042 # so one script is as good as another. But avoid the broken or
11043 # incompatible versions:
11044 # SysV /etc/install, /usr/sbin/install
11045 # SunOS /usr/etc/install
11046 # IRIX /sbin/install
11047 # AIX /bin/install
11048 # AmigaOS /C/install, which installs bootblocks on floppy discs
11049 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
11050 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
11051 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
11052 # OS/2's system install, which has a completely different semantic
11053 # ./install, which can be erroneously created by make from ./install.sh.
11054 # Reject install programs that cannot install multiple files.
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
11056 $as_echo_n "checking for a BSD-compatible install... " >&6; }
11057 if test -z "$INSTALL"; then
11058 if ${ac_cv_path_install+:} false; then :
11059 $as_echo_n "(cached) " >&6
11060 else
11061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11062 for as_dir in $PATH
11063 do
11064 IFS=$as_save_IFS
11065 test -z "$as_dir" && as_dir=.
11066 # Account for people who put trailing slashes in PATH elements.
11067 case $as_dir/ in #((
11068 ./ | .// | /[cC]/* | \
11069 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
11070 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
11071 /usr/ucb/* ) ;;
11072 *)
11073 # OSF1 and SCO ODT 3.0 have their own names for install.
11074 # Don't use installbsd from OSF since it installs stuff as root
11075 # by default.
11076 for ac_prog in ginstall scoinst install; do
11077 for ac_exec_ext in '' $ac_executable_extensions; do
11078 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
11079 if test $ac_prog = install &&
11080 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11081 # AIX install. It has an incompatible calling convention.
11082 :
11083 elif test $ac_prog = install &&
11084 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11085 # program-specific install script used by HP pwplus--don't use.
11086 :
11087 else
11088 rm -rf conftest.one conftest.two conftest.dir
11089 echo one > conftest.one
11090 echo two > conftest.two
11091 mkdir conftest.dir
11092 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
11093 test -s conftest.one && test -s conftest.two &&
11094 test -s conftest.dir/conftest.one &&
11095 test -s conftest.dir/conftest.two
11096 then
11097 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
11098 break 3
11099 fi
11100 fi
11101 fi
11102 done
11103 done
11104 ;;
11105 esac
11106
11107 done
11108 IFS=$as_save_IFS
11109
11110 rm -rf conftest.one conftest.two conftest.dir
11111
11112 fi
11113 if test "${ac_cv_path_install+set}" = set; then
11114 INSTALL=$ac_cv_path_install
11115 else
11116 # As a last resort, use the slow shell script. Don't cache a
11117 # value for INSTALL within a source directory, because that will
11118 # break other packages using the cache if that directory is
11119 # removed, or if the value is a relative name.
11120 INSTALL=$ac_install_sh
11121 fi
11122 fi
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
11124 $as_echo "$INSTALL" >&6; }
11125
11126 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
11127 # It thinks the first close brace ends the variable substitution.
11128 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
11129
11130 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
11131
11132 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
11133
11134
11135 ac_config_headers="$ac_config_headers config.h"
11136
11137
11138 ac_config_commands="$ac_config_commands default-1"
11139
11140 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"
11141
11142 cat >confcache <<\_ACEOF
11143 # This file is a shell script that caches the results of configure
11144 # tests run on this system so they can be shared between configure
11145 # scripts and configure runs, see configure's option --config-cache.
11146 # It is not useful on other systems. If it contains results you don't
11147 # want to keep, you may remove or edit it.
11148 #
11149 # config.status only pays attention to the cache file if you give it
11150 # the --recheck option to rerun configure.
11151 #
11152 # `ac_cv_env_foo' variables (set or unset) will be overridden when
11153 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11154 # following values.
11155
11156 _ACEOF
11157
11158 # The following way of writing the cache mishandles newlines in values,
11159 # but we know of no workaround that is simple, portable, and efficient.
11160 # So, we kill variables containing newlines.
11161 # Ultrix sh set writes to stderr and can't be redirected directly,
11162 # and sets the high bit in the cache file unless we assign to the vars.
11163 (
11164 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11165 eval ac_val=\$$ac_var
11166 case $ac_val in #(
11167 *${as_nl}*)
11168 case $ac_var in #(
11169 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
11170 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11171 esac
11172 case $ac_var in #(
11173 _ | IFS | as_nl) ;; #(
11174 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11175 *) { eval $ac_var=; unset $ac_var;} ;;
11176 esac ;;
11177 esac
11178 done
11179
11180 (set) 2>&1 |
11181 case $as_nl`(ac_space=' '; set) 2>&1` in #(
11182 *${as_nl}ac_space=\ *)
11183 # `set' does not quote correctly, so add quotes: double-quote
11184 # substitution turns \\\\ into \\, and sed turns \\ into \.
11185 sed -n \
11186 "s/'/'\\\\''/g;
11187 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11188 ;; #(
11189 *)
11190 # `set' quotes correctly as required by POSIX, so do not add quotes.
11191 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11192 ;;
11193 esac |
11194 sort
11195 ) |
11196 sed '
11197 /^ac_cv_env_/b end
11198 t clear
11199 :clear
11200 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11201 t end
11202 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11203 :end' >>confcache
11204 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11205 if test -w "$cache_file"; then
11206 if test "x$cache_file" != "x/dev/null"; then
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
11208 $as_echo "$as_me: updating cache $cache_file" >&6;}
11209 if test ! -f "$cache_file" || test -h "$cache_file"; then
11210 cat confcache >"$cache_file"
11211 else
11212 case $cache_file in #(
11213 */* | ?:*)
11214 mv -f confcache "$cache_file"$$ &&
11215 mv -f "$cache_file"$$ "$cache_file" ;; #(
11216 *)
11217 mv -f confcache "$cache_file" ;;
11218 esac
11219 fi
11220 fi
11221 else
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
11223 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11224 fi
11225 fi
11226 rm -f confcache
11227
11228 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11229 # Let make expand exec_prefix.
11230 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11231
11232 DEFS=-DHAVE_CONFIG_H
11233
11234 ac_libobjs=
11235 ac_ltlibobjs=
11236 U=
11237 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11238 # 1. Remove the extension, and $U if already installed.
11239 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11240 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
11241 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
11242 # will be set to the directory where LIBOBJS objects are built.
11243 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11244 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
11245 done
11246 LIBOBJS=$ac_libobjs
11247
11248 LTLIBOBJS=$ac_ltlibobjs
11249
11250
11251
11252 : "${CONFIG_STATUS=./config.status}"
11253 ac_write_fail=0
11254 ac_clean_files_save=$ac_clean_files
11255 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
11257 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
11258 as_write_fail=0
11259 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
11260 #! $SHELL
11261 # Generated by $as_me.
11262 # Run this file to recreate the current configuration.
11263 # Compiler output produced by configure, useful for debugging
11264 # configure, is in config.log if it exists.
11265
11266 debug=false
11267 ac_cs_recheck=false
11268 ac_cs_silent=false
11269
11270 SHELL=\${CONFIG_SHELL-$SHELL}
11271 export SHELL
11272 _ASEOF
11273 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
11274 ## -------------------- ##
11275 ## M4sh Initialization. ##
11276 ## -------------------- ##
11277
11278 # Be more Bourne compatible
11279 DUALCASE=1; export DUALCASE # for MKS sh
11280 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
11281 emulate sh
11282 NULLCMD=:
11283 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
11284 # is contrary to our usage. Disable this feature.
11285 alias -g '${1+"$@"}'='"$@"'
11286 setopt NO_GLOB_SUBST
11287 else
11288 case `(set -o) 2>/dev/null` in #(
11289 *posix*) :
11290 set -o posix ;; #(
11291 *) :
11292 ;;
11293 esac
11294 fi
11295
11296
11297 as_nl='
11298 '
11299 export as_nl
11300 # Printing a long string crashes Solaris 7 /usr/bin/printf.
11301 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11302 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
11303 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
11304 # Prefer a ksh shell builtin over an external printf program on Solaris,
11305 # but without wasting forks for bash or zsh.
11306 if test -z "$BASH_VERSION$ZSH_VERSION" \
11307 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
11308 as_echo='print -r --'
11309 as_echo_n='print -rn --'
11310 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
11311 as_echo='printf %s\n'
11312 as_echo_n='printf %s'
11313 else
11314 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
11315 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
11316 as_echo_n='/usr/ucb/echo -n'
11317 else
11318 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
11319 as_echo_n_body='eval
11320 arg=$1;
11321 case $arg in #(
11322 *"$as_nl"*)
11323 expr "X$arg" : "X\\(.*\\)$as_nl";
11324 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
11325 esac;
11326 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
11327 '
11328 export as_echo_n_body
11329 as_echo_n='sh -c $as_echo_n_body as_echo'
11330 fi
11331 export as_echo_body
11332 as_echo='sh -c $as_echo_body as_echo'
11333 fi
11334
11335 # The user is always right.
11336 if test "${PATH_SEPARATOR+set}" != set; then
11337 PATH_SEPARATOR=:
11338 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11339 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11340 PATH_SEPARATOR=';'
11341 }
11342 fi
11343
11344
11345 # IFS
11346 # We need space, tab and new line, in precisely that order. Quoting is
11347 # there to prevent editors from complaining about space-tab.
11348 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
11349 # splitting by setting IFS to empty value.)
11350 IFS=" "" $as_nl"
11351
11352 # Find who we are. Look in the path if we contain no directory separator.
11353 as_myself=
11354 case $0 in #((
11355 *[\\/]* ) as_myself=$0 ;;
11356 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357 for as_dir in $PATH
11358 do
11359 IFS=$as_save_IFS
11360 test -z "$as_dir" && as_dir=.
11361 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11362 done
11363 IFS=$as_save_IFS
11364
11365 ;;
11366 esac
11367 # We did not find ourselves, most probably we were run as `sh COMMAND'
11368 # in which case we are not to be found in the path.
11369 if test "x$as_myself" = x; then
11370 as_myself=$0
11371 fi
11372 if test ! -f "$as_myself"; then
11373 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11374 exit 1
11375 fi
11376
11377 # Unset variables that we do not need and which cause bugs (e.g. in
11378 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
11379 # suppresses any "Segmentation fault" message there. '((' could
11380 # trigger a bug in pdksh 5.2.14.
11381 for as_var in BASH_ENV ENV MAIL MAILPATH
11382 do eval test x\${$as_var+set} = xset \
11383 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
11384 done
11385 PS1='$ '
11386 PS2='> '
11387 PS4='+ '
11388
11389 # NLS nuisances.
11390 LC_ALL=C
11391 export LC_ALL
11392 LANGUAGE=C
11393 export LANGUAGE
11394
11395 # CDPATH.
11396 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11397
11398
11399 # as_fn_error STATUS ERROR [LINENO LOG_FD]
11400 # ----------------------------------------
11401 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11402 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
11403 # script with STATUS, using 1 if that was 0.
11404 as_fn_error ()
11405 {
11406 as_status=$1; test $as_status -eq 0 && as_status=1
11407 if test "$4"; then
11408 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11409 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
11410 fi
11411 $as_echo "$as_me: error: $2" >&2
11412 as_fn_exit $as_status
11413 } # as_fn_error
11414
11415
11416 # as_fn_set_status STATUS
11417 # -----------------------
11418 # Set $? to STATUS, without forking.
11419 as_fn_set_status ()
11420 {
11421 return $1
11422 } # as_fn_set_status
11423
11424 # as_fn_exit STATUS
11425 # -----------------
11426 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11427 as_fn_exit ()
11428 {
11429 set +e
11430 as_fn_set_status $1
11431 exit $1
11432 } # as_fn_exit
11433
11434 # as_fn_unset VAR
11435 # ---------------
11436 # Portably unset VAR.
11437 as_fn_unset ()
11438 {
11439 { eval $1=; unset $1;}
11440 }
11441 as_unset=as_fn_unset
11442 # as_fn_append VAR VALUE
11443 # ----------------------
11444 # Append the text in VALUE to the end of the definition contained in VAR. Take
11445 # advantage of any shell optimizations that allow amortized linear growth over
11446 # repeated appends, instead of the typical quadratic growth present in naive
11447 # implementations.
11448 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11449 eval 'as_fn_append ()
11450 {
11451 eval $1+=\$2
11452 }'
11453 else
11454 as_fn_append ()
11455 {
11456 eval $1=\$$1\$2
11457 }
11458 fi # as_fn_append
11459
11460 # as_fn_arith ARG...
11461 # ------------------
11462 # Perform arithmetic evaluation on the ARGs, and store the result in the
11463 # global $as_val. Take advantage of shells that can avoid forks. The arguments
11464 # must be portable across $(()) and expr.
11465 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11466 eval 'as_fn_arith ()
11467 {
11468 as_val=$(( $* ))
11469 }'
11470 else
11471 as_fn_arith ()
11472 {
11473 as_val=`expr "$@" || test $? -eq 1`
11474 }
11475 fi # as_fn_arith
11476
11477
11478 if expr a : '\(a\)' >/dev/null 2>&1 &&
11479 test "X`expr 00001 : '.*\(...\)'`" = X001; then
11480 as_expr=expr
11481 else
11482 as_expr=false
11483 fi
11484
11485 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11486 as_basename=basename
11487 else
11488 as_basename=false
11489 fi
11490
11491 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11492 as_dirname=dirname
11493 else
11494 as_dirname=false
11495 fi
11496
11497 as_me=`$as_basename -- "$0" ||
11498 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11499 X"$0" : 'X\(//\)$' \| \
11500 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11501 $as_echo X/"$0" |
11502 sed '/^.*\/\([^/][^/]*\)\/*$/{
11503 s//\1/
11504 q
11505 }
11506 /^X\/\(\/\/\)$/{
11507 s//\1/
11508 q
11509 }
11510 /^X\/\(\/\).*/{
11511 s//\1/
11512 q
11513 }
11514 s/.*/./; q'`
11515
11516 # Avoid depending upon Character Ranges.
11517 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11518 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11519 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11520 as_cr_digits='0123456789'
11521 as_cr_alnum=$as_cr_Letters$as_cr_digits
11522
11523 ECHO_C= ECHO_N= ECHO_T=
11524 case `echo -n x` in #(((((
11525 -n*)
11526 case `echo 'xy\c'` in
11527 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11528 xy) ECHO_C='\c';;
11529 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11530 ECHO_T=' ';;
11531 esac;;
11532 *)
11533 ECHO_N='-n';;
11534 esac
11535
11536 rm -f conf$$ conf$$.exe conf$$.file
11537 if test -d conf$$.dir; then
11538 rm -f conf$$.dir/conf$$.file
11539 else
11540 rm -f conf$$.dir
11541 mkdir conf$$.dir 2>/dev/null
11542 fi
11543 if (echo >conf$$.file) 2>/dev/null; then
11544 if ln -s conf$$.file conf$$ 2>/dev/null; then
11545 as_ln_s='ln -s'
11546 # ... but there are two gotchas:
11547 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11548 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11549 # In both cases, we have to default to `cp -pR'.
11550 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11551 as_ln_s='cp -pR'
11552 elif ln conf$$.file conf$$ 2>/dev/null; then
11553 as_ln_s=ln
11554 else
11555 as_ln_s='cp -pR'
11556 fi
11557 else
11558 as_ln_s='cp -pR'
11559 fi
11560 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11561 rmdir conf$$.dir 2>/dev/null
11562
11563
11564 # as_fn_mkdir_p
11565 # -------------
11566 # Create "$as_dir" as a directory, including parents if necessary.
11567 as_fn_mkdir_p ()
11568 {
11569
11570 case $as_dir in #(
11571 -*) as_dir=./$as_dir;;
11572 esac
11573 test -d "$as_dir" || eval $as_mkdir_p || {
11574 as_dirs=
11575 while :; do
11576 case $as_dir in #(
11577 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11578 *) as_qdir=$as_dir;;
11579 esac
11580 as_dirs="'$as_qdir' $as_dirs"
11581 as_dir=`$as_dirname -- "$as_dir" ||
11582 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11583 X"$as_dir" : 'X\(//\)[^/]' \| \
11584 X"$as_dir" : 'X\(//\)$' \| \
11585 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11586 $as_echo X"$as_dir" |
11587 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11588 s//\1/
11589 q
11590 }
11591 /^X\(\/\/\)[^/].*/{
11592 s//\1/
11593 q
11594 }
11595 /^X\(\/\/\)$/{
11596 s//\1/
11597 q
11598 }
11599 /^X\(\/\).*/{
11600 s//\1/
11601 q
11602 }
11603 s/.*/./; q'`
11604 test -d "$as_dir" && break
11605 done
11606 test -z "$as_dirs" || eval "mkdir $as_dirs"
11607 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
11608
11609
11610 } # as_fn_mkdir_p
11611 if mkdir -p . 2>/dev/null; then
11612 as_mkdir_p='mkdir -p "$as_dir"'
11613 else
11614 test -d ./-p && rmdir ./-p
11615 as_mkdir_p=false
11616 fi
11617
11618
11619 # as_fn_executable_p FILE
11620 # -----------------------
11621 # Test if FILE is an executable regular file.
11622 as_fn_executable_p ()
11623 {
11624 test -f "$1" && test -x "$1"
11625 } # as_fn_executable_p
11626 as_test_x='test -x'
11627 as_executable_p=as_fn_executable_p
11628
11629 # Sed expression to map a string onto a valid CPP name.
11630 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11631
11632 # Sed expression to map a string onto a valid variable name.
11633 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11634
11635
11636 exec 6>&1
11637 ## ----------------------------------- ##
11638 ## Main body of $CONFIG_STATUS script. ##
11639 ## ----------------------------------- ##
11640 _ASEOF
11641 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11642
11643 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11644 # Save the log message, to keep $0 and so on meaningful, and to
11645 # report actual input values of CONFIG_FILES etc. instead of their
11646 # values after options handling.
11647 ac_log="
11648 This file was extended by pcap $as_me 1.10.0-PRE-GIT, which was
11649 generated by GNU Autoconf 2.69. Invocation command line was
11650
11651 CONFIG_FILES = $CONFIG_FILES
11652 CONFIG_HEADERS = $CONFIG_HEADERS
11653 CONFIG_LINKS = $CONFIG_LINKS
11654 CONFIG_COMMANDS = $CONFIG_COMMANDS
11655 $ $0 $@
11656
11657 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11658 "
11659
11660 _ACEOF
11661
11662 case $ac_config_files in *"
11663 "*) set x $ac_config_files; shift; ac_config_files=$*;;
11664 esac
11665
11666 case $ac_config_headers in *"
11667 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11668 esac
11669
11670
11671 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11672 # Files that config.status was made for.
11673 config_files="$ac_config_files"
11674 config_headers="$ac_config_headers"
11675 config_commands="$ac_config_commands"
11676
11677 _ACEOF
11678
11679 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11680 ac_cs_usage="\
11681 \`$as_me' instantiates files and other configuration actions
11682 from templates according to the current configuration. Unless the files
11683 and actions are specified as TAGs, all are instantiated by default.
11684
11685 Usage: $0 [OPTION]... [TAG]...
11686
11687 -h, --help print this help, then exit
11688 -V, --version print version number and configuration settings, then exit
11689 --config print configuration, then exit
11690 -q, --quiet, --silent
11691 do not print progress messages
11692 -d, --debug don't remove temporary files
11693 --recheck update $as_me by reconfiguring in the same conditions
11694 --file=FILE[:TEMPLATE]
11695 instantiate the configuration file FILE
11696 --header=FILE[:TEMPLATE]
11697 instantiate the configuration header FILE
11698
11699 Configuration files:
11700 $config_files
11701
11702 Configuration headers:
11703 $config_headers
11704
11705 Configuration commands:
11706 $config_commands
11707
11708 Report bugs to the package provider."
11709
11710 _ACEOF
11711 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11712 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
11713 ac_cs_version="\\
11714 pcap config.status 1.10.0-PRE-GIT
11715 configured by $0, generated by GNU Autoconf 2.69,
11716 with options \\"\$ac_cs_config\\"
11717
11718 Copyright (C) 2012 Free Software Foundation, Inc.
11719 This config.status script is free software; the Free Software Foundation
11720 gives unlimited permission to copy, distribute and modify it."
11721
11722 ac_pwd='$ac_pwd'
11723 srcdir='$srcdir'
11724 INSTALL='$INSTALL'
11725 test -n "\$AWK" || AWK=awk
11726 _ACEOF
11727
11728 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11729 # The default lists apply if the user does not specify any file.
11730 ac_need_defaults=:
11731 while test $# != 0
11732 do
11733 case $1 in
11734 --*=?*)
11735 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11736 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11737 ac_shift=:
11738 ;;
11739 --*=)
11740 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11741 ac_optarg=
11742 ac_shift=:
11743 ;;
11744 *)
11745 ac_option=$1
11746 ac_optarg=$2
11747 ac_shift=shift
11748 ;;
11749 esac
11750
11751 case $ac_option in
11752 # Handling of the options.
11753 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11754 ac_cs_recheck=: ;;
11755 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11756 $as_echo "$ac_cs_version"; exit ;;
11757 --config | --confi | --conf | --con | --co | --c )
11758 $as_echo "$ac_cs_config"; exit ;;
11759 --debug | --debu | --deb | --de | --d | -d )
11760 debug=: ;;
11761 --file | --fil | --fi | --f )
11762 $ac_shift
11763 case $ac_optarg in
11764 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11765 '') as_fn_error $? "missing file argument" ;;
11766 esac
11767 as_fn_append CONFIG_FILES " '$ac_optarg'"
11768 ac_need_defaults=false;;
11769 --header | --heade | --head | --hea )
11770 $ac_shift
11771 case $ac_optarg in
11772 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11773 esac
11774 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11775 ac_need_defaults=false;;
11776 --he | --h)
11777 # Conflict between --help and --header
11778 as_fn_error $? "ambiguous option: \`$1'
11779 Try \`$0 --help' for more information.";;
11780 --help | --hel | -h )
11781 $as_echo "$ac_cs_usage"; exit ;;
11782 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11783 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11784 ac_cs_silent=: ;;
11785
11786 # This is an error.
11787 -*) as_fn_error $? "unrecognized option: \`$1'
11788 Try \`$0 --help' for more information." ;;
11789
11790 *) as_fn_append ac_config_targets " $1"
11791 ac_need_defaults=false ;;
11792
11793 esac
11794 shift
11795 done
11796
11797 ac_configure_extra_args=
11798
11799 if $ac_cs_silent; then
11800 exec 6>/dev/null
11801 ac_configure_extra_args="$ac_configure_extra_args --silent"
11802 fi
11803
11804 _ACEOF
11805 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11806 if \$ac_cs_recheck; then
11807 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11808 shift
11809 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11810 CONFIG_SHELL='$SHELL'
11811 export CONFIG_SHELL
11812 exec "\$@"
11813 fi
11814
11815 _ACEOF
11816 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11817 exec 5>>config.log
11818 {
11819 echo
11820 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11821 ## Running $as_me. ##
11822 _ASBOX
11823 $as_echo "$ac_log"
11824 } >&5
11825
11826 _ACEOF
11827 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11828 #
11829 # INIT-COMMANDS
11830 #
11831
11832
11833 _ACEOF
11834
11835 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11836
11837 # Handling of arguments.
11838 for ac_config_target in $ac_config_targets
11839 do
11840 case $ac_config_target in
11841 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
11842 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
11843 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11844 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
11845 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
11846 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
11847 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
11848 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
11849 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
11850 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
11851 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
11852 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
11853 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
11854 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
11855 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
11856 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
11857 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
11858 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
11859 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
11860 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
11861 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
11862 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
11863 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
11864
11865 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
11866 esac
11867 done
11868
11869
11870 # If the user did not use the arguments to specify the items to instantiate,
11871 # then the envvar interface is used. Set only those that are not.
11872 # We use the long form for the default assignment because of an extremely
11873 # bizarre bug on SunOS 4.1.3.
11874 if $ac_need_defaults; then
11875 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11876 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11877 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11878 fi
11879
11880 # Have a temporary directory for convenience. Make it in the build tree
11881 # simply because there is no reason against having it here, and in addition,
11882 # creating and moving files from /tmp can sometimes cause problems.
11883 # Hook for its removal unless debugging.
11884 # Note that there is a small window in which the directory will not be cleaned:
11885 # after its creation but before its name has been assigned to `$tmp'.
11886 $debug ||
11887 {
11888 tmp= ac_tmp=
11889 trap 'exit_status=$?
11890 : "${ac_tmp:=$tmp}"
11891 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11892 ' 0
11893 trap 'as_fn_exit 1' 1 2 13 15
11894 }
11895 # Create a (secure) tmp directory for tmp files.
11896
11897 {
11898 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11899 test -d "$tmp"
11900 } ||
11901 {
11902 tmp=./conf$$-$RANDOM
11903 (umask 077 && mkdir "$tmp")
11904 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11905 ac_tmp=$tmp
11906
11907 # Set up the scripts for CONFIG_FILES section.
11908 # No need to generate them if there are no CONFIG_FILES.
11909 # This happens for instance with `./config.status config.h'.
11910 if test -n "$CONFIG_FILES"; then
11911
11912
11913 ac_cr=`echo X | tr X '\015'`
11914 # On cygwin, bash can eat \r inside `` if the user requested igncr.
11915 # But we know of no other shell where ac_cr would be empty at this
11916 # point, so we can use a bashism as a fallback.
11917 if test "x$ac_cr" = x; then
11918 eval ac_cr=\$\'\\r\'
11919 fi
11920 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11921 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11922 ac_cs_awk_cr='\\r'
11923 else
11924 ac_cs_awk_cr=$ac_cr
11925 fi
11926
11927 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11928 _ACEOF
11929
11930
11931 {
11932 echo "cat >conf$$subs.awk <<_ACEOF" &&
11933 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11934 echo "_ACEOF"
11935 } >conf$$subs.sh ||
11936 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11937 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11938 ac_delim='%!_!# '
11939 for ac_last_try in false false false false false :; do
11940 . ./conf$$subs.sh ||
11941 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11942
11943 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11944 if test $ac_delim_n = $ac_delim_num; then
11945 break
11946 elif $ac_last_try; then
11947 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11948 else
11949 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11950 fi
11951 done
11952 rm -f conf$$subs.sh
11953
11954 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11955 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11956 _ACEOF
11957 sed -n '
11958 h
11959 s/^/S["/; s/!.*/"]=/
11960 p
11961 g
11962 s/^[^!]*!//
11963 :repl
11964 t repl
11965 s/'"$ac_delim"'$//
11966 t delim
11967 :nl
11968 h
11969 s/\(.\{148\}\)..*/\1/
11970 t more1
11971 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11972 p
11973 n
11974 b repl
11975 :more1
11976 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11977 p
11978 g
11979 s/.\{148\}//
11980 t nl
11981 :delim
11982 h
11983 s/\(.\{148\}\)..*/\1/
11984 t more2
11985 s/["\\]/\\&/g; s/^/"/; s/$/"/
11986 p
11987 b
11988 :more2
11989 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11990 p
11991 g
11992 s/.\{148\}//
11993 t delim
11994 ' <conf$$subs.awk | sed '
11995 /^[^""]/{
11996 N
11997 s/\n//
11998 }
11999 ' >>$CONFIG_STATUS || ac_write_fail=1
12000 rm -f conf$$subs.awk
12001 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12002 _ACAWK
12003 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
12004 for (key in S) S_is_set[key] = 1
12005 FS = "\a"
12006
12007 }
12008 {
12009 line = $ 0
12010 nfields = split(line, field, "@")
12011 substed = 0
12012 len = length(field[1])
12013 for (i = 2; i < nfields; i++) {
12014 key = field[i]
12015 keylen = length(key)
12016 if (S_is_set[key]) {
12017 value = S[key]
12018 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
12019 len += length(value) + length(field[++i])
12020 substed = 1
12021 } else
12022 len += 1 + keylen
12023 }
12024
12025 print line
12026 }
12027
12028 _ACAWK
12029 _ACEOF
12030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12031 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
12032 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
12033 else
12034 cat
12035 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
12036 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
12037 _ACEOF
12038
12039 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
12040 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
12041 # trailing colons and then remove the whole line if VPATH becomes empty
12042 # (actually we leave an empty line to preserve line numbers).
12043 if test "x$srcdir" = x.; then
12044 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
12045 h
12046 s///
12047 s/^/:/
12048 s/[ ]*$/:/
12049 s/:\$(srcdir):/:/g
12050 s/:\${srcdir}:/:/g
12051 s/:@srcdir@:/:/g
12052 s/^:*//
12053 s/:*$//
12054 x
12055 s/\(=[ ]*\).*/\1/
12056 G
12057 s/\n//
12058 s/^[^=]*=[ ]*$//
12059 }'
12060 fi
12061
12062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12063 fi # test -n "$CONFIG_FILES"
12064
12065 # Set up the scripts for CONFIG_HEADERS section.
12066 # No need to generate them if there are no CONFIG_HEADERS.
12067 # This happens for instance with `./config.status Makefile'.
12068 if test -n "$CONFIG_HEADERS"; then
12069 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
12070 BEGIN {
12071 _ACEOF
12072
12073 # Transform confdefs.h into an awk script `defines.awk', embedded as
12074 # here-document in config.status, that substitutes the proper values into
12075 # config.h.in to produce config.h.
12076
12077 # Create a delimiter string that does not exist in confdefs.h, to ease
12078 # handling of long lines.
12079 ac_delim='%!_!# '
12080 for ac_last_try in false false :; do
12081 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
12082 if test -z "$ac_tt"; then
12083 break
12084 elif $ac_last_try; then
12085 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
12086 else
12087 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12088 fi
12089 done
12090
12091 # For the awk script, D is an array of macro values keyed by name,
12092 # likewise P contains macro parameters if any. Preserve backslash
12093 # newline sequences.
12094
12095 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
12096 sed -n '
12097 s/.\{148\}/&'"$ac_delim"'/g
12098 t rset
12099 :rset
12100 s/^[ ]*#[ ]*define[ ][ ]*/ /
12101 t def
12102 d
12103 :def
12104 s/\\$//
12105 t bsnl
12106 s/["\\]/\\&/g
12107 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12108 D["\1"]=" \3"/p
12109 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
12110 d
12111 :bsnl
12112 s/["\\]/\\&/g
12113 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12114 D["\1"]=" \3\\\\\\n"\\/p
12115 t cont
12116 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
12117 t cont
12118 d
12119 :cont
12120 n
12121 s/.\{148\}/&'"$ac_delim"'/g
12122 t clear
12123 :clear
12124 s/\\$//
12125 t bsnlc
12126 s/["\\]/\\&/g; s/^/"/; s/$/"/p
12127 d
12128 :bsnlc
12129 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
12130 b cont
12131 ' <confdefs.h | sed '
12132 s/'"$ac_delim"'/"\\\
12133 "/g' >>$CONFIG_STATUS || ac_write_fail=1
12134
12135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12136 for (key in D) D_is_set[key] = 1
12137 FS = "\a"
12138 }
12139 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
12140 line = \$ 0
12141 split(line, arg, " ")
12142 if (arg[1] == "#") {
12143 defundef = arg[2]
12144 mac1 = arg[3]
12145 } else {
12146 defundef = substr(arg[1], 2)
12147 mac1 = arg[2]
12148 }
12149 split(mac1, mac2, "(") #)
12150 macro = mac2[1]
12151 prefix = substr(line, 1, index(line, defundef) - 1)
12152 if (D_is_set[macro]) {
12153 # Preserve the white space surrounding the "#".
12154 print prefix "define", macro P[macro] D[macro]
12155 next
12156 } else {
12157 # Replace #undef with comments. This is necessary, for example,
12158 # in the case of _POSIX_SOURCE, which is predefined and required
12159 # on some systems where configure will not decide to define it.
12160 if (defundef == "undef") {
12161 print "/*", prefix defundef, macro, "*/"
12162 next
12163 }
12164 }
12165 }
12166 { print }
12167 _ACAWK
12168 _ACEOF
12169 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12170 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
12171 fi # test -n "$CONFIG_HEADERS"
12172
12173
12174 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
12175 shift
12176 for ac_tag
12177 do
12178 case $ac_tag in
12179 :[FHLC]) ac_mode=$ac_tag; continue;;
12180 esac
12181 case $ac_mode$ac_tag in
12182 :[FHL]*:*);;
12183 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
12184 :[FH]-) ac_tag=-:-;;
12185 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12186 esac
12187 ac_save_IFS=$IFS
12188 IFS=:
12189 set x $ac_tag
12190 IFS=$ac_save_IFS
12191 shift
12192 ac_file=$1
12193 shift
12194
12195 case $ac_mode in
12196 :L) ac_source=$1;;
12197 :[FH])
12198 ac_file_inputs=
12199 for ac_f
12200 do
12201 case $ac_f in
12202 -) ac_f="$ac_tmp/stdin";;
12203 *) # Look for the file first in the build tree, then in the source tree
12204 # (if the path is not absolute). The absolute path cannot be DOS-style,
12205 # because $ac_f cannot contain `:'.
12206 test -f "$ac_f" ||
12207 case $ac_f in
12208 [\\/$]*) false;;
12209 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12210 esac ||
12211 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
12212 esac
12213 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
12214 as_fn_append ac_file_inputs " '$ac_f'"
12215 done
12216
12217 # Let's still pretend it is `configure' which instantiates (i.e., don't
12218 # use $as_me), people would be surprised to read:
12219 # /* config.h. Generated by config.status. */
12220 configure_input='Generated from '`
12221 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
12222 `' by configure.'
12223 if test x"$ac_file" != x-; then
12224 configure_input="$ac_file. $configure_input"
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
12226 $as_echo "$as_me: creating $ac_file" >&6;}
12227 fi
12228 # Neutralize special characters interpreted by sed in replacement strings.
12229 case $configure_input in #(
12230 *\&* | *\|* | *\\* )
12231 ac_sed_conf_input=`$as_echo "$configure_input" |
12232 sed 's/[\\\\&|]/\\\\&/g'`;; #(
12233 *) ac_sed_conf_input=$configure_input;;
12234 esac
12235
12236 case $ac_tag in
12237 *:-:* | *:-) cat >"$ac_tmp/stdin" \
12238 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
12239 esac
12240 ;;
12241 esac
12242
12243 ac_dir=`$as_dirname -- "$ac_file" ||
12244 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12245 X"$ac_file" : 'X\(//\)[^/]' \| \
12246 X"$ac_file" : 'X\(//\)$' \| \
12247 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12248 $as_echo X"$ac_file" |
12249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12250 s//\1/
12251 q
12252 }
12253 /^X\(\/\/\)[^/].*/{
12254 s//\1/
12255 q
12256 }
12257 /^X\(\/\/\)$/{
12258 s//\1/
12259 q
12260 }
12261 /^X\(\/\).*/{
12262 s//\1/
12263 q
12264 }
12265 s/.*/./; q'`
12266 as_dir="$ac_dir"; as_fn_mkdir_p
12267 ac_builddir=.
12268
12269 case "$ac_dir" in
12270 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12271 *)
12272 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
12273 # A ".." for each directory in $ac_dir_suffix.
12274 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
12275 case $ac_top_builddir_sub in
12276 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12277 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12278 esac ;;
12279 esac
12280 ac_abs_top_builddir=$ac_pwd
12281 ac_abs_builddir=$ac_pwd$ac_dir_suffix
12282 # for backward compatibility:
12283 ac_top_builddir=$ac_top_build_prefix
12284
12285 case $srcdir in
12286 .) # We are building in place.
12287 ac_srcdir=.
12288 ac_top_srcdir=$ac_top_builddir_sub
12289 ac_abs_top_srcdir=$ac_pwd ;;
12290 [\\/]* | ?:[\\/]* ) # Absolute name.
12291 ac_srcdir=$srcdir$ac_dir_suffix;
12292 ac_top_srcdir=$srcdir
12293 ac_abs_top_srcdir=$srcdir ;;
12294 *) # Relative name.
12295 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12296 ac_top_srcdir=$ac_top_build_prefix$srcdir
12297 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12298 esac
12299 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12300
12301
12302 case $ac_mode in
12303 :F)
12304 #
12305 # CONFIG_FILE
12306 #
12307
12308 case $INSTALL in
12309 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12310 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12311 esac
12312 _ACEOF
12313
12314 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12315 # If the template does not know about datarootdir, expand it.
12316 # FIXME: This hack should be removed a few years after 2.60.
12317 ac_datarootdir_hack=; ac_datarootdir_seen=
12318 ac_sed_dataroot='
12319 /datarootdir/ {
12320 p
12321 q
12322 }
12323 /@datadir@/p
12324 /@docdir@/p
12325 /@infodir@/p
12326 /@localedir@/p
12327 /@mandir@/p'
12328 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12329 *datarootdir*) ac_datarootdir_seen=yes;;
12330 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12332 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12333 _ACEOF
12334 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12335 ac_datarootdir_hack='
12336 s&@datadir@&$datadir&g
12337 s&@docdir@&$docdir&g
12338 s&@infodir@&$infodir&g
12339 s&@localedir@&$localedir&g
12340 s&@mandir@&$mandir&g
12341 s&\\\${datarootdir}&$datarootdir&g' ;;
12342 esac
12343 _ACEOF
12344
12345 # Neutralize VPATH when `$srcdir' = `.'.
12346 # Shell code in configure.ac might set extrasub.
12347 # FIXME: do we really want to maintain this feature?
12348 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12349 ac_sed_extra="$ac_vpsub
12350 $extrasub
12351 _ACEOF
12352 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12353 :t
12354 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12355 s|@configure_input@|$ac_sed_conf_input|;t t
12356 s&@top_builddir@&$ac_top_builddir_sub&;t t
12357 s&@top_build_prefix@&$ac_top_build_prefix&;t t
12358 s&@srcdir@&$ac_srcdir&;t t
12359 s&@abs_srcdir@&$ac_abs_srcdir&;t t
12360 s&@top_srcdir@&$ac_top_srcdir&;t t
12361 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12362 s&@builddir@&$ac_builddir&;t t
12363 s&@abs_builddir@&$ac_abs_builddir&;t t
12364 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12365 s&@INSTALL@&$ac_INSTALL&;t t
12366 $ac_datarootdir_hack
12367 "
12368 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
12369 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12370
12371 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12372 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
12373 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
12374 "$ac_tmp/out"`; test -z "$ac_out"; } &&
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12376 which seems to be undefined. Please make sure it is defined" >&5
12377 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12378 which seems to be undefined. Please make sure it is defined" >&2;}
12379
12380 rm -f "$ac_tmp/stdin"
12381 case $ac_file in
12382 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
12383 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
12384 esac \
12385 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12386 ;;
12387 :H)
12388 #
12389 # CONFIG_HEADER
12390 #
12391 if test x"$ac_file" != x-; then
12392 {
12393 $as_echo "/* $configure_input */" \
12394 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
12395 } >"$ac_tmp/config.h" \
12396 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12397 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
12399 $as_echo "$as_me: $ac_file is unchanged" >&6;}
12400 else
12401 rm -f "$ac_file"
12402 mv "$ac_tmp/config.h" "$ac_file" \
12403 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12404 fi
12405 else
12406 $as_echo "/* $configure_input */" \
12407 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
12408 || as_fn_error $? "could not create -" "$LINENO" 5
12409 fi
12410 ;;
12411
12412 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12413 $as_echo "$as_me: executing $ac_file commands" >&6;}
12414 ;;
12415 esac
12416
12417
12418 case $ac_file$ac_mode in
12419 "default-1":C) if test -f .devel; then
12420 echo timestamp > stamp-h
12421 cat $srcdir/Makefile-devel-adds >> Makefile
12422 make depend
12423 fi ;;
12424
12425 esac
12426 done # for ac_tag
12427
12428
12429 as_fn_exit 0
12430 _ACEOF
12431 ac_clean_files=$ac_clean_files_save
12432
12433 test $ac_write_fail = 0 ||
12434 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
12435
12436
12437 # configure is writing to config.log, and then calls config.status.
12438 # config.status does its own redirection, appending to config.log.
12439 # Unfortunately, on DOS this fails, as config.log is still kept open
12440 # by configure, so config.status won't be able to write to it; its
12441 # output is simply discarded. So we exec the FD to /dev/null,
12442 # effectively closing config.log, so it can be properly (re)opened and
12443 # appended to by config.status. When coming back to configure, we
12444 # need to make the FD available again.
12445 if test "$no_create" != yes; then
12446 ac_cs_success=:
12447 ac_config_status_args=
12448 test "$silent" = yes &&
12449 ac_config_status_args="$ac_config_status_args --quiet"
12450 exec 5>/dev/null
12451 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12452 exec 5>>config.log
12453 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12454 # would make configure fail if this is the last instruction.
12455 $ac_cs_success || as_fn_exit 1
12456 fi
12457 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12459 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
12460 fi
12461
12462 exit 0