]> The Tcpdump Group git mirrors - libpcap/blob - configure
Make sure no read routine process more than INT_MAX packets.
[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.2-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.2-PRE-GIT'
581 PACKAGE_STRING='pcap 1.10.2-PRE-GIT'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="pcap.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_subst_vars='LTLIBOBJS
623 INSTALL_DATA
624 INSTALL_SCRIPT
625 INSTALL_PROGRAM
626 PCAP_SUPPORT_RDMASNIFF
627 PCAP_SUPPORT_DBUS
628 PCAP_SUPPORT_BT
629 PCAP_SUPPORT_DPDK
630 PCAP_SUPPORT_NETMAP
631 PCAP_SUPPORT_NETFILTER
632 PCAP_SUPPORT_LINUX_USBMON
633 EXTRA_NETWORK_LIBS
634 RPCAPD_LIBS
635 INSTALL_RPCAPD
636 BUILD_RPCAPD
637 PTHREAD_LIBS
638 MAN_ADMIN_COMMANDS
639 MAN_MISC_INFO
640 MAN_FILE_FORMATS
641 MAN_DEVICES
642 DYEXT
643 REMOTE_C_SRC
644 MODULE_C_SRC
645 PLATFORM_CXX_SRC
646 PLATFORM_C_SRC
647 ADDLARCHIVEOBJS
648 ADDLOBJS
649 V_YACC
650 V_RPATH_OPT
651 V_SONAME_OPT
652 V_SHLIB_OPT
653 V_SHLIB_CMD
654 V_SHLIB_CCOPT
655 V_LEX
656 V_INCLS
657 V_DEFS
658 V_PROG_LDFLAGS_FAT
659 V_PROG_CCOPT_FAT
660 V_LIB_LDFLAGS_FAT
661 V_LIB_CCOPT_FAT
662 V_CCOPT
663 MKDEP
664 DEPENDENCY_CFLAG
665 LN_S
666 AR
667 RANLIB
668 REENTRANT_PARSER
669 BISON_BYACC
670 LEXLIB
671 LEX_OUTPUT_ROOT
672 LEX
673 PKGCONFIG
674 VALGRINDTEST_SRC
675 LIBOBJS
676 EGREP
677 GREP
678 CPP
679 ac_ct_CXX
680 CXXFLAGS
681 CXX
682 OBJEXT
683 EXEEXT
684 ac_ct_CC
685 CPPFLAGS
686 LDFLAGS
687 CFLAGS
688 CC
689 SHLICC2
690 target_os
691 target_vendor
692 target_cpu
693 target
694 host_os
695 host_vendor
696 host_cpu
697 host
698 build_os
699 build_vendor
700 build_cpu
701 build
702 target_alias
703 host_alias
704 build_alias
705 LIBS
706 ECHO_T
707 ECHO_N
708 ECHO_C
709 DEFS
710 mandir
711 localedir
712 libdir
713 psdir
714 pdfdir
715 dvidir
716 htmldir
717 infodir
718 docdir
719 oldincludedir
720 includedir
721 runstatedir
722 localstatedir
723 sharedstatedir
724 sysconfdir
725 datadir
726 datarootdir
727 libexecdir
728 sbindir
729 bindir
730 program_transform_name
731 prefix
732 exec_prefix
733 PACKAGE_URL
734 PACKAGE_BUGREPORT
735 PACKAGE_STRING
736 PACKAGE_VERSION
737 PACKAGE_TARNAME
738 PACKAGE_NAME
739 PATH_SEPARATOR
740 SHELL'
741 ac_subst_files=''
742 ac_user_opts='
743 enable_option_checking
744 with_gcc
745 enable_largefile
746 enable_protochain
747 with_pcap
748 with_libnl
749 enable_ipv6
750 with_dag
751 with_dag_includes
752 with_dag_libraries
753 with_septel
754 with_snf
755 with_snf_includes
756 with_snf_libraries
757 with_turbocap
758 enable_remote
759 enable_optimizer_dbg
760 enable_yydebug
761 enable_universal
762 enable_shared
763 enable_usb
764 enable_netmap
765 with_dpdk
766 enable_bluetooth
767 enable_dbus
768 enable_rdma
769 '
770 ac_precious_vars='build_alias
771 host_alias
772 target_alias
773 CC
774 CFLAGS
775 LDFLAGS
776 LIBS
777 CPPFLAGS
778 CXX
779 CXXFLAGS
780 CCC
781 CPP'
782
783
784 # Initialize some variables set by options.
785 ac_init_help=
786 ac_init_version=false
787 ac_unrecognized_opts=
788 ac_unrecognized_sep=
789 # The variables have the same names as the options, with
790 # dashes changed to underlines.
791 cache_file=/dev/null
792 exec_prefix=NONE
793 no_create=
794 no_recursion=
795 prefix=NONE
796 program_prefix=NONE
797 program_suffix=NONE
798 program_transform_name=s,x,x,
799 silent=
800 site=
801 srcdir=
802 verbose=
803 x_includes=NONE
804 x_libraries=NONE
805
806 # Installation directory options.
807 # These are left unexpanded so users can "make install exec_prefix=/foo"
808 # and all the variables that are supposed to be based on exec_prefix
809 # by default will actually change.
810 # Use braces instead of parens because sh, perl, etc. also accept them.
811 # (The list follows the same order as the GNU Coding Standards.)
812 bindir='${exec_prefix}/bin'
813 sbindir='${exec_prefix}/sbin'
814 libexecdir='${exec_prefix}/libexec'
815 datarootdir='${prefix}/share'
816 datadir='${datarootdir}'
817 sysconfdir='${prefix}/etc'
818 sharedstatedir='${prefix}/com'
819 localstatedir='${prefix}/var'
820 runstatedir='${localstatedir}/run'
821 includedir='${prefix}/include'
822 oldincludedir='/usr/include'
823 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
824 infodir='${datarootdir}/info'
825 htmldir='${docdir}'
826 dvidir='${docdir}'
827 pdfdir='${docdir}'
828 psdir='${docdir}'
829 libdir='${exec_prefix}/lib'
830 localedir='${datarootdir}/locale'
831 mandir='${datarootdir}/man'
832
833 ac_prev=
834 ac_dashdash=
835 for ac_option
836 do
837 # If the previous option needs an argument, assign it.
838 if test -n "$ac_prev"; then
839 eval $ac_prev=\$ac_option
840 ac_prev=
841 continue
842 fi
843
844 case $ac_option in
845 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
846 *=) ac_optarg= ;;
847 *) ac_optarg=yes ;;
848 esac
849
850 # Accept the important Cygnus configure options, so we can diagnose typos.
851
852 case $ac_dashdash$ac_option in
853 --)
854 ac_dashdash=yes ;;
855
856 -bindir | --bindir | --bindi | --bind | --bin | --bi)
857 ac_prev=bindir ;;
858 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
859 bindir=$ac_optarg ;;
860
861 -build | --build | --buil | --bui | --bu)
862 ac_prev=build_alias ;;
863 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
864 build_alias=$ac_optarg ;;
865
866 -cache-file | --cache-file | --cache-fil | --cache-fi \
867 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
868 ac_prev=cache_file ;;
869 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
870 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
871 cache_file=$ac_optarg ;;
872
873 --config-cache | -C)
874 cache_file=config.cache ;;
875
876 -datadir | --datadir | --datadi | --datad)
877 ac_prev=datadir ;;
878 -datadir=* | --datadir=* | --datadi=* | --datad=*)
879 datadir=$ac_optarg ;;
880
881 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
882 | --dataroo | --dataro | --datar)
883 ac_prev=datarootdir ;;
884 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
885 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
886 datarootdir=$ac_optarg ;;
887
888 -disable-* | --disable-*)
889 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
890 # Reject names that are not valid shell variable names.
891 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
892 as_fn_error $? "invalid feature name: $ac_useropt"
893 ac_useropt_orig=$ac_useropt
894 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
895 case $ac_user_opts in
896 *"
897 "enable_$ac_useropt"
898 "*) ;;
899 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
900 ac_unrecognized_sep=', ';;
901 esac
902 eval enable_$ac_useropt=no ;;
903
904 -docdir | --docdir | --docdi | --doc | --do)
905 ac_prev=docdir ;;
906 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907 docdir=$ac_optarg ;;
908
909 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910 ac_prev=dvidir ;;
911 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912 dvidir=$ac_optarg ;;
913
914 -enable-* | --enable-*)
915 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
916 # Reject names that are not valid shell variable names.
917 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
918 as_fn_error $? "invalid feature name: $ac_useropt"
919 ac_useropt_orig=$ac_useropt
920 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
921 case $ac_user_opts in
922 *"
923 "enable_$ac_useropt"
924 "*) ;;
925 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
926 ac_unrecognized_sep=', ';;
927 esac
928 eval enable_$ac_useropt=\$ac_optarg ;;
929
930 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
931 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
932 | --exec | --exe | --ex)
933 ac_prev=exec_prefix ;;
934 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
935 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
936 | --exec=* | --exe=* | --ex=*)
937 exec_prefix=$ac_optarg ;;
938
939 -gas | --gas | --ga | --g)
940 # Obsolete; use --with-gas.
941 with_gas=yes ;;
942
943 -help | --help | --hel | --he | -h)
944 ac_init_help=long ;;
945 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
946 ac_init_help=recursive ;;
947 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
948 ac_init_help=short ;;
949
950 -host | --host | --hos | --ho)
951 ac_prev=host_alias ;;
952 -host=* | --host=* | --hos=* | --ho=*)
953 host_alias=$ac_optarg ;;
954
955 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
956 ac_prev=htmldir ;;
957 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
958 | --ht=*)
959 htmldir=$ac_optarg ;;
960
961 -includedir | --includedir | --includedi | --included | --include \
962 | --includ | --inclu | --incl | --inc)
963 ac_prev=includedir ;;
964 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
965 | --includ=* | --inclu=* | --incl=* | --inc=*)
966 includedir=$ac_optarg ;;
967
968 -infodir | --infodir | --infodi | --infod | --info | --inf)
969 ac_prev=infodir ;;
970 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
971 infodir=$ac_optarg ;;
972
973 -libdir | --libdir | --libdi | --libd)
974 ac_prev=libdir ;;
975 -libdir=* | --libdir=* | --libdi=* | --libd=*)
976 libdir=$ac_optarg ;;
977
978 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
979 | --libexe | --libex | --libe)
980 ac_prev=libexecdir ;;
981 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
982 | --libexe=* | --libex=* | --libe=*)
983 libexecdir=$ac_optarg ;;
984
985 -localedir | --localedir | --localedi | --localed | --locale)
986 ac_prev=localedir ;;
987 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
988 localedir=$ac_optarg ;;
989
990 -localstatedir | --localstatedir | --localstatedi | --localstated \
991 | --localstate | --localstat | --localsta | --localst | --locals)
992 ac_prev=localstatedir ;;
993 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
994 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
995 localstatedir=$ac_optarg ;;
996
997 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
998 ac_prev=mandir ;;
999 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1000 mandir=$ac_optarg ;;
1001
1002 -nfp | --nfp | --nf)
1003 # Obsolete; use --without-fp.
1004 with_fp=no ;;
1005
1006 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1007 | --no-cr | --no-c | -n)
1008 no_create=yes ;;
1009
1010 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1011 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1012 no_recursion=yes ;;
1013
1014 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1015 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1016 | --oldin | --oldi | --old | --ol | --o)
1017 ac_prev=oldincludedir ;;
1018 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1019 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1020 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1021 oldincludedir=$ac_optarg ;;
1022
1023 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1024 ac_prev=prefix ;;
1025 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1026 prefix=$ac_optarg ;;
1027
1028 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1029 | --program-pre | --program-pr | --program-p)
1030 ac_prev=program_prefix ;;
1031 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1032 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1033 program_prefix=$ac_optarg ;;
1034
1035 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1036 | --program-suf | --program-su | --program-s)
1037 ac_prev=program_suffix ;;
1038 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1039 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1040 program_suffix=$ac_optarg ;;
1041
1042 -program-transform-name | --program-transform-name \
1043 | --program-transform-nam | --program-transform-na \
1044 | --program-transform-n | --program-transform- \
1045 | --program-transform | --program-transfor \
1046 | --program-transfo | --program-transf \
1047 | --program-trans | --program-tran \
1048 | --progr-tra | --program-tr | --program-t)
1049 ac_prev=program_transform_name ;;
1050 -program-transform-name=* | --program-transform-name=* \
1051 | --program-transform-nam=* | --program-transform-na=* \
1052 | --program-transform-n=* | --program-transform-=* \
1053 | --program-transform=* | --program-transfor=* \
1054 | --program-transfo=* | --program-transf=* \
1055 | --program-trans=* | --program-tran=* \
1056 | --progr-tra=* | --program-tr=* | --program-t=*)
1057 program_transform_name=$ac_optarg ;;
1058
1059 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1060 ac_prev=pdfdir ;;
1061 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1062 pdfdir=$ac_optarg ;;
1063
1064 -psdir | --psdir | --psdi | --psd | --ps)
1065 ac_prev=psdir ;;
1066 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1067 psdir=$ac_optarg ;;
1068
1069 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1070 | -silent | --silent | --silen | --sile | --sil)
1071 silent=yes ;;
1072
1073 -runstatedir | --runstatedir | --runstatedi | --runstated \
1074 | --runstate | --runstat | --runsta | --runst | --runs \
1075 | --run | --ru | --r)
1076 ac_prev=runstatedir ;;
1077 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1078 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1079 | --run=* | --ru=* | --r=*)
1080 runstatedir=$ac_optarg ;;
1081
1082 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1083 ac_prev=sbindir ;;
1084 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1085 | --sbi=* | --sb=*)
1086 sbindir=$ac_optarg ;;
1087
1088 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1089 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1090 | --sharedst | --shareds | --shared | --share | --shar \
1091 | --sha | --sh)
1092 ac_prev=sharedstatedir ;;
1093 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1094 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1095 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1096 | --sha=* | --sh=*)
1097 sharedstatedir=$ac_optarg ;;
1098
1099 -site | --site | --sit)
1100 ac_prev=site ;;
1101 -site=* | --site=* | --sit=*)
1102 site=$ac_optarg ;;
1103
1104 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1105 ac_prev=srcdir ;;
1106 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1107 srcdir=$ac_optarg ;;
1108
1109 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1110 | --syscon | --sysco | --sysc | --sys | --sy)
1111 ac_prev=sysconfdir ;;
1112 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1113 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1114 sysconfdir=$ac_optarg ;;
1115
1116 -target | --target | --targe | --targ | --tar | --ta | --t)
1117 ac_prev=target_alias ;;
1118 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1119 target_alias=$ac_optarg ;;
1120
1121 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1122 verbose=yes ;;
1123
1124 -version | --version | --versio | --versi | --vers | -V)
1125 ac_init_version=: ;;
1126
1127 -with-* | --with-*)
1128 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1129 # Reject names that are not valid shell variable names.
1130 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1131 as_fn_error $? "invalid package name: $ac_useropt"
1132 ac_useropt_orig=$ac_useropt
1133 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1134 case $ac_user_opts in
1135 *"
1136 "with_$ac_useropt"
1137 "*) ;;
1138 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1139 ac_unrecognized_sep=', ';;
1140 esac
1141 eval with_$ac_useropt=\$ac_optarg ;;
1142
1143 -without-* | --without-*)
1144 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1145 # Reject names that are not valid shell variable names.
1146 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1147 as_fn_error $? "invalid package name: $ac_useropt"
1148 ac_useropt_orig=$ac_useropt
1149 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1150 case $ac_user_opts in
1151 *"
1152 "with_$ac_useropt"
1153 "*) ;;
1154 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1155 ac_unrecognized_sep=', ';;
1156 esac
1157 eval with_$ac_useropt=no ;;
1158
1159 --x)
1160 # Obsolete; use --with-x.
1161 with_x=yes ;;
1162
1163 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1164 | --x-incl | --x-inc | --x-in | --x-i)
1165 ac_prev=x_includes ;;
1166 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1167 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1168 x_includes=$ac_optarg ;;
1169
1170 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1171 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1172 ac_prev=x_libraries ;;
1173 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1174 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1175 x_libraries=$ac_optarg ;;
1176
1177 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1178 Try \`$0 --help' for more information"
1179 ;;
1180
1181 *=*)
1182 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1183 # Reject names that are not valid shell variable names.
1184 case $ac_envvar in #(
1185 '' | [0-9]* | *[!_$as_cr_alnum]* )
1186 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1187 esac
1188 eval $ac_envvar=\$ac_optarg
1189 export $ac_envvar ;;
1190
1191 *)
1192 # FIXME: should be removed in autoconf 3.0.
1193 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1194 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1195 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1196 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1197 ;;
1198
1199 esac
1200 done
1201
1202 if test -n "$ac_prev"; then
1203 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1204 as_fn_error $? "missing argument to $ac_option"
1205 fi
1206
1207 if test -n "$ac_unrecognized_opts"; then
1208 case $enable_option_checking in
1209 no) ;;
1210 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1211 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1212 esac
1213 fi
1214
1215 # Check all directory arguments for consistency.
1216 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1217 datadir sysconfdir sharedstatedir localstatedir includedir \
1218 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1219 libdir localedir mandir runstatedir
1220 do
1221 eval ac_val=\$$ac_var
1222 # Remove trailing slashes.
1223 case $ac_val in
1224 */ )
1225 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1226 eval $ac_var=\$ac_val;;
1227 esac
1228 # Be sure to have absolute directory names.
1229 case $ac_val in
1230 [\\/$]* | ?:[\\/]* ) continue;;
1231 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1232 esac
1233 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1234 done
1235
1236 # There might be people who depend on the old broken behavior: `$host'
1237 # used to hold the argument of --host etc.
1238 # FIXME: To remove some day.
1239 build=$build_alias
1240 host=$host_alias
1241 target=$target_alias
1242
1243 # FIXME: To remove some day.
1244 if test "x$host_alias" != x; then
1245 if test "x$build_alias" = x; then
1246 cross_compiling=maybe
1247 elif test "x$build_alias" != "x$host_alias"; then
1248 cross_compiling=yes
1249 fi
1250 fi
1251
1252 ac_tool_prefix=
1253 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1254
1255 test "$silent" = yes && exec 6>/dev/null
1256
1257
1258 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1259 ac_ls_di=`ls -di .` &&
1260 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1261 as_fn_error $? "working directory cannot be determined"
1262 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1263 as_fn_error $? "pwd does not report name of working directory"
1264
1265
1266 # Find the source files, if location was not specified.
1267 if test -z "$srcdir"; then
1268 ac_srcdir_defaulted=yes
1269 # Try the directory containing this script, then the parent directory.
1270 ac_confdir=`$as_dirname -- "$as_myself" ||
1271 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1272 X"$as_myself" : 'X\(//\)[^/]' \| \
1273 X"$as_myself" : 'X\(//\)$' \| \
1274 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1275 $as_echo X"$as_myself" |
1276 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\/\)[^/].*/{
1281 s//\1/
1282 q
1283 }
1284 /^X\(\/\/\)$/{
1285 s//\1/
1286 q
1287 }
1288 /^X\(\/\).*/{
1289 s//\1/
1290 q
1291 }
1292 s/.*/./; q'`
1293 srcdir=$ac_confdir
1294 if test ! -r "$srcdir/$ac_unique_file"; then
1295 srcdir=..
1296 fi
1297 else
1298 ac_srcdir_defaulted=no
1299 fi
1300 if test ! -r "$srcdir/$ac_unique_file"; then
1301 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1302 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1303 fi
1304 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1305 ac_abs_confdir=`(
1306 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1307 pwd)`
1308 # When building in place, set srcdir=.
1309 if test "$ac_abs_confdir" = "$ac_pwd"; then
1310 srcdir=.
1311 fi
1312 # Remove unnecessary trailing slashes from srcdir.
1313 # Double slashes in file names in object file debugging info
1314 # mess up M-x gdb in Emacs.
1315 case $srcdir in
1316 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1317 esac
1318 for ac_var in $ac_precious_vars; do
1319 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1320 eval ac_env_${ac_var}_value=\$${ac_var}
1321 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1322 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1323 done
1324
1325 #
1326 # Report the --help message.
1327 #
1328 if test "$ac_init_help" = "long"; then
1329 # Omit some internal or obsolete options to make the list less imposing.
1330 # This message is too long to be a string in the A/UX 3.1 sh.
1331 cat <<_ACEOF
1332 \`configure' configures pcap 1.10.2-PRE-GIT to adapt to many kinds of systems.
1333
1334 Usage: $0 [OPTION]... [VAR=VALUE]...
1335
1336 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1337 VAR=VALUE. See below for descriptions of some of the useful variables.
1338
1339 Defaults for the options are specified in brackets.
1340
1341 Configuration:
1342 -h, --help display this help and exit
1343 --help=short display options specific to this package
1344 --help=recursive display the short help of all the included packages
1345 -V, --version display version information and exit
1346 -q, --quiet, --silent do not print \`checking ...' messages
1347 --cache-file=FILE cache test results in FILE [disabled]
1348 -C, --config-cache alias for \`--cache-file=config.cache'
1349 -n, --no-create do not create output files
1350 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1351
1352 Installation directories:
1353 --prefix=PREFIX install architecture-independent files in PREFIX
1354 [$ac_default_prefix]
1355 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1356 [PREFIX]
1357
1358 By default, \`make install' will install all the files in
1359 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1360 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1361 for instance \`--prefix=\$HOME'.
1362
1363 For better control, use the options below.
1364
1365 Fine tuning of the installation directories:
1366 --bindir=DIR user executables [EPREFIX/bin]
1367 --sbindir=DIR system admin executables [EPREFIX/sbin]
1368 --libexecdir=DIR program executables [EPREFIX/libexec]
1369 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1370 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1371 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1372 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1373 --libdir=DIR object code libraries [EPREFIX/lib]
1374 --includedir=DIR C header files [PREFIX/include]
1375 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1376 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1377 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1378 --infodir=DIR info documentation [DATAROOTDIR/info]
1379 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1380 --mandir=DIR man documentation [DATAROOTDIR/man]
1381 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap]
1382 --htmldir=DIR html documentation [DOCDIR]
1383 --dvidir=DIR dvi documentation [DOCDIR]
1384 --pdfdir=DIR pdf documentation [DOCDIR]
1385 --psdir=DIR ps documentation [DOCDIR]
1386 _ACEOF
1387
1388 cat <<\_ACEOF
1389
1390 System types:
1391 --build=BUILD configure for building on BUILD [guessed]
1392 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1393 --target=TARGET configure for building compilers for TARGET [HOST]
1394 _ACEOF
1395 fi
1396
1397 if test -n "$ac_init_help"; then
1398 case $ac_init_help in
1399 short | recursive ) echo "Configuration of pcap 1.10.2-PRE-GIT:";;
1400 esac
1401 cat <<\_ACEOF
1402
1403 Optional Features:
1404 --disable-option-checking ignore unrecognized --enable/--with options
1405 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1406 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1407 --disable-largefile omit support for large files
1408 --disable-protochain disable \"protochain\" insn
1409 --enable-ipv6 build IPv6-capable version [default=yes]
1410 --enable-remote enable remote packet capture [default=no]
1411 --disable-remote disable remote packet capture
1412 --enable-optimizer-dbg build optimizer debugging code
1413 --enable-yydebug build parser debugging code
1414 --disable-universal don't build universal on macOS
1415 --enable-shared build shared libraries [default=yes, if support
1416 available]
1417 --enable-usb enable Linux usbmon USB capture support
1418 [default=yes, if support available]
1419 --enable-netmap enable netmap support [default=yes, if support
1420 available]
1421 --enable-bluetooth enable Bluetooth support [default=yes, if support
1422 available]
1423 --enable-dbus enable D-Bus capture support [default=yes, if
1424 support available]
1425 --enable-rdma enable RDMA capture support [default=yes, if support
1426 available]
1427
1428 Optional Packages:
1429 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1430 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1431 --without-gcc don't use gcc
1432 --with-pcap=TYPE use packet capture TYPE
1433 --without-libnl disable libnl support [default=yes, on Linux, if
1434 present]
1435 --with-dag[=DIR] include Endace DAG support (located in directory
1436 DIR, if supplied). [default=yes, if present]
1437 --with-dag-includes=IDIR
1438 Endace DAG include directory, if not DIR/include
1439 --with-dag-libraries=LDIR
1440 Endace DAG library directory, if not DIR/lib
1441 --with-septel[=DIR] include Septel support (located in directory DIR, if
1442 supplied). [default=yes, if present]
1443 --with-snf[=DIR] include Myricom SNF support (located in directory
1444 DIR, if supplied). [default=yes, if present]
1445 --with-snf-includes=IDIR
1446 Myricom SNF include directory, if not DIR/include
1447 --with-snf-libraries=LDIR
1448 Myricom SNF library directory, if not DIR/lib
1449 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1450 directory DIR, if supplied). [default=yes, if
1451 present]
1452 --with-dpdk[=DIR] include DPDK support (located in directory DIR, if
1453 supplied). [default=yes, if present]
1454
1455 Some influential environment variables:
1456 CC C compiler command
1457 CFLAGS C compiler flags
1458 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1459 nonstandard directory <lib dir>
1460 LIBS libraries to pass to the linker, e.g. -l<library>
1461 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1462 you have headers in a nonstandard directory <include dir>
1463 CXX C++ compiler command
1464 CXXFLAGS C++ compiler flags
1465 CPP C preprocessor
1466
1467 Use these variables to override the choices made by `configure' or to help
1468 it to find libraries and programs with nonstandard names/locations.
1469
1470 Report bugs to the package provider.
1471 _ACEOF
1472 ac_status=$?
1473 fi
1474
1475 if test "$ac_init_help" = "recursive"; then
1476 # If there are subdirs, report their specific --help.
1477 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1478 test -d "$ac_dir" ||
1479 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1480 continue
1481 ac_builddir=.
1482
1483 case "$ac_dir" in
1484 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1485 *)
1486 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1487 # A ".." for each directory in $ac_dir_suffix.
1488 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1489 case $ac_top_builddir_sub in
1490 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1491 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1492 esac ;;
1493 esac
1494 ac_abs_top_builddir=$ac_pwd
1495 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1496 # for backward compatibility:
1497 ac_top_builddir=$ac_top_build_prefix
1498
1499 case $srcdir in
1500 .) # We are building in place.
1501 ac_srcdir=.
1502 ac_top_srcdir=$ac_top_builddir_sub
1503 ac_abs_top_srcdir=$ac_pwd ;;
1504 [\\/]* | ?:[\\/]* ) # Absolute name.
1505 ac_srcdir=$srcdir$ac_dir_suffix;
1506 ac_top_srcdir=$srcdir
1507 ac_abs_top_srcdir=$srcdir ;;
1508 *) # Relative name.
1509 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1510 ac_top_srcdir=$ac_top_build_prefix$srcdir
1511 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1512 esac
1513 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1514
1515 cd "$ac_dir" || { ac_status=$?; continue; }
1516 # Check for guested configure.
1517 if test -f "$ac_srcdir/configure.gnu"; then
1518 echo &&
1519 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1520 elif test -f "$ac_srcdir/configure"; then
1521 echo &&
1522 $SHELL "$ac_srcdir/configure" --help=recursive
1523 else
1524 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1525 fi || ac_status=$?
1526 cd "$ac_pwd" || { ac_status=$?; break; }
1527 done
1528 fi
1529
1530 test -n "$ac_init_help" && exit $ac_status
1531 if $ac_init_version; then
1532 cat <<\_ACEOF
1533 pcap configure 1.10.2-PRE-GIT
1534 generated by GNU Autoconf 2.69
1535
1536 Copyright (C) 2012 Free Software Foundation, Inc.
1537 This configure script is free software; the Free Software Foundation
1538 gives unlimited permission to copy, distribute and modify it.
1539 _ACEOF
1540 exit
1541 fi
1542
1543 ## ------------------------ ##
1544 ## Autoconf initialization. ##
1545 ## ------------------------ ##
1546
1547 # ac_fn_c_try_compile LINENO
1548 # --------------------------
1549 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1550 ac_fn_c_try_compile ()
1551 {
1552 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1553 rm -f conftest.$ac_objext
1554 if { { ac_try="$ac_compile"
1555 case "(($ac_try" in
1556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1557 *) ac_try_echo=$ac_try;;
1558 esac
1559 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1560 $as_echo "$ac_try_echo"; } >&5
1561 (eval "$ac_compile") 2>conftest.err
1562 ac_status=$?
1563 if test -s conftest.err; then
1564 grep -v '^ *+' conftest.err >conftest.er1
1565 cat conftest.er1 >&5
1566 mv -f conftest.er1 conftest.err
1567 fi
1568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1569 test $ac_status = 0; } && {
1570 test -z "$ac_c_werror_flag" ||
1571 test ! -s conftest.err
1572 } && test -s conftest.$ac_objext; then :
1573 ac_retval=0
1574 else
1575 $as_echo "$as_me: failed program was:" >&5
1576 sed 's/^/| /' conftest.$ac_ext >&5
1577
1578 ac_retval=1
1579 fi
1580 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1581 as_fn_set_status $ac_retval
1582
1583 } # ac_fn_c_try_compile
1584
1585 # ac_fn_cxx_try_compile LINENO
1586 # ----------------------------
1587 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1588 ac_fn_cxx_try_compile ()
1589 {
1590 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1591 rm -f conftest.$ac_objext
1592 if { { ac_try="$ac_compile"
1593 case "(($ac_try" in
1594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1595 *) ac_try_echo=$ac_try;;
1596 esac
1597 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1598 $as_echo "$ac_try_echo"; } >&5
1599 (eval "$ac_compile") 2>conftest.err
1600 ac_status=$?
1601 if test -s conftest.err; then
1602 grep -v '^ *+' conftest.err >conftest.er1
1603 cat conftest.er1 >&5
1604 mv -f conftest.er1 conftest.err
1605 fi
1606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1607 test $ac_status = 0; } && {
1608 test -z "$ac_cxx_werror_flag" ||
1609 test ! -s conftest.err
1610 } && test -s conftest.$ac_objext; then :
1611 ac_retval=0
1612 else
1613 $as_echo "$as_me: failed program was:" >&5
1614 sed 's/^/| /' conftest.$ac_ext >&5
1615
1616 ac_retval=1
1617 fi
1618 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1619 as_fn_set_status $ac_retval
1620
1621 } # ac_fn_cxx_try_compile
1622
1623 # ac_fn_c_try_cpp LINENO
1624 # ----------------------
1625 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1626 ac_fn_c_try_cpp ()
1627 {
1628 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629 if { { ac_try="$ac_cpp conftest.$ac_ext"
1630 case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633 esac
1634 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635 $as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644 test $ac_status = 0; } > conftest.i && {
1645 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 }; then :
1648 ac_retval=0
1649 else
1650 $as_echo "$as_me: failed program was:" >&5
1651 sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654 fi
1655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656 as_fn_set_status $ac_retval
1657
1658 } # ac_fn_c_try_cpp
1659
1660 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1661 # -------------------------------------------------------
1662 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1663 # the include files in INCLUDES and setting the cache variable VAR
1664 # accordingly.
1665 ac_fn_c_check_header_mongrel ()
1666 {
1667 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1668 if eval \${$3+:} false; then :
1669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670 $as_echo_n "checking for $2... " >&6; }
1671 if eval \${$3+:} false; then :
1672 $as_echo_n "(cached) " >&6
1673 fi
1674 eval ac_res=\$$3
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1676 $as_echo "$ac_res" >&6; }
1677 else
1678 # Is the header compilable?
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1680 $as_echo_n "checking $2 usability... " >&6; }
1681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1682 /* end confdefs.h. */
1683 $4
1684 #include <$2>
1685 _ACEOF
1686 if ac_fn_c_try_compile "$LINENO"; then :
1687 ac_header_compiler=yes
1688 else
1689 ac_header_compiler=no
1690 fi
1691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1693 $as_echo "$ac_header_compiler" >&6; }
1694
1695 # Is the header present?
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1697 $as_echo_n "checking $2 presence... " >&6; }
1698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699 /* end confdefs.h. */
1700 #include <$2>
1701 _ACEOF
1702 if ac_fn_c_try_cpp "$LINENO"; then :
1703 ac_header_preproc=yes
1704 else
1705 ac_header_preproc=no
1706 fi
1707 rm -f conftest.err conftest.i conftest.$ac_ext
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1709 $as_echo "$ac_header_preproc" >&6; }
1710
1711 # So? What about this header?
1712 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1713 yes:no: )
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1715 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1717 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1718 ;;
1719 no:yes:* )
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1721 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1723 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1725 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1727 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1729 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1730 ;;
1731 esac
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733 $as_echo_n "checking for $2... " >&6; }
1734 if eval \${$3+:} false; then :
1735 $as_echo_n "(cached) " >&6
1736 else
1737 eval "$3=\$ac_header_compiler"
1738 fi
1739 eval ac_res=\$$3
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1741 $as_echo "$ac_res" >&6; }
1742 fi
1743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744
1745 } # ac_fn_c_check_header_mongrel
1746
1747 # ac_fn_c_try_run LINENO
1748 # ----------------------
1749 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1750 # that executables *can* be run.
1751 ac_fn_c_try_run ()
1752 {
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_link"
1755 case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758 esac
1759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760 $as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_link") 2>&5
1762 ac_status=$?
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1765 { { case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768 esac
1769 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770 $as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_try") 2>&5
1772 ac_status=$?
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; }; }; then :
1775 ac_retval=0
1776 else
1777 $as_echo "$as_me: program exited with status $ac_status" >&5
1778 $as_echo "$as_me: failed program was:" >&5
1779 sed 's/^/| /' conftest.$ac_ext >&5
1780
1781 ac_retval=$ac_status
1782 fi
1783 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1785 as_fn_set_status $ac_retval
1786
1787 } # ac_fn_c_try_run
1788
1789 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1790 # -------------------------------------------------------
1791 # Tests whether HEADER exists and can be compiled using the include files in
1792 # INCLUDES, setting the cache variable VAR accordingly.
1793 ac_fn_c_check_header_compile ()
1794 {
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797 $as_echo_n "checking for $2... " >&6; }
1798 if eval \${$3+:} false; then :
1799 $as_echo_n "(cached) " >&6
1800 else
1801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802 /* end confdefs.h. */
1803 $4
1804 #include <$2>
1805 _ACEOF
1806 if ac_fn_c_try_compile "$LINENO"; then :
1807 eval "$3=yes"
1808 else
1809 eval "$3=no"
1810 fi
1811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812 fi
1813 eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815 $as_echo "$ac_res" >&6; }
1816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1817
1818 } # ac_fn_c_check_header_compile
1819
1820 # ac_fn_c_check_func LINENO FUNC VAR
1821 # ----------------------------------
1822 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1823 ac_fn_c_check_func ()
1824 {
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827 $as_echo_n "checking for $2... " >&6; }
1828 if eval \${$3+:} false; then :
1829 $as_echo_n "(cached) " >&6
1830 else
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h. */
1833 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1834 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1835 #define $2 innocuous_$2
1836
1837 /* System header to define __stub macros and hopefully few prototypes,
1838 which can conflict with char $2 (); below.
1839 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1840 <limits.h> exists even on freestanding compilers. */
1841
1842 #ifdef __STDC__
1843 # include <limits.h>
1844 #else
1845 # include <assert.h>
1846 #endif
1847
1848 #undef $2
1849
1850 /* Override any GCC internal prototype to avoid an error.
1851 Use char because int might match the return type of a GCC
1852 builtin and then its argument prototype would still apply. */
1853 #ifdef __cplusplus
1854 extern "C"
1855 #endif
1856 char $2 ();
1857 /* The GNU C library defines this for functions which it implements
1858 to always fail with ENOSYS. Some functions are actually named
1859 something starting with __ and the normal name is an alias. */
1860 #if defined __stub_$2 || defined __stub___$2
1861 choke me
1862 #endif
1863
1864 int
1865 main ()
1866 {
1867 return $2 ();
1868 ;
1869 return 0;
1870 }
1871 _ACEOF
1872 if ac_fn_c_try_link "$LINENO"; then :
1873 eval "$3=yes"
1874 else
1875 eval "$3=no"
1876 fi
1877 rm -f core conftest.err conftest.$ac_objext \
1878 conftest$ac_exeext conftest.$ac_ext
1879 fi
1880 eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1884
1885 } # ac_fn_c_check_func
1886
1887 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1888 # ---------------------------------------------
1889 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1890 # accordingly.
1891 ac_fn_c_check_decl ()
1892 {
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894 as_decl_name=`echo $2|sed 's/ *(.*//'`
1895 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1897 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1898 if eval \${$3+:} false; then :
1899 $as_echo_n "(cached) " >&6
1900 else
1901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902 /* end confdefs.h. */
1903 $4
1904 int
1905 main ()
1906 {
1907 #ifndef $as_decl_name
1908 #ifdef __cplusplus
1909 (void) $as_decl_use;
1910 #else
1911 (void) $as_decl_name;
1912 #endif
1913 #endif
1914
1915 ;
1916 return 0;
1917 }
1918 _ACEOF
1919 if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921 else
1922 eval "$3=no"
1923 fi
1924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925 fi
1926 eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 $as_echo "$ac_res" >&6; }
1929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930
1931 } # ac_fn_c_check_decl
1932
1933 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934 # -------------------------------------------
1935 # Tests whether TYPE exists after having included INCLUDES, setting cache
1936 # variable VAR accordingly.
1937 ac_fn_c_check_type ()
1938 {
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941 $as_echo_n "checking for $2... " >&6; }
1942 if eval \${$3+:} false; then :
1943 $as_echo_n "(cached) " >&6
1944 else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947 /* end confdefs.h. */
1948 $4
1949 int
1950 main ()
1951 {
1952 if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956 }
1957 _ACEOF
1958 if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960 /* end confdefs.h. */
1961 $4
1962 int
1963 main ()
1964 {
1965 if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969 }
1970 _ACEOF
1971 if ac_fn_c_try_compile "$LINENO"; then :
1972
1973 else
1974 eval "$3=yes"
1975 fi
1976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977 fi
1978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979 fi
1980 eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982 $as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984
1985 } # ac_fn_c_check_type
1986
1987 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1988 # ----------------------------------------------------
1989 # Tries to find if the field MEMBER exists in type AGGR, after including
1990 # INCLUDES, setting cache variable VAR accordingly.
1991 ac_fn_c_check_member ()
1992 {
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1995 $as_echo_n "checking for $2.$3... " >&6; }
1996 if eval \${$4+:} false; then :
1997 $as_echo_n "(cached) " >&6
1998 else
1999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000 /* end confdefs.h. */
2001 $5
2002 int
2003 main ()
2004 {
2005 static $2 ac_aggr;
2006 if (ac_aggr.$3)
2007 return 0;
2008 ;
2009 return 0;
2010 }
2011 _ACEOF
2012 if ac_fn_c_try_compile "$LINENO"; then :
2013 eval "$4=yes"
2014 else
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016 /* end confdefs.h. */
2017 $5
2018 int
2019 main ()
2020 {
2021 static $2 ac_aggr;
2022 if (sizeof ac_aggr.$3)
2023 return 0;
2024 ;
2025 return 0;
2026 }
2027 _ACEOF
2028 if ac_fn_c_try_compile "$LINENO"; then :
2029 eval "$4=yes"
2030 else
2031 eval "$4=no"
2032 fi
2033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 fi
2035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 fi
2037 eval ac_res=\$$4
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039 $as_echo "$ac_res" >&6; }
2040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041
2042 } # ac_fn_c_check_member
2043 cat >config.log <<_ACEOF
2044 This file contains any messages produced by compilers while
2045 running configure, to aid debugging if configure makes a mistake.
2046
2047 It was created by pcap $as_me 1.10.2-PRE-GIT, which was
2048 generated by GNU Autoconf 2.69. Invocation command line was
2049
2050 $ $0 $@
2051
2052 _ACEOF
2053 exec 5>>config.log
2054 {
2055 cat <<_ASUNAME
2056 ## --------- ##
2057 ## Platform. ##
2058 ## --------- ##
2059
2060 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2061 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2062 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2063 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2064 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2065
2066 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2067 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2068
2069 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2070 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2071 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2072 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2073 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2074 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2075 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2076
2077 _ASUNAME
2078
2079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2080 for as_dir in $PATH
2081 do
2082 IFS=$as_save_IFS
2083 test -z "$as_dir" && as_dir=.
2084 $as_echo "PATH: $as_dir"
2085 done
2086 IFS=$as_save_IFS
2087
2088 } >&5
2089
2090 cat >&5 <<_ACEOF
2091
2092
2093 ## ----------- ##
2094 ## Core tests. ##
2095 ## ----------- ##
2096
2097 _ACEOF
2098
2099
2100 # Keep a trace of the command line.
2101 # Strip out --no-create and --no-recursion so they do not pile up.
2102 # Strip out --silent because we don't want to record it for future runs.
2103 # Also quote any args containing shell meta-characters.
2104 # Make two passes to allow for proper duplicate-argument suppression.
2105 ac_configure_args=
2106 ac_configure_args0=
2107 ac_configure_args1=
2108 ac_must_keep_next=false
2109 for ac_pass in 1 2
2110 do
2111 for ac_arg
2112 do
2113 case $ac_arg in
2114 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2115 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2116 | -silent | --silent | --silen | --sile | --sil)
2117 continue ;;
2118 *\'*)
2119 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2120 esac
2121 case $ac_pass in
2122 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2123 2)
2124 as_fn_append ac_configure_args1 " '$ac_arg'"
2125 if test $ac_must_keep_next = true; then
2126 ac_must_keep_next=false # Got value, back to normal.
2127 else
2128 case $ac_arg in
2129 *=* | --config-cache | -C | -disable-* | --disable-* \
2130 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2131 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2132 | -with-* | --with-* | -without-* | --without-* | --x)
2133 case "$ac_configure_args0 " in
2134 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2135 esac
2136 ;;
2137 -* ) ac_must_keep_next=true ;;
2138 esac
2139 fi
2140 as_fn_append ac_configure_args " '$ac_arg'"
2141 ;;
2142 esac
2143 done
2144 done
2145 { ac_configure_args0=; unset ac_configure_args0;}
2146 { ac_configure_args1=; unset ac_configure_args1;}
2147
2148 # When interrupted or exit'd, cleanup temporary files, and complete
2149 # config.log. We remove comments because anyway the quotes in there
2150 # would cause problems or look ugly.
2151 # WARNING: Use '\'' to represent an apostrophe within the trap.
2152 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2153 trap 'exit_status=$?
2154 # Save into config.log some information that might help in debugging.
2155 {
2156 echo
2157
2158 $as_echo "## ---------------- ##
2159 ## Cache variables. ##
2160 ## ---------------- ##"
2161 echo
2162 # The following way of writing the cache mishandles newlines in values,
2163 (
2164 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2165 eval ac_val=\$$ac_var
2166 case $ac_val in #(
2167 *${as_nl}*)
2168 case $ac_var in #(
2169 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2170 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2171 esac
2172 case $ac_var in #(
2173 _ | IFS | as_nl) ;; #(
2174 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2175 *) { eval $ac_var=; unset $ac_var;} ;;
2176 esac ;;
2177 esac
2178 done
2179 (set) 2>&1 |
2180 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2181 *${as_nl}ac_space=\ *)
2182 sed -n \
2183 "s/'\''/'\''\\\\'\'''\''/g;
2184 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2185 ;; #(
2186 *)
2187 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2188 ;;
2189 esac |
2190 sort
2191 )
2192 echo
2193
2194 $as_echo "## ----------------- ##
2195 ## Output variables. ##
2196 ## ----------------- ##"
2197 echo
2198 for ac_var in $ac_subst_vars
2199 do
2200 eval ac_val=\$$ac_var
2201 case $ac_val in
2202 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2203 esac
2204 $as_echo "$ac_var='\''$ac_val'\''"
2205 done | sort
2206 echo
2207
2208 if test -n "$ac_subst_files"; then
2209 $as_echo "## ------------------- ##
2210 ## File substitutions. ##
2211 ## ------------------- ##"
2212 echo
2213 for ac_var in $ac_subst_files
2214 do
2215 eval ac_val=\$$ac_var
2216 case $ac_val in
2217 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2218 esac
2219 $as_echo "$ac_var='\''$ac_val'\''"
2220 done | sort
2221 echo
2222 fi
2223
2224 if test -s confdefs.h; then
2225 $as_echo "## ----------- ##
2226 ## confdefs.h. ##
2227 ## ----------- ##"
2228 echo
2229 cat confdefs.h
2230 echo
2231 fi
2232 test "$ac_signal" != 0 &&
2233 $as_echo "$as_me: caught signal $ac_signal"
2234 $as_echo "$as_me: exit $exit_status"
2235 } >&5
2236 rm -f core *.core core.conftest.* &&
2237 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2238 exit $exit_status
2239 ' 0
2240 for ac_signal in 1 2 13 15; do
2241 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2242 done
2243 ac_signal=0
2244
2245 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2246 rm -f -r conftest* confdefs.h
2247
2248 $as_echo "/* confdefs.h */" > confdefs.h
2249
2250 # Predefined preprocessor variables.
2251
2252 cat >>confdefs.h <<_ACEOF
2253 #define PACKAGE_NAME "$PACKAGE_NAME"
2254 _ACEOF
2255
2256 cat >>confdefs.h <<_ACEOF
2257 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2258 _ACEOF
2259
2260 cat >>confdefs.h <<_ACEOF
2261 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2262 _ACEOF
2263
2264 cat >>confdefs.h <<_ACEOF
2265 #define PACKAGE_STRING "$PACKAGE_STRING"
2266 _ACEOF
2267
2268 cat >>confdefs.h <<_ACEOF
2269 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2270 _ACEOF
2271
2272 cat >>confdefs.h <<_ACEOF
2273 #define PACKAGE_URL "$PACKAGE_URL"
2274 _ACEOF
2275
2276
2277 # Let the site file select an alternate cache file if it wants to.
2278 # Prefer an explicitly selected file to automatically selected ones.
2279 ac_site_file1=NONE
2280 ac_site_file2=NONE
2281 if test -n "$CONFIG_SITE"; then
2282 # We do not want a PATH search for config.site.
2283 case $CONFIG_SITE in #((
2284 -*) ac_site_file1=./$CONFIG_SITE;;
2285 */*) ac_site_file1=$CONFIG_SITE;;
2286 *) ac_site_file1=./$CONFIG_SITE;;
2287 esac
2288 elif test "x$prefix" != xNONE; then
2289 ac_site_file1=$prefix/share/config.site
2290 ac_site_file2=$prefix/etc/config.site
2291 else
2292 ac_site_file1=$ac_default_prefix/share/config.site
2293 ac_site_file2=$ac_default_prefix/etc/config.site
2294 fi
2295 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2296 do
2297 test "x$ac_site_file" = xNONE && continue
2298 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2300 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2301 sed 's/^/| /' "$ac_site_file" >&5
2302 . "$ac_site_file" \
2303 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2304 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2305 as_fn_error $? "failed to load site script $ac_site_file
2306 See \`config.log' for more details" "$LINENO" 5; }
2307 fi
2308 done
2309
2310 if test -r "$cache_file"; then
2311 # Some versions of bash will fail to source /dev/null (special files
2312 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2313 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2315 $as_echo "$as_me: loading cache $cache_file" >&6;}
2316 case $cache_file in
2317 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2318 *) . "./$cache_file";;
2319 esac
2320 fi
2321 else
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2323 $as_echo "$as_me: creating cache $cache_file" >&6;}
2324 >$cache_file
2325 fi
2326
2327 # Check that the precious variables saved in the cache have kept the same
2328 # value.
2329 ac_cache_corrupted=false
2330 for ac_var in $ac_precious_vars; do
2331 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2332 eval ac_new_set=\$ac_env_${ac_var}_set
2333 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2334 eval ac_new_val=\$ac_env_${ac_var}_value
2335 case $ac_old_set,$ac_new_set in
2336 set,)
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2338 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2339 ac_cache_corrupted=: ;;
2340 ,set)
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2342 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2343 ac_cache_corrupted=: ;;
2344 ,);;
2345 *)
2346 if test "x$ac_old_val" != "x$ac_new_val"; then
2347 # differences in whitespace do not lead to failure.
2348 ac_old_val_w=`echo x $ac_old_val`
2349 ac_new_val_w=`echo x $ac_new_val`
2350 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2352 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2353 ac_cache_corrupted=:
2354 else
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2356 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2357 eval $ac_var=\$ac_old_val
2358 fi
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2360 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2362 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2363 fi;;
2364 esac
2365 # Pass precious variables to config.status.
2366 if test "$ac_new_set" = set; then
2367 case $ac_new_val in
2368 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2369 *) ac_arg=$ac_var=$ac_new_val ;;
2370 esac
2371 case " $ac_configure_args " in
2372 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2373 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2374 esac
2375 fi
2376 done
2377 if $ac_cache_corrupted; then
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2381 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2382 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2383 fi
2384 ## -------------------- ##
2385 ## Main body of script. ##
2386 ## -------------------- ##
2387
2388 ac_ext=c
2389 ac_cpp='$CPP $CPPFLAGS'
2390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2393
2394
2395
2396
2397
2398 ac_aux_dir=
2399 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2400 if test -f "$ac_dir/install-sh"; then
2401 ac_aux_dir=$ac_dir
2402 ac_install_sh="$ac_aux_dir/install-sh -c"
2403 break
2404 elif test -f "$ac_dir/install.sh"; then
2405 ac_aux_dir=$ac_dir
2406 ac_install_sh="$ac_aux_dir/install.sh -c"
2407 break
2408 elif test -f "$ac_dir/shtool"; then
2409 ac_aux_dir=$ac_dir
2410 ac_install_sh="$ac_aux_dir/shtool install -c"
2411 break
2412 fi
2413 done
2414 if test -z "$ac_aux_dir"; then
2415 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2416 fi
2417
2418 # These three variables are undocumented and unsupported,
2419 # and are intended to be withdrawn in a future Autoconf release.
2420 # They can cause serious problems if a builder's source tree is in a directory
2421 # whose full name contains unusual characters.
2422 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2423 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2424 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2425
2426
2427 # Make sure we can run config.sub.
2428 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2429 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2430
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2432 $as_echo_n "checking build system type... " >&6; }
2433 if ${ac_cv_build+:} false; then :
2434 $as_echo_n "(cached) " >&6
2435 else
2436 ac_build_alias=$build_alias
2437 test "x$ac_build_alias" = x &&
2438 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2439 test "x$ac_build_alias" = x &&
2440 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2441 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2442 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2443
2444 fi
2445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2446 $as_echo "$ac_cv_build" >&6; }
2447 case $ac_cv_build in
2448 *-*-*) ;;
2449 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2450 esac
2451 build=$ac_cv_build
2452 ac_save_IFS=$IFS; IFS='-'
2453 set x $ac_cv_build
2454 shift
2455 build_cpu=$1
2456 build_vendor=$2
2457 shift; shift
2458 # Remember, the first character of IFS is used to create $*,
2459 # except with old shells:
2460 build_os=$*
2461 IFS=$ac_save_IFS
2462 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2463
2464
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2466 $as_echo_n "checking host system type... " >&6; }
2467 if ${ac_cv_host+:} false; then :
2468 $as_echo_n "(cached) " >&6
2469 else
2470 if test "x$host_alias" = x; then
2471 ac_cv_host=$ac_cv_build
2472 else
2473 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2474 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2475 fi
2476
2477 fi
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2479 $as_echo "$ac_cv_host" >&6; }
2480 case $ac_cv_host in
2481 *-*-*) ;;
2482 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2483 esac
2484 host=$ac_cv_host
2485 ac_save_IFS=$IFS; IFS='-'
2486 set x $ac_cv_host
2487 shift
2488 host_cpu=$1
2489 host_vendor=$2
2490 shift; shift
2491 # Remember, the first character of IFS is used to create $*,
2492 # except with old shells:
2493 host_os=$*
2494 IFS=$ac_save_IFS
2495 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2496
2497
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2499 $as_echo_n "checking target system type... " >&6; }
2500 if ${ac_cv_target+:} false; then :
2501 $as_echo_n "(cached) " >&6
2502 else
2503 if test "x$target_alias" = x; then
2504 ac_cv_target=$ac_cv_host
2505 else
2506 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2507 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2508 fi
2509
2510 fi
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2512 $as_echo "$ac_cv_target" >&6; }
2513 case $ac_cv_target in
2514 *-*-*) ;;
2515 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2516 esac
2517 target=$ac_cv_target
2518 ac_save_IFS=$IFS; IFS='-'
2519 set x $ac_cv_target
2520 shift
2521 target_cpu=$1
2522 target_vendor=$2
2523 shift; shift
2524 # Remember, the first character of IFS is used to create $*,
2525 # except with old shells:
2526 target_os=$*
2527 IFS=$ac_save_IFS
2528 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2529
2530
2531 # The aliases save the names the user supplied, while $host etc.
2532 # will get canonicalized.
2533 test -n "$target_alias" &&
2534 test "$program_prefix$program_suffix$program_transform_name" = \
2535 NONENONEs,x,x, &&
2536 program_prefix=${target_alias}-
2537
2538
2539
2540
2541
2542
2543
2544
2545 # Check whether --with-gcc was given.
2546 if test "${with_gcc+set}" = set; then :
2547 withval=$with_gcc;
2548 fi
2549
2550 V_CCOPT=""
2551 if test "${srcdir}" != "." ; then
2552 V_CCOPT="-I\$(srcdir)"
2553 fi
2554 if test "${CFLAGS+set}" = set; then
2555 LBL_CFLAGS="$CFLAGS"
2556 fi
2557 if test -z "$CC" ; then
2558 case "$host_os" in
2559
2560 bsdi*)
2561 # Extract the first word of "shlicc2", so it can be a program name with args.
2562 set dummy shlicc2; ac_word=$2
2563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2564 $as_echo_n "checking for $ac_word... " >&6; }
2565 if ${ac_cv_prog_SHLICC2+:} false; then :
2566 $as_echo_n "(cached) " >&6
2567 else
2568 if test -n "$SHLICC2"; then
2569 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2570 else
2571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2572 for as_dir in $PATH
2573 do
2574 IFS=$as_save_IFS
2575 test -z "$as_dir" && as_dir=.
2576 for ac_exec_ext in '' $ac_executable_extensions; do
2577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2578 ac_cv_prog_SHLICC2="yes"
2579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2580 break 2
2581 fi
2582 done
2583 done
2584 IFS=$as_save_IFS
2585
2586 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2587 fi
2588 fi
2589 SHLICC2=$ac_cv_prog_SHLICC2
2590 if test -n "$SHLICC2"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2592 $as_echo "$SHLICC2" >&6; }
2593 else
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2595 $as_echo "no" >&6; }
2596 fi
2597
2598
2599 if test $SHLICC2 = yes ; then
2600 CC=shlicc2
2601 export CC
2602 fi
2603 ;;
2604 esac
2605 fi
2606 if test -z "$CC" -a "$with_gcc" = no ; then
2607 CC=cc
2608 export CC
2609 fi
2610
2611 #
2612 # We require C99 or later.
2613 # Try to get it, which may involve adding compiler flags;
2614 # if that fails, give up.
2615 #
2616 ac_ext=c
2617 ac_cpp='$CPP $CPPFLAGS'
2618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2621 if test -n "$ac_tool_prefix"; then
2622 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2623 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2625 $as_echo_n "checking for $ac_word... " >&6; }
2626 if ${ac_cv_prog_CC+:} false; then :
2627 $as_echo_n "(cached) " >&6
2628 else
2629 if test -n "$CC"; then
2630 ac_cv_prog_CC="$CC" # Let the user override the test.
2631 else
2632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2633 for as_dir in $PATH
2634 do
2635 IFS=$as_save_IFS
2636 test -z "$as_dir" && as_dir=.
2637 for ac_exec_ext in '' $ac_executable_extensions; do
2638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2639 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2641 break 2
2642 fi
2643 done
2644 done
2645 IFS=$as_save_IFS
2646
2647 fi
2648 fi
2649 CC=$ac_cv_prog_CC
2650 if test -n "$CC"; then
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2652 $as_echo "$CC" >&6; }
2653 else
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2655 $as_echo "no" >&6; }
2656 fi
2657
2658
2659 fi
2660 if test -z "$ac_cv_prog_CC"; then
2661 ac_ct_CC=$CC
2662 # Extract the first word of "gcc", so it can be a program name with args.
2663 set dummy gcc; ac_word=$2
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2665 $as_echo_n "checking for $ac_word... " >&6; }
2666 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2667 $as_echo_n "(cached) " >&6
2668 else
2669 if test -n "$ac_ct_CC"; then
2670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2671 else
2672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2673 for as_dir in $PATH
2674 do
2675 IFS=$as_save_IFS
2676 test -z "$as_dir" && as_dir=.
2677 for ac_exec_ext in '' $ac_executable_extensions; do
2678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2679 ac_cv_prog_ac_ct_CC="gcc"
2680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2681 break 2
2682 fi
2683 done
2684 done
2685 IFS=$as_save_IFS
2686
2687 fi
2688 fi
2689 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2690 if test -n "$ac_ct_CC"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2692 $as_echo "$ac_ct_CC" >&6; }
2693 else
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2695 $as_echo "no" >&6; }
2696 fi
2697
2698 if test "x$ac_ct_CC" = x; then
2699 CC=""
2700 else
2701 case $cross_compiling:$ac_tool_warned in
2702 yes:)
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2704 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2705 ac_tool_warned=yes ;;
2706 esac
2707 CC=$ac_ct_CC
2708 fi
2709 else
2710 CC="$ac_cv_prog_CC"
2711 fi
2712
2713 if test -z "$CC"; then
2714 if test -n "$ac_tool_prefix"; then
2715 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2716 set dummy ${ac_tool_prefix}cc; ac_word=$2
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718 $as_echo_n "checking for $ac_word... " >&6; }
2719 if ${ac_cv_prog_CC+:} false; then :
2720 $as_echo_n "(cached) " >&6
2721 else
2722 if test -n "$CC"; then
2723 ac_cv_prog_CC="$CC" # Let the user override the test.
2724 else
2725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726 for as_dir in $PATH
2727 do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
2731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2732 ac_cv_prog_CC="${ac_tool_prefix}cc"
2733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736 done
2737 done
2738 IFS=$as_save_IFS
2739
2740 fi
2741 fi
2742 CC=$ac_cv_prog_CC
2743 if test -n "$CC"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2745 $as_echo "$CC" >&6; }
2746 else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748 $as_echo "no" >&6; }
2749 fi
2750
2751
2752 fi
2753 fi
2754 if test -z "$CC"; then
2755 # Extract the first word of "cc", so it can be a program name with args.
2756 set dummy cc; ac_word=$2
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2758 $as_echo_n "checking for $ac_word... " >&6; }
2759 if ${ac_cv_prog_CC+:} false; then :
2760 $as_echo_n "(cached) " >&6
2761 else
2762 if test -n "$CC"; then
2763 ac_cv_prog_CC="$CC" # Let the user override the test.
2764 else
2765 ac_prog_rejected=no
2766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2767 for as_dir in $PATH
2768 do
2769 IFS=$as_save_IFS
2770 test -z "$as_dir" && as_dir=.
2771 for ac_exec_ext in '' $ac_executable_extensions; do
2772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2773 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2774 ac_prog_rejected=yes
2775 continue
2776 fi
2777 ac_cv_prog_CC="cc"
2778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2779 break 2
2780 fi
2781 done
2782 done
2783 IFS=$as_save_IFS
2784
2785 if test $ac_prog_rejected = yes; then
2786 # We found a bogon in the path, so make sure we never use it.
2787 set dummy $ac_cv_prog_CC
2788 shift
2789 if test $# != 0; then
2790 # We chose a different compiler from the bogus one.
2791 # However, it has the same basename, so the bogon will be chosen
2792 # first if we set CC to just the basename; use the full file name.
2793 shift
2794 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2795 fi
2796 fi
2797 fi
2798 fi
2799 CC=$ac_cv_prog_CC
2800 if test -n "$CC"; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2802 $as_echo "$CC" >&6; }
2803 else
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805 $as_echo "no" >&6; }
2806 fi
2807
2808
2809 fi
2810 if test -z "$CC"; then
2811 if test -n "$ac_tool_prefix"; then
2812 for ac_prog in cl.exe
2813 do
2814 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2815 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2817 $as_echo_n "checking for $ac_word... " >&6; }
2818 if ${ac_cv_prog_CC+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820 else
2821 if test -n "$CC"; then
2822 ac_cv_prog_CC="$CC" # Let the user override the test.
2823 else
2824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2825 for as_dir in $PATH
2826 do
2827 IFS=$as_save_IFS
2828 test -z "$as_dir" && as_dir=.
2829 for ac_exec_ext in '' $ac_executable_extensions; do
2830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2831 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2833 break 2
2834 fi
2835 done
2836 done
2837 IFS=$as_save_IFS
2838
2839 fi
2840 fi
2841 CC=$ac_cv_prog_CC
2842 if test -n "$CC"; then
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2844 $as_echo "$CC" >&6; }
2845 else
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2847 $as_echo "no" >&6; }
2848 fi
2849
2850
2851 test -n "$CC" && break
2852 done
2853 fi
2854 if test -z "$CC"; then
2855 ac_ct_CC=$CC
2856 for ac_prog in cl.exe
2857 do
2858 # Extract the first word of "$ac_prog", so it can be a program name with args.
2859 set dummy $ac_prog; ac_word=$2
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2861 $as_echo_n "checking for $ac_word... " >&6; }
2862 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864 else
2865 if test -n "$ac_ct_CC"; then
2866 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2867 else
2868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2869 for as_dir in $PATH
2870 do
2871 IFS=$as_save_IFS
2872 test -z "$as_dir" && as_dir=.
2873 for ac_exec_ext in '' $ac_executable_extensions; do
2874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2875 ac_cv_prog_ac_ct_CC="$ac_prog"
2876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2877 break 2
2878 fi
2879 done
2880 done
2881 IFS=$as_save_IFS
2882
2883 fi
2884 fi
2885 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2886 if test -n "$ac_ct_CC"; then
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2888 $as_echo "$ac_ct_CC" >&6; }
2889 else
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2891 $as_echo "no" >&6; }
2892 fi
2893
2894
2895 test -n "$ac_ct_CC" && break
2896 done
2897
2898 if test "x$ac_ct_CC" = x; then
2899 CC=""
2900 else
2901 case $cross_compiling:$ac_tool_warned in
2902 yes:)
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2904 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2905 ac_tool_warned=yes ;;
2906 esac
2907 CC=$ac_ct_CC
2908 fi
2909 fi
2910
2911 fi
2912
2913
2914 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2915 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2916 as_fn_error $? "no acceptable C compiler found in \$PATH
2917 See \`config.log' for more details" "$LINENO" 5; }
2918
2919 # Provide some information about the compiler.
2920 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2921 set X $ac_compile
2922 ac_compiler=$2
2923 for ac_option in --version -v -V -qversion; do
2924 { { ac_try="$ac_compiler $ac_option >&5"
2925 case "(($ac_try" in
2926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927 *) ac_try_echo=$ac_try;;
2928 esac
2929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2930 $as_echo "$ac_try_echo"; } >&5
2931 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2932 ac_status=$?
2933 if test -s conftest.err; then
2934 sed '10a\
2935 ... rest of stderr output deleted ...
2936 10q' conftest.err >conftest.er1
2937 cat conftest.er1 >&5
2938 fi
2939 rm -f conftest.er1 conftest.err
2940 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2941 test $ac_status = 0; }
2942 done
2943
2944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2945 /* end confdefs.h. */
2946
2947 int
2948 main ()
2949 {
2950
2951 ;
2952 return 0;
2953 }
2954 _ACEOF
2955 ac_clean_files_save=$ac_clean_files
2956 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2957 # Try to create an executable without -o first, disregard a.out.
2958 # It will help us diagnose broken compilers, and finding out an intuition
2959 # of exeext.
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2961 $as_echo_n "checking whether the C compiler works... " >&6; }
2962 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2963
2964 # The possible output files:
2965 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2966
2967 ac_rmfiles=
2968 for ac_file in $ac_files
2969 do
2970 case $ac_file in
2971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2972 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2973 esac
2974 done
2975 rm -f $ac_rmfiles
2976
2977 if { { ac_try="$ac_link_default"
2978 case "(($ac_try" in
2979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980 *) ac_try_echo=$ac_try;;
2981 esac
2982 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2983 $as_echo "$ac_try_echo"; } >&5
2984 (eval "$ac_link_default") 2>&5
2985 ac_status=$?
2986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2987 test $ac_status = 0; }; then :
2988 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2989 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2990 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2991 # so that the user can short-circuit this test for compilers unknown to
2992 # Autoconf.
2993 for ac_file in $ac_files ''
2994 do
2995 test -f "$ac_file" || continue
2996 case $ac_file in
2997 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2998 ;;
2999 [ab].out )
3000 # We found the default executable, but exeext='' is most
3001 # certainly right.
3002 break;;
3003 *.* )
3004 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3005 then :; else
3006 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3007 fi
3008 # We set ac_cv_exeext here because the later test for it is not
3009 # safe: cross compilers may not add the suffix if given an `-o'
3010 # argument, so we may need to know it at that point already.
3011 # Even if this section looks crufty: it has the advantage of
3012 # actually working.
3013 break;;
3014 * )
3015 break;;
3016 esac
3017 done
3018 test "$ac_cv_exeext" = no && ac_cv_exeext=
3019
3020 else
3021 ac_file=''
3022 fi
3023 if test -z "$ac_file"; then :
3024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3025 $as_echo "no" >&6; }
3026 $as_echo "$as_me: failed program was:" >&5
3027 sed 's/^/| /' conftest.$ac_ext >&5
3028
3029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3030 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3031 as_fn_error 77 "C compiler cannot create executables
3032 See \`config.log' for more details" "$LINENO" 5; }
3033 else
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3035 $as_echo "yes" >&6; }
3036 fi
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3038 $as_echo_n "checking for C compiler default output file name... " >&6; }
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3040 $as_echo "$ac_file" >&6; }
3041 ac_exeext=$ac_cv_exeext
3042
3043 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3044 ac_clean_files=$ac_clean_files_save
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3046 $as_echo_n "checking for suffix of executables... " >&6; }
3047 if { { ac_try="$ac_link"
3048 case "(($ac_try" in
3049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3050 *) ac_try_echo=$ac_try;;
3051 esac
3052 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3053 $as_echo "$ac_try_echo"; } >&5
3054 (eval "$ac_link") 2>&5
3055 ac_status=$?
3056 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3057 test $ac_status = 0; }; then :
3058 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3059 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3060 # work properly (i.e., refer to `conftest.exe'), while it won't with
3061 # `rm'.
3062 for ac_file in conftest.exe conftest conftest.*; do
3063 test -f "$ac_file" || continue
3064 case $ac_file in
3065 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3066 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3067 break;;
3068 * ) break;;
3069 esac
3070 done
3071 else
3072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3073 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3074 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3075 See \`config.log' for more details" "$LINENO" 5; }
3076 fi
3077 rm -f conftest conftest$ac_cv_exeext
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3079 $as_echo "$ac_cv_exeext" >&6; }
3080
3081 rm -f conftest.$ac_ext
3082 EXEEXT=$ac_cv_exeext
3083 ac_exeext=$EXEEXT
3084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085 /* end confdefs.h. */
3086 #include <stdio.h>
3087 int
3088 main ()
3089 {
3090 FILE *f = fopen ("conftest.out", "w");
3091 return ferror (f) || fclose (f) != 0;
3092
3093 ;
3094 return 0;
3095 }
3096 _ACEOF
3097 ac_clean_files="$ac_clean_files conftest.out"
3098 # Check that the compiler produces executables we can run. If not, either
3099 # the compiler is broken, or we cross compile.
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3101 $as_echo_n "checking whether we are cross compiling... " >&6; }
3102 if test "$cross_compiling" != yes; then
3103 { { ac_try="$ac_link"
3104 case "(($ac_try" in
3105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106 *) ac_try_echo=$ac_try;;
3107 esac
3108 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3109 $as_echo "$ac_try_echo"; } >&5
3110 (eval "$ac_link") 2>&5
3111 ac_status=$?
3112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113 test $ac_status = 0; }
3114 if { ac_try='./conftest$ac_cv_exeext'
3115 { { case "(($ac_try" in
3116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117 *) ac_try_echo=$ac_try;;
3118 esac
3119 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3120 $as_echo "$ac_try_echo"; } >&5
3121 (eval "$ac_try") 2>&5
3122 ac_status=$?
3123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3124 test $ac_status = 0; }; }; then
3125 cross_compiling=no
3126 else
3127 if test "$cross_compiling" = maybe; then
3128 cross_compiling=yes
3129 else
3130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132 as_fn_error $? "cannot run C compiled programs.
3133 If you meant to cross compile, use \`--host'.
3134 See \`config.log' for more details" "$LINENO" 5; }
3135 fi
3136 fi
3137 fi
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3139 $as_echo "$cross_compiling" >&6; }
3140
3141 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3142 ac_clean_files=$ac_clean_files_save
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3144 $as_echo_n "checking for suffix of object files... " >&6; }
3145 if ${ac_cv_objext+:} false; then :
3146 $as_echo_n "(cached) " >&6
3147 else
3148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3149 /* end confdefs.h. */
3150
3151 int
3152 main ()
3153 {
3154
3155 ;
3156 return 0;
3157 }
3158 _ACEOF
3159 rm -f conftest.o conftest.obj
3160 if { { ac_try="$ac_compile"
3161 case "(($ac_try" in
3162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3163 *) ac_try_echo=$ac_try;;
3164 esac
3165 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3166 $as_echo "$ac_try_echo"; } >&5
3167 (eval "$ac_compile") 2>&5
3168 ac_status=$?
3169 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3170 test $ac_status = 0; }; then :
3171 for ac_file in conftest.o conftest.obj conftest.*; do
3172 test -f "$ac_file" || continue;
3173 case $ac_file in
3174 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3175 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3176 break;;
3177 esac
3178 done
3179 else
3180 $as_echo "$as_me: failed program was:" >&5
3181 sed 's/^/| /' conftest.$ac_ext >&5
3182
3183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3184 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3185 as_fn_error $? "cannot compute suffix of object files: cannot compile
3186 See \`config.log' for more details" "$LINENO" 5; }
3187 fi
3188 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3189 fi
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3191 $as_echo "$ac_cv_objext" >&6; }
3192 OBJEXT=$ac_cv_objext
3193 ac_objext=$OBJEXT
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3195 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3196 if ${ac_cv_c_compiler_gnu+:} false; then :
3197 $as_echo_n "(cached) " >&6
3198 else
3199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3200 /* end confdefs.h. */
3201
3202 int
3203 main ()
3204 {
3205 #ifndef __GNUC__
3206 choke me
3207 #endif
3208
3209 ;
3210 return 0;
3211 }
3212 _ACEOF
3213 if ac_fn_c_try_compile "$LINENO"; then :
3214 ac_compiler_gnu=yes
3215 else
3216 ac_compiler_gnu=no
3217 fi
3218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3219 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3220
3221 fi
3222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3223 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3224 if test $ac_compiler_gnu = yes; then
3225 GCC=yes
3226 else
3227 GCC=
3228 fi
3229 ac_test_CFLAGS=${CFLAGS+set}
3230 ac_save_CFLAGS=$CFLAGS
3231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3232 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3233 if ${ac_cv_prog_cc_g+:} false; then :
3234 $as_echo_n "(cached) " >&6
3235 else
3236 ac_save_c_werror_flag=$ac_c_werror_flag
3237 ac_c_werror_flag=yes
3238 ac_cv_prog_cc_g=no
3239 CFLAGS="-g"
3240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3241 /* end confdefs.h. */
3242
3243 int
3244 main ()
3245 {
3246
3247 ;
3248 return 0;
3249 }
3250 _ACEOF
3251 if ac_fn_c_try_compile "$LINENO"; then :
3252 ac_cv_prog_cc_g=yes
3253 else
3254 CFLAGS=""
3255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3256 /* end confdefs.h. */
3257
3258 int
3259 main ()
3260 {
3261
3262 ;
3263 return 0;
3264 }
3265 _ACEOF
3266 if ac_fn_c_try_compile "$LINENO"; then :
3267
3268 else
3269 ac_c_werror_flag=$ac_save_c_werror_flag
3270 CFLAGS="-g"
3271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3272 /* end confdefs.h. */
3273
3274 int
3275 main ()
3276 {
3277
3278 ;
3279 return 0;
3280 }
3281 _ACEOF
3282 if ac_fn_c_try_compile "$LINENO"; then :
3283 ac_cv_prog_cc_g=yes
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 fi
3289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3290 ac_c_werror_flag=$ac_save_c_werror_flag
3291 fi
3292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3293 $as_echo "$ac_cv_prog_cc_g" >&6; }
3294 if test "$ac_test_CFLAGS" = set; then
3295 CFLAGS=$ac_save_CFLAGS
3296 elif test $ac_cv_prog_cc_g = yes; then
3297 if test "$GCC" = yes; then
3298 CFLAGS="-g -O2"
3299 else
3300 CFLAGS="-g"
3301 fi
3302 else
3303 if test "$GCC" = yes; then
3304 CFLAGS="-O2"
3305 else
3306 CFLAGS=
3307 fi
3308 fi
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3310 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3311 if ${ac_cv_prog_cc_c89+:} false; then :
3312 $as_echo_n "(cached) " >&6
3313 else
3314 ac_cv_prog_cc_c89=no
3315 ac_save_CC=$CC
3316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3317 /* end confdefs.h. */
3318 #include <stdarg.h>
3319 #include <stdio.h>
3320 struct stat;
3321 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3322 struct buf { int x; };
3323 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3324 static char *e (p, i)
3325 char **p;
3326 int i;
3327 {
3328 return p[i];
3329 }
3330 static char *f (char * (*g) (char **, int), char **p, ...)
3331 {
3332 char *s;
3333 va_list v;
3334 va_start (v,p);
3335 s = g (p, va_arg (v,int));
3336 va_end (v);
3337 return s;
3338 }
3339
3340 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3341 function prototypes and stuff, but not '\xHH' hex character constants.
3342 These don't provoke an error unfortunately, instead are silently treated
3343 as 'x'. The following induces an error, until -std is added to get
3344 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3345 array size at least. It's necessary to write '\x00'==0 to get something
3346 that's true only with -std. */
3347 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3348
3349 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3350 inside strings and character constants. */
3351 #define FOO(x) 'x'
3352 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3353
3354 int test (int i, double x);
3355 struct s1 {int (*f) (int a);};
3356 struct s2 {int (*f) (double a);};
3357 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3358 int argc;
3359 char **argv;
3360 int
3361 main ()
3362 {
3363 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3364 ;
3365 return 0;
3366 }
3367 _ACEOF
3368 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3369 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3370 do
3371 CC="$ac_save_CC $ac_arg"
3372 if ac_fn_c_try_compile "$LINENO"; then :
3373 ac_cv_prog_cc_c89=$ac_arg
3374 fi
3375 rm -f core conftest.err conftest.$ac_objext
3376 test "x$ac_cv_prog_cc_c89" != "xno" && break
3377 done
3378 rm -f conftest.$ac_ext
3379 CC=$ac_save_CC
3380
3381 fi
3382 # AC_CACHE_VAL
3383 case "x$ac_cv_prog_cc_c89" in
3384 x)
3385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3386 $as_echo "none needed" >&6; } ;;
3387 xno)
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3389 $as_echo "unsupported" >&6; } ;;
3390 *)
3391 CC="$CC $ac_cv_prog_cc_c89"
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3393 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3394 esac
3395 if test "x$ac_cv_prog_cc_c89" != xno; then :
3396
3397 fi
3398
3399 ac_ext=c
3400 ac_cpp='$CPP $CPPFLAGS'
3401 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3402 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3403 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3404
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3406 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3407 if ${ac_cv_prog_cc_c99+:} false; then :
3408 $as_echo_n "(cached) " >&6
3409 else
3410 ac_cv_prog_cc_c99=no
3411 ac_save_CC=$CC
3412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3413 /* end confdefs.h. */
3414 #include <stdarg.h>
3415 #include <stdbool.h>
3416 #include <stdlib.h>
3417 #include <wchar.h>
3418 #include <stdio.h>
3419
3420 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3421 #define debug(...) fprintf (stderr, __VA_ARGS__)
3422 #define showlist(...) puts (#__VA_ARGS__)
3423 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3424 static void
3425 test_varargs_macros (void)
3426 {
3427 int x = 1234;
3428 int y = 5678;
3429 debug ("Flag");
3430 debug ("X = %d\n", x);
3431 showlist (The first, second, and third items.);
3432 report (x>y, "x is %d but y is %d", x, y);
3433 }
3434
3435 // Check long long types.
3436 #define BIG64 18446744073709551615ull
3437 #define BIG32 4294967295ul
3438 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3439 #if !BIG_OK
3440 your preprocessor is broken;
3441 #endif
3442 #if BIG_OK
3443 #else
3444 your preprocessor is broken;
3445 #endif
3446 static long long int bignum = -9223372036854775807LL;
3447 static unsigned long long int ubignum = BIG64;
3448
3449 struct incomplete_array
3450 {
3451 int datasize;
3452 double data[];
3453 };
3454
3455 struct named_init {
3456 int number;
3457 const wchar_t *name;
3458 double average;
3459 };
3460
3461 typedef const char *ccp;
3462
3463 static inline int
3464 test_restrict (ccp restrict text)
3465 {
3466 // See if C++-style comments work.
3467 // Iterate through items via the restricted pointer.
3468 // Also check for declarations in for loops.
3469 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3470 continue;
3471 return 0;
3472 }
3473
3474 // Check varargs and va_copy.
3475 static void
3476 test_varargs (const char *format, ...)
3477 {
3478 va_list args;
3479 va_start (args, format);
3480 va_list args_copy;
3481 va_copy (args_copy, args);
3482
3483 const char *str;
3484 int number;
3485 float fnumber;
3486
3487 while (*format)
3488 {
3489 switch (*format++)
3490 {
3491 case 's': // string
3492 str = va_arg (args_copy, const char *);
3493 break;
3494 case 'd': // int
3495 number = va_arg (args_copy, int);
3496 break;
3497 case 'f': // float
3498 fnumber = va_arg (args_copy, double);
3499 break;
3500 default:
3501 break;
3502 }
3503 }
3504 va_end (args_copy);
3505 va_end (args);
3506 }
3507
3508 int
3509 main ()
3510 {
3511
3512 // Check bool.
3513 _Bool success = false;
3514
3515 // Check restrict.
3516 if (test_restrict ("String literal") == 0)
3517 success = true;
3518 char *restrict newvar = "Another string";
3519
3520 // Check varargs.
3521 test_varargs ("s, d' f .", "string", 65, 34.234);
3522 test_varargs_macros ();
3523
3524 // Check flexible array members.
3525 struct incomplete_array *ia =
3526 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3527 ia->datasize = 10;
3528 for (int i = 0; i < ia->datasize; ++i)
3529 ia->data[i] = i * 1.234;
3530
3531 // Check named initializers.
3532 struct named_init ni = {
3533 .number = 34,
3534 .name = L"Test wide string",
3535 .average = 543.34343,
3536 };
3537
3538 ni.number = 58;
3539
3540 int dynamic_array[ni.number];
3541 dynamic_array[ni.number - 1] = 543;
3542
3543 // work around unused variable warnings
3544 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3545 || dynamic_array[ni.number - 1] != 543);
3546
3547 ;
3548 return 0;
3549 }
3550 _ACEOF
3551 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3552 do
3553 CC="$ac_save_CC $ac_arg"
3554 if ac_fn_c_try_compile "$LINENO"; then :
3555 ac_cv_prog_cc_c99=$ac_arg
3556 fi
3557 rm -f core conftest.err conftest.$ac_objext
3558 test "x$ac_cv_prog_cc_c99" != "xno" && break
3559 done
3560 rm -f conftest.$ac_ext
3561 CC=$ac_save_CC
3562
3563 fi
3564 # AC_CACHE_VAL
3565 case "x$ac_cv_prog_cc_c99" in
3566 x)
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3568 $as_echo "none needed" >&6; } ;;
3569 xno)
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3571 $as_echo "unsupported" >&6; } ;;
3572 *)
3573 CC="$CC $ac_cv_prog_cc_c99"
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3575 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3576 esac
3577 if test "x$ac_cv_prog_cc_c99" != xno; then :
3578
3579 fi
3580
3581
3582 if test "$ac_cv_prog_cc_c99" = "no"; then
3583 as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
3584 fi
3585 case "$host_os" in
3586 haiku*)
3587 #
3588 # Haiku's platform file is in C++.
3589 #
3590 ac_ext=cpp
3591 ac_cpp='$CXXCPP $CPPFLAGS'
3592 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3595 if test -z "$CXX"; then
3596 if test -n "$CCC"; then
3597 CXX=$CCC
3598 else
3599 if test -n "$ac_tool_prefix"; then
3600 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3601 do
3602 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3603 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605 $as_echo_n "checking for $ac_word... " >&6; }
3606 if ${ac_cv_prog_CXX+:} false; then :
3607 $as_echo_n "(cached) " >&6
3608 else
3609 if test -n "$CXX"; then
3610 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3611 else
3612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613 for as_dir in $PATH
3614 do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
3617 for ac_exec_ext in '' $ac_executable_extensions; do
3618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3619 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3620 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3621 break 2
3622 fi
3623 done
3624 done
3625 IFS=$as_save_IFS
3626
3627 fi
3628 fi
3629 CXX=$ac_cv_prog_CXX
3630 if test -n "$CXX"; then
3631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3632 $as_echo "$CXX" >&6; }
3633 else
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635 $as_echo "no" >&6; }
3636 fi
3637
3638
3639 test -n "$CXX" && break
3640 done
3641 fi
3642 if test -z "$CXX"; then
3643 ac_ct_CXX=$CXX
3644 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3645 do
3646 # Extract the first word of "$ac_prog", so it can be a program name with args.
3647 set dummy $ac_prog; ac_word=$2
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649 $as_echo_n "checking for $ac_word... " >&6; }
3650 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3651 $as_echo_n "(cached) " >&6
3652 else
3653 if test -n "$ac_ct_CXX"; then
3654 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3655 else
3656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657 for as_dir in $PATH
3658 do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
3661 for ac_exec_ext in '' $ac_executable_extensions; do
3662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3663 ac_cv_prog_ac_ct_CXX="$ac_prog"
3664 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3665 break 2
3666 fi
3667 done
3668 done
3669 IFS=$as_save_IFS
3670
3671 fi
3672 fi
3673 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3674 if test -n "$ac_ct_CXX"; then
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3676 $as_echo "$ac_ct_CXX" >&6; }
3677 else
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679 $as_echo "no" >&6; }
3680 fi
3681
3682
3683 test -n "$ac_ct_CXX" && break
3684 done
3685
3686 if test "x$ac_ct_CXX" = x; then
3687 CXX="g++"
3688 else
3689 case $cross_compiling:$ac_tool_warned in
3690 yes:)
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3692 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3693 ac_tool_warned=yes ;;
3694 esac
3695 CXX=$ac_ct_CXX
3696 fi
3697 fi
3698
3699 fi
3700 fi
3701 # Provide some information about the compiler.
3702 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3703 set X $ac_compile
3704 ac_compiler=$2
3705 for ac_option in --version -v -V -qversion; do
3706 { { ac_try="$ac_compiler $ac_option >&5"
3707 case "(($ac_try" in
3708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3709 *) ac_try_echo=$ac_try;;
3710 esac
3711 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3712 $as_echo "$ac_try_echo"; } >&5
3713 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3714 ac_status=$?
3715 if test -s conftest.err; then
3716 sed '10a\
3717 ... rest of stderr output deleted ...
3718 10q' conftest.err >conftest.er1
3719 cat conftest.er1 >&5
3720 fi
3721 rm -f conftest.er1 conftest.err
3722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3723 test $ac_status = 0; }
3724 done
3725
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3727 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3728 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3729 $as_echo_n "(cached) " >&6
3730 else
3731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3732 /* end confdefs.h. */
3733
3734 int
3735 main ()
3736 {
3737 #ifndef __GNUC__
3738 choke me
3739 #endif
3740
3741 ;
3742 return 0;
3743 }
3744 _ACEOF
3745 if ac_fn_cxx_try_compile "$LINENO"; then :
3746 ac_compiler_gnu=yes
3747 else
3748 ac_compiler_gnu=no
3749 fi
3750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3751 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3752
3753 fi
3754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3755 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3756 if test $ac_compiler_gnu = yes; then
3757 GXX=yes
3758 else
3759 GXX=
3760 fi
3761 ac_test_CXXFLAGS=${CXXFLAGS+set}
3762 ac_save_CXXFLAGS=$CXXFLAGS
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3764 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3765 if ${ac_cv_prog_cxx_g+:} false; then :
3766 $as_echo_n "(cached) " >&6
3767 else
3768 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3769 ac_cxx_werror_flag=yes
3770 ac_cv_prog_cxx_g=no
3771 CXXFLAGS="-g"
3772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3773 /* end confdefs.h. */
3774
3775 int
3776 main ()
3777 {
3778
3779 ;
3780 return 0;
3781 }
3782 _ACEOF
3783 if ac_fn_cxx_try_compile "$LINENO"; then :
3784 ac_cv_prog_cxx_g=yes
3785 else
3786 CXXFLAGS=""
3787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3788 /* end confdefs.h. */
3789
3790 int
3791 main ()
3792 {
3793
3794 ;
3795 return 0;
3796 }
3797 _ACEOF
3798 if ac_fn_cxx_try_compile "$LINENO"; then :
3799
3800 else
3801 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3802 CXXFLAGS="-g"
3803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3804 /* end confdefs.h. */
3805
3806 int
3807 main ()
3808 {
3809
3810 ;
3811 return 0;
3812 }
3813 _ACEOF
3814 if ac_fn_cxx_try_compile "$LINENO"; then :
3815 ac_cv_prog_cxx_g=yes
3816 fi
3817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3818 fi
3819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3820 fi
3821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3822 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3823 fi
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3825 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3826 if test "$ac_test_CXXFLAGS" = set; then
3827 CXXFLAGS=$ac_save_CXXFLAGS
3828 elif test $ac_cv_prog_cxx_g = yes; then
3829 if test "$GXX" = yes; then
3830 CXXFLAGS="-g -O2"
3831 else
3832 CXXFLAGS="-g"
3833 fi
3834 else
3835 if test "$GXX" = yes; then
3836 CXXFLAGS="-O2"
3837 else
3838 CXXFLAGS=
3839 fi
3840 fi
3841 ac_ext=c
3842 ac_cpp='$CPP $CPPFLAGS'
3843 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3844 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3845 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3846
3847 ;;
3848 esac
3849
3850
3851
3852
3853
3854
3855 if test "$GCC" = yes ; then
3856 #
3857 # -Werror forces warnings to be errors.
3858 #
3859 ac_lbl_cc_force_warning_errors=-Werror
3860
3861 #
3862 # Try to have the compiler default to hiding symbols,
3863 # so that only symbols explicitly exported with
3864 # PCAP_API will be visible outside (shared) libraries.
3865 #
3866
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3868 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3869 save_CFLAGS="$CFLAGS"
3870 CFLAGS="$CFLAGS -fvisibility=hidden"
3871 #
3872 # XXX - yes, this depends on the way AC_LANG_WERROR works,
3873 # but no mechanism is provided to turn AC_LANG_WERROR on
3874 # *and then turn it back off*, so that we *only* do it when
3875 # testing compiler options - 15 years after somebody asked
3876 # for it:
3877 #
3878 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
3879 #
3880 save_ac_c_werror_flag="$ac_c_werror_flag"
3881 ac_c_werror_flag=yes
3882 #
3883 # We use AC_LANG_SOURCE() so that we can control the complete
3884 # content of the program being compiled. We do not, for example,
3885 # want the default "int main()" that AC_LANG_PROGRAM() generates,
3886 # as it will generate a warning with -Wold-style-definition, meaning
3887 # that we would treat it as not working, as the test will fail if
3888 # *any* error output, including a warning due to the flag we're
3889 # testing, is generated; see
3890 #
3891 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
3892 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
3893 #
3894 # This may, as per those two messages, be fixed in autoonf 2.70,
3895 # but we only require 2.64 or newer for now.
3896 #
3897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3898 /* end confdefs.h. */
3899 int main(void) { return 0; }
3900 _ACEOF
3901 if ac_fn_c_try_compile "$LINENO"; then :
3902
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3904 $as_echo "yes" >&6; }
3905 can_add_to_cflags=yes
3906 #
3907 # The compile supports this; do we have some C code for
3908 # which the warning should *not* appear?
3909 # We test the fourth argument because the third argument
3910 # could contain quotes, breaking the test.
3911 #
3912 if test "x" != "x"
3913 then
3914 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3916 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3918 /* end confdefs.h. */
3919
3920 _ACEOF
3921 if ac_fn_c_try_compile "$LINENO"; then :
3922
3923 #
3924 # Not a problem.
3925 #
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3927 $as_echo "no" >&6; }
3928
3929 else
3930
3931 #
3932 # A problem.
3933 #
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3935 $as_echo "yes" >&6; }
3936 can_add_to_cflags=no
3937
3938 fi
3939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3940 fi
3941 CFLAGS="$save_CFLAGS"
3942 if test x"$can_add_to_cflags" = "xyes"
3943 then
3944 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3945 fi
3946
3947 else
3948
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950 $as_echo "no" >&6; }
3951 CFLAGS="$save_CFLAGS"
3952
3953 fi
3954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3955 ac_c_werror_flag="$save_ac_c_werror_flag"
3956
3957 else
3958 V_INCLS="$V_INCLS -I/usr/local/include"
3959 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3960
3961 case "$host_os" in
3962
3963 darwin*)
3964 #
3965 # This is assumed either to be GCC or clang, both
3966 # of which use -Werror to force warnings to be errors.
3967 #
3968 ac_lbl_cc_force_warning_errors=-Werror
3969
3970 #
3971 # Try to have the compiler default to hiding symbols,
3972 # so that only symbols explicitly exported with
3973 # PCAP_API will be visible outside (shared) libraries.
3974 #
3975
3976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3977 $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3978 save_CFLAGS="$CFLAGS"
3979 CFLAGS="$CFLAGS -fvisibility=hidden"
3980 #
3981 # XXX - yes, this depends on the way AC_LANG_WERROR works,
3982 # but no mechanism is provided to turn AC_LANG_WERROR on
3983 # *and then turn it back off*, so that we *only* do it when
3984 # testing compiler options - 15 years after somebody asked
3985 # for it:
3986 #
3987 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
3988 #
3989 save_ac_c_werror_flag="$ac_c_werror_flag"
3990 ac_c_werror_flag=yes
3991 #
3992 # We use AC_LANG_SOURCE() so that we can control the complete
3993 # content of the program being compiled. We do not, for example,
3994 # want the default "int main()" that AC_LANG_PROGRAM() generates,
3995 # as it will generate a warning with -Wold-style-definition, meaning
3996 # that we would treat it as not working, as the test will fail if
3997 # *any* error output, including a warning due to the flag we're
3998 # testing, is generated; see
3999 #
4000 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4001 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4002 #
4003 # This may, as per those two messages, be fixed in autoonf 2.70,
4004 # but we only require 2.64 or newer for now.
4005 #
4006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4007 /* end confdefs.h. */
4008 int main(void) { return 0; }
4009 _ACEOF
4010 if ac_fn_c_try_compile "$LINENO"; then :
4011
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4013 $as_echo "yes" >&6; }
4014 can_add_to_cflags=yes
4015 #
4016 # The compile supports this; do we have some C code for
4017 # which the warning should *not* appear?
4018 # We test the fourth argument because the third argument
4019 # could contain quotes, breaking the test.
4020 #
4021 if test "x" != "x"
4022 then
4023 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4025 $as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4027 /* end confdefs.h. */
4028
4029 _ACEOF
4030 if ac_fn_c_try_compile "$LINENO"; then :
4031
4032 #
4033 # Not a problem.
4034 #
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4036 $as_echo "no" >&6; }
4037
4038 else
4039
4040 #
4041 # A problem.
4042 #
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4044 $as_echo "yes" >&6; }
4045 can_add_to_cflags=no
4046
4047 fi
4048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4049 fi
4050 CFLAGS="$save_CFLAGS"
4051 if test x"$can_add_to_cflags" = "xyes"
4052 then
4053 V_CCOPT="$V_CCOPT -fvisibility=hidden"
4054 fi
4055
4056 else
4057
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059 $as_echo "no" >&6; }
4060 CFLAGS="$save_CFLAGS"
4061
4062 fi
4063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4064 ac_c_werror_flag="$save_ac_c_werror_flag"
4065
4066 ;;
4067
4068 hpux*)
4069 #
4070 # HP C, which is what we presume we're using, doesn't
4071 # exit with a non-zero exit status if we hand it an
4072 # invalid -W flag, can't be forced to do so even with
4073 # +We, and doesn't handle GCC-style -W flags, so we
4074 # don't want to try using GCC-style -W flags.
4075 #
4076 ac_lbl_cc_dont_try_gcc_dashW=yes
4077 ;;
4078
4079 irix*)
4080 #
4081 # MIPS C, which is what we presume we're using, doesn't
4082 # necessarily exit with a non-zero exit status if we
4083 # hand it an invalid -W flag, can't be forced to do
4084 # so, and doesn't handle GCC-style -W flags, so we
4085 # don't want to try using GCC-style -W flags.
4086 #
4087 ac_lbl_cc_dont_try_gcc_dashW=yes
4088 #
4089 # It also, apparently, defaults to "char" being
4090 # unsigned, unlike most other C implementations;
4091 # I suppose we could say "signed char" whenever
4092 # we want to guarantee a signed "char", but let's
4093 # just force signed chars.
4094 #
4095 # -xansi is normally the default, but the
4096 # configure script was setting it; perhaps -cckr
4097 # was the default in the Old Days. (Then again,
4098 # that would probably be for backwards compatibility
4099 # in the days when ANSI C was Shiny and New, i.e.
4100 # 1989 and the early '90's, so maybe we can just
4101 # drop support for those compilers.)
4102 #
4103 # -g is equivalent to -g2, which turns off
4104 # optimization; we choose -g3, which generates
4105 # debugging information but doesn't turn off
4106 # optimization (even if the optimization would
4107 # cause inaccuracies in debugging).
4108 #
4109 V_CCOPT="$V_CCOPT -xansi -signed -g3"
4110 ;;
4111
4112 osf*)
4113 #
4114 # Presumed to be DEC OSF/1, Digital UNIX, or
4115 # Tru64 UNIX.
4116 #
4117 # The DEC C compiler, which is what we presume we're
4118 # using, doesn't exit with a non-zero exit status if we
4119 # hand it an invalid -W flag, can't be forced to do
4120 # so, and doesn't handle GCC-style -W flags, so we
4121 # don't want to try using GCC-style -W flags.
4122 #
4123 ac_lbl_cc_dont_try_gcc_dashW=yes
4124 #
4125 # -g is equivalent to -g2, which turns off
4126 # optimization; we choose -g3, which generates
4127 # debugging information but doesn't turn off
4128 # optimization (even if the optimization would
4129 # cause inaccuracies in debugging).
4130 #
4131 V_CCOPT="$V_CCOPT -g3"
4132 ;;
4133
4134 solaris*)
4135 #
4136 # Assumed to be Sun C, which requires -errwarn to force
4137 # warnings to be treated as errors.
4138 #
4139 ac_lbl_cc_force_warning_errors=-errwarn
4140
4141 #
4142 # Try to have the compiler default to hiding symbols,
4143 # so that only symbols explicitly exported with
4144 # PCAP_API will be visible outside (shared) libraries.
4145 #
4146
4147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
4148 $as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
4149 save_CFLAGS="$CFLAGS"
4150 CFLAGS="$CFLAGS -xldscope=hidden"
4151 #
4152 # XXX - yes, this depends on the way AC_LANG_WERROR works,
4153 # but no mechanism is provided to turn AC_LANG_WERROR on
4154 # *and then turn it back off*, so that we *only* do it when
4155 # testing compiler options - 15 years after somebody asked
4156 # for it:
4157 #
4158 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
4159 #
4160 save_ac_c_werror_flag="$ac_c_werror_flag"
4161 ac_c_werror_flag=yes
4162 #
4163 # We use AC_LANG_SOURCE() so that we can control the complete
4164 # content of the program being compiled. We do not, for example,
4165 # want the default "int main()" that AC_LANG_PROGRAM() generates,
4166 # as it will generate a warning with -Wold-style-definition, meaning
4167 # that we would treat it as not working, as the test will fail if
4168 # *any* error output, including a warning due to the flag we're
4169 # testing, is generated; see
4170 #
4171 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4172 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4173 #
4174 # This may, as per those two messages, be fixed in autoonf 2.70,
4175 # but we only require 2.64 or newer for now.
4176 #
4177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178 /* end confdefs.h. */
4179 int main(void) { return 0; }
4180 _ACEOF
4181 if ac_fn_c_try_compile "$LINENO"; then :
4182
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4184 $as_echo "yes" >&6; }
4185 can_add_to_cflags=yes
4186 #
4187 # The compile supports this; do we have some C code for
4188 # which the warning should *not* appear?
4189 # We test the fourth argument because the third argument
4190 # could contain quotes, breaking the test.
4191 #
4192 if test "x" != "x"
4193 then
4194 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
4196 $as_echo_n "checking whether -xldscope=hidden ... " >&6; }
4197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4198 /* end confdefs.h. */
4199
4200 _ACEOF
4201 if ac_fn_c_try_compile "$LINENO"; then :
4202
4203 #
4204 # Not a problem.
4205 #
4206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4207 $as_echo "no" >&6; }
4208
4209 else
4210
4211 #
4212 # A problem.
4213 #
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4215 $as_echo "yes" >&6; }
4216 can_add_to_cflags=no
4217
4218 fi
4219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4220 fi
4221 CFLAGS="$save_CFLAGS"
4222 if test x"$can_add_to_cflags" = "xyes"
4223 then
4224 V_CCOPT="$V_CCOPT -xldscope=hidden"
4225 fi
4226
4227 else
4228
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230 $as_echo "no" >&6; }
4231 CFLAGS="$save_CFLAGS"
4232
4233 fi
4234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4235 ac_c_werror_flag="$save_ac_c_werror_flag"
4236
4237 ;;
4238
4239 ultrix*)
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
4241 $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
4242 if ${ac_cv_lbl_cc_const_proto+:} false; then :
4243 $as_echo_n "(cached) " >&6
4244 else
4245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4246 /* end confdefs.h. */
4247 #include <sys/types.h>
4248 int
4249 main ()
4250 {
4251 struct a { int b; };
4252 void c(const struct a *)
4253 ;
4254 return 0;
4255 }
4256 _ACEOF
4257 if ac_fn_c_try_compile "$LINENO"; then :
4258 ac_cv_lbl_cc_const_proto=yes
4259 else
4260 ac_cv_lbl_cc_const_proto=no
4261 fi
4262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4263 fi
4264
4265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
4266 $as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
4267 if test $ac_cv_lbl_cc_const_proto = no ; then
4268
4269 $as_echo "#define const /**/" >>confdefs.h
4270
4271 fi
4272 ;;
4273 esac
4274 V_CCOPT="$V_CCOPT -O"
4275 fi
4276
4277
4278 if test "$GCC" = yes ; then
4279 #
4280 # On platforms where we build a shared library:
4281 #
4282 # add options to generate position-independent code,
4283 # if necessary (it's the default in AIX and Darwin/macOS);
4284 #
4285 # define option to set the soname of the shared library,
4286 # if the OS supports that;
4287 #
4288 # add options to specify, at link time, a directory to
4289 # add to the run-time search path, if that's necessary.
4290 #
4291 V_SHLIB_CMD="\$(CC)"
4292 V_SHLIB_OPT="-shared"
4293 case "$host_os" in
4294
4295 aix*)
4296 ;;
4297
4298 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
4299 #
4300 # Platforms where the linker is the GNU linker
4301 # or accepts command-line arguments like
4302 # those the GNU linker accepts.
4303 #
4304 # Some instruction sets require -fPIC on some
4305 # operating systems. Check for them. If you
4306 # have a combination that requires it, add it
4307 # here.
4308 #
4309 PIC_OPT=-fpic
4310 case "$host_cpu" in
4311
4312 sparc64*)
4313 case "$host_os" in
4314
4315 freebsd*|openbsd*|linux*)
4316 PIC_OPT=-fPIC
4317 ;;
4318 esac
4319 ;;
4320 esac
4321 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
4322 V_SONAME_OPT="-Wl,-soname,"
4323 V_RPATH_OPT="-Wl,-rpath,"
4324 ;;
4325
4326 hpux*)
4327 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4328 #
4329 # XXX - this assumes GCC is using the HP linker,
4330 # rather than the GNU linker, and that the "+h"
4331 # option is used on all HP-UX platforms, both .sl
4332 # and .so.
4333 #
4334 V_SONAME_OPT="-Wl,+h,"
4335 #
4336 # By default, directories specified with -L
4337 # are added to the run-time search path, so
4338 # we don't add them in pcap-config.
4339 #
4340 ;;
4341
4342 solaris*)
4343 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4344 #
4345 # XXX - this assumes GCC is using the Sun linker,
4346 # rather than the GNU linker.
4347 #
4348 V_SONAME_OPT="-Wl,-h,"
4349 V_RPATH_OPT="-Wl,-R,"
4350 ;;
4351 esac
4352 else
4353 #
4354 # Set the appropriate compiler flags and, on platforms
4355 # where we build a shared library:
4356 #
4357 # add options to generate position-independent code,
4358 # if necessary (it's the default in Darwin/macOS);
4359 #
4360 # if we generate ".so" shared libraries, define the
4361 # appropriate options for building the shared library;
4362 #
4363 # add options to specify, at link time, a directory to
4364 # add to the run-time search path, if that's necessary.
4365 #
4366 # Note: spaces after V_SONAME_OPT are significant; on
4367 # some platforms the soname is passed with a GCC-like
4368 # "-Wl,-soname,{soname}" option, with the soname part
4369 # of the option, while on other platforms the C compiler
4370 # driver takes it as a regular option with the soname
4371 # following the option. The same applies to V_RPATH_OPT.
4372 #
4373 case "$host_os" in
4374
4375 aix*)
4376 V_SHLIB_CMD="\$(CC)"
4377 V_SHLIB_OPT="-G -bnoentry -bexpall"
4378 ;;
4379
4380 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
4381 #
4382 # "cc" is GCC.
4383 #
4384 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4385 V_SHLIB_CMD="\$(CC)"
4386 V_SHLIB_OPT="-shared"
4387 V_SONAME_OPT="-Wl,-soname,"
4388 V_RPATH_OPT="-Wl,-rpath,"
4389 ;;
4390
4391 hpux*)
4392 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
4393 V_SHLIB_CMD="\$(LD)"
4394 V_SHLIB_OPT="-b"
4395 V_SONAME_OPT="+h "
4396 #
4397 # By default, directories specified with -L
4398 # are added to the run-time search path, so
4399 # we don't add them in pcap-config.
4400 #
4401 ;;
4402
4403 osf*)
4404 #
4405 # Presumed to be DEC OSF/1, Digital UNIX, or
4406 # Tru64 UNIX.
4407 #
4408 V_SHLIB_CMD="\$(CC)"
4409 V_SHLIB_OPT="-shared"
4410 V_SONAME_OPT="-soname "
4411 V_RPATH_OPT="-rpath "
4412 ;;
4413
4414 solaris*)
4415 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
4416 V_SHLIB_CMD="\$(CC)"
4417 V_SHLIB_OPT="-G"
4418 V_SONAME_OPT="-h "
4419 V_RPATH_OPT="-R"
4420 ;;
4421 esac
4422 fi
4423
4424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4425 $as_echo_n "checking for inline... " >&6; }
4426 save_CFLAGS="$CFLAGS"
4427 CFLAGS="$V_CCOPT"
4428 if ${ac_cv_lbl_inline+:} false; then :
4429 $as_echo_n "(cached) " >&6
4430 else
4431
4432 ac_cv_lbl_inline=""
4433 ac_lbl_cc_inline=no
4434 for ac_lbl_inline in inline __inline__ __inline
4435 do
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437 /* end confdefs.h. */
4438 #define inline $ac_lbl_inline
4439 static inline struct iltest *foo(void);
4440 struct iltest {
4441 int iltest1;
4442 int iltest2;
4443 };
4444
4445 static inline struct iltest *
4446 foo()
4447 {
4448 static struct iltest xxx;
4449
4450 return &xxx;
4451 }
4452 int
4453 main ()
4454 {
4455
4456 ;
4457 return 0;
4458 }
4459 _ACEOF
4460 if ac_fn_c_try_compile "$LINENO"; then :
4461 ac_lbl_cc_inline=yes
4462 fi
4463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464 if test "$ac_lbl_cc_inline" = yes ; then
4465 break;
4466 fi
4467 done
4468 if test "$ac_lbl_cc_inline" = yes ; then
4469 ac_cv_lbl_inline=$ac_lbl_inline
4470 fi
4471 fi
4472
4473 CFLAGS="$save_CFLAGS"
4474 if test ! -z "$ac_cv_lbl_inline" ; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4476 $as_echo "$ac_cv_lbl_inline" >&6; }
4477 else
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479 $as_echo "no" >&6; }
4480 fi
4481
4482 cat >>confdefs.h <<_ACEOF
4483 #define inline $ac_cv_lbl_inline
4484 _ACEOF
4485
4486
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5
4488 $as_echo_n "checking for __atomic_load_n... " >&6; }
4489 if ${ac_cv_have___atomic_load_n+:} false; then :
4490 $as_echo_n "(cached) " >&6
4491 else
4492
4493 # ac_fn_c_try_link LINENO
4494 # -----------------------
4495 # Try to link conftest.$ac_ext, and return whether this succeeded.
4496 ac_fn_c_try_link ()
4497 {
4498 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4499 rm -f conftest.$ac_objext conftest$ac_exeext
4500 if { { ac_try="$ac_link"
4501 case "(($ac_try" in
4502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4503 *) ac_try_echo=$ac_try;;
4504 esac
4505 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4506 $as_echo "$ac_try_echo"; } >&5
4507 (eval "$ac_link") 2>conftest.err
4508 ac_status=$?
4509 if test -s conftest.err; then
4510 grep -v '^ *+' conftest.err >conftest.er1
4511 cat conftest.er1 >&5
4512 mv -f conftest.er1 conftest.err
4513 fi
4514 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4515 test $ac_status = 0; } && {
4516 test -z "$ac_c_werror_flag" ||
4517 test ! -s conftest.err
4518 } && test -s conftest$ac_exeext && {
4519 test "$cross_compiling" = yes ||
4520 test -x conftest$ac_exeext
4521 }; then :
4522 ac_retval=0
4523 else
4524 $as_echo "$as_me: failed program was:" >&5
4525 sed 's/^/| /' conftest.$ac_ext >&5
4526
4527 ac_retval=1
4528 fi
4529 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
4530 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
4531 # interfere with the next link command; also delete a directory that is
4532 # left behind by Apple's compiler. We do this before executing the actions.
4533 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
4534 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
4535 as_fn_set_status $ac_retval
4536
4537 } # ac_fn_c_try_link
4538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4539 /* end confdefs.h. */
4540
4541 int
4542 main ()
4543 {
4544
4545 int i = 17;
4546 int j;
4547 j = __atomic_load_n(&i, __ATOMIC_RELAXED);
4548
4549 ;
4550 return 0;
4551 }
4552 _ACEOF
4553 if ac_fn_c_try_link "$LINENO"; then :
4554 ac_have___atomic_load_n=yes
4555 else
4556 ac_have___atomic_load_n=no
4557 fi
4558 rm -f core conftest.err conftest.$ac_objext \
4559 conftest$ac_exeext conftest.$ac_ext
4560 fi
4561
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5
4563 $as_echo "$ac_have___atomic_load_n" >&6; }
4564 if test $ac_have___atomic_load_n = yes ; then
4565
4566 $as_echo "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h
4567
4568 fi
4569
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5
4571 $as_echo_n "checking for __atomic_store_n... " >&6; }
4572 if ${ac_cv_have___atomic_store_n+:} false; then :
4573 $as_echo_n "(cached) " >&6
4574 else
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576 /* end confdefs.h. */
4577
4578 int
4579 main ()
4580 {
4581
4582 int i;
4583 __atomic_store_n(&i, 17, __ATOMIC_RELAXED);
4584
4585 ;
4586 return 0;
4587 }
4588 _ACEOF
4589 if ac_fn_c_try_link "$LINENO"; then :
4590 ac_have___atomic_store_n=yes
4591 else
4592 ac_have___atomic_store_n=no
4593 fi
4594 rm -f core conftest.err conftest.$ac_objext \
4595 conftest$ac_exeext conftest.$ac_ext
4596 fi
4597
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5
4599 $as_echo "$ac_have___atomic_store_n" >&6; }
4600 if test $ac_have___atomic_store_n = yes ; then
4601
4602 $as_echo "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h
4603
4604 fi
4605
4606 #
4607 # Try to arrange for large file support.
4608 #
4609 # Check whether --enable-largefile was given.
4610 if test "${enable_largefile+set}" = set; then :
4611 enableval=$enable_largefile;
4612 fi
4613
4614 if test "$enable_largefile" != no; then
4615
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4617 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4618 if ${ac_cv_sys_largefile_CC+:} false; then :
4619 $as_echo_n "(cached) " >&6
4620 else
4621 ac_cv_sys_largefile_CC=no
4622 if test "$GCC" != yes; then
4623 ac_save_CC=$CC
4624 while :; do
4625 # IRIX 6.2 and later do not support large files by default,
4626 # so use the C compiler's -n32 option if that helps.
4627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4628 /* end confdefs.h. */
4629 #include <sys/types.h>
4630 /* Check that off_t can represent 2**63 - 1 correctly.
4631 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4632 since some C++ compilers masquerading as C compilers
4633 incorrectly reject 9223372036854775807. */
4634 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4635 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4636 && LARGE_OFF_T % 2147483647 == 1)
4637 ? 1 : -1];
4638 int
4639 main ()
4640 {
4641
4642 ;
4643 return 0;
4644 }
4645 _ACEOF
4646 if ac_fn_c_try_compile "$LINENO"; then :
4647 break
4648 fi
4649 rm -f core conftest.err conftest.$ac_objext
4650 CC="$CC -n32"
4651 if ac_fn_c_try_compile "$LINENO"; then :
4652 ac_cv_sys_largefile_CC=' -n32'; break
4653 fi
4654 rm -f core conftest.err conftest.$ac_objext
4655 break
4656 done
4657 CC=$ac_save_CC
4658 rm -f conftest.$ac_ext
4659 fi
4660 fi
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4662 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4663 if test "$ac_cv_sys_largefile_CC" != no; then
4664 CC=$CC$ac_cv_sys_largefile_CC
4665 fi
4666
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4668 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4669 if ${ac_cv_sys_file_offset_bits+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671 else
4672 while :; do
4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674 /* end confdefs.h. */
4675 #include <sys/types.h>
4676 /* Check that off_t can represent 2**63 - 1 correctly.
4677 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4678 since some C++ compilers masquerading as C compilers
4679 incorrectly reject 9223372036854775807. */
4680 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4681 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4682 && LARGE_OFF_T % 2147483647 == 1)
4683 ? 1 : -1];
4684 int
4685 main ()
4686 {
4687
4688 ;
4689 return 0;
4690 }
4691 _ACEOF
4692 if ac_fn_c_try_compile "$LINENO"; then :
4693 ac_cv_sys_file_offset_bits=no; break
4694 fi
4695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4697 /* end confdefs.h. */
4698 #define _FILE_OFFSET_BITS 64
4699 #include <sys/types.h>
4700 /* Check that off_t can represent 2**63 - 1 correctly.
4701 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4702 since some C++ compilers masquerading as C compilers
4703 incorrectly reject 9223372036854775807. */
4704 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4705 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4706 && LARGE_OFF_T % 2147483647 == 1)
4707 ? 1 : -1];
4708 int
4709 main ()
4710 {
4711
4712 ;
4713 return 0;
4714 }
4715 _ACEOF
4716 if ac_fn_c_try_compile "$LINENO"; then :
4717 ac_cv_sys_file_offset_bits=64; break
4718 fi
4719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4720 ac_cv_sys_file_offset_bits=unknown
4721 break
4722 done
4723 fi
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4725 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4726 case $ac_cv_sys_file_offset_bits in #(
4727 no | unknown) ;;
4728 *)
4729 cat >>confdefs.h <<_ACEOF
4730 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4731 _ACEOF
4732 ;;
4733 esac
4734 rm -rf conftest*
4735 if test $ac_cv_sys_file_offset_bits = unknown; then
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4737 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4738 if ${ac_cv_sys_large_files+:} false; then :
4739 $as_echo_n "(cached) " >&6
4740 else
4741 while :; do
4742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4743 /* end confdefs.h. */
4744 #include <sys/types.h>
4745 /* Check that off_t can represent 2**63 - 1 correctly.
4746 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4747 since some C++ compilers masquerading as C compilers
4748 incorrectly reject 9223372036854775807. */
4749 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4750 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4751 && LARGE_OFF_T % 2147483647 == 1)
4752 ? 1 : -1];
4753 int
4754 main ()
4755 {
4756
4757 ;
4758 return 0;
4759 }
4760 _ACEOF
4761 if ac_fn_c_try_compile "$LINENO"; then :
4762 ac_cv_sys_large_files=no; break
4763 fi
4764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766 /* end confdefs.h. */
4767 #define _LARGE_FILES 1
4768 #include <sys/types.h>
4769 /* Check that off_t can represent 2**63 - 1 correctly.
4770 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4771 since some C++ compilers masquerading as C compilers
4772 incorrectly reject 9223372036854775807. */
4773 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4774 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4775 && LARGE_OFF_T % 2147483647 == 1)
4776 ? 1 : -1];
4777 int
4778 main ()
4779 {
4780
4781 ;
4782 return 0;
4783 }
4784 _ACEOF
4785 if ac_fn_c_try_compile "$LINENO"; then :
4786 ac_cv_sys_large_files=1; break
4787 fi
4788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4789 ac_cv_sys_large_files=unknown
4790 break
4791 done
4792 fi
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4794 $as_echo "$ac_cv_sys_large_files" >&6; }
4795 case $ac_cv_sys_large_files in #(
4796 no | unknown) ;;
4797 *)
4798 cat >>confdefs.h <<_ACEOF
4799 #define _LARGE_FILES $ac_cv_sys_large_files
4800 _ACEOF
4801 ;;
4802 esac
4803 rm -rf conftest*
4804 fi
4805
4806
4807 fi
4808
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4810 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4811 if ${ac_cv_sys_largefile_source+:} false; then :
4812 $as_echo_n "(cached) " >&6
4813 else
4814 while :; do
4815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h. */
4817 #include <sys/types.h> /* for off_t */
4818 #include <stdio.h>
4819 int
4820 main ()
4821 {
4822 int (*fp) (FILE *, off_t, int) = fseeko;
4823 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4824 ;
4825 return 0;
4826 }
4827 _ACEOF
4828 if ac_fn_c_try_link "$LINENO"; then :
4829 ac_cv_sys_largefile_source=no; break
4830 fi
4831 rm -f core conftest.err conftest.$ac_objext \
4832 conftest$ac_exeext conftest.$ac_ext
4833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4834 /* end confdefs.h. */
4835 #define _LARGEFILE_SOURCE 1
4836 #include <sys/types.h> /* for off_t */
4837 #include <stdio.h>
4838 int
4839 main ()
4840 {
4841 int (*fp) (FILE *, off_t, int) = fseeko;
4842 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4843 ;
4844 return 0;
4845 }
4846 _ACEOF
4847 if ac_fn_c_try_link "$LINENO"; then :
4848 ac_cv_sys_largefile_source=1; break
4849 fi
4850 rm -f core conftest.err conftest.$ac_objext \
4851 conftest$ac_exeext conftest.$ac_ext
4852 ac_cv_sys_largefile_source=unknown
4853 break
4854 done
4855 fi
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4857 $as_echo "$ac_cv_sys_largefile_source" >&6; }
4858 case $ac_cv_sys_largefile_source in #(
4859 no | unknown) ;;
4860 *)
4861 cat >>confdefs.h <<_ACEOF
4862 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4863 _ACEOF
4864 ;;
4865 esac
4866 rm -rf conftest*
4867
4868 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4869 # in glibc 2.1.3, but that breaks too many other things.
4870 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4871 if test $ac_cv_sys_largefile_source != unknown; then
4872
4873 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
4874
4875 fi
4876
4877
4878 ac_ext=c
4879 ac_cpp='$CPP $CPPFLAGS'
4880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4884 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4885 # On Suns, sometimes $CPP names a directory.
4886 if test -n "$CPP" && test -d "$CPP"; then
4887 CPP=
4888 fi
4889 if test -z "$CPP"; then
4890 if ${ac_cv_prog_CPP+:} false; then :
4891 $as_echo_n "(cached) " >&6
4892 else
4893 # Double quotes because CPP needs to be expanded
4894 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4895 do
4896 ac_preproc_ok=false
4897 for ac_c_preproc_warn_flag in '' yes
4898 do
4899 # Use a header file that comes with gcc, so configuring glibc
4900 # with a fresh cross-compiler works.
4901 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4902 # <limits.h> exists even on freestanding compilers.
4903 # On the NeXT, cc -E runs the code through the compiler's parser,
4904 # not just through cpp. "Syntax error" is here to catch this case.
4905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4906 /* end confdefs.h. */
4907 #ifdef __STDC__
4908 # include <limits.h>
4909 #else
4910 # include <assert.h>
4911 #endif
4912 Syntax error
4913 _ACEOF
4914 if ac_fn_c_try_cpp "$LINENO"; then :
4915
4916 else
4917 # Broken: fails on valid input.
4918 continue
4919 fi
4920 rm -f conftest.err conftest.i conftest.$ac_ext
4921
4922 # OK, works on sane cases. Now check whether nonexistent headers
4923 # can be detected and how.
4924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4925 /* end confdefs.h. */
4926 #include <ac_nonexistent.h>
4927 _ACEOF
4928 if ac_fn_c_try_cpp "$LINENO"; then :
4929 # Broken: success on invalid input.
4930 continue
4931 else
4932 # Passes both tests.
4933 ac_preproc_ok=:
4934 break
4935 fi
4936 rm -f conftest.err conftest.i conftest.$ac_ext
4937
4938 done
4939 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4940 rm -f conftest.i conftest.err conftest.$ac_ext
4941 if $ac_preproc_ok; then :
4942 break
4943 fi
4944
4945 done
4946 ac_cv_prog_CPP=$CPP
4947
4948 fi
4949 CPP=$ac_cv_prog_CPP
4950 else
4951 ac_cv_prog_CPP=$CPP
4952 fi
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4954 $as_echo "$CPP" >&6; }
4955 ac_preproc_ok=false
4956 for ac_c_preproc_warn_flag in '' yes
4957 do
4958 # Use a header file that comes with gcc, so configuring glibc
4959 # with a fresh cross-compiler works.
4960 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4961 # <limits.h> exists even on freestanding compilers.
4962 # On the NeXT, cc -E runs the code through the compiler's parser,
4963 # not just through cpp. "Syntax error" is here to catch this case.
4964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4965 /* end confdefs.h. */
4966 #ifdef __STDC__
4967 # include <limits.h>
4968 #else
4969 # include <assert.h>
4970 #endif
4971 Syntax error
4972 _ACEOF
4973 if ac_fn_c_try_cpp "$LINENO"; then :
4974
4975 else
4976 # Broken: fails on valid input.
4977 continue
4978 fi
4979 rm -f conftest.err conftest.i conftest.$ac_ext
4980
4981 # OK, works on sane cases. Now check whether nonexistent headers
4982 # can be detected and how.
4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4984 /* end confdefs.h. */
4985 #include <ac_nonexistent.h>
4986 _ACEOF
4987 if ac_fn_c_try_cpp "$LINENO"; then :
4988 # Broken: success on invalid input.
4989 continue
4990 else
4991 # Passes both tests.
4992 ac_preproc_ok=:
4993 break
4994 fi
4995 rm -f conftest.err conftest.i conftest.$ac_ext
4996
4997 done
4998 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4999 rm -f conftest.i conftest.err conftest.$ac_ext
5000 if $ac_preproc_ok; then :
5001
5002 else
5003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5005 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5006 See \`config.log' for more details" "$LINENO" 5; }
5007 fi
5008
5009 ac_ext=c
5010 ac_cpp='$CPP $CPPFLAGS'
5011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5014
5015
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5017 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5018 if ${ac_cv_path_GREP+:} false; then :
5019 $as_echo_n "(cached) " >&6
5020 else
5021 if test -z "$GREP"; then
5022 ac_path_GREP_found=false
5023 # Loop through the user's path and test for each of PROGNAME-LIST
5024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5025 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5026 do
5027 IFS=$as_save_IFS
5028 test -z "$as_dir" && as_dir=.
5029 for ac_prog in grep ggrep; do
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5032 as_fn_executable_p "$ac_path_GREP" || continue
5033 # Check for GNU ac_path_GREP and select it if it is found.
5034 # Check for GNU $ac_path_GREP
5035 case `"$ac_path_GREP" --version 2>&1` in
5036 *GNU*)
5037 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5038 *)
5039 ac_count=0
5040 $as_echo_n 0123456789 >"conftest.in"
5041 while :
5042 do
5043 cat "conftest.in" "conftest.in" >"conftest.tmp"
5044 mv "conftest.tmp" "conftest.in"
5045 cp "conftest.in" "conftest.nl"
5046 $as_echo 'GREP' >> "conftest.nl"
5047 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5048 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5049 as_fn_arith $ac_count + 1 && ac_count=$as_val
5050 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5051 # Best one so far, save it but keep looking for a better one
5052 ac_cv_path_GREP="$ac_path_GREP"
5053 ac_path_GREP_max=$ac_count
5054 fi
5055 # 10*(2^10) chars as input seems more than enough
5056 test $ac_count -gt 10 && break
5057 done
5058 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5059 esac
5060
5061 $ac_path_GREP_found && break 3
5062 done
5063 done
5064 done
5065 IFS=$as_save_IFS
5066 if test -z "$ac_cv_path_GREP"; then
5067 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5068 fi
5069 else
5070 ac_cv_path_GREP=$GREP
5071 fi
5072
5073 fi
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5075 $as_echo "$ac_cv_path_GREP" >&6; }
5076 GREP="$ac_cv_path_GREP"
5077
5078
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5080 $as_echo_n "checking for egrep... " >&6; }
5081 if ${ac_cv_path_EGREP+:} false; then :
5082 $as_echo_n "(cached) " >&6
5083 else
5084 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5085 then ac_cv_path_EGREP="$GREP -E"
5086 else
5087 if test -z "$EGREP"; then
5088 ac_path_EGREP_found=false
5089 # Loop through the user's path and test for each of PROGNAME-LIST
5090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5092 do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
5095 for ac_prog in egrep; do
5096 for ac_exec_ext in '' $ac_executable_extensions; do
5097 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5098 as_fn_executable_p "$ac_path_EGREP" || continue
5099 # Check for GNU ac_path_EGREP and select it if it is found.
5100 # Check for GNU $ac_path_EGREP
5101 case `"$ac_path_EGREP" --version 2>&1` in
5102 *GNU*)
5103 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5104 *)
5105 ac_count=0
5106 $as_echo_n 0123456789 >"conftest.in"
5107 while :
5108 do
5109 cat "conftest.in" "conftest.in" >"conftest.tmp"
5110 mv "conftest.tmp" "conftest.in"
5111 cp "conftest.in" "conftest.nl"
5112 $as_echo 'EGREP' >> "conftest.nl"
5113 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5114 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5115 as_fn_arith $ac_count + 1 && ac_count=$as_val
5116 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5117 # Best one so far, save it but keep looking for a better one
5118 ac_cv_path_EGREP="$ac_path_EGREP"
5119 ac_path_EGREP_max=$ac_count
5120 fi
5121 # 10*(2^10) chars as input seems more than enough
5122 test $ac_count -gt 10 && break
5123 done
5124 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5125 esac
5126
5127 $ac_path_EGREP_found && break 3
5128 done
5129 done
5130 done
5131 IFS=$as_save_IFS
5132 if test -z "$ac_cv_path_EGREP"; then
5133 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5134 fi
5135 else
5136 ac_cv_path_EGREP=$EGREP
5137 fi
5138
5139 fi
5140 fi
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5142 $as_echo "$ac_cv_path_EGREP" >&6; }
5143 EGREP="$ac_cv_path_EGREP"
5144
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5147 $as_echo_n "checking for ANSI C header files... " >&6; }
5148 if ${ac_cv_header_stdc+:} false; then :
5149 $as_echo_n "(cached) " >&6
5150 else
5151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5152 /* end confdefs.h. */
5153 #include <stdlib.h>
5154 #include <stdarg.h>
5155 #include <string.h>
5156 #include <float.h>
5157
5158 int
5159 main ()
5160 {
5161
5162 ;
5163 return 0;
5164 }
5165 _ACEOF
5166 if ac_fn_c_try_compile "$LINENO"; then :
5167 ac_cv_header_stdc=yes
5168 else
5169 ac_cv_header_stdc=no
5170 fi
5171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5172
5173 if test $ac_cv_header_stdc = yes; then
5174 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5176 /* end confdefs.h. */
5177 #include <string.h>
5178
5179 _ACEOF
5180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5181 $EGREP "memchr" >/dev/null 2>&1; then :
5182
5183 else
5184 ac_cv_header_stdc=no
5185 fi
5186 rm -f conftest*
5187
5188 fi
5189
5190 if test $ac_cv_header_stdc = yes; then
5191 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193 /* end confdefs.h. */
5194 #include <stdlib.h>
5195
5196 _ACEOF
5197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5198 $EGREP "free" >/dev/null 2>&1; then :
5199
5200 else
5201 ac_cv_header_stdc=no
5202 fi
5203 rm -f conftest*
5204
5205 fi
5206
5207 if test $ac_cv_header_stdc = yes; then
5208 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5209 if test "$cross_compiling" = yes; then :
5210 :
5211 else
5212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5213 /* end confdefs.h. */
5214 #include <ctype.h>
5215 #include <stdlib.h>
5216 #if ((' ' & 0x0FF) == 0x020)
5217 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5218 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5219 #else
5220 # define ISLOWER(c) \
5221 (('a' <= (c) && (c) <= 'i') \
5222 || ('j' <= (c) && (c) <= 'r') \
5223 || ('s' <= (c) && (c) <= 'z'))
5224 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5225 #endif
5226
5227 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5228 int
5229 main ()
5230 {
5231 int i;
5232 for (i = 0; i < 256; i++)
5233 if (XOR (islower (i), ISLOWER (i))
5234 || toupper (i) != TOUPPER (i))
5235 return 2;
5236 return 0;
5237 }
5238 _ACEOF
5239 if ac_fn_c_try_run "$LINENO"; then :
5240
5241 else
5242 ac_cv_header_stdc=no
5243 fi
5244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5245 conftest.$ac_objext conftest.beam conftest.$ac_ext
5246 fi
5247
5248 fi
5249 fi
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5251 $as_echo "$ac_cv_header_stdc" >&6; }
5252 if test $ac_cv_header_stdc = yes; then
5253
5254 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5255
5256 fi
5257
5258 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5259 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5260 inttypes.h stdint.h unistd.h
5261 do :
5262 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5263 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5264 "
5265 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5266 cat >>confdefs.h <<_ACEOF
5267 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5268 _ACEOF
5269
5270 fi
5271
5272 done
5273
5274
5275 for ac_header in sys/ioccom.h sys/sockio.h
5276 do :
5277 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5278 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5279 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5280 cat >>confdefs.h <<_ACEOF
5281 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5282 _ACEOF
5283
5284 fi
5285
5286 done
5287
5288 for ac_header in netpacket/packet.h
5289 do :
5290 ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5291 if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
5292 cat >>confdefs.h <<_ACEOF
5293 #define HAVE_NETPACKET_PACKET_H 1
5294 _ACEOF
5295
5296 fi
5297
5298 done
5299
5300 for ac_header in net/pfvar.h
5301 do :
5302 ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
5303 #include <sys/socket.h>
5304 #include <net/if.h>
5305 "
5306 if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
5307 cat >>confdefs.h <<_ACEOF
5308 #define HAVE_NET_PFVAR_H 1
5309 _ACEOF
5310
5311 fi
5312
5313 done
5314
5315 if test "$ac_cv_header_net_pfvar_h" = yes; then
5316 #
5317 # Check for various PF actions.
5318 #
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
5320 $as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
5321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5322 /* end confdefs.h. */
5323 #include <sys/types.h>
5324 #include <sys/socket.h>
5325 #include <net/if.h>
5326 #include <net/pfvar.h>
5327 int
5328 main ()
5329 {
5330 return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
5331 ;
5332 return 0;
5333 }
5334 _ACEOF
5335 if ac_fn_c_try_compile "$LINENO"; then :
5336
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5338 $as_echo "yes" >&6; }
5339
5340 $as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
5341
5342
5343 else
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345 $as_echo "no" >&6; }
5346 fi
5347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5348 fi
5349
5350 case "$host_os" in
5351 haiku*)
5352 #
5353 # Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
5354 #
5355 CFLAGS="$CFLAGS -D_BSD_SOURCE"
5356 ;;
5357 esac
5358
5359 if test "$GCC" = yes ; then
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
5361 $as_echo_n "checking for ANSI ioctl definitions... " >&6; }
5362 if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
5363 $as_echo_n "(cached) " >&6
5364 else
5365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366 /* end confdefs.h. */
5367 /*
5368 * This generates a "duplicate case value" when fixincludes
5369 * has not be run.
5370 */
5371 # include <sys/types.h>
5372 # include <sys/time.h>
5373 # include <sys/ioctl.h>
5374 # ifdef HAVE_SYS_IOCCOM_H
5375 # include <sys/ioccom.h>
5376 # endif
5377 int
5378 main ()
5379 {
5380 switch (0) {
5381 case _IO('A', 1):;
5382 case _IO('B', 1):;
5383 }
5384 ;
5385 return 0;
5386 }
5387 _ACEOF
5388 if ac_fn_c_try_compile "$LINENO"; then :
5389 ac_cv_lbl_gcc_fixincludes=yes
5390 else
5391 ac_cv_lbl_gcc_fixincludes=no
5392 fi
5393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5394 fi
5395
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
5397 $as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
5398 if test $ac_cv_lbl_gcc_fixincludes = no ; then
5399 # Don't cache failure
5400 unset ac_cv_lbl_gcc_fixincludes
5401 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
5402 fi
5403 fi
5404
5405 for ac_func in strerror
5406 do :
5407 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
5408 if test "x$ac_cv_func_strerror" = xyes; then :
5409 cat >>confdefs.h <<_ACEOF
5410 #define HAVE_STRERROR 1
5411 _ACEOF
5412
5413 fi
5414 done
5415
5416 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
5417 if test "x$ac_cv_func_strerror_r" = xyes; then :
5418
5419 #
5420 # We have strerror_r; if we define _GNU_SOURCE, is it a
5421 # POSIX-compliant strerror_r() or a GNU strerror_r()?
5422 #
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
5424 $as_echo_n "checking whether strerror_r is GNU-style... " >&6; }
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426 /* end confdefs.h. */
5427
5428 #define _GNU_SOURCE
5429 #include <string.h>
5430
5431 /* Define it GNU-style; that will cause an error if it's not GNU-style */
5432 extern char *strerror_r(int, char *, size_t);
5433
5434 int
5435 main(void)
5436 {
5437 return 0;
5438 }
5439
5440
5441 _ACEOF
5442 if ac_fn_c_try_compile "$LINENO"; then :
5443
5444 # GNU-style
5445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5446 $as_echo "yes" >&6; }
5447
5448 $as_echo "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
5449
5450
5451 else
5452
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5454 $as_echo "no" >&6; }
5455
5456 $as_echo "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
5457
5458
5459 fi
5460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461
5462 else
5463
5464 #
5465 # We don't have strerror_r; do we have _wcserror_s?
5466 #
5467 for ac_func in _wcserror_s
5468 do :
5469 ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
5470 if test "x$ac_cv_func__wcserror_s" = xyes; then :
5471 cat >>confdefs.h <<_ACEOF
5472 #define HAVE__WCSERROR_S 1
5473 _ACEOF
5474
5475 fi
5476 done
5477
5478
5479 fi
5480
5481
5482 #
5483 # Thanks, IBM, for not providing vsyslog() in AIX!
5484 #
5485 for ac_func in vsyslog
5486 do :
5487 ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5488 if test "x$ac_cv_func_vsyslog" = xyes; then :
5489 cat >>confdefs.h <<_ACEOF
5490 #define HAVE_VSYSLOG 1
5491 _ACEOF
5492
5493 fi
5494 done
5495
5496
5497 #
5498 # Make sure we have vsnprintf() and snprintf(); we require them.
5499 #
5500 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5501 if test "x$ac_cv_func_vsnprintf" = xyes; then :
5502
5503 else
5504 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5505 fi
5506
5507 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5508 if test "x$ac_cv_func_snprintf" = xyes; then :
5509
5510 else
5511 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5512 fi
5513
5514
5515 needasprintf=no
5516 for ac_func in vasprintf asprintf
5517 do :
5518 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5519 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5520 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5521 cat >>confdefs.h <<_ACEOF
5522 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5523 _ACEOF
5524
5525 else
5526 needasprintf=yes
5527 fi
5528 done
5529
5530 if test $needasprintf = yes; then
5531 case " $LIBOBJS " in
5532 *" asprintf.$ac_objext "* ) ;;
5533 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5534 ;;
5535 esac
5536
5537 fi
5538
5539 needstrlcat=no
5540 for ac_func in strlcat
5541 do :
5542 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5543 if test "x$ac_cv_func_strlcat" = xyes; then :
5544 cat >>confdefs.h <<_ACEOF
5545 #define HAVE_STRLCAT 1
5546 _ACEOF
5547
5548 else
5549 needstrlcat=yes
5550 fi
5551 done
5552
5553 if test $needstrlcat = yes; then
5554 case " $LIBOBJS " in
5555 *" strlcat.$ac_objext "* ) ;;
5556 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5557 ;;
5558 esac
5559
5560 fi
5561
5562 needstrlcpy=no
5563 for ac_func in strlcpy
5564 do :
5565 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5566 if test "x$ac_cv_func_strlcpy" = xyes; then :
5567 cat >>confdefs.h <<_ACEOF
5568 #define HAVE_STRLCPY 1
5569 _ACEOF
5570
5571 else
5572 needstrlcpy=yes
5573 fi
5574 done
5575
5576 if test $needstrlcpy = yes; then
5577 case " $LIBOBJS " in
5578 *" strlcpy.$ac_objext "* ) ;;
5579 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5580 ;;
5581 esac
5582
5583 fi
5584
5585 needstrtok_r=no
5586 for ac_func in strtok_r
5587 do :
5588 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5589 if test "x$ac_cv_func_strtok_r" = xyes; then :
5590 cat >>confdefs.h <<_ACEOF
5591 #define HAVE_STRTOK_R 1
5592 _ACEOF
5593
5594 else
5595 needstrtok_r=yes
5596 fi
5597 done
5598
5599 if test $needstrtok_r = yes; then
5600 case " $LIBOBJS " in
5601 *" strtok_r.$ac_objext "* ) ;;
5602 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5603 ;;
5604 esac
5605
5606 fi
5607
5608 #
5609 # Do we have ffs(), and is it declared in <strings.h>?
5610 #
5611 for ac_func in ffs
5612 do :
5613 ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5614 if test "x$ac_cv_func_ffs" = xyes; then :
5615 cat >>confdefs.h <<_ACEOF
5616 #define HAVE_FFS 1
5617 _ACEOF
5618
5619 fi
5620 done
5621
5622 if test "$ac_cv_func_ffs" = yes; then
5623 #
5624 # We have ffs(); is it declared in <strings.h>?
5625 #
5626 # This test fails if we don't have <strings.h> or if we do
5627 # but it doesn't declare ffs().
5628 #
5629 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5630 #include <strings.h>
5631
5632 "
5633 if test "x$ac_cv_have_decl_ffs" = xyes; then :
5634
5635
5636 $as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5637
5638
5639 fi
5640
5641 fi
5642
5643 #
5644 # Do this before checking for ether_hostton(), as it's a
5645 # "getaddrinfo()-ish function".
5646 #
5647
5648 #
5649 # Most operating systems have getaddrinfo() in the default searched
5650 # libraries (i.e. libc). Check there first.
5651 #
5652 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5653 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5654
5655 else
5656
5657 #
5658 # Not found in the standard system libraries.
5659 # Try libsocket, which requires libnsl.
5660 #
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5662 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
5663 if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
5664 $as_echo_n "(cached) " >&6
5665 else
5666 ac_check_lib_save_LIBS=$LIBS
5667 LIBS="-lsocket -lnsl $LIBS"
5668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5669 /* end confdefs.h. */
5670
5671 /* Override any GCC internal prototype to avoid an error.
5672 Use char because int might match the return type of a GCC
5673 builtin and then its argument prototype would still apply. */
5674 #ifdef __cplusplus
5675 extern "C"
5676 #endif
5677 char getaddrinfo ();
5678 int
5679 main ()
5680 {
5681 return getaddrinfo ();
5682 ;
5683 return 0;
5684 }
5685 _ACEOF
5686 if ac_fn_c_try_link "$LINENO"; then :
5687 ac_cv_lib_socket_getaddrinfo=yes
5688 else
5689 ac_cv_lib_socket_getaddrinfo=no
5690 fi
5691 rm -f core conftest.err conftest.$ac_objext \
5692 conftest$ac_exeext conftest.$ac_ext
5693 LIBS=$ac_check_lib_save_LIBS
5694 fi
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5696 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
5697 if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
5698
5699 #
5700 # OK, we found it in libsocket.
5701 #
5702 LIBS="-lsocket -lnsl $LIBS"
5703
5704 else
5705
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
5707 $as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
5708 if ${ac_cv_lib_network_getaddrinfo+:} false; then :
5709 $as_echo_n "(cached) " >&6
5710 else
5711 ac_check_lib_save_LIBS=$LIBS
5712 LIBS="-lnetwork $LIBS"
5713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5714 /* end confdefs.h. */
5715
5716 /* Override any GCC internal prototype to avoid an error.
5717 Use char because int might match the return type of a GCC
5718 builtin and then its argument prototype would still apply. */
5719 #ifdef __cplusplus
5720 extern "C"
5721 #endif
5722 char getaddrinfo ();
5723 int
5724 main ()
5725 {
5726 return getaddrinfo ();
5727 ;
5728 return 0;
5729 }
5730 _ACEOF
5731 if ac_fn_c_try_link "$LINENO"; then :
5732 ac_cv_lib_network_getaddrinfo=yes
5733 else
5734 ac_cv_lib_network_getaddrinfo=no
5735 fi
5736 rm -f core conftest.err conftest.$ac_objext \
5737 conftest$ac_exeext conftest.$ac_ext
5738 LIBS=$ac_check_lib_save_LIBS
5739 fi
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
5741 $as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
5742 if test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
5743
5744 #
5745 # OK, we found it in libnetwork on Haiku.
5746 #
5747 LIBS="-lnetwork $LIBS"
5748
5749 else
5750
5751 #
5752 # We didn't find it.
5753 #
5754 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5755
5756 fi
5757
5758
5759 fi
5760
5761
5762 #
5763 # OK, do we have recvmsg() in libxnet?
5764 # We also link with libsocket and libnsl.
5765 #
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5767 $as_echo_n "checking for recvmsg in -lxnet... " >&6; }
5768 if ${ac_cv_lib_xnet_recvmsg+:} false; then :
5769 $as_echo_n "(cached) " >&6
5770 else
5771 ac_check_lib_save_LIBS=$LIBS
5772 LIBS="-lxnet -lsocket -lnsl $LIBS"
5773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5774 /* end confdefs.h. */
5775
5776 /* Override any GCC internal prototype to avoid an error.
5777 Use char because int might match the return type of a GCC
5778 builtin and then its argument prototype would still apply. */
5779 #ifdef __cplusplus
5780 extern "C"
5781 #endif
5782 char recvmsg ();
5783 int
5784 main ()
5785 {
5786 return recvmsg ();
5787 ;
5788 return 0;
5789 }
5790 _ACEOF
5791 if ac_fn_c_try_link "$LINENO"; then :
5792 ac_cv_lib_xnet_recvmsg=yes
5793 else
5794 ac_cv_lib_xnet_recvmsg=no
5795 fi
5796 rm -f core conftest.err conftest.$ac_objext \
5797 conftest$ac_exeext conftest.$ac_ext
5798 LIBS=$ac_check_lib_save_LIBS
5799 fi
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
5801 $as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
5802 if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
5803
5804 #
5805 # Yes - link with it as well.
5806 #
5807 LIBS="-lxnet $LIBS"
5808
5809 fi
5810
5811
5812 fi
5813
5814 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5816 $as_echo_n "checking for library containing putmsg... " >&6; }
5817 if ${ac_cv_search_putmsg+:} false; then :
5818 $as_echo_n "(cached) " >&6
5819 else
5820 ac_func_search_save_LIBS=$LIBS
5821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822 /* end confdefs.h. */
5823
5824 /* Override any GCC internal prototype to avoid an error.
5825 Use char because int might match the return type of a GCC
5826 builtin and then its argument prototype would still apply. */
5827 #ifdef __cplusplus
5828 extern "C"
5829 #endif
5830 char putmsg ();
5831 int
5832 main ()
5833 {
5834 return putmsg ();
5835 ;
5836 return 0;
5837 }
5838 _ACEOF
5839 for ac_lib in '' str; do
5840 if test -z "$ac_lib"; then
5841 ac_res="none required"
5842 else
5843 ac_res=-l$ac_lib
5844 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5845 fi
5846 if ac_fn_c_try_link "$LINENO"; then :
5847 ac_cv_search_putmsg=$ac_res
5848 fi
5849 rm -f core conftest.err conftest.$ac_objext \
5850 conftest$ac_exeext
5851 if ${ac_cv_search_putmsg+:} false; then :
5852 break
5853 fi
5854 done
5855 if ${ac_cv_search_putmsg+:} false; then :
5856
5857 else
5858 ac_cv_search_putmsg=no
5859 fi
5860 rm conftest.$ac_ext
5861 LIBS=$ac_func_search_save_LIBS
5862 fi
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5864 $as_echo "$ac_cv_search_putmsg" >&6; }
5865 ac_res=$ac_cv_search_putmsg
5866 if test "$ac_res" != no; then :
5867 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5868
5869 fi
5870
5871
5872
5873 #
5874 # Check for reentrant versions of getnetbyname_r(), as provided by
5875 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5876 # If we don't find one, we just use getnetbyname(), which uses
5877 # thread-specific data on many platforms, but doesn't use it on
5878 # NetBSD or OpenBSD, and may not use it on older versions of other
5879 # platforms.
5880 #
5881 # Only do the check if we have a declaration of getnetbyname_r();
5882 # without it, we can't check which API it has. (We assume that
5883 # if there's a declaration, it has a prototype, so that the API
5884 # can be checked.)
5885 #
5886 ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
5887 "
5888 if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
5889
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
5891 $as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
5892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5893 /* end confdefs.h. */
5894 #include <netdb.h>
5895 int
5896 main ()
5897 {
5898
5899 struct netent netent_buf;
5900 char buf[1024];
5901 struct netent *resultp;
5902 int h_errnoval;
5903
5904 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
5905
5906 ;
5907 return 0;
5908 }
5909 _ACEOF
5910 if ac_fn_c_try_link "$LINENO"; then :
5911
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5913 $as_echo "yes" >&6; }
5914
5915 $as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
5916
5917
5918 else
5919
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921 $as_echo "no" >&6; }
5922
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
5924 $as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
5925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5926 /* end confdefs.h. */
5927 #include <netdb.h>
5928 int
5929 main ()
5930 {
5931
5932 struct netent netent_buf;
5933 char buf[1024];
5934
5935 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
5936
5937 ;
5938 return 0;
5939 }
5940 _ACEOF
5941 if ac_fn_c_try_link "$LINENO"; then :
5942
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5944 $as_echo "yes" >&6; }
5945
5946 $as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
5947
5948
5949 else
5950
5951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952 $as_echo "no" >&6; }
5953
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
5955 $as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
5956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5957 /* end confdefs.h. */
5958 #include <netdb.h>
5959 int
5960 main ()
5961 {
5962
5963 struct netent netent_buf;
5964 struct netent_data net_data;
5965
5966 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
5967
5968 ;
5969 return 0;
5970 }
5971 _ACEOF
5972 if ac_fn_c_try_link "$LINENO"; then :
5973
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5975 $as_echo "yes" >&6; }
5976
5977 $as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
5978
5979
5980 else
5981
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5983 $as_echo "no" >&6; }
5984
5985 fi
5986 rm -f core conftest.err conftest.$ac_objext \
5987 conftest$ac_exeext conftest.$ac_ext
5988
5989 fi
5990 rm -f core conftest.err conftest.$ac_objext \
5991 conftest$ac_exeext conftest.$ac_ext
5992
5993 fi
5994 rm -f core conftest.err conftest.$ac_objext \
5995 conftest$ac_exeext conftest.$ac_ext
5996
5997 fi
5998
5999
6000 #
6001 # Check for reentrant versions of getprotobyname_r(), as provided by
6002 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6003 # If we don't find one, we just use getprotobyname(), which uses
6004 # thread-specific data on many platforms, but doesn't use it on
6005 # NetBSD or OpenBSD, and may not use it on older versions of other
6006 # platforms.
6007 #
6008 # Only do the check if we have a declaration of getprotobyname_r();
6009 # without it, we can't check which API it has. (We assume that
6010 # if there's a declaration, it has a prototype, so that the API
6011 # can be checked.)
6012 #
6013 ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
6014 "
6015 if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
6016
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
6018 $as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
6019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6020 /* end confdefs.h. */
6021 #include <netdb.h>
6022 int
6023 main ()
6024 {
6025
6026 struct protoent protoent_buf;
6027 char buf[1024];
6028 struct protoent *resultp;
6029
6030 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
6031
6032 ;
6033 return 0;
6034 }
6035 _ACEOF
6036 if ac_fn_c_try_link "$LINENO"; then :
6037
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6039 $as_echo "yes" >&6; }
6040
6041 $as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
6042
6043
6044 else
6045
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047 $as_echo "no" >&6; }
6048
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
6050 $as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6052 /* end confdefs.h. */
6053 #include <netdb.h>
6054 int
6055 main ()
6056 {
6057
6058 struct protoent protoent_buf;
6059 char buf[1024];
6060
6061 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
6062
6063 ;
6064 return 0;
6065 }
6066 _ACEOF
6067 if ac_fn_c_try_link "$LINENO"; then :
6068
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6070 $as_echo "yes" >&6; }
6071
6072 $as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
6073
6074
6075 else
6076
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078 $as_echo "no" >&6; }
6079
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
6081 $as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
6082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6083 /* end confdefs.h. */
6084 #include <netdb.h>
6085 int
6086 main ()
6087 {
6088
6089 struct protoent protoent_buf;
6090 struct protoent_data proto_data;
6091
6092 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
6093
6094 ;
6095 return 0;
6096 }
6097 _ACEOF
6098 if ac_fn_c_try_link "$LINENO"; then :
6099
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6101 $as_echo "yes" >&6; }
6102
6103 $as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6104
6105
6106 else
6107
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6109 $as_echo "no" >&6; }
6110
6111 fi
6112 rm -f core conftest.err conftest.$ac_objext \
6113 conftest$ac_exeext conftest.$ac_ext
6114
6115 fi
6116 rm -f core conftest.err conftest.$ac_objext \
6117 conftest$ac_exeext conftest.$ac_ext
6118
6119 fi
6120 rm -f core conftest.err conftest.$ac_objext \
6121 conftest$ac_exeext conftest.$ac_ext
6122
6123 fi
6124
6125
6126 #
6127 # You are in a twisty little maze of UN*Xes, all different.
6128 # Some might not have ether_hostton().
6129 # Some might have it and declare it in <net/ethernet.h>.
6130 # Some might have it and declare it in <netinet/ether.h>
6131 # Some might have it and declare it in <sys/ethernet.h>.
6132 # Some might have it and declare it in <arpa/inet.h>.
6133 # Some might have it and declare it in <netinet/if_ether.h>.
6134 # Some might have it and not declare it in any header file.
6135 #
6136 # Before you is a C compiler.
6137 #
6138 for ac_func in ether_hostton
6139 do :
6140 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6141 if test "x$ac_cv_func_ether_hostton" = xyes; then :
6142 cat >>confdefs.h <<_ACEOF
6143 #define HAVE_ETHER_HOSTTON 1
6144 _ACEOF
6145
6146 fi
6147 done
6148
6149 if test "$ac_cv_func_ether_hostton" = yes; then
6150 #
6151 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
6152 #
6153 # This test fails if we don't have <net/ethernet.h> or if we do
6154 # but it doesn't declare ether_hostton().
6155 #
6156 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6157 #include <net/ethernet.h>
6158
6159 "
6160 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6161
6162
6163 $as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6164
6165
6166 fi
6167
6168 #
6169 # Did that succeed?
6170 #
6171 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6172 #
6173 # No, how about <netinet/ether.h>, as on Linux?
6174 #
6175 # This test fails if we don't have <netinet/ether.h>
6176 # or if we do but it doesn't declare ether_hostton().
6177 #
6178 # Unset ac_cv_have_decl_ether_hostton so we don't
6179 # treat the previous failure as a cached value and
6180 # suppress the next test.
6181 #
6182 unset ac_cv_have_decl_ether_hostton
6183 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6184 #include <netinet/ether.h>
6185
6186 "
6187 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6188
6189
6190 $as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6191
6192
6193 fi
6194
6195 fi
6196 #
6197 # Did that succeed?
6198 #
6199 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6200 #
6201 # No, how about <sys/ethernet.h>, as on Solaris 10
6202 # and later?
6203 #
6204 # This test fails if we don't have <sys/ethernet.h>
6205 # or if we do but it doesn't declare ether_hostton().
6206 #
6207 # Unset ac_cv_have_decl_ether_hostton so we don't
6208 # treat the previous failure as a cached value and
6209 # suppress the next test.
6210 #
6211 unset ac_cv_have_decl_ether_hostton
6212 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6213 #include <sys/ethernet.h>
6214
6215 "
6216 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6217
6218
6219 $as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6220
6221
6222 fi
6223
6224 fi
6225 #
6226 # Did that succeed?
6227 #
6228 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6229 #
6230 # No, how about <arpa/inet.h>, as in AIX?
6231 #
6232 # This test fails if we don't have <arpa/inet.h>
6233 # (if we have ether_hostton(), we should have
6234 # networking, and if we have networking, we should
6235 # have <arapa/inet.h>) or if we do but it doesn't
6236 # declare ether_hostton().
6237 #
6238 # Unset ac_cv_have_decl_ether_hostton so we don't
6239 # treat the previous failure as a cached value and
6240 # suppress the next test.
6241 #
6242 unset ac_cv_have_decl_ether_hostton
6243 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6244 #include <arpa/inet.h>
6245
6246 "
6247 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6248
6249
6250 $as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6251
6252
6253 fi
6254
6255 fi
6256 #
6257 # Did that succeed?
6258 #
6259 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6260 #
6261 # No, how about <netinet/if_ether.h>?
6262 # On some platforms, it requires <net/if.h> and
6263 # <netinet/in.h>, and we always include it with
6264 # both of them, so test it with both of them.
6265 #
6266 # This test fails if we don't have <netinet/if_ether.h>
6267 # and the headers we include before it, or if we do but
6268 # <netinet/if_ether.h> doesn't declare ether_hostton().
6269 #
6270 # Unset ac_cv_have_decl_ether_hostton so we don't
6271 # treat the previous failure as a cached value and
6272 # suppress the next test.
6273 #
6274 unset ac_cv_have_decl_ether_hostton
6275 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6276 #include <sys/types.h>
6277 #include <sys/socket.h>
6278 #include <net/if.h>
6279 #include <netinet/in.h>
6280 #include <netinet/if_ether.h>
6281
6282 "
6283 if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6284
6285
6286 $as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6287
6288
6289 fi
6290
6291 fi
6292 #
6293 # After all that, is ether_hostton() declared?
6294 #
6295 if test "$ac_cv_have_decl_ether_hostton" = yes; then
6296 #
6297 # Yes.
6298 #
6299
6300 $as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6301
6302 else
6303 #
6304 # No, we'll have to declare it ourselves.
6305 # Do we have "struct ether_addr" if we include
6306 # <netinet/if_ether.h>?
6307 #
6308 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6309 #include <sys/types.h>
6310 #include <sys/socket.h>
6311 #include <net/if.h>
6312 #include <netinet/in.h>
6313 #include <netinet/if_ether.h>
6314
6315 "
6316 if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6317
6318 cat >>confdefs.h <<_ACEOF
6319 #define HAVE_STRUCT_ETHER_ADDR 1
6320 _ACEOF
6321
6322
6323 fi
6324
6325 fi
6326 fi
6327
6328 #
6329 # For various things that might use pthreads.
6330 #
6331 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6332 if test "x$ac_cv_header_pthread_h" = xyes; then :
6333
6334 #
6335 # OK, we have pthread.h. Do we have pthread_create in the
6336 # system libraries?
6337 #
6338 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
6339 if test "x$ac_cv_func_pthread_create" = xyes; then :
6340
6341 #
6342 # Yes.
6343 #
6344 ac_lbl_have_pthreads="found"
6345
6346 else
6347
6348 #
6349 # No - do we have it in -lpthreads?
6350 #
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
6352 $as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
6353 if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
6354 $as_echo_n "(cached) " >&6
6355 else
6356 ac_check_lib_save_LIBS=$LIBS
6357 LIBS="-lpthreads $LIBS"
6358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6359 /* end confdefs.h. */
6360
6361 /* Override any GCC internal prototype to avoid an error.
6362 Use char because int might match the return type of a GCC
6363 builtin and then its argument prototype would still apply. */
6364 #ifdef __cplusplus
6365 extern "C"
6366 #endif
6367 char pthread_create ();
6368 int
6369 main ()
6370 {
6371 return pthread_create ();
6372 ;
6373 return 0;
6374 }
6375 _ACEOF
6376 if ac_fn_c_try_link "$LINENO"; then :
6377 ac_cv_lib_pthreads_pthread_create=yes
6378 else
6379 ac_cv_lib_pthreads_pthread_create=no
6380 fi
6381 rm -f core conftest.err conftest.$ac_objext \
6382 conftest$ac_exeext conftest.$ac_ext
6383 LIBS=$ac_check_lib_save_LIBS
6384 fi
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
6386 $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
6387 if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
6388
6389 #
6390 # Yes - add -lpthreads.
6391 #
6392 ac_lbl_have_pthreads="found"
6393 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
6394
6395 else
6396
6397 #
6398 # No - do we have it in -lpthread?
6399 #
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6401 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6402 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6403 $as_echo_n "(cached) " >&6
6404 else
6405 ac_check_lib_save_LIBS=$LIBS
6406 LIBS="-lpthread $LIBS"
6407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408 /* end confdefs.h. */
6409
6410 /* Override any GCC internal prototype to avoid an error.
6411 Use char because int might match the return type of a GCC
6412 builtin and then its argument prototype would still apply. */
6413 #ifdef __cplusplus
6414 extern "C"
6415 #endif
6416 char pthread_create ();
6417 int
6418 main ()
6419 {
6420 return pthread_create ();
6421 ;
6422 return 0;
6423 }
6424 _ACEOF
6425 if ac_fn_c_try_link "$LINENO"; then :
6426 ac_cv_lib_pthread_pthread_create=yes
6427 else
6428 ac_cv_lib_pthread_pthread_create=no
6429 fi
6430 rm -f core conftest.err conftest.$ac_objext \
6431 conftest$ac_exeext conftest.$ac_ext
6432 LIBS=$ac_check_lib_save_LIBS
6433 fi
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6435 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6436 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6437
6438 #
6439 # Yes - add -lpthread.
6440 #
6441 ac_lbl_have_pthreads="found"
6442 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
6443
6444 else
6445
6446 #
6447 # No.
6448 #
6449 ac_lbl_have_pthreads="not found"
6450
6451 fi
6452
6453
6454 fi
6455
6456
6457 fi
6458
6459
6460 else
6461
6462 #
6463 # We didn't find pthread.h.
6464 #
6465 ac_lbl_have_pthreads="not found"
6466
6467
6468 fi
6469
6470
6471
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
6473 $as_echo_n "checking if --disable-protochain option is specified... " >&6; }
6474 # Check whether --enable-protochain was given.
6475 if test "${enable_protochain+set}" = set; then :
6476 enableval=$enable_protochain;
6477 fi
6478
6479 case "x$enable_protochain" in
6480 xyes) enable_protochain=enabled ;;
6481 xno) enable_protochain=disabled ;;
6482 x) enable_protochain=enabled ;;
6483 esac
6484
6485 if test "$enable_protochain" = "disabled"; then
6486
6487 $as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
6488
6489 fi
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
6491 $as_echo "${enable_protochain}" >&6; }
6492
6493 #
6494 # valgrindtest directly uses the native capture mechanism, but
6495 # only tests with BPF and PF_PACKET sockets; only enable it if
6496 # we have BPF or PF_PACKET sockets.
6497 #
6498 VALGRINDTEST_SRC=
6499
6500
6501 # Check whether --with-pcap was given.
6502 if test "${with_pcap+set}" = set; then :
6503 withval=$with_pcap;
6504 fi
6505
6506 if test ! -z "$with_pcap" ; then
6507 V_PCAP="$withval"
6508 else
6509 #
6510 # Check for a bunch of headers for various packet
6511 # capture mechanisms.
6512 #
6513 for ac_header in net/bpf.h
6514 do :
6515 ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
6516 if test "x$ac_cv_header_net_bpf_h" = xyes; then :
6517 cat >>confdefs.h <<_ACEOF
6518 #define HAVE_NET_BPF_H 1
6519 _ACEOF
6520
6521 fi
6522
6523 done
6524
6525 if test "$ac_cv_header_net_bpf_h" = yes; then
6526 #
6527 # Does it define BIOCSETIF?
6528 # I.e., is it a header for an LBL/BSD-style capture
6529 # mechanism, or is it just a header for a BPF filter
6530 # engine? Some versions of Arch Linux, for example,
6531 # have a net/bpf.h that doesn't define BIOCSETIF;
6532 # as it's a Linux, it should use packet sockets,
6533 # instead.
6534 #
6535 # We need:
6536 #
6537 # sys/types.h, because FreeBSD 10's net/bpf.h
6538 # requires that various BSD-style integer types
6539 # be defined;
6540 #
6541 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
6542 # doesn't include it but does use struct timeval
6543 # in ioctl definitions;
6544 #
6545 # sys/ioctl.h and, if we have it, sys/ioccom.h,
6546 # because net/bpf.h defines ioctls;
6547 #
6548 # net/if.h, because it defines some structures
6549 # used in ioctls defined by net/bpf.h;
6550 #
6551 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
6552 # defines some structure fields as being
6553 # struct sockaddrs;
6554 #
6555 # and net/bpf.h doesn't necessarily include all
6556 # of those headers itself.
6557 #
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
6559 $as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
6560 if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
6561 $as_echo_n "(cached) " >&6
6562 else
6563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6564 /* end confdefs.h. */
6565
6566 #include <sys/types.h>
6567 #include <sys/time.h>
6568 #include <sys/ioctl.h>
6569 #include <sys/socket.h>
6570 #ifdef HAVE_SYS_IOCCOM_H
6571 #include <sys/ioccom.h>
6572 #endif
6573 #include <net/bpf.h>
6574 #include <net/if.h>
6575
6576 int
6577 main ()
6578 {
6579 u_int i = BIOCSETIF;
6580 ;
6581 return 0;
6582 }
6583 _ACEOF
6584 if ac_fn_c_try_compile "$LINENO"; then :
6585 ac_cv_lbl_bpf_h_defines_biocsetif=yes
6586 else
6587 ac_cv_lbl_bpf_h_defines_biocsetif=no
6588 fi
6589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6590 fi
6591
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6593 $as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6594 fi
6595 for ac_header in net/pfilt.h net/enet.h
6596 do :
6597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6598 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6599 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6600 cat >>confdefs.h <<_ACEOF
6601 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6602 _ACEOF
6603
6604 fi
6605
6606 done
6607
6608 for ac_header in net/nit.h sys/net/nit.h
6609 do :
6610 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6611 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6612 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6613 cat >>confdefs.h <<_ACEOF
6614 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6615 _ACEOF
6616
6617 fi
6618
6619 done
6620
6621 for ac_header in linux/socket.h net/raw.h sys/dlpi.h
6622 do :
6623 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6624 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6625 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6626 cat >>confdefs.h <<_ACEOF
6627 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6628 _ACEOF
6629
6630 fi
6631
6632 done
6633
6634 for ac_header in config/HaikuConfig.h
6635 do :
6636 ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
6637 if test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
6638 cat >>confdefs.h <<_ACEOF
6639 #define HAVE_CONFIG_HAIKUCONFIG_H 1
6640 _ACEOF
6641
6642 fi
6643
6644 done
6645
6646
6647 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6648 #
6649 # BPF.
6650 # Check this before DLPI, so that we pick BPF on
6651 # Solaris 11 and later.
6652 #
6653 V_PCAP=bpf
6654
6655 #
6656 # We have BPF, so build valgrindtest with "make test"
6657 # on macOS and FreeBSD (add your OS once there's a
6658 # valgrind for it).
6659 #
6660 case "$host_os" in
6661
6662 freebsd*|darwin*|linux*)
6663 VALGRINDTEST_SRC=valgrindtest.c
6664 ;;
6665 esac
6666 elif test "$ac_cv_header_linux_socket_h" = yes; then
6667 #
6668 # No prizes for guessing this one.
6669 #
6670 V_PCAP=linux
6671 VALGRINDTEST_SRC=valgrindtest.c
6672 elif test "$ac_cv_header_net_pfilt_h" = yes; then
6673 #
6674 # DEC OSF/1, Digital UNIX, Tru64 UNIX
6675 #
6676 V_PCAP=pf
6677 elif test "$ac_cv_header_net_enet_h" = yes; then
6678 #
6679 # Stanford Enetfilter.
6680 #
6681 V_PCAP=enet
6682 elif test "$ac_cv_header_net_nit_h" = yes; then
6683 #
6684 # SunOS 4.x STREAMS NIT.
6685 #
6686 V_PCAP=snit
6687 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6688 #
6689 # Pre-SunOS 4.x non-STREAMS NIT.
6690 #
6691 V_PCAP=nit
6692 elif test "$ac_cv_header_net_raw_h" = yes; then
6693 #
6694 # IRIX snoop.
6695 #
6696 V_PCAP=snoop
6697 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6698 #
6699 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6700 #
6701 V_PCAP=dlpi
6702 elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
6703 #
6704 # Haiku.
6705 #
6706 V_PCAP=haiku
6707 else
6708 #
6709 # Nothing we support.
6710 #
6711 V_PCAP=null
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6713 $as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6715 $as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6716 fi
6717 fi
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6719 $as_echo_n "checking packet capture type... " >&6; }
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6721 $as_echo "$V_PCAP" >&6; }
6722
6723
6724 #
6725 # Do we have pkg-config?
6726 #
6727 # Extract the first word of "pkg-config", so it can be a program name with args.
6728 set dummy pkg-config; ac_word=$2
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6730 $as_echo_n "checking for $ac_word... " >&6; }
6731 if ${ac_cv_prog_PKGCONFIG+:} false; then :
6732 $as_echo_n "(cached) " >&6
6733 else
6734 if test -n "$PKGCONFIG"; then
6735 ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
6736 else
6737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6738 for as_dir in $PATH
6739 do
6740 IFS=$as_save_IFS
6741 test -z "$as_dir" && as_dir=.
6742 for ac_exec_ext in '' $ac_executable_extensions; do
6743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6744 ac_cv_prog_PKGCONFIG="pkg-config"
6745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6746 break 2
6747 fi
6748 done
6749 done
6750 IFS=$as_save_IFS
6751
6752 test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
6753 fi
6754 fi
6755 PKGCONFIG=$ac_cv_prog_PKGCONFIG
6756 if test -n "$PKGCONFIG"; then
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
6758 $as_echo "$PKGCONFIG" >&6; }
6759 else
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6761 $as_echo "no" >&6; }
6762 fi
6763
6764
6765
6766 #
6767 # Handle each capture type.
6768 #
6769 case "$V_PCAP" in
6770 dlpi)
6771 #
6772 # Checks for some header files.
6773 #
6774 for ac_header in sys/bufmod.h sys/dlpi_ext.h
6775 do :
6776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6777 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6778 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6779 cat >>confdefs.h <<_ACEOF
6780 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6781 _ACEOF
6782
6783 fi
6784
6785 done
6786
6787
6788 #
6789 # Checks to see if Solaris has the public libdlpi(3LIB) library.
6790 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
6791 # public libdlpi(3LIB) version. Before libdlpi was made public, a
6792 # private version also existed, which did not have the same APIs.
6793 # Due to a gcc bug, the default search path for 32-bit libraries does
6794 # not include /lib, we add it explicitly here.
6795 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
6796 # Also, due to the bug above applications that link to libpcap with
6797 # libdlpi will have to add "-L/lib" option to "configure".
6798 #
6799 save_LDFLAGS="$LDFLAGS"
6800 LDFLAGS="$LIBS -L/lib"
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6802 $as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
6803 if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
6804 $as_echo_n "(cached) " >&6
6805 else
6806 ac_check_lib_save_LIBS=$LIBS
6807 LIBS="-ldlpi $LIBS"
6808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6809 /* end confdefs.h. */
6810
6811 /* Override any GCC internal prototype to avoid an error.
6812 Use char because int might match the return type of a GCC
6813 builtin and then its argument prototype would still apply. */
6814 #ifdef __cplusplus
6815 extern "C"
6816 #endif
6817 char dlpi_walk ();
6818 int
6819 main ()
6820 {
6821 return dlpi_walk ();
6822 ;
6823 return 0;
6824 }
6825 _ACEOF
6826 if ac_fn_c_try_link "$LINENO"; then :
6827 ac_cv_lib_dlpi_dlpi_walk=yes
6828 else
6829 ac_cv_lib_dlpi_dlpi_walk=no
6830 fi
6831 rm -f core conftest.err conftest.$ac_objext \
6832 conftest$ac_exeext conftest.$ac_ext
6833 LIBS=$ac_check_lib_save_LIBS
6834 fi
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6836 $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6837 if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6838
6839 LIBS="-ldlpi $LIBS"
6840 V_PCAP=libdlpi
6841
6842 #
6843 # Capture module plus common code needed for
6844 # common functions used by pcap-[dlpi,libdlpi].c
6845 #
6846 PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
6847
6848 $as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
6849
6850
6851 else
6852
6853 V_PCAP=dlpi
6854
6855 #
6856 # Capture module plus common code needed for
6857 # common functions used by pcap-[dlpi,libdlpi].c
6858 #
6859 PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
6860
6861 fi
6862
6863 LDFLAGS="$save_LDFLAGS"
6864
6865 #
6866 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
6867 # versions of DLPI.
6868 #
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
6870 $as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
6871 if ${ac_cv_sys_dlpi_usable+:} false; then :
6872 $as_echo_n "(cached) " >&6
6873 else
6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875 /* end confdefs.h. */
6876
6877 #include <sys/types.h>
6878 #include <sys/time.h>
6879 #include <sys/dlpi.h>
6880
6881 int
6882 main ()
6883 {
6884 int i = DL_PROMISC_PHYS;
6885 ;
6886 return 0;
6887 }
6888 _ACEOF
6889 if ac_fn_c_try_compile "$LINENO"; then :
6890 ac_cv_sys_dlpi_usable=yes
6891 else
6892 ac_cv_sys_dlpi_usable=no
6893 fi
6894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6895 fi
6896
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
6898 $as_echo "$ac_cv_sys_dlpi_usable" >&6; }
6899 if test $ac_cv_sys_dlpi_usable = no ; then
6900 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
6901 fi
6902
6903 #
6904 # Check to see if Solaris has the dl_passive_req_t struct defined
6905 # in <sys/dlpi.h>.
6906 # This check is for DLPI support for passive modes.
6907 # See dlpi(7P) for more details.
6908 #
6909 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
6910 #include <sys/types.h>
6911 #include <sys/dlpi.h>
6912
6913 "
6914 if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
6915
6916 cat >>confdefs.h <<_ACEOF
6917 #define HAVE_DL_PASSIVE_REQ_T 1
6918 _ACEOF
6919
6920
6921 fi
6922
6923 ;;
6924
6925 enet)
6926 #
6927 # Capture module
6928 #
6929 PLATFORM_C_SRC="pcap-enet.c"
6930 ;;
6931
6932 haiku)
6933 #
6934 # Capture module
6935 #
6936 PLATFORM_CXX_SRC="pcap-haiku.cpp"
6937
6938 #
6939 # Just for the sake of it.
6940 #
6941 for ac_header in net/if.h net/if_dl.h net/if_types.h
6942 do :
6943 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6944 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6945 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6946 cat >>confdefs.h <<_ACEOF
6947 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6948 _ACEOF
6949
6950 fi
6951
6952 done
6953
6954 ;;
6955
6956 linux)
6957 #
6958 # Capture module
6959 #
6960 PLATFORM_C_SRC="pcap-linux.c"
6961
6962 #
6963 # Do we have the wireless extensions?
6964 #
6965 for ac_header in linux/wireless.h
6966 do :
6967 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
6968 #include <sys/socket.h>
6969 #include <linux/if.h>
6970 #include <linux/types.h>
6971
6972 "
6973 if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
6974 cat >>confdefs.h <<_ACEOF
6975 #define HAVE_LINUX_WIRELESS_H 1
6976 _ACEOF
6977
6978 fi
6979
6980 done
6981
6982
6983 #
6984 # Do we have libnl?
6985 # We only want version 3. Version 2 was, apparently,
6986 # short-lived, and version 1 is source and binary
6987 # incompatible with version 3, and it appears that,
6988 # these days, everybody's using version 3. We're
6989 # not supporting older versions of the Linux kernel;
6990 # let's drop support for older versions of libnl, too.
6991 #
6992
6993 # Check whether --with-libnl was given.
6994 if test "${with_libnl+set}" = set; then :
6995 withval=$with_libnl; with_libnl=$withval
6996 else
6997 with_libnl=if_available
6998 fi
6999
7000
7001 if test x$with_libnl != xno ; then
7002 if test "x$PKGCONFIG" != "xno"; then
7003 #
7004 # We have pkg-config; see if we have libnl-genl-3.0
7005 # as a package.
7006 #
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5
7008 $as_echo_n "checking for libnl-genl-3.0 with pkg-config... " >&6; }
7009 if "$PKGCONFIG" libnl-genl-3.0; then
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
7011 $as_echo "found" >&6; }
7012 pkg_config_found_libnl=yes
7013 libnl_genl_cflags=`"$PKGCONFIG" --cflags libnl-genl-3.0`
7014 V_INCLS="$V_INCLS ${libnl_genl_cflags}"
7015 libnl_genl_libs=`"$PKGCONFIG" --libs libnl-genl-3.0`
7016 LIBS="${libnl_genl_libs} $LIBS"
7017
7018 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7019
7020 else
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7022 $as_echo "not found" >&6; }
7023 fi
7024 fi
7025
7026 if test x$pkg_config_found_libnl != xyes; then
7027 #
7028 # OK, either we don't have pkg-config or there
7029 # wasn't a .pc file for it; Check for it directly.
7030 #
7031 case "$with_libnl" in
7032
7033 yes|if_available)
7034 incdir=-I/usr/include/libnl3
7035 libnldir=
7036 ;;
7037
7038 *)
7039 if test -d $withval; then
7040 libnldir=-L${withval}/lib
7041 incdir=-I${withval}/include
7042 fi
7043 ;;
7044 esac
7045
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
7047 $as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
7048 if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
7049 $as_echo_n "(cached) " >&6
7050 else
7051 ac_check_lib_save_LIBS=$LIBS
7052 LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
7053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7054 /* end confdefs.h. */
7055
7056 /* Override any GCC internal prototype to avoid an error.
7057 Use char because int might match the return type of a GCC
7058 builtin and then its argument prototype would still apply. */
7059 #ifdef __cplusplus
7060 extern "C"
7061 #endif
7062 char nl_socket_alloc ();
7063 int
7064 main ()
7065 {
7066 return nl_socket_alloc ();
7067 ;
7068 return 0;
7069 }
7070 _ACEOF
7071 if ac_fn_c_try_link "$LINENO"; then :
7072 ac_cv_lib_nl_3_nl_socket_alloc=yes
7073 else
7074 ac_cv_lib_nl_3_nl_socket_alloc=no
7075 fi
7076 rm -f core conftest.err conftest.$ac_objext \
7077 conftest$ac_exeext conftest.$ac_ext
7078 LIBS=$ac_check_lib_save_LIBS
7079 fi
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
7081 $as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
7082 if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
7083
7084 #
7085 # Yes, we have libnl 3.x.
7086 #
7087 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
7088
7089 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7090
7091 V_INCLS="$V_INCLS ${incdir}"
7092
7093 else
7094
7095 #
7096 # No, we don't have libnl at all.
7097 # Fail if the user explicitly requested
7098 # it.
7099 #
7100 if test x$with_libnl = xyes ; then
7101 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
7102 fi
7103
7104 fi
7105
7106 fi
7107 fi
7108
7109 #
7110 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
7111 #
7112 # NOTE: any failure means we conclude that it doesn't have that
7113 # member, so if we don't have tpacket_auxdata, we conclude it
7114 # doesn't have that member (which is OK, as either we won't be
7115 # using code that would use that member, or we wouldn't compile
7116 # in any case).
7117 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
7118 #include <sys/types.h>
7119 #include <linux/if_packet.h>
7120
7121 "
7122 if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
7123
7124 cat >>confdefs.h <<_ACEOF
7125 #define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
7126 _ACEOF
7127
7128
7129 fi
7130
7131 ;;
7132
7133 bpf)
7134 #
7135 # Capture module
7136 #
7137 PLATFORM_C_SRC="pcap-bpf.c"
7138
7139 #
7140 # Check whether we have the *BSD-style ioctls.
7141 #
7142 for ac_header in net/if_media.h
7143 do :
7144 ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
7145 if test "x$ac_cv_header_net_if_media_h" = xyes; then :
7146 cat >>confdefs.h <<_ACEOF
7147 #define HAVE_NET_IF_MEDIA_H 1
7148 _ACEOF
7149
7150 fi
7151
7152 done
7153
7154
7155 #
7156 # Check whether we have struct BPF_TIMEVAL.
7157 #
7158 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
7159 #include <sys/types.h>
7160 #include <sys/ioctl.h>
7161 #ifdef HAVE_SYS_IOCCOM_H
7162 #include <sys/ioccom.h>
7163 #endif
7164 #include <net/bpf.h>
7165
7166 "
7167 if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
7168
7169 cat >>confdefs.h <<_ACEOF
7170 #define HAVE_STRUCT_BPF_TIMEVAL 1
7171 _ACEOF
7172
7173
7174 fi
7175
7176 ;;
7177
7178 pf)
7179 #
7180 # Capture module
7181 #
7182 PLATFORM_C_SRC="pcap-pf.c"
7183 ;;
7184
7185 snit)
7186 #
7187 # Capture module
7188 #
7189 PLATFORM_C_SRC="pcap-snit.c"
7190 ;;
7191
7192 snoop)
7193 #
7194 # Capture module
7195 #
7196 PLATFORM_C_SRC="pcap-snoop.c"
7197 ;;
7198
7199 dag)
7200 #
7201 # --with-pcap=dag is the only way to get here, and it means
7202 # "DAG support but nothing else"
7203 #
7204 V_DEFS="$V_DEFS -DDAG_ONLY"
7205 PLATFORM_C_SRC="pcap-dag.c"
7206 xxx_only=yes
7207 ;;
7208
7209 dpdk)
7210 #
7211 # --with-pcap=dpdk is the only way to get here, and it means
7212 # "DPDK support but nothing else"
7213 #
7214 V_DEFS="$V_DEFS -DDPDK_ONLY"
7215 PLATFORM_C_SRC="pcap-dpdk.c"
7216 xxx_only=yes
7217 ;;
7218
7219 septel)
7220 #
7221 # --with-pcap=septel is the only way to get here, and it means
7222 # "Septel support but nothing else"
7223 #
7224 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
7225 PLATFORM_C_SRC="pcap-septel.c"
7226 xxx_only=yes
7227 ;;
7228
7229 snf)
7230 #
7231 # --with-pcap=snf is the only way to get here, and it means
7232 # "SNF support but nothing else"
7233 #
7234 V_DEFS="$V_DEFS -DSNF_ONLY"
7235 PLATFORM_C_SRC="pcap-snf.c"
7236 xxx_only=yes
7237 ;;
7238
7239 null)
7240 #
7241 # Capture module
7242 #
7243 PLATFORM_C_SRC="pcap-null.c"
7244 ;;
7245
7246 *)
7247 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
7248 ;;
7249 esac
7250
7251 if test "$V_PCAP" != null
7252 then
7253 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
7254 if test "x$ac_cv_func_getifaddrs" = xyes; then :
7255
7256 #
7257 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
7258 # as well, just in case some platform is really weird.
7259 #
7260 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
7261 if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
7262
7263 #
7264 # We have the header, so we use "getifaddrs()" to
7265 # get the list of interfaces.
7266 #
7267 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
7268
7269 else
7270
7271 #
7272 # We don't have the header - give up.
7273 # XXX - we could also fall back on some other
7274 # mechanism, but, for now, this'll catch this
7275 # problem so that we can at least try to figure
7276 # out something to do on systems with "getifaddrs()"
7277 # but without "ifaddrs.h", if there is something
7278 # we can do on those systems.
7279 #
7280 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
7281
7282 fi
7283
7284
7285
7286 else
7287
7288 #
7289 # Well, we don't have "getifaddrs()", at least not with the
7290 # libraries with which we've decided we need to link
7291 # libpcap with, so we have to use some other mechanism.
7292 #
7293 # Note that this may happen on Solaris, which has
7294 # getifaddrs(), but in -lsocket, not in -lxnet, so we
7295 # won't find it if we link with -lxnet, which we want
7296 # to do for other reasons.
7297 #
7298 # For now, we use either the SIOCGIFCONF ioctl or the
7299 # SIOCGLIFCONF ioctl, preferring the latter if we have
7300 # it; the latter is a Solarisism that first appeared
7301 # in Solaris 8. (Solaris's getifaddrs() appears to
7302 # be built atop SIOCGLIFCONF; using it directly
7303 # avoids a not-all-that-useful middleman.)
7304 #
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
7306 $as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
7307 if ${ac_cv_lbl_have_siocglifconf+:} false; then :
7308 $as_echo_n "(cached) " >&6
7309 else
7310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311 /* end confdefs.h. */
7312 #include <sys/param.h>
7313 #include <sys/file.h>
7314 #include <sys/ioctl.h>
7315 #include <sys/socket.h>
7316 #include <sys/sockio.h>
7317 int
7318 main ()
7319 {
7320 ioctl(0, SIOCGLIFCONF, (char *)0);
7321 ;
7322 return 0;
7323 }
7324 _ACEOF
7325 if ac_fn_c_try_compile "$LINENO"; then :
7326 ac_cv_lbl_have_siocglifconf=yes
7327 else
7328 ac_cv_lbl_have_siocglifconf=no
7329 fi
7330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7331 fi
7332
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
7334 $as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
7335 if test $ac_cv_lbl_have_siocglifconf = yes ; then
7336 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
7337 else
7338 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
7339 fi
7340
7341 fi
7342
7343 fi
7344
7345 case "$host_os" in
7346 linux*)
7347 for ac_header in linux/net_tstamp.h
7348 do :
7349 ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
7350 if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
7351 cat >>confdefs.h <<_ACEOF
7352 #define HAVE_LINUX_NET_TSTAMP_H 1
7353 _ACEOF
7354
7355 fi
7356
7357 done
7358
7359 ;;
7360 *)
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
7362 $as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
7363 ;;
7364 esac
7365
7366 #
7367 # Check for socklen_t.
7368 #
7369 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
7370 #include <sys/types.h>
7371 #include <sys/socket.h>
7372
7373 "
7374 if test "x$ac_cv_type_socklen_t" = xyes; then :
7375
7376 cat >>confdefs.h <<_ACEOF
7377 #define HAVE_SOCKLEN_T 1
7378 _ACEOF
7379
7380
7381 fi
7382
7383
7384 # Check whether --enable-ipv6 was given.
7385 if test "${enable_ipv6+set}" = set; then :
7386 enableval=$enable_ipv6;
7387 else
7388 enable_ipv6=yes
7389 fi
7390
7391 if test "$enable_ipv6" != "no"; then
7392 #
7393 # We've already made sure we have getaddrinfo above in
7394 # AC_LBL_LIBRARY_NET.
7395 #
7396
7397 $as_echo "#define INET6 1" >>confdefs.h
7398
7399 fi
7400
7401 # Check for Endace DAG card support.
7402
7403 # Check whether --with-dag was given.
7404 if test "${with_dag+set}" = set; then :
7405 withval=$with_dag;
7406 if test "$withval" = no
7407 then
7408 # User doesn't want DAG support.
7409 want_dag=no
7410 elif test "$withval" = yes
7411 then
7412 # User wants DAG support but hasn't specified a directory.
7413 want_dag=yes
7414 else
7415 # User wants DAG support and has specified a directory, so use the provided value.
7416 want_dag=yes
7417 dag_root=$withval
7418 fi
7419
7420 else
7421
7422 if test "$V_PCAP" = dag; then
7423 # User requested DAG-only libpcap, so we'd better have
7424 # the DAG API.
7425 want_dag=yes
7426 elif test "xxx_only" = yes; then
7427 # User requested something-else-only pcap, so they don't
7428 # want DAG support.
7429 want_dag=no
7430 else
7431 #
7432 # Use DAG API if present, otherwise don't
7433 #
7434 want_dag=ifpresent
7435 fi
7436
7437 fi
7438
7439
7440
7441 # Check whether --with-dag-includes was given.
7442 if test "${with_dag_includes+set}" = set; then :
7443 withval=$with_dag_includes;
7444 # User wants DAG support and has specified a header directory, so use the provided value.
7445 want_dag=yes
7446 dag_include_dir=$withval
7447
7448 fi
7449
7450
7451
7452 # Check whether --with-dag-libraries was given.
7453 if test "${with_dag_libraries+set}" = set; then :
7454 withval=$with_dag_libraries;
7455 # User wants DAG support and has specified a library directory, so use the provided value.
7456 want_dag=yes
7457 dag_lib_dir=$withval
7458
7459 fi
7460
7461
7462 if test "$want_dag" != no; then
7463
7464 # If necessary, set default paths for DAG API headers and libraries.
7465 if test -z "$dag_root"; then
7466 dag_root=/usr/local
7467 fi
7468
7469 if test -z "$dag_include_dir"; then
7470 dag_include_dir="$dag_root/include"
7471 fi
7472
7473 if test -z "$dag_lib_dir"; then
7474 dag_lib_dir="$dag_root/lib"
7475 #
7476 # Handle multiarch systems.
7477 #
7478 if test -d "$dag_lib_dir/$host"
7479 then
7480 dag_lib_dir="$dag_lib_dir/$host"
7481 fi
7482 fi
7483
7484 save_CFLAGS="$CFLAGS"
7485 CFLAGS="$CFLAGS -I$dag_include_dir"
7486 for ac_header in dagapi.h
7487 do :
7488 ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
7489 if test "x$ac_cv_header_dagapi_h" = xyes; then :
7490 cat >>confdefs.h <<_ACEOF
7491 #define HAVE_DAGAPI_H 1
7492 _ACEOF
7493
7494 fi
7495
7496 done
7497
7498
7499 if test "$ac_cv_header_dagapi_h" = yes; then
7500
7501 V_INCLS="$V_INCLS -I$dag_include_dir"
7502
7503 if test $V_PCAP != dag ; then
7504 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
7505 fi
7506
7507 # Check for various DAG API functions.
7508 # Don't need to save and restore LIBS to prevent -ldag being
7509 # included if there's a found-action (arg 3).
7510 save_LDFLAGS="$LDFLAGS"
7511 LDFLAGS="-L$dag_lib_dir"
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
7513 $as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
7514 if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
7515 $as_echo_n "(cached) " >&6
7516 else
7517 ac_check_lib_save_LIBS=$LIBS
7518 LIBS="-ldag $LIBS"
7519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7520 /* end confdefs.h. */
7521
7522 /* Override any GCC internal prototype to avoid an error.
7523 Use char because int might match the return type of a GCC
7524 builtin and then its argument prototype would still apply. */
7525 #ifdef __cplusplus
7526 extern "C"
7527 #endif
7528 char dag_attach_stream ();
7529 int
7530 main ()
7531 {
7532 return dag_attach_stream ();
7533 ;
7534 return 0;
7535 }
7536 _ACEOF
7537 if ac_fn_c_try_link "$LINENO"; then :
7538 ac_cv_lib_dag_dag_attach_stream=yes
7539 else
7540 ac_cv_lib_dag_dag_attach_stream=no
7541 fi
7542 rm -f core conftest.err conftest.$ac_objext \
7543 conftest$ac_exeext conftest.$ac_ext
7544 LIBS=$ac_check_lib_save_LIBS
7545 fi
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
7547 $as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
7548 if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
7549 cat >>confdefs.h <<_ACEOF
7550 #define HAVE_LIBDAG 1
7551 _ACEOF
7552
7553 LIBS="-ldag $LIBS"
7554
7555 else
7556 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
7557 fi
7558
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
7560 $as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
7561 if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
7562 $as_echo_n "(cached) " >&6
7563 else
7564 ac_check_lib_save_LIBS=$LIBS
7565 LIBS="-ldag $LIBS"
7566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7567 /* end confdefs.h. */
7568
7569 /* Override any GCC internal prototype to avoid an error.
7570 Use char because int might match the return type of a GCC
7571 builtin and then its argument prototype would still apply. */
7572 #ifdef __cplusplus
7573 extern "C"
7574 #endif
7575 char dag_attach_stream64 ();
7576 int
7577 main ()
7578 {
7579 return dag_attach_stream64 ();
7580 ;
7581 return 0;
7582 }
7583 _ACEOF
7584 if ac_fn_c_try_link "$LINENO"; then :
7585 ac_cv_lib_dag_dag_attach_stream64=yes
7586 else
7587 ac_cv_lib_dag_dag_attach_stream64=no
7588 fi
7589 rm -f core conftest.err conftest.$ac_objext \
7590 conftest$ac_exeext conftest.$ac_ext
7591 LIBS=$ac_check_lib_save_LIBS
7592 fi
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
7594 $as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
7595 if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
7596 dag_large_streams="1"
7597 else
7598 dag_large_streams="0"
7599 fi
7600
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
7602 $as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
7603 if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
7604 $as_echo_n "(cached) " >&6
7605 else
7606 ac_check_lib_save_LIBS=$LIBS
7607 LIBS="-ldag $LIBS"
7608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7609 /* end confdefs.h. */
7610
7611 /* Override any GCC internal prototype to avoid an error.
7612 Use char because int might match the return type of a GCC
7613 builtin and then its argument prototype would still apply. */
7614 #ifdef __cplusplus
7615 extern "C"
7616 #endif
7617 char dag_get_erf_types ();
7618 int
7619 main ()
7620 {
7621 return dag_get_erf_types ();
7622 ;
7623 return 0;
7624 }
7625 _ACEOF
7626 if ac_fn_c_try_link "$LINENO"; then :
7627 ac_cv_lib_dag_dag_get_erf_types=yes
7628 else
7629 ac_cv_lib_dag_dag_get_erf_types=no
7630 fi
7631 rm -f core conftest.err conftest.$ac_objext \
7632 conftest$ac_exeext conftest.$ac_ext
7633 LIBS=$ac_check_lib_save_LIBS
7634 fi
7635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
7636 $as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
7637 if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
7638
7639
7640 $as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
7641
7642 fi
7643
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
7645 $as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
7646 if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
7647 $as_echo_n "(cached) " >&6
7648 else
7649 ac_check_lib_save_LIBS=$LIBS
7650 LIBS="-ldag $LIBS"
7651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7652 /* end confdefs.h. */
7653
7654 /* Override any GCC internal prototype to avoid an error.
7655 Use char because int might match the return type of a GCC
7656 builtin and then its argument prototype would still apply. */
7657 #ifdef __cplusplus
7658 extern "C"
7659 #endif
7660 char dag_get_stream_erf_types ();
7661 int
7662 main ()
7663 {
7664 return dag_get_stream_erf_types ();
7665 ;
7666 return 0;
7667 }
7668 _ACEOF
7669 if ac_fn_c_try_link "$LINENO"; then :
7670 ac_cv_lib_dag_dag_get_stream_erf_types=yes
7671 else
7672 ac_cv_lib_dag_dag_get_stream_erf_types=no
7673 fi
7674 rm -f core conftest.err conftest.$ac_objext \
7675 conftest$ac_exeext conftest.$ac_ext
7676 LIBS=$ac_check_lib_save_LIBS
7677 fi
7678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
7679 $as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
7680 if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
7681
7682
7683 $as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
7684
7685 fi
7686
7687
7688 LDFLAGS="$save_LDFLAGS"
7689
7690 #
7691 # We assume that if we have libdag we have libdagconf,
7692 # as they're installed at the same time from the same
7693 # package.
7694 #
7695 LIBS="$LIBS -ldag -ldagconf"
7696 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
7697
7698 if test "$dag_large_streams" = 1; then
7699
7700 $as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
7701
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
7703 $as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
7704 if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
7705 $as_echo_n "(cached) " >&6
7706 else
7707 ac_check_lib_save_LIBS=$LIBS
7708 LIBS="-lvdag $LIBS"
7709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7710 /* end confdefs.h. */
7711
7712 /* Override any GCC internal prototype to avoid an error.
7713 Use char because int might match the return type of a GCC
7714 builtin and then its argument prototype would still apply. */
7715 #ifdef __cplusplus
7716 extern "C"
7717 #endif
7718 char vdag_set_device_info ();
7719 int
7720 main ()
7721 {
7722 return vdag_set_device_info ();
7723 ;
7724 return 0;
7725 }
7726 _ACEOF
7727 if ac_fn_c_try_link "$LINENO"; then :
7728 ac_cv_lib_vdag_vdag_set_device_info=yes
7729 else
7730 ac_cv_lib_vdag_vdag_set_device_info=no
7731 fi
7732 rm -f core conftest.err conftest.$ac_objext \
7733 conftest$ac_exeext conftest.$ac_ext
7734 LIBS=$ac_check_lib_save_LIBS
7735 fi
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
7737 $as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
7738 if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
7739 ac_dag_have_vdag="1"
7740 else
7741 ac_dag_have_vdag="0"
7742 fi
7743
7744 if test "$ac_dag_have_vdag" = 1; then
7745
7746 $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
7747
7748 if test "$ac_lbl_have_pthreads" != "found"; then
7749 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
7750 fi
7751 LIBS="$LIBS $PTHREAD_LIBS"
7752 fi
7753 fi
7754
7755
7756 $as_echo "#define HAVE_DAG_API 1" >>confdefs.h
7757
7758 else
7759
7760 if test "$V_PCAP" = dag; then
7761 # User requested "dag" capture type but we couldn't
7762 # find the DAG API support.
7763 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
7764 fi
7765
7766 if test "$want_dag" = yes; then
7767 # User wanted DAG support but we couldn't find it.
7768 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
7769 fi
7770 fi
7771 CFLAGS="$save_CFLAGS"
7772 fi
7773
7774
7775 # Check whether --with-septel was given.
7776 if test "${with_septel+set}" = set; then :
7777 withval=$with_septel;
7778 if test "$withval" = no
7779 then
7780 want_septel=no
7781 elif test "$withval" = yes
7782 then
7783 want_septel=yes
7784 septel_root=
7785 else
7786 want_septel=yes
7787 septel_root=$withval
7788 fi
7789
7790 else
7791
7792 if test "$V_PCAP" = septel; then
7793 # User requested Septel-only libpcap, so we'd better have
7794 # the Septel API.
7795 want_septel=yes
7796 elif test "xxx_only" = yes; then
7797 # User requested something-else-only pcap, so they don't
7798 # want Septel support.
7799 want_septel=no
7800 else
7801 #
7802 # Use Septel API if present, otherwise don't
7803 #
7804 want_septel=ifpresent
7805 fi
7806
7807 fi
7808
7809
7810 ac_cv_lbl_septel_api=no
7811 if test "$with_septel" != no; then
7812
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
7814 $as_echo_n "checking whether we have Septel API headers... " >&6; }
7815
7816 # If necessary, set default paths for Septel API headers and libraries.
7817 if test -z "$septel_root"; then
7818 septel_root=$srcdir/../septel
7819 fi
7820
7821 septel_tools_dir="$septel_root"
7822 septel_include_dir="$septel_root/INC"
7823
7824 if test -r "$septel_include_dir/msg.h"; then
7825 ac_cv_lbl_septel_api=yes
7826 fi
7827
7828 if test "$ac_cv_lbl_septel_api" = yes; then
7829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
7830 $as_echo "yes ($septel_include_dir)" >&6; }
7831
7832 V_INCLS="$V_INCLS -I$septel_include_dir"
7833 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"
7834 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"
7835
7836 if test "$V_PCAP" != septel ; then
7837 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
7838 fi
7839
7840
7841 $as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
7842
7843 else
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7845 $as_echo "no" >&6; }
7846
7847 if test "$V_PCAP" = septel; then
7848 # User requested "septel" capture type but
7849 # we couldn't find the Septel API support.
7850 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
7851 fi
7852
7853 if test "$want_septel" = yes; then
7854 # User wanted Septel support but we couldn't find it.
7855 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
7856 fi
7857 fi
7858 fi
7859
7860 # Check for Myricom SNF support.
7861
7862 # Check whether --with-snf was given.
7863 if test "${with_snf+set}" = set; then :
7864 withval=$with_snf;
7865 if test "$withval" = no
7866 then
7867 # User explicitly doesn't want SNF
7868 want_snf=no
7869 elif test "$withval" = yes
7870 then
7871 # User wants SNF support but hasn't specified a directory.
7872 want_snf=yes
7873 else
7874 # User wants SNF support with a specified directory.
7875 want_snf=yes
7876 snf_root=$withval
7877 fi
7878
7879 else
7880
7881 if test "$V_PCAP" = snf; then
7882 # User requested Sniffer-only libpcap, so we'd better have
7883 # the Sniffer API.
7884 want_snf=yes
7885 elif test "xxx_only" = yes; then
7886 # User requested something-else-only pcap, so they don't
7887 # want SNF support.
7888 want_snf=no
7889 else
7890 #
7891 # Use Sniffer API if present, otherwise don't
7892 #
7893 want_snf=ifpresent
7894 fi
7895
7896 fi
7897
7898
7899
7900 # Check whether --with-snf-includes was given.
7901 if test "${with_snf_includes+set}" = set; then :
7902 withval=$with_snf_includes;
7903 # User wants SNF with specific header directory
7904 want_snf=yes
7905 snf_include_dir=$withval
7906
7907 fi
7908
7909
7910
7911 # Check whether --with-snf-libraries was given.
7912 if test "${with_snf_libraries+set}" = set; then :
7913 withval=$with_snf_libraries;
7914 # User wants SNF with specific lib directory
7915 want_snf=yes
7916 snf_lib_dir=$withval
7917
7918 fi
7919
7920
7921 ac_cv_lbl_snf_api=no
7922 if test "$with_snf" != no; then
7923
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
7925 $as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
7926
7927 # If necessary, set default paths for Sniffer headers and libraries.
7928 if test -z "$snf_root"; then
7929 snf_root=/opt/snf
7930 fi
7931
7932 if test -z "$snf_include_dir"; then
7933 snf_include_dir="$snf_root/include"
7934 fi
7935
7936 if test -z "$snf_lib_dir"; then
7937 snf_lib_dir="$snf_root/lib"
7938 #
7939 # Handle multiarch systems.
7940 #
7941 if test -d "$snf_lib_dir/$host"
7942 then
7943 snf_lib_dir="$snf_lib_dir/$host"
7944 fi
7945 fi
7946
7947 if test -f "$snf_include_dir/snf.h"; then
7948 # We found a header; make sure we can link with the library
7949 save_LDFLAGS="$LDFLAGS"
7950 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
7952 $as_echo_n "checking for snf_init in -lsnf... " >&6; }
7953 if ${ac_cv_lib_snf_snf_init+:} false; then :
7954 $as_echo_n "(cached) " >&6
7955 else
7956 ac_check_lib_save_LIBS=$LIBS
7957 LIBS="-lsnf $LIBS"
7958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7959 /* end confdefs.h. */
7960
7961 /* Override any GCC internal prototype to avoid an error.
7962 Use char because int might match the return type of a GCC
7963 builtin and then its argument prototype would still apply. */
7964 #ifdef __cplusplus
7965 extern "C"
7966 #endif
7967 char snf_init ();
7968 int
7969 main ()
7970 {
7971 return snf_init ();
7972 ;
7973 return 0;
7974 }
7975 _ACEOF
7976 if ac_fn_c_try_link "$LINENO"; then :
7977 ac_cv_lib_snf_snf_init=yes
7978 else
7979 ac_cv_lib_snf_snf_init=no
7980 fi
7981 rm -f core conftest.err conftest.$ac_objext \
7982 conftest$ac_exeext conftest.$ac_ext
7983 LIBS=$ac_check_lib_save_LIBS
7984 fi
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
7986 $as_echo "$ac_cv_lib_snf_snf_init" >&6; }
7987 if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
7988 ac_cv_lbl_snf_api="yes"
7989 fi
7990
7991 LDFLAGS="$save_LDFLAGS"
7992 if test "$ac_cv_lbl_snf_api" = no; then
7993 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
7994 fi
7995 fi
7996
7997 if test "$ac_cv_lbl_snf_api" = yes; then
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
7999 $as_echo "yes ($snf_root)" >&6; }
8000
8001 V_INCLS="$V_INCLS -I$snf_include_dir"
8002 LIBS="$LIBS -lsnf"
8003 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
8004
8005 if test "$V_PCAP" != snf ; then
8006 MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
8007 fi
8008
8009
8010 $as_echo "#define HAVE_SNF_API 1" >>confdefs.h
8011
8012 else
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8014 $as_echo "no" >&6; }
8015
8016 if test "$want_snf" = yes; then
8017 # User requested "snf" capture type but
8018 # we couldn't find the Sniffer API support.
8019 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
8020 fi
8021
8022 if test "$want_snf" = yes; then
8023 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
8024 fi
8025 fi
8026 fi
8027
8028 # Check for Riverbed TurboCap support.
8029
8030 # Check whether --with-turbocap was given.
8031 if test "${with_turbocap+set}" = set; then :
8032 withval=$with_turbocap;
8033 if test "$withval" = no
8034 then
8035 # User explicitly doesn't want TurboCap
8036 want_turbocap=no
8037 elif test "$withval" = yes
8038 then
8039 # User wants TurboCap support but hasn't specified a directory.
8040 want_turbocap=yes
8041 else
8042 # User wants TurboCap support with a specified directory.
8043 want_turbocap=yes
8044 turbocap_root=$withval
8045 fi
8046
8047 else
8048
8049 if test "xxx_only" = yes; then
8050 # User requested something-else-only pcap, so they don't
8051 # want TurboCap support.
8052 want_turbocap=no
8053 else
8054 #
8055 # Use TurboCap API if present, otherwise don't
8056 #
8057 want_turbocap=ifpresent
8058 fi
8059
8060 fi
8061
8062
8063 ac_cv_lbl_turbocap_api=no
8064 if test "$want_turbocap" != no; then
8065
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
8067 $as_echo_n "checking whether TurboCap is supported... " >&6; }
8068
8069 save_CFLAGS="$CFLAGS"
8070 save_LIBS="$LIBS"
8071 if test ! -z "$turbocap_root"; then
8072 TURBOCAP_CFLAGS="-I$turbocap_root/include"
8073 TURBOCAP_LIBS="-L$turbocap_root/lib"
8074 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
8075 fi
8076
8077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078 /* end confdefs.h. */
8079
8080 #include <TcApi.h>
8081
8082 int
8083 main ()
8084 {
8085
8086 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
8087 TC_INSTANCE i;
8088 (void)TcInstanceCreateByName("foo", &i);
8089
8090 ;
8091 return 0;
8092 }
8093 _ACEOF
8094 if ac_fn_c_try_compile "$LINENO"; then :
8095 ac_cv_lbl_turbocap_api=yes
8096 fi
8097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8098
8099 CFLAGS="$save_CFLAGS"
8100 if test $ac_cv_lbl_turbocap_api = yes; then
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8102 $as_echo "yes" >&6; }
8103
8104 MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
8105 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
8106 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
8107
8108
8109 $as_echo "#define HAVE_TC_API 1" >>confdefs.h
8110
8111 else
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8113 $as_echo "no" >&6; }
8114
8115 if test "$want_turbocap" = yes; then
8116 # User wanted Turbo support but we couldn't find it.
8117 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
8118 fi
8119 fi
8120 fi
8121
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
8123 $as_echo_n "checking whether to enable remote packet capture... " >&6; }
8124 # Check whether --enable-remote was given.
8125 if test "${enable_remote+set}" = set; then :
8126 enableval=$enable_remote;
8127 else
8128 enableval=no
8129 fi
8130
8131 case "$enableval" in
8132 yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8133 $as_echo "yes" >&6; }
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
8135 $as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
8137 $as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
8138 #
8139 # rpcapd requires pthreads on UN*X.
8140 #
8141 if test "$ac_lbl_have_pthreads" != "found"; then
8142 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
8143 fi
8144 #
8145 # It also requires crypt().
8146 # Do we have it in the system libraries?
8147 #
8148 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
8149 if test "x$ac_cv_func_crypt" = xyes; then :
8150
8151 else
8152
8153 #
8154 # No. Do we have it in -lcrypt?
8155 #
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
8157 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
8158 if ${ac_cv_lib_crypt_crypt+:} false; then :
8159 $as_echo_n "(cached) " >&6
8160 else
8161 ac_check_lib_save_LIBS=$LIBS
8162 LIBS="-lcrypt $LIBS"
8163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8164 /* end confdefs.h. */
8165
8166 /* Override any GCC internal prototype to avoid an error.
8167 Use char because int might match the return type of a GCC
8168 builtin and then its argument prototype would still apply. */
8169 #ifdef __cplusplus
8170 extern "C"
8171 #endif
8172 char crypt ();
8173 int
8174 main ()
8175 {
8176 return crypt ();
8177 ;
8178 return 0;
8179 }
8180 _ACEOF
8181 if ac_fn_c_try_link "$LINENO"; then :
8182 ac_cv_lib_crypt_crypt=yes
8183 else
8184 ac_cv_lib_crypt_crypt=no
8185 fi
8186 rm -f core conftest.err conftest.$ac_objext \
8187 conftest$ac_exeext conftest.$ac_ext
8188 LIBS=$ac_check_lib_save_LIBS
8189 fi
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
8191 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
8192 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
8193
8194 #
8195 # Yes; add -lcrypt to the libraries for rpcapd.
8196 #
8197 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
8198
8199 else
8200
8201 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
8202
8203 fi
8204
8205
8206 fi
8207
8208
8209 #
8210 # OK, we have crypt(). Do we have getspnam()?
8211 #
8212 for ac_func in getspnam
8213 do :
8214 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8215 if test "x$ac_cv_func_getspnam" = xyes; then :
8216 cat >>confdefs.h <<_ACEOF
8217 #define HAVE_GETSPNAM 1
8218 _ACEOF
8219
8220 fi
8221 done
8222
8223
8224 #
8225 # Check for various members of struct msghdr.
8226 #
8227 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
8228 #include \"ftmacros.h\"
8229 #include <sys/socket.h>
8230
8231 "
8232 if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
8233
8234 cat >>confdefs.h <<_ACEOF
8235 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
8236 _ACEOF
8237
8238
8239 fi
8240
8241 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
8242 #include \"ftmacros.h\"
8243 #include <sys/socket.h>
8244
8245 "
8246 if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
8247
8248 cat >>confdefs.h <<_ACEOF
8249 #define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
8250 _ACEOF
8251
8252
8253 fi
8254
8255
8256 #
8257 # Optionally, we may want to support SSL.
8258 # Check for OpenSSL/libressl.
8259 #
8260 # First, try looking for it as a regular system library.
8261 # Make sure we can find SSL_library_init() using the
8262 # standard headers, just in case we're running a version
8263 # of macOS that ships with the OpenSSL library but not
8264 # the OpenSSL headers, and have also installed another
8265 # version of OpenSSL with headers.
8266 #
8267 save_LIBS="$LIBS"
8268 LIBS="-lssl -lcrypto"
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
8270 $as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
8271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272 /* end confdefs.h. */
8273
8274 #include <openssl/ssl.h>
8275
8276 int
8277 main ()
8278 {
8279
8280 SSL_library_init();
8281 return 0;
8282
8283 ;
8284 return 0;
8285 }
8286 _ACEOF
8287 if ac_fn_c_try_link "$LINENO"; then :
8288
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8290 $as_echo "yes" >&6; }
8291 HAVE_OPENSSL=yes
8292 OPENSSL_LIBS="-lssl -lcrypto"
8293
8294 else
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8296 $as_echo "no" >&6; }
8297 fi
8298 rm -f core conftest.err conftest.$ac_objext \
8299 conftest$ac_exeext conftest.$ac_ext
8300 LIBS="$save_LIBS"
8301
8302 #
8303 # If we didn't find it, check for it with pkg-config.
8304 #
8305 if test "x$HAVE_OPENSSL" != "xyes"; then
8306 if test "x$PKGCONFIG" != "xno"; then
8307 #
8308 # We have pkg-config; see if we have OpenSSL/
8309 # libressl installed as a package.
8310 #
8311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL/libressl with pkg-config" >&5
8312 $as_echo_n "checking for OpenSSL/libressl with pkg-config... " >&6; }
8313 if "$PKGCONFIG" openssl; then
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8315 $as_echo "found" >&6; }
8316 HAVE_OPENSSL=yes
8317 OPENSSL_CFLAGS=`"$PKGCONFIG" --cflags openssl`
8318 OPENSSL_LIBS=`"$PKGCONFIG" --libs openssl`
8319 else
8320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8321 $as_echo "not found" >&6; }
8322 fi
8323 fi
8324 fi
8325
8326 #
8327 # If we didn't find it, check for it under /usr/local/opt/openssl;
8328 # that's where Homebrew puts it on macOS. Feel free to add other
8329 # -L directories as necessary; the "system library" check should
8330 # also handle "add-on library under /usr/local", so that shouldn't
8331 # be necessary here.
8332 #
8333 if test "x$HAVE_OPENSSL" != "xyes"; then
8334 save_CFLAGS="$CFLAGS"
8335 save_LIBS="$LIBS"
8336 CFLAGS="$CFLAGS -L/usr/local/opt/openssl/include"
8337 LIBS="$LIBS -L/usr/local/opt/openssl/lib -lssl -lcrypto"
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local/opt that we can use" >&5
8339 $as_echo_n "checking whether we have OpenSSL/libressl in /usr/local/opt that we can use... " >&6; }
8340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8341 /* end confdefs.h. */
8342
8343 #include <openssl/ssl.h>
8344
8345 int
8346 main ()
8347 {
8348
8349 SSL_library_init();
8350 return 0;
8351
8352 ;
8353 return 0;
8354 }
8355 _ACEOF
8356 if ac_fn_c_try_link "$LINENO"; then :
8357
8358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8359 $as_echo "yes" >&6; }
8360 HAVE_OPENSSL=yes
8361 OPENSSL_CFLAGS="-I/usr/local/opt/openssl/include"
8362 OPENSSL_LIBS="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
8363
8364 else
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366 $as_echo "no" >&6; }
8367 fi
8368 rm -f core conftest.err conftest.$ac_objext \
8369 conftest$ac_exeext conftest.$ac_ext
8370 CFLAGS="$save_CFLAGS"
8371 LIBS="$save_LIBS"
8372 fi
8373
8374 #
8375 # OK, did we find it?
8376 #
8377 if test "x$HAVE_OPENSSL" = "xyes"; then
8378
8379 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
8380
8381 CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
8382 LIBS="$LIBS $OPENSSL_LIBS"
8383 else
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
8385 $as_echo "$as_me: OpenSSL not found" >&6;}
8386 fi
8387
8388
8389 $as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
8390
8391 REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
8392 BUILD_RPCAPD=build-rpcapd
8393 INSTALL_RPCAPD=install-rpcapd
8394 ;;
8395 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396 $as_echo "no" >&6; }
8397 ;;
8398 esac
8399
8400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
8401 $as_echo_n "checking whether to build optimizer debugging code... " >&6; }
8402 # Check whether --enable-optimizer-dbg was given.
8403 if test "${enable_optimizer_dbg+set}" = set; then :
8404 enableval=$enable_optimizer_dbg;
8405 fi
8406
8407 if test "$enable_optimizer_dbg" = "yes"; then
8408
8409 $as_echo "#define BDEBUG 1" >>confdefs.h
8410
8411 fi
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
8413 $as_echo "${enable_optimizer_dbg-no}" >&6; }
8414
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
8416 $as_echo_n "checking whether to build parser debugging code... " >&6; }
8417 # Check whether --enable-yydebug was given.
8418 if test "${enable_yydebug+set}" = set; then :
8419 enableval=$enable_yydebug;
8420 fi
8421
8422 if test "$enable_yydebug" = "yes"; then
8423
8424 $as_echo "#define YYDEBUG 1" >>confdefs.h
8425
8426 fi
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
8428 $as_echo "${enable_yydebug-no}" >&6; }
8429
8430 #
8431 # Look for {f}lex.
8432 #
8433 for ac_prog in flex lex
8434 do
8435 # Extract the first word of "$ac_prog", so it can be a program name with args.
8436 set dummy $ac_prog; ac_word=$2
8437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8438 $as_echo_n "checking for $ac_word... " >&6; }
8439 if ${ac_cv_prog_LEX+:} false; then :
8440 $as_echo_n "(cached) " >&6
8441 else
8442 if test -n "$LEX"; then
8443 ac_cv_prog_LEX="$LEX" # Let the user override the test.
8444 else
8445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446 for as_dir in $PATH
8447 do
8448 IFS=$as_save_IFS
8449 test -z "$as_dir" && as_dir=.
8450 for ac_exec_ext in '' $ac_executable_extensions; do
8451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452 ac_cv_prog_LEX="$ac_prog"
8453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454 break 2
8455 fi
8456 done
8457 done
8458 IFS=$as_save_IFS
8459
8460 fi
8461 fi
8462 LEX=$ac_cv_prog_LEX
8463 if test -n "$LEX"; then
8464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8465 $as_echo "$LEX" >&6; }
8466 else
8467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468 $as_echo "no" >&6; }
8469 fi
8470
8471
8472 test -n "$LEX" && break
8473 done
8474 test -n "$LEX" || LEX=":"
8475
8476 if test "x$LEX" != "x:"; then
8477 cat >conftest.l <<_ACEOF
8478 %%
8479 a { ECHO; }
8480 b { REJECT; }
8481 c { yymore (); }
8482 d { yyless (1); }
8483 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
8484 yyless ((input () != 0)); }
8485 f { unput (yytext[0]); }
8486 . { BEGIN INITIAL; }
8487 %%
8488 #ifdef YYTEXT_POINTER
8489 extern char *yytext;
8490 #endif
8491 int
8492 main (void)
8493 {
8494 return ! yylex () + ! yywrap ();
8495 }
8496 _ACEOF
8497 { { ac_try="$LEX conftest.l"
8498 case "(($ac_try" in
8499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8500 *) ac_try_echo=$ac_try;;
8501 esac
8502 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8503 $as_echo "$ac_try_echo"; } >&5
8504 (eval "$LEX conftest.l") 2>&5
8505 ac_status=$?
8506 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8507 test $ac_status = 0; }
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8509 $as_echo_n "checking lex output file root... " >&6; }
8510 if ${ac_cv_prog_lex_root+:} false; then :
8511 $as_echo_n "(cached) " >&6
8512 else
8513
8514 if test -f lex.yy.c; then
8515 ac_cv_prog_lex_root=lex.yy
8516 elif test -f lexyy.c; then
8517 ac_cv_prog_lex_root=lexyy
8518 else
8519 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8520 fi
8521 fi
8522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8523 $as_echo "$ac_cv_prog_lex_root" >&6; }
8524 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8525
8526 if test -z "${LEXLIB+set}"; then
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8528 $as_echo_n "checking lex library... " >&6; }
8529 if ${ac_cv_lib_lex+:} false; then :
8530 $as_echo_n "(cached) " >&6
8531 else
8532
8533 ac_save_LIBS=$LIBS
8534 ac_cv_lib_lex='none needed'
8535 for ac_lib in '' -lfl -ll; do
8536 LIBS="$ac_lib $ac_save_LIBS"
8537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8538 /* end confdefs.h. */
8539 `cat $LEX_OUTPUT_ROOT.c`
8540 _ACEOF
8541 if ac_fn_c_try_link "$LINENO"; then :
8542 ac_cv_lib_lex=$ac_lib
8543 fi
8544 rm -f core conftest.err conftest.$ac_objext \
8545 conftest$ac_exeext conftest.$ac_ext
8546 test "$ac_cv_lib_lex" != 'none needed' && break
8547 done
8548 LIBS=$ac_save_LIBS
8549
8550 fi
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8552 $as_echo "$ac_cv_lib_lex" >&6; }
8553 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8554 fi
8555
8556
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8558 $as_echo_n "checking whether yytext is a pointer... " >&6; }
8559 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8560 $as_echo_n "(cached) " >&6
8561 else
8562 # POSIX says lex can declare yytext either as a pointer or an array; the
8563 # default is implementation-dependent. Figure out which it is, since
8564 # not all implementations provide the %pointer and %array declarations.
8565 ac_cv_prog_lex_yytext_pointer=no
8566 ac_save_LIBS=$LIBS
8567 LIBS="$LEXLIB $ac_save_LIBS"
8568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8569 /* end confdefs.h. */
8570
8571 #define YYTEXT_POINTER 1
8572 `cat $LEX_OUTPUT_ROOT.c`
8573 _ACEOF
8574 if ac_fn_c_try_link "$LINENO"; then :
8575 ac_cv_prog_lex_yytext_pointer=yes
8576 fi
8577 rm -f core conftest.err conftest.$ac_objext \
8578 conftest$ac_exeext conftest.$ac_ext
8579 LIBS=$ac_save_LIBS
8580
8581 fi
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8583 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8584 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8585
8586 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8587
8588 fi
8589 rm -f conftest.l $LEX_OUTPUT_ROOT.c
8590
8591 fi
8592 if test "$LEX" = ":"; then
8593 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
8594 fi
8595
8596 #
8597 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
8598 # and supports processing our scanner.l.
8599 #
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
8601 $as_echo_n "checking for capable lex... " >&6; }
8602 if ${tcpdump_cv_capable_lex+:} false; then :
8603 $as_echo_n "(cached) " >&6
8604 else
8605 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
8606 tcpdump_cv_capable_lex=yes
8607 else
8608 tcpdump_cv_capable_lex=insufficient
8609 fi
8610 fi
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
8612 $as_echo "$tcpdump_cv_capable_lex" >&6; }
8613 if test $tcpdump_cv_capable_lex = insufficient ; then
8614 as_fn_error $? "$LEX is insufficient to compile libpcap.
8615 libpcap requires Flex 2.5.31 or later, or a compatible version of lex.
8616 If a suitable version of Lex/Flex is available as a non-standard command
8617 and/or not in the PATH, you can specify it using the LEX environment
8618 variable. That said, on some systems the error can mean that Flex/Lex is
8619 actually acceptable, but m4 is not. Likewise, if a suitable version of
8620 m4 (such as GNU M4) is available but has not been detected, you can
8621 specify it using the M4 environment variable." "$LINENO" 5
8622 fi
8623
8624 #
8625 # Look for yacc/bison/byacc.
8626 # If it's Bison, we do not want -y, as 1) we will be using -o to cause
8627 # the output for XXX.y to be written to XXX.c and 2) we don't want
8628 # it to issue warnings about stuff not supported by POSIX YACC - we
8629 # want to use that stuff, and don't care whether plain YACC supports
8630 # it or not, we require either Bison or Berkeley YACC.
8631 #
8632 BISON_BYACC=""
8633 #
8634 # Look for Bison.
8635 #
8636 for ac_prog in bison
8637 do
8638 # Extract the first word of "$ac_prog", so it can be a program name with args.
8639 set dummy $ac_prog; ac_word=$2
8640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8641 $as_echo_n "checking for $ac_word... " >&6; }
8642 if ${ac_cv_prog_BISON_BYACC+:} false; then :
8643 $as_echo_n "(cached) " >&6
8644 else
8645 if test -n "$BISON_BYACC"; then
8646 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
8647 else
8648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649 for as_dir in $PATH
8650 do
8651 IFS=$as_save_IFS
8652 test -z "$as_dir" && as_dir=.
8653 for ac_exec_ext in '' $ac_executable_extensions; do
8654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655 ac_cv_prog_BISON_BYACC="$ac_prog"
8656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657 break 2
8658 fi
8659 done
8660 done
8661 IFS=$as_save_IFS
8662
8663 fi
8664 fi
8665 BISON_BYACC=$ac_cv_prog_BISON_BYACC
8666 if test -n "$BISON_BYACC"; then
8667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
8668 $as_echo "$BISON_BYACC" >&6; }
8669 else
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8671 $as_echo "no" >&6; }
8672 fi
8673
8674
8675 test -n "$BISON_BYACC" && break
8676 done
8677
8678 if test x"$BISON_BYACC" != x; then
8679 #
8680 # We found Bison.
8681 #
8682 # Bison prior to 2.4(.1) doesn't support "%define api.pure", so use
8683 # "%pure-parser".
8684 #
8685 bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'`
8686 bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'`
8687 if test "$bison_major_version" -lt 2 -o \
8688 \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \)
8689 then
8690 REENTRANT_PARSER="%pure-parser"
8691 else
8692 REENTRANT_PARSER="%define api.pure"
8693 fi
8694 else
8695 #
8696 # We didn't find Bison; check for Berkeley YACC, under the
8697 # names byacc and yacc.
8698 #
8699 for ac_prog in byacc yacc
8700 do
8701 # Extract the first word of "$ac_prog", so it can be a program name with args.
8702 set dummy $ac_prog; ac_word=$2
8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8704 $as_echo_n "checking for $ac_word... " >&6; }
8705 if ${ac_cv_prog_BISON_BYACC+:} false; then :
8706 $as_echo_n "(cached) " >&6
8707 else
8708 if test -n "$BISON_BYACC"; then
8709 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
8710 else
8711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8712 for as_dir in $PATH
8713 do
8714 IFS=$as_save_IFS
8715 test -z "$as_dir" && as_dir=.
8716 for ac_exec_ext in '' $ac_executable_extensions; do
8717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8718 ac_cv_prog_BISON_BYACC="$ac_prog"
8719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8720 break 2
8721 fi
8722 done
8723 done
8724 IFS=$as_save_IFS
8725
8726 fi
8727 fi
8728 BISON_BYACC=$ac_cv_prog_BISON_BYACC
8729 if test -n "$BISON_BYACC"; then
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
8731 $as_echo "$BISON_BYACC" >&6; }
8732 else
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734 $as_echo "no" >&6; }
8735 fi
8736
8737
8738 test -n "$BISON_BYACC" && break
8739 done
8740
8741 if test x"$BISON_BYACC" != x; then
8742 #
8743 # Make sure this is Berkeley YACC, not AT&T YACC;
8744 # the latter doesn't support reentrant parsers.
8745 # Run it with "-V"; that succeeds and reports the
8746 # version number with Berkeley YACC, but will
8747 # (probably) fail with various vendor flavors
8748 # of AT&T YACC.
8749 #
8750 # Hopefully this also eliminates any versions
8751 # of Berkeley YACC that don't support reentrant
8752 # parsers, if there are any.
8753 #
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5
8755 $as_echo_n "checking for capable yacc... " >&6; }
8756 if ${tcpdump_cv_capable_yacc+:} false; then :
8757 $as_echo_n "(cached) " >&6
8758 else
8759 if $BISON_BYACC -V >/dev/null 2>&1; then
8760 tcpdump_cv_capable_yacc=yes
8761 else
8762 tcpdump_cv_capable_yacc=insufficient
8763 fi
8764 fi
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
8766 $as_echo "$tcpdump_cv_capable_yacc" >&6; }
8767 if test $tcpdump_cv_capable_yacc = insufficient ; then
8768 as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap.
8769 libpcap requires Bison, a newer version of Berkeley YACC with support
8770 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8771 fi
8772 else
8773 #
8774 # OK, we found neither byacc nor yacc.
8775 #
8776 as_fn_error $? "Neither bison, byacc, nor yacc was found.
8777 libpcap requires Bison, a newer version of Berkeley YACC with support
8778 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8779 fi
8780
8781 #
8782 # Berkeley YACC doesn't support "%define api.pure", so use
8783 # "%pure-parser".
8784 #
8785 REENTRANT_PARSER="%pure-parser"
8786 fi
8787
8788
8789
8790 #
8791 # Do various checks for various OSes and versions of those OSes.
8792 #
8793 # Assume, by default, no support for shared libraries and V7/BSD
8794 # convention for man pages (devices in section 4, file formats in
8795 # section 5, miscellaneous info in section 7, administrative commands
8796 # and daemons in section 8). Individual cases can override this.
8797 #
8798 DYEXT="none"
8799 MAN_DEVICES=4
8800 MAN_FILE_FORMATS=5
8801 MAN_MISC_INFO=7
8802 MAN_ADMIN_COMMANDS=8
8803 case "$host_os" in
8804
8805 aix*)
8806
8807 $as_echo "#define _SUN 1" >>confdefs.h
8808
8809
8810 #
8811 # AIX makes it fun to build shared and static libraries,
8812 # because they're *both* ".a" archive libraries. We
8813 # build the static library for the benefit of the traditional
8814 # scheme of building libpcap and tcpdump in subdirectories of
8815 # the same directory, with tcpdump statically linked with the
8816 # libpcap in question, but we also build a shared library as
8817 # "libpcap.shareda" and install *it*, rather than the static
8818 # library, as "libpcap.a".
8819 #
8820 DYEXT="shareda"
8821
8822 case "$V_PCAP" in
8823
8824 dlpi)
8825 #
8826 # If we're using DLPI, applications will need to
8827 # use /lib/pse.exp if present, as we use the
8828 # STREAMS routines.
8829 #
8830 pseexe="/lib/pse.exp"
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
8832 $as_echo_n "checking for $pseexe... " >&6; }
8833 if test -f $pseexe ; then
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8835 $as_echo "yes" >&6; }
8836 LIBS="-I:$pseexe"
8837 fi
8838 ;;
8839
8840 bpf)
8841 #
8842 # If we're using BPF, we need "-lodm" and "-lcfg", as
8843 # we use them to load the BPF module.
8844 #
8845 LIBS="-lodm -lcfg"
8846 ;;
8847 esac
8848 ;;
8849
8850 darwin*)
8851 DYEXT="dylib"
8852 V_CCOPT="$V_CCOPT -fno-common"
8853 # Check whether --enable-universal was given.
8854 if test "${enable_universal+set}" = set; then :
8855 enableval=$enable_universal;
8856 fi
8857
8858 if test "$enable_universal" != "no"; then
8859 case "$host_os" in
8860
8861 darwin[0-7].*)
8862 #
8863 # Pre-Tiger. Build only for 32-bit PowerPC; no
8864 # need for any special compiler or linker flags.
8865 #
8866 ;;
8867
8868 darwin8.[0123]|darwin8.[0123].*)
8869 #
8870 # Tiger, prior to Intel support. Build
8871 # libraries and executables for 32-bit PowerPC
8872 # and 64-bit PowerPC, with 32-bit PowerPC first.
8873 # (I'm guessing that's what Apple does.)
8874 #
8875 # (The double brackets are needed because
8876 # autotools/m4 use brackets as a quoting
8877 # character; the double brackets turn into
8878 # single brackets in the generated configure
8879 # file.)
8880 #
8881 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
8882 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
8883 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
8884 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
8885 ;;
8886
8887 darwin8.[456]|darwin.[456].*)
8888 #
8889 # Tiger, subsequent to Intel support but prior
8890 # to x86-64 support. Build libraries and
8891 # executables for 32-bit PowerPC, 64-bit
8892 # PowerPC, and 32-bit x86, with 32-bit PowerPC
8893 # first. (I'm guessing that's what Apple does.)
8894 #
8895 # (The double brackets are needed because
8896 # autotools/m4 use brackets as a quoting
8897 # character; the double brackets turn into
8898 # single brackets in the generated configure
8899 # file.)
8900 #
8901 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8902 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8903 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8904 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8905 ;;
8906
8907 darwin8.*)
8908 #
8909 # All other Tiger, so subsequent to x86-64
8910 # support. Build libraries and executables for
8911 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
8912 # and x86-64, with 32-bit PowerPC first. (I'm
8913 # guessing that's what Apple does.)
8914 #
8915 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8916 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8917 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8918 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8919 ;;
8920
8921 darwin9.*)
8922 #
8923 # Leopard. Build libraries for 32-bit PowerPC,
8924 # 64-bit PowerPC, 32-bit x86, and x86-64, with
8925 # 32-bit PowerPC first, and build executables
8926 # for 32-bit x86 and 32-bit PowerPC, with 32-bit
8927 # x86 first. (That's what Apple does.)
8928 #
8929 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8930 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8931 V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
8932 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
8933 ;;
8934
8935 darwin10.*)
8936 #
8937 # Snow Leopard. Build libraries for x86-64,
8938 # 32-bit x86, and 32-bit PowerPC, with x86-64
8939 # first, and build executables for x86-64 and
8940 # 32-bit x86, with x86-64 first. (That's what
8941 # Apple does, even though Snow Leopard doesn't
8942 # run on PPC, so PPC libpcap runs under Rosetta,
8943 # and Rosetta doesn't support BPF ioctls, so PPC
8944 # programs can't do live captures.)
8945 #
8946 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
8947 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
8948 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
8949 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
8950 ;;
8951
8952 darwin*)
8953 #
8954 # Post-Snow Leopard. Build libraries for x86-64
8955 # and 32-bit x86, with x86-64 first, and build
8956 # executables only for x86-64. (That's what
8957 # Apple does.) This requires no special flags
8958 # for programs.
8959 # XXX - update if and when Apple drops support
8960 # for 32-bit x86 code and if and when Apple adds
8961 # ARM-based Macs. (You're on your own for iOS
8962 # etc.)
8963 #
8964 # XXX - check whether we *can* build for
8965 # i386 and, if not, suggest that the user
8966 # install the /usr/include headers if they
8967 # want to build fat.
8968 #
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
8970 $as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
8971 save_CFLAGS="$CFLAGS"
8972 CFLAGS="$CFLAGS -arch i386"
8973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974 /* end confdefs.h. */
8975
8976 int
8977 main ()
8978 {
8979 return 0;
8980 ;
8981 return 0;
8982 }
8983 _ACEOF
8984 if ac_fn_c_try_link "$LINENO"; then :
8985
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8987 $as_echo "yes" >&6; }
8988 V_LIB_CCOPT_FAT="-arch x86_64"
8989 V_LIB_LDFLAGS_FAT="-arch x86_64"
8990
8991 #
8992 # OpenSSL installation on macOS seems
8993 # to install only the libs for 64-bit
8994 # x86 - at least that's what Brew does:
8995 # only configure 32-bit builds if we
8996 # don't have OpenSSL.
8997 #
8998 if test "$HAVE_OPENSSL" != yes; then
8999 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
9000 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
9001 fi
9002
9003 else
9004
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9006 $as_echo "no" >&6; }
9007 V_LIB_CCOPT_FAT="-arch x86_64"
9008 V_LIB_LDFLAGS_FAT="-arch x86_64"
9009 case "$host_os" in
9010
9011 darwin18.*)
9012 #
9013 # Mojave; you need to install the
9014 # /usr/include headers to get
9015 # 32-bit x86 builds to work.
9016 #
9017 { $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
9018 $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;}
9019 ;;
9020
9021 *)
9022 #
9023 # Pre-Mojave; the command-line
9024 # tools should be sufficient to
9025 # enable 32-bit x86 builds.
9026 #
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
9028 $as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
9029 ;;
9030 esac
9031
9032 fi
9033 rm -f core conftest.err conftest.$ac_objext \
9034 conftest$ac_exeext conftest.$ac_ext
9035 CFLAGS="$save_CFLAGS"
9036 ;;
9037 esac
9038 fi
9039 ;;
9040
9041 hpux9*)
9042
9043 $as_echo "#define HAVE_HPUX9 1" >>confdefs.h
9044
9045
9046 #
9047 # Use System V conventions for man pages.
9048 #
9049 MAN_ADMIN_COMMANDS=1m
9050 MAN_FILE_FORMATS=4
9051 MAN_MISC_INFO=5
9052 ;;
9053
9054 hpux10.0*)
9055
9056 #
9057 # Use System V conventions for man pages.
9058 #
9059 MAN_ADMIN_COMMANDS=1m
9060 MAN_FILE_FORMATS=4
9061 MAN_MISC_INFO=5
9062 ;;
9063
9064 hpux10.1*)
9065
9066 #
9067 # Use System V conventions for man pages.
9068 #
9069 MAN_ADMIN_COMMANDS=1m
9070 MAN_FILE_FORMATS=4
9071 MAN_MISC_INFO=5
9072 ;;
9073
9074 hpux*)
9075
9076 $as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
9077
9078 if test "`uname -m`" = "ia64"; then
9079 DYEXT="so"
9080 else
9081 DYEXT="sl"
9082 fi
9083
9084 #
9085 # "-b" builds a shared library; "+h" sets the soname.
9086 #
9087 SHLIB_OPT="-b"
9088 SONAME_OPT="+h"
9089
9090 #
9091 # Use System V conventions for man pages.
9092 #
9093 MAN_FILE_FORMATS=4
9094 MAN_MISC_INFO=5
9095 ;;
9096
9097 irix*)
9098 #
9099 # Use IRIX conventions for man pages; they're the same as the
9100 # System V conventions, except that they use section 8 for
9101 # administrative commands and daemons.
9102 #
9103 MAN_FILE_FORMATS=4
9104 MAN_MISC_INFO=5
9105 ;;
9106
9107 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
9108 DYEXT="so"
9109
9110 #
9111 # Compiler assumed to be GCC; run-time linker may require a -R
9112 # flag.
9113 #
9114 if test "$libdir" != "/usr/lib"; then
9115 V_RFLAGS=-Wl,-R$libdir
9116 fi
9117 ;;
9118
9119 osf*)
9120 DYEXT="so"
9121
9122 #
9123 # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
9124 # Use Tru64 UNIX conventions for man pages; they're the same as
9125 # the System V conventions except that they use section 8 for
9126 # administrative commands and daemons.
9127 #
9128 MAN_FILE_FORMATS=4
9129 MAN_MISC_INFO=5
9130 MAN_DEVICES=7
9131 ;;
9132
9133 sinix*)
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
9135 $as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
9136 if ${ac_cv_cc_sinix_defined+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138 else
9139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9140 /* end confdefs.h. */
9141
9142 int
9143 main ()
9144 {
9145 int i = sinix;
9146 ;
9147 return 0;
9148 }
9149 _ACEOF
9150 if ac_fn_c_try_compile "$LINENO"; then :
9151 ac_cv_cc_sinix_defined=yes
9152 else
9153 ac_cv_cc_sinix_defined=no
9154 fi
9155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156 fi
9157
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
9159 $as_echo "$ac_cv_cc_sinix_defined" >&6; }
9160 if test $ac_cv_cc_sinix_defined = no ; then
9161
9162 $as_echo "#define sinix 1" >>confdefs.h
9163
9164 fi
9165 ;;
9166
9167 solaris*)
9168
9169 $as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
9170
9171
9172 DYEXT="so"
9173
9174 #
9175 # Make sure errno is thread-safe, in case we're called in
9176 # a multithreaded program. We don't guarantee that two
9177 # threads can use the *same* pcap_t safely, but the
9178 # current version does guarantee that you can use different
9179 # pcap_t's in different threads, and even that pcap_compile()
9180 # is thread-safe (it wasn't thread-safe in some older versions).
9181 #
9182 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
9183
9184 case "`uname -r`" in
9185
9186 5.12)
9187 ;;
9188
9189 *)
9190 #
9191 # Use System V conventions for man pages.
9192 #
9193 MAN_ADMIN_COMMANDS=1m
9194 MAN_FILE_FORMATS=4
9195 MAN_MISC_INFO=5
9196 MAN_DEVICES=7D
9197 esac
9198 ;;
9199 esac
9200
9201 # Check whether --enable-shared was given.
9202 if test "${enable_shared+set}" = set; then :
9203 enableval=$enable_shared;
9204 fi
9205
9206 test "x$enable_shared" = "xno" && DYEXT="none"
9207
9208 if test -n "$ac_tool_prefix"; then
9209 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9210 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9212 $as_echo_n "checking for $ac_word... " >&6; }
9213 if ${ac_cv_prog_RANLIB+:} false; then :
9214 $as_echo_n "(cached) " >&6
9215 else
9216 if test -n "$RANLIB"; then
9217 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9218 else
9219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220 for as_dir in $PATH
9221 do
9222 IFS=$as_save_IFS
9223 test -z "$as_dir" && as_dir=.
9224 for ac_exec_ext in '' $ac_executable_extensions; do
9225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228 break 2
9229 fi
9230 done
9231 done
9232 IFS=$as_save_IFS
9233
9234 fi
9235 fi
9236 RANLIB=$ac_cv_prog_RANLIB
9237 if test -n "$RANLIB"; then
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9239 $as_echo "$RANLIB" >&6; }
9240 else
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9242 $as_echo "no" >&6; }
9243 fi
9244
9245
9246 fi
9247 if test -z "$ac_cv_prog_RANLIB"; then
9248 ac_ct_RANLIB=$RANLIB
9249 # Extract the first word of "ranlib", so it can be a program name with args.
9250 set dummy ranlib; ac_word=$2
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9252 $as_echo_n "checking for $ac_word... " >&6; }
9253 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9254 $as_echo_n "(cached) " >&6
9255 else
9256 if test -n "$ac_ct_RANLIB"; then
9257 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9258 else
9259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9260 for as_dir in $PATH
9261 do
9262 IFS=$as_save_IFS
9263 test -z "$as_dir" && as_dir=.
9264 for ac_exec_ext in '' $ac_executable_extensions; do
9265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9266 ac_cv_prog_ac_ct_RANLIB="ranlib"
9267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9268 break 2
9269 fi
9270 done
9271 done
9272 IFS=$as_save_IFS
9273
9274 fi
9275 fi
9276 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9277 if test -n "$ac_ct_RANLIB"; then
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9279 $as_echo "$ac_ct_RANLIB" >&6; }
9280 else
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282 $as_echo "no" >&6; }
9283 fi
9284
9285 if test "x$ac_ct_RANLIB" = x; then
9286 RANLIB=":"
9287 else
9288 case $cross_compiling:$ac_tool_warned in
9289 yes:)
9290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9291 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9292 ac_tool_warned=yes ;;
9293 esac
9294 RANLIB=$ac_ct_RANLIB
9295 fi
9296 else
9297 RANLIB="$ac_cv_prog_RANLIB"
9298 fi
9299
9300 if test -n "$ac_tool_prefix"; then
9301 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9302 set dummy ${ac_tool_prefix}ar; ac_word=$2
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9304 $as_echo_n "checking for $ac_word... " >&6; }
9305 if ${ac_cv_prog_AR+:} false; then :
9306 $as_echo_n "(cached) " >&6
9307 else
9308 if test -n "$AR"; then
9309 ac_cv_prog_AR="$AR" # Let the user override the test.
9310 else
9311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312 for as_dir in $PATH
9313 do
9314 IFS=$as_save_IFS
9315 test -z "$as_dir" && as_dir=.
9316 for ac_exec_ext in '' $ac_executable_extensions; do
9317 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9318 ac_cv_prog_AR="${ac_tool_prefix}ar"
9319 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9320 break 2
9321 fi
9322 done
9323 done
9324 IFS=$as_save_IFS
9325
9326 fi
9327 fi
9328 AR=$ac_cv_prog_AR
9329 if test -n "$AR"; then
9330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9331 $as_echo "$AR" >&6; }
9332 else
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334 $as_echo "no" >&6; }
9335 fi
9336
9337
9338 fi
9339 if test -z "$ac_cv_prog_AR"; then
9340 ac_ct_AR=$AR
9341 # Extract the first word of "ar", so it can be a program name with args.
9342 set dummy ar; ac_word=$2
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344 $as_echo_n "checking for $ac_word... " >&6; }
9345 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9346 $as_echo_n "(cached) " >&6
9347 else
9348 if test -n "$ac_ct_AR"; then
9349 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9350 else
9351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9352 for as_dir in $PATH
9353 do
9354 IFS=$as_save_IFS
9355 test -z "$as_dir" && as_dir=.
9356 for ac_exec_ext in '' $ac_executable_extensions; do
9357 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9358 ac_cv_prog_ac_ct_AR="ar"
9359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9360 break 2
9361 fi
9362 done
9363 done
9364 IFS=$as_save_IFS
9365
9366 fi
9367 fi
9368 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9369 if test -n "$ac_ct_AR"; then
9370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9371 $as_echo "$ac_ct_AR" >&6; }
9372 else
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9374 $as_echo "no" >&6; }
9375 fi
9376
9377 if test "x$ac_ct_AR" = x; then
9378 AR=""
9379 else
9380 case $cross_compiling:$ac_tool_warned in
9381 yes:)
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9383 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9384 ac_tool_warned=yes ;;
9385 esac
9386 AR=$ac_ct_AR
9387 fi
9388 else
9389 AR="$ac_cv_prog_AR"
9390 fi
9391
9392
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9394 $as_echo_n "checking whether ln -s works... " >&6; }
9395 LN_S=$as_ln_s
9396 if test "$LN_S" = "ln -s"; then
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9398 $as_echo "yes" >&6; }
9399 else
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9401 $as_echo "no, using $LN_S" >&6; }
9402 fi
9403
9404
9405
9406 rm -f os-proto.h
9407 if test "${LBL_CFLAGS+set}" = set; then
9408 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
9409 fi
9410 if test -f .devel ; then
9411 #
9412 # Skip all the warning option stuff on some compilers.
9413 #
9414 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
9415
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
9417 $as_echo_n "checking whether the compiler supports the -W option... " >&6; }
9418 save_CFLAGS="$CFLAGS"
9419 CFLAGS="$CFLAGS -W"
9420 #
9421 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9422 # but no mechanism is provided to turn AC_LANG_WERROR on
9423 # *and then turn it back off*, so that we *only* do it when
9424 # testing compiler options - 15 years after somebody asked
9425 # for it:
9426 #
9427 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9428 #
9429 save_ac_c_werror_flag="$ac_c_werror_flag"
9430 ac_c_werror_flag=yes
9431 #
9432 # We use AC_LANG_SOURCE() so that we can control the complete
9433 # content of the program being compiled. We do not, for example,
9434 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9435 # as it will generate a warning with -Wold-style-definition, meaning
9436 # that we would treat it as not working, as the test will fail if
9437 # *any* error output, including a warning due to the flag we're
9438 # testing, is generated; see
9439 #
9440 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9441 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9442 #
9443 # This may, as per those two messages, be fixed in autoonf 2.70,
9444 # but we only require 2.64 or newer for now.
9445 #
9446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9447 /* end confdefs.h. */
9448 int main(void) { return 0; }
9449 _ACEOF
9450 if ac_fn_c_try_compile "$LINENO"; then :
9451
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9453 $as_echo "yes" >&6; }
9454 can_add_to_cflags=yes
9455 #
9456 # The compile supports this; do we have some C code for
9457 # which the warning should *not* appear?
9458 # We test the fourth argument because the third argument
9459 # could contain quotes, breaking the test.
9460 #
9461 if test "x" != "x"
9462 then
9463 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
9465 $as_echo_n "checking whether -W ... " >&6; }
9466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9467 /* end confdefs.h. */
9468
9469 _ACEOF
9470 if ac_fn_c_try_compile "$LINENO"; then :
9471
9472 #
9473 # Not a problem.
9474 #
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9476 $as_echo "no" >&6; }
9477
9478 else
9479
9480 #
9481 # A problem.
9482 #
9483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9484 $as_echo "yes" >&6; }
9485 can_add_to_cflags=no
9486
9487 fi
9488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9489 fi
9490 CFLAGS="$save_CFLAGS"
9491 if test x"$can_add_to_cflags" = "xyes"
9492 then
9493 V_CCOPT="$V_CCOPT -W"
9494 fi
9495
9496 else
9497
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499 $as_echo "no" >&6; }
9500 CFLAGS="$save_CFLAGS"
9501
9502 fi
9503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9504 ac_c_werror_flag="$save_ac_c_werror_flag"
9505
9506
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
9508 $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
9509 save_CFLAGS="$CFLAGS"
9510 CFLAGS="$CFLAGS -Wall"
9511 #
9512 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9513 # but no mechanism is provided to turn AC_LANG_WERROR on
9514 # *and then turn it back off*, so that we *only* do it when
9515 # testing compiler options - 15 years after somebody asked
9516 # for it:
9517 #
9518 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9519 #
9520 save_ac_c_werror_flag="$ac_c_werror_flag"
9521 ac_c_werror_flag=yes
9522 #
9523 # We use AC_LANG_SOURCE() so that we can control the complete
9524 # content of the program being compiled. We do not, for example,
9525 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9526 # as it will generate a warning with -Wold-style-definition, meaning
9527 # that we would treat it as not working, as the test will fail if
9528 # *any* error output, including a warning due to the flag we're
9529 # testing, is generated; see
9530 #
9531 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9532 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9533 #
9534 # This may, as per those two messages, be fixed in autoonf 2.70,
9535 # but we only require 2.64 or newer for now.
9536 #
9537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9538 /* end confdefs.h. */
9539 int main(void) { return 0; }
9540 _ACEOF
9541 if ac_fn_c_try_compile "$LINENO"; then :
9542
9543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9544 $as_echo "yes" >&6; }
9545 can_add_to_cflags=yes
9546 #
9547 # The compile supports this; do we have some C code for
9548 # which the warning should *not* appear?
9549 # We test the fourth argument because the third argument
9550 # could contain quotes, breaking the test.
9551 #
9552 if test "x" != "x"
9553 then
9554 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
9556 $as_echo_n "checking whether -Wall ... " >&6; }
9557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9558 /* end confdefs.h. */
9559
9560 _ACEOF
9561 if ac_fn_c_try_compile "$LINENO"; then :
9562
9563 #
9564 # Not a problem.
9565 #
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567 $as_echo "no" >&6; }
9568
9569 else
9570
9571 #
9572 # A problem.
9573 #
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9575 $as_echo "yes" >&6; }
9576 can_add_to_cflags=no
9577
9578 fi
9579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9580 fi
9581 CFLAGS="$save_CFLAGS"
9582 if test x"$can_add_to_cflags" = "xyes"
9583 then
9584 V_CCOPT="$V_CCOPT -Wall"
9585 fi
9586
9587 else
9588
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590 $as_echo "no" >&6; }
9591 CFLAGS="$save_CFLAGS"
9592
9593 fi
9594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9595 ac_c_werror_flag="$save_ac_c_werror_flag"
9596
9597
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
9599 $as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
9600 save_CFLAGS="$CFLAGS"
9601 CFLAGS="$CFLAGS -Wcomma"
9602 #
9603 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9604 # but no mechanism is provided to turn AC_LANG_WERROR on
9605 # *and then turn it back off*, so that we *only* do it when
9606 # testing compiler options - 15 years after somebody asked
9607 # for it:
9608 #
9609 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9610 #
9611 save_ac_c_werror_flag="$ac_c_werror_flag"
9612 ac_c_werror_flag=yes
9613 #
9614 # We use AC_LANG_SOURCE() so that we can control the complete
9615 # content of the program being compiled. We do not, for example,
9616 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9617 # as it will generate a warning with -Wold-style-definition, meaning
9618 # that we would treat it as not working, as the test will fail if
9619 # *any* error output, including a warning due to the flag we're
9620 # testing, is generated; see
9621 #
9622 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9623 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9624 #
9625 # This may, as per those two messages, be fixed in autoonf 2.70,
9626 # but we only require 2.64 or newer for now.
9627 #
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629 /* end confdefs.h. */
9630 int main(void) { return 0; }
9631 _ACEOF
9632 if ac_fn_c_try_compile "$LINENO"; then :
9633
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9635 $as_echo "yes" >&6; }
9636 can_add_to_cflags=yes
9637 #
9638 # The compile supports this; do we have some C code for
9639 # which the warning should *not* appear?
9640 # We test the fourth argument because the third argument
9641 # could contain quotes, breaking the test.
9642 #
9643 if test "x" != "x"
9644 then
9645 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
9647 $as_echo_n "checking whether -Wcomma ... " >&6; }
9648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9649 /* end confdefs.h. */
9650
9651 _ACEOF
9652 if ac_fn_c_try_compile "$LINENO"; then :
9653
9654 #
9655 # Not a problem.
9656 #
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658 $as_echo "no" >&6; }
9659
9660 else
9661
9662 #
9663 # A problem.
9664 #
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9666 $as_echo "yes" >&6; }
9667 can_add_to_cflags=no
9668
9669 fi
9670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9671 fi
9672 CFLAGS="$save_CFLAGS"
9673 if test x"$can_add_to_cflags" = "xyes"
9674 then
9675 V_CCOPT="$V_CCOPT -Wcomma"
9676 fi
9677
9678 else
9679
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681 $as_echo "no" >&6; }
9682 CFLAGS="$save_CFLAGS"
9683
9684 fi
9685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9686 ac_c_werror_flag="$save_ac_c_werror_flag"
9687
9688
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
9690 $as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
9691 save_CFLAGS="$CFLAGS"
9692 CFLAGS="$CFLAGS -Wdocumentation"
9693 #
9694 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9695 # but no mechanism is provided to turn AC_LANG_WERROR on
9696 # *and then turn it back off*, so that we *only* do it when
9697 # testing compiler options - 15 years after somebody asked
9698 # for it:
9699 #
9700 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9701 #
9702 save_ac_c_werror_flag="$ac_c_werror_flag"
9703 ac_c_werror_flag=yes
9704 #
9705 # We use AC_LANG_SOURCE() so that we can control the complete
9706 # content of the program being compiled. We do not, for example,
9707 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9708 # as it will generate a warning with -Wold-style-definition, meaning
9709 # that we would treat it as not working, as the test will fail if
9710 # *any* error output, including a warning due to the flag we're
9711 # testing, is generated; see
9712 #
9713 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9714 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9715 #
9716 # This may, as per those two messages, be fixed in autoonf 2.70,
9717 # but we only require 2.64 or newer for now.
9718 #
9719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9720 /* end confdefs.h. */
9721 int main(void) { return 0; }
9722 _ACEOF
9723 if ac_fn_c_try_compile "$LINENO"; then :
9724
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9726 $as_echo "yes" >&6; }
9727 can_add_to_cflags=yes
9728 #
9729 # The compile supports this; do we have some C code for
9730 # which the warning should *not* appear?
9731 # We test the fourth argument because the third argument
9732 # could contain quotes, breaking the test.
9733 #
9734 if test "x" != "x"
9735 then
9736 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
9738 $as_echo_n "checking whether -Wdocumentation ... " >&6; }
9739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740 /* end confdefs.h. */
9741
9742 _ACEOF
9743 if ac_fn_c_try_compile "$LINENO"; then :
9744
9745 #
9746 # Not a problem.
9747 #
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749 $as_echo "no" >&6; }
9750
9751 else
9752
9753 #
9754 # A problem.
9755 #
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9757 $as_echo "yes" >&6; }
9758 can_add_to_cflags=no
9759
9760 fi
9761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9762 fi
9763 CFLAGS="$save_CFLAGS"
9764 if test x"$can_add_to_cflags" = "xyes"
9765 then
9766 V_CCOPT="$V_CCOPT -Wdocumentation"
9767 fi
9768
9769 else
9770
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772 $as_echo "no" >&6; }
9773 CFLAGS="$save_CFLAGS"
9774
9775 fi
9776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9777 ac_c_werror_flag="$save_ac_c_werror_flag"
9778
9779
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
9781 $as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
9782 save_CFLAGS="$CFLAGS"
9783 CFLAGS="$CFLAGS -Wformat-nonliteral"
9784 #
9785 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9786 # but no mechanism is provided to turn AC_LANG_WERROR on
9787 # *and then turn it back off*, so that we *only* do it when
9788 # testing compiler options - 15 years after somebody asked
9789 # for it:
9790 #
9791 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9792 #
9793 save_ac_c_werror_flag="$ac_c_werror_flag"
9794 ac_c_werror_flag=yes
9795 #
9796 # We use AC_LANG_SOURCE() so that we can control the complete
9797 # content of the program being compiled. We do not, for example,
9798 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9799 # as it will generate a warning with -Wold-style-definition, meaning
9800 # that we would treat it as not working, as the test will fail if
9801 # *any* error output, including a warning due to the flag we're
9802 # testing, is generated; see
9803 #
9804 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9805 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9806 #
9807 # This may, as per those two messages, be fixed in autoonf 2.70,
9808 # but we only require 2.64 or newer for now.
9809 #
9810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811 /* end confdefs.h. */
9812 int main(void) { return 0; }
9813 _ACEOF
9814 if ac_fn_c_try_compile "$LINENO"; then :
9815
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9817 $as_echo "yes" >&6; }
9818 can_add_to_cflags=yes
9819 #
9820 # The compile supports this; do we have some C code for
9821 # which the warning should *not* appear?
9822 # We test the fourth argument because the third argument
9823 # could contain quotes, breaking the test.
9824 #
9825 if test "x" != "x"
9826 then
9827 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
9829 $as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
9830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9831 /* end confdefs.h. */
9832
9833 _ACEOF
9834 if ac_fn_c_try_compile "$LINENO"; then :
9835
9836 #
9837 # Not a problem.
9838 #
9839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9840 $as_echo "no" >&6; }
9841
9842 else
9843
9844 #
9845 # A problem.
9846 #
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9848 $as_echo "yes" >&6; }
9849 can_add_to_cflags=no
9850
9851 fi
9852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9853 fi
9854 CFLAGS="$save_CFLAGS"
9855 if test x"$can_add_to_cflags" = "xyes"
9856 then
9857 V_CCOPT="$V_CCOPT -Wformat-nonliteral"
9858 fi
9859
9860 else
9861
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863 $as_echo "no" >&6; }
9864 CFLAGS="$save_CFLAGS"
9865
9866 fi
9867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9868 ac_c_werror_flag="$save_ac_c_werror_flag"
9869
9870
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
9872 $as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
9873 save_CFLAGS="$CFLAGS"
9874 CFLAGS="$CFLAGS -Wmissing-noreturn"
9875 #
9876 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9877 # but no mechanism is provided to turn AC_LANG_WERROR on
9878 # *and then turn it back off*, so that we *only* do it when
9879 # testing compiler options - 15 years after somebody asked
9880 # for it:
9881 #
9882 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9883 #
9884 save_ac_c_werror_flag="$ac_c_werror_flag"
9885 ac_c_werror_flag=yes
9886 #
9887 # We use AC_LANG_SOURCE() so that we can control the complete
9888 # content of the program being compiled. We do not, for example,
9889 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9890 # as it will generate a warning with -Wold-style-definition, meaning
9891 # that we would treat it as not working, as the test will fail if
9892 # *any* error output, including a warning due to the flag we're
9893 # testing, is generated; see
9894 #
9895 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9896 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9897 #
9898 # This may, as per those two messages, be fixed in autoonf 2.70,
9899 # but we only require 2.64 or newer for now.
9900 #
9901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9902 /* end confdefs.h. */
9903 int main(void) { return 0; }
9904 _ACEOF
9905 if ac_fn_c_try_compile "$LINENO"; then :
9906
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9908 $as_echo "yes" >&6; }
9909 can_add_to_cflags=yes
9910 #
9911 # The compile supports this; do we have some C code for
9912 # which the warning should *not* appear?
9913 # We test the fourth argument because the third argument
9914 # could contain quotes, breaking the test.
9915 #
9916 if test "x" != "x"
9917 then
9918 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
9920 $as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
9921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9922 /* end confdefs.h. */
9923
9924 _ACEOF
9925 if ac_fn_c_try_compile "$LINENO"; then :
9926
9927 #
9928 # Not a problem.
9929 #
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931 $as_echo "no" >&6; }
9932
9933 else
9934
9935 #
9936 # A problem.
9937 #
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9939 $as_echo "yes" >&6; }
9940 can_add_to_cflags=no
9941
9942 fi
9943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944 fi
9945 CFLAGS="$save_CFLAGS"
9946 if test x"$can_add_to_cflags" = "xyes"
9947 then
9948 V_CCOPT="$V_CCOPT -Wmissing-noreturn"
9949 fi
9950
9951 else
9952
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954 $as_echo "no" >&6; }
9955 CFLAGS="$save_CFLAGS"
9956
9957 fi
9958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9959 ac_c_werror_flag="$save_ac_c_werror_flag"
9960
9961
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
9963 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
9964 save_CFLAGS="$CFLAGS"
9965 CFLAGS="$CFLAGS -Wmissing-prototypes"
9966 #
9967 # XXX - yes, this depends on the way AC_LANG_WERROR works,
9968 # but no mechanism is provided to turn AC_LANG_WERROR on
9969 # *and then turn it back off*, so that we *only* do it when
9970 # testing compiler options - 15 years after somebody asked
9971 # for it:
9972 #
9973 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
9974 #
9975 save_ac_c_werror_flag="$ac_c_werror_flag"
9976 ac_c_werror_flag=yes
9977 #
9978 # We use AC_LANG_SOURCE() so that we can control the complete
9979 # content of the program being compiled. We do not, for example,
9980 # want the default "int main()" that AC_LANG_PROGRAM() generates,
9981 # as it will generate a warning with -Wold-style-definition, meaning
9982 # that we would treat it as not working, as the test will fail if
9983 # *any* error output, including a warning due to the flag we're
9984 # testing, is generated; see
9985 #
9986 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9987 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
9988 #
9989 # This may, as per those two messages, be fixed in autoonf 2.70,
9990 # but we only require 2.64 or newer for now.
9991 #
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993 /* end confdefs.h. */
9994 int main(void) { return 0; }
9995 _ACEOF
9996 if ac_fn_c_try_compile "$LINENO"; then :
9997
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9999 $as_echo "yes" >&6; }
10000 can_add_to_cflags=yes
10001 #
10002 # The compile supports this; do we have some C code for
10003 # which the warning should *not* appear?
10004 # We test the fourth argument because the third argument
10005 # could contain quotes, breaking the test.
10006 #
10007 if test "x" != "x"
10008 then
10009 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
10011 $as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
10012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10013 /* end confdefs.h. */
10014
10015 _ACEOF
10016 if ac_fn_c_try_compile "$LINENO"; then :
10017
10018 #
10019 # Not a problem.
10020 #
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022 $as_echo "no" >&6; }
10023
10024 else
10025
10026 #
10027 # A problem.
10028 #
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10030 $as_echo "yes" >&6; }
10031 can_add_to_cflags=no
10032
10033 fi
10034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10035 fi
10036 CFLAGS="$save_CFLAGS"
10037 if test x"$can_add_to_cflags" = "xyes"
10038 then
10039 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
10040 fi
10041
10042 else
10043
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045 $as_echo "no" >&6; }
10046 CFLAGS="$save_CFLAGS"
10047
10048 fi
10049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10050 ac_c_werror_flag="$save_ac_c_werror_flag"
10051
10052
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
10054 $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
10055 save_CFLAGS="$CFLAGS"
10056 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
10057 #
10058 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10059 # but no mechanism is provided to turn AC_LANG_WERROR on
10060 # *and then turn it back off*, so that we *only* do it when
10061 # testing compiler options - 15 years after somebody asked
10062 # for it:
10063 #
10064 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10065 #
10066 save_ac_c_werror_flag="$ac_c_werror_flag"
10067 ac_c_werror_flag=yes
10068 #
10069 # We use AC_LANG_SOURCE() so that we can control the complete
10070 # content of the program being compiled. We do not, for example,
10071 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10072 # as it will generate a warning with -Wold-style-definition, meaning
10073 # that we would treat it as not working, as the test will fail if
10074 # *any* error output, including a warning due to the flag we're
10075 # testing, is generated; see
10076 #
10077 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10078 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10079 #
10080 # This may, as per those two messages, be fixed in autoonf 2.70,
10081 # but we only require 2.64 or newer for now.
10082 #
10083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10084 /* end confdefs.h. */
10085 int main(void) { return 0; }
10086 _ACEOF
10087 if ac_fn_c_try_compile "$LINENO"; then :
10088
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10090 $as_echo "yes" >&6; }
10091 can_add_to_cflags=yes
10092 #
10093 # The compile supports this; do we have some C code for
10094 # which the warning should *not* appear?
10095 # We test the fourth argument because the third argument
10096 # could contain quotes, breaking the test.
10097 #
10098 if test "x" != "x"
10099 then
10100 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
10102 $as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
10103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10104 /* end confdefs.h. */
10105
10106 _ACEOF
10107 if ac_fn_c_try_compile "$LINENO"; then :
10108
10109 #
10110 # Not a problem.
10111 #
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113 $as_echo "no" >&6; }
10114
10115 else
10116
10117 #
10118 # A problem.
10119 #
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10121 $as_echo "yes" >&6; }
10122 can_add_to_cflags=no
10123
10124 fi
10125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10126 fi
10127 CFLAGS="$save_CFLAGS"
10128 if test x"$can_add_to_cflags" = "xyes"
10129 then
10130 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
10131 fi
10132
10133 else
10134
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136 $as_echo "no" >&6; }
10137 CFLAGS="$save_CFLAGS"
10138
10139 fi
10140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10141 ac_c_werror_flag="$save_ac_c_werror_flag"
10142
10143
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
10145 $as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
10146 save_CFLAGS="$CFLAGS"
10147 CFLAGS="$CFLAGS -Wpointer-arith"
10148 #
10149 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10150 # but no mechanism is provided to turn AC_LANG_WERROR on
10151 # *and then turn it back off*, so that we *only* do it when
10152 # testing compiler options - 15 years after somebody asked
10153 # for it:
10154 #
10155 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10156 #
10157 save_ac_c_werror_flag="$ac_c_werror_flag"
10158 ac_c_werror_flag=yes
10159 #
10160 # We use AC_LANG_SOURCE() so that we can control the complete
10161 # content of the program being compiled. We do not, for example,
10162 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10163 # as it will generate a warning with -Wold-style-definition, meaning
10164 # that we would treat it as not working, as the test will fail if
10165 # *any* error output, including a warning due to the flag we're
10166 # testing, is generated; see
10167 #
10168 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10169 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10170 #
10171 # This may, as per those two messages, be fixed in autoonf 2.70,
10172 # but we only require 2.64 or newer for now.
10173 #
10174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10175 /* end confdefs.h. */
10176 int main(void) { return 0; }
10177 _ACEOF
10178 if ac_fn_c_try_compile "$LINENO"; then :
10179
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10181 $as_echo "yes" >&6; }
10182 can_add_to_cflags=yes
10183 #
10184 # The compile supports this; do we have some C code for
10185 # which the warning should *not* appear?
10186 # We test the fourth argument because the third argument
10187 # could contain quotes, breaking the test.
10188 #
10189 if test "x" != "x"
10190 then
10191 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
10193 $as_echo_n "checking whether -Wpointer-arith ... " >&6; }
10194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10195 /* end confdefs.h. */
10196
10197 _ACEOF
10198 if ac_fn_c_try_compile "$LINENO"; then :
10199
10200 #
10201 # Not a problem.
10202 #
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204 $as_echo "no" >&6; }
10205
10206 else
10207
10208 #
10209 # A problem.
10210 #
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10212 $as_echo "yes" >&6; }
10213 can_add_to_cflags=no
10214
10215 fi
10216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10217 fi
10218 CFLAGS="$save_CFLAGS"
10219 if test x"$can_add_to_cflags" = "xyes"
10220 then
10221 V_CCOPT="$V_CCOPT -Wpointer-arith"
10222 fi
10223
10224 else
10225
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227 $as_echo "no" >&6; }
10228 CFLAGS="$save_CFLAGS"
10229
10230 fi
10231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10232 ac_c_werror_flag="$save_ac_c_werror_flag"
10233
10234
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
10236 $as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
10237 save_CFLAGS="$CFLAGS"
10238 CFLAGS="$CFLAGS -Wpointer-sign"
10239 #
10240 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10241 # but no mechanism is provided to turn AC_LANG_WERROR on
10242 # *and then turn it back off*, so that we *only* do it when
10243 # testing compiler options - 15 years after somebody asked
10244 # for it:
10245 #
10246 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10247 #
10248 save_ac_c_werror_flag="$ac_c_werror_flag"
10249 ac_c_werror_flag=yes
10250 #
10251 # We use AC_LANG_SOURCE() so that we can control the complete
10252 # content of the program being compiled. We do not, for example,
10253 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10254 # as it will generate a warning with -Wold-style-definition, meaning
10255 # that we would treat it as not working, as the test will fail if
10256 # *any* error output, including a warning due to the flag we're
10257 # testing, is generated; see
10258 #
10259 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10260 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10261 #
10262 # This may, as per those two messages, be fixed in autoonf 2.70,
10263 # but we only require 2.64 or newer for now.
10264 #
10265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10266 /* end confdefs.h. */
10267 int main(void) { return 0; }
10268 _ACEOF
10269 if ac_fn_c_try_compile "$LINENO"; then :
10270
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10272 $as_echo "yes" >&6; }
10273 can_add_to_cflags=yes
10274 #
10275 # The compile supports this; do we have some C code for
10276 # which the warning should *not* appear?
10277 # We test the fourth argument because the third argument
10278 # could contain quotes, breaking the test.
10279 #
10280 if test "x" != "x"
10281 then
10282 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
10284 $as_echo_n "checking whether -Wpointer-sign ... " >&6; }
10285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10286 /* end confdefs.h. */
10287
10288 _ACEOF
10289 if ac_fn_c_try_compile "$LINENO"; then :
10290
10291 #
10292 # Not a problem.
10293 #
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295 $as_echo "no" >&6; }
10296
10297 else
10298
10299 #
10300 # A problem.
10301 #
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10303 $as_echo "yes" >&6; }
10304 can_add_to_cflags=no
10305
10306 fi
10307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10308 fi
10309 CFLAGS="$save_CFLAGS"
10310 if test x"$can_add_to_cflags" = "xyes"
10311 then
10312 V_CCOPT="$V_CCOPT -Wpointer-sign"
10313 fi
10314
10315 else
10316
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10318 $as_echo "no" >&6; }
10319 CFLAGS="$save_CFLAGS"
10320
10321 fi
10322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10323 ac_c_werror_flag="$save_ac_c_werror_flag"
10324
10325
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
10327 $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
10328 save_CFLAGS="$CFLAGS"
10329 CFLAGS="$CFLAGS -Wshadow"
10330 #
10331 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10332 # but no mechanism is provided to turn AC_LANG_WERROR on
10333 # *and then turn it back off*, so that we *only* do it when
10334 # testing compiler options - 15 years after somebody asked
10335 # for it:
10336 #
10337 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10338 #
10339 save_ac_c_werror_flag="$ac_c_werror_flag"
10340 ac_c_werror_flag=yes
10341 #
10342 # We use AC_LANG_SOURCE() so that we can control the complete
10343 # content of the program being compiled. We do not, for example,
10344 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10345 # as it will generate a warning with -Wold-style-definition, meaning
10346 # that we would treat it as not working, as the test will fail if
10347 # *any* error output, including a warning due to the flag we're
10348 # testing, is generated; see
10349 #
10350 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10351 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10352 #
10353 # This may, as per those two messages, be fixed in autoonf 2.70,
10354 # but we only require 2.64 or newer for now.
10355 #
10356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10357 /* end confdefs.h. */
10358 int main(void) { return 0; }
10359 _ACEOF
10360 if ac_fn_c_try_compile "$LINENO"; then :
10361
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10363 $as_echo "yes" >&6; }
10364 can_add_to_cflags=yes
10365 #
10366 # The compile supports this; do we have some C code for
10367 # which the warning should *not* appear?
10368 # We test the fourth argument because the third argument
10369 # could contain quotes, breaking the test.
10370 #
10371 if test "x" != "x"
10372 then
10373 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
10375 $as_echo_n "checking whether -Wshadow ... " >&6; }
10376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10377 /* end confdefs.h. */
10378
10379 _ACEOF
10380 if ac_fn_c_try_compile "$LINENO"; then :
10381
10382 #
10383 # Not a problem.
10384 #
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386 $as_echo "no" >&6; }
10387
10388 else
10389
10390 #
10391 # A problem.
10392 #
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10394 $as_echo "yes" >&6; }
10395 can_add_to_cflags=no
10396
10397 fi
10398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10399 fi
10400 CFLAGS="$save_CFLAGS"
10401 if test x"$can_add_to_cflags" = "xyes"
10402 then
10403 V_CCOPT="$V_CCOPT -Wshadow"
10404 fi
10405
10406 else
10407
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409 $as_echo "no" >&6; }
10410 CFLAGS="$save_CFLAGS"
10411
10412 fi
10413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10414 ac_c_werror_flag="$save_ac_c_werror_flag"
10415
10416
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
10418 $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
10419 save_CFLAGS="$CFLAGS"
10420 CFLAGS="$CFLAGS -Wsign-compare"
10421 #
10422 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10423 # but no mechanism is provided to turn AC_LANG_WERROR on
10424 # *and then turn it back off*, so that we *only* do it when
10425 # testing compiler options - 15 years after somebody asked
10426 # for it:
10427 #
10428 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10429 #
10430 save_ac_c_werror_flag="$ac_c_werror_flag"
10431 ac_c_werror_flag=yes
10432 #
10433 # We use AC_LANG_SOURCE() so that we can control the complete
10434 # content of the program being compiled. We do not, for example,
10435 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10436 # as it will generate a warning with -Wold-style-definition, meaning
10437 # that we would treat it as not working, as the test will fail if
10438 # *any* error output, including a warning due to the flag we're
10439 # testing, is generated; see
10440 #
10441 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10442 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10443 #
10444 # This may, as per those two messages, be fixed in autoonf 2.70,
10445 # but we only require 2.64 or newer for now.
10446 #
10447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h. */
10449 int main(void) { return 0; }
10450 _ACEOF
10451 if ac_fn_c_try_compile "$LINENO"; then :
10452
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10454 $as_echo "yes" >&6; }
10455 can_add_to_cflags=yes
10456 #
10457 # The compile supports this; do we have some C code for
10458 # which the warning should *not* appear?
10459 # We test the fourth argument because the third argument
10460 # could contain quotes, breaking the test.
10461 #
10462 if test "x" != "x"
10463 then
10464 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
10466 $as_echo_n "checking whether -Wsign-compare ... " >&6; }
10467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10468 /* end confdefs.h. */
10469
10470 _ACEOF
10471 if ac_fn_c_try_compile "$LINENO"; then :
10472
10473 #
10474 # Not a problem.
10475 #
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477 $as_echo "no" >&6; }
10478
10479 else
10480
10481 #
10482 # A problem.
10483 #
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10485 $as_echo "yes" >&6; }
10486 can_add_to_cflags=no
10487
10488 fi
10489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10490 fi
10491 CFLAGS="$save_CFLAGS"
10492 if test x"$can_add_to_cflags" = "xyes"
10493 then
10494 V_CCOPT="$V_CCOPT -Wsign-compare"
10495 fi
10496
10497 else
10498
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500 $as_echo "no" >&6; }
10501 CFLAGS="$save_CFLAGS"
10502
10503 fi
10504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10505 ac_c_werror_flag="$save_ac_c_werror_flag"
10506
10507
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
10509 $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
10510 save_CFLAGS="$CFLAGS"
10511 CFLAGS="$CFLAGS -Wstrict-prototypes"
10512 #
10513 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10514 # but no mechanism is provided to turn AC_LANG_WERROR on
10515 # *and then turn it back off*, so that we *only* do it when
10516 # testing compiler options - 15 years after somebody asked
10517 # for it:
10518 #
10519 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10520 #
10521 save_ac_c_werror_flag="$ac_c_werror_flag"
10522 ac_c_werror_flag=yes
10523 #
10524 # We use AC_LANG_SOURCE() so that we can control the complete
10525 # content of the program being compiled. We do not, for example,
10526 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10527 # as it will generate a warning with -Wold-style-definition, meaning
10528 # that we would treat it as not working, as the test will fail if
10529 # *any* error output, including a warning due to the flag we're
10530 # testing, is generated; see
10531 #
10532 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10533 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10534 #
10535 # This may, as per those two messages, be fixed in autoonf 2.70,
10536 # but we only require 2.64 or newer for now.
10537 #
10538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10539 /* end confdefs.h. */
10540 int main(void) { return 0; }
10541 _ACEOF
10542 if ac_fn_c_try_compile "$LINENO"; then :
10543
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10545 $as_echo "yes" >&6; }
10546 can_add_to_cflags=yes
10547 #
10548 # The compile supports this; do we have some C code for
10549 # which the warning should *not* appear?
10550 # We test the fourth argument because the third argument
10551 # could contain quotes, breaking the test.
10552 #
10553 if test "x" != "x"
10554 then
10555 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
10557 $as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
10558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10559 /* end confdefs.h. */
10560
10561 _ACEOF
10562 if ac_fn_c_try_compile "$LINENO"; then :
10563
10564 #
10565 # Not a problem.
10566 #
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568 $as_echo "no" >&6; }
10569
10570 else
10571
10572 #
10573 # A problem.
10574 #
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10576 $as_echo "yes" >&6; }
10577 can_add_to_cflags=no
10578
10579 fi
10580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10581 fi
10582 CFLAGS="$save_CFLAGS"
10583 if test x"$can_add_to_cflags" = "xyes"
10584 then
10585 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
10586 fi
10587
10588 else
10589
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591 $as_echo "no" >&6; }
10592 CFLAGS="$save_CFLAGS"
10593
10594 fi
10595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10596 ac_c_werror_flag="$save_ac_c_werror_flag"
10597
10598
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
10600 $as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
10601 save_CFLAGS="$CFLAGS"
10602 CFLAGS="$CFLAGS -Wunused-parameter"
10603 #
10604 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10605 # but no mechanism is provided to turn AC_LANG_WERROR on
10606 # *and then turn it back off*, so that we *only* do it when
10607 # testing compiler options - 15 years after somebody asked
10608 # for it:
10609 #
10610 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10611 #
10612 save_ac_c_werror_flag="$ac_c_werror_flag"
10613 ac_c_werror_flag=yes
10614 #
10615 # We use AC_LANG_SOURCE() so that we can control the complete
10616 # content of the program being compiled. We do not, for example,
10617 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10618 # as it will generate a warning with -Wold-style-definition, meaning
10619 # that we would treat it as not working, as the test will fail if
10620 # *any* error output, including a warning due to the flag we're
10621 # testing, is generated; see
10622 #
10623 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10624 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10625 #
10626 # This may, as per those two messages, be fixed in autoonf 2.70,
10627 # but we only require 2.64 or newer for now.
10628 #
10629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10630 /* end confdefs.h. */
10631 int main(void) { return 0; }
10632 _ACEOF
10633 if ac_fn_c_try_compile "$LINENO"; then :
10634
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10636 $as_echo "yes" >&6; }
10637 can_add_to_cflags=yes
10638 #
10639 # The compile supports this; do we have some C code for
10640 # which the warning should *not* appear?
10641 # We test the fourth argument because the third argument
10642 # could contain quotes, breaking the test.
10643 #
10644 if test "x" != "x"
10645 then
10646 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
10648 $as_echo_n "checking whether -Wunused-parameter ... " >&6; }
10649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650 /* end confdefs.h. */
10651
10652 _ACEOF
10653 if ac_fn_c_try_compile "$LINENO"; then :
10654
10655 #
10656 # Not a problem.
10657 #
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659 $as_echo "no" >&6; }
10660
10661 else
10662
10663 #
10664 # A problem.
10665 #
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10667 $as_echo "yes" >&6; }
10668 can_add_to_cflags=no
10669
10670 fi
10671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10672 fi
10673 CFLAGS="$save_CFLAGS"
10674 if test x"$can_add_to_cflags" = "xyes"
10675 then
10676 V_CCOPT="$V_CCOPT -Wunused-parameter"
10677 fi
10678
10679 else
10680
10681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682 $as_echo "no" >&6; }
10683 CFLAGS="$save_CFLAGS"
10684
10685 fi
10686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10687 ac_c_werror_flag="$save_ac_c_werror_flag"
10688
10689
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
10691 $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
10692 save_CFLAGS="$CFLAGS"
10693 CFLAGS="$CFLAGS -Wused-but-marked-unused"
10694 #
10695 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10696 # but no mechanism is provided to turn AC_LANG_WERROR on
10697 # *and then turn it back off*, so that we *only* do it when
10698 # testing compiler options - 15 years after somebody asked
10699 # for it:
10700 #
10701 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10702 #
10703 save_ac_c_werror_flag="$ac_c_werror_flag"
10704 ac_c_werror_flag=yes
10705 #
10706 # We use AC_LANG_SOURCE() so that we can control the complete
10707 # content of the program being compiled. We do not, for example,
10708 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10709 # as it will generate a warning with -Wold-style-definition, meaning
10710 # that we would treat it as not working, as the test will fail if
10711 # *any* error output, including a warning due to the flag we're
10712 # testing, is generated; see
10713 #
10714 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10715 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10716 #
10717 # This may, as per those two messages, be fixed in autoonf 2.70,
10718 # but we only require 2.64 or newer for now.
10719 #
10720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10721 /* end confdefs.h. */
10722 int main(void) { return 0; }
10723 _ACEOF
10724 if ac_fn_c_try_compile "$LINENO"; then :
10725
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10727 $as_echo "yes" >&6; }
10728 can_add_to_cflags=yes
10729 #
10730 # The compile supports this; do we have some C code for
10731 # which the warning should *not* appear?
10732 # We test the fourth argument because the third argument
10733 # could contain quotes, breaking the test.
10734 #
10735 if test "x" != "x"
10736 then
10737 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
10739 $as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
10740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10741 /* end confdefs.h. */
10742
10743 _ACEOF
10744 if ac_fn_c_try_compile "$LINENO"; then :
10745
10746 #
10747 # Not a problem.
10748 #
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750 $as_echo "no" >&6; }
10751
10752 else
10753
10754 #
10755 # A problem.
10756 #
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10758 $as_echo "yes" >&6; }
10759 can_add_to_cflags=no
10760
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10763 fi
10764 CFLAGS="$save_CFLAGS"
10765 if test x"$can_add_to_cflags" = "xyes"
10766 then
10767 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
10768 fi
10769
10770 else
10771
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10773 $as_echo "no" >&6; }
10774 CFLAGS="$save_CFLAGS"
10775
10776 fi
10777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10778 ac_c_werror_flag="$save_ac_c_werror_flag"
10779
10780 # Warns about safeguards added in case the enums are
10781 # extended
10782 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
10783 #
10784 # This can cause problems with ntohs(), ntohl(),
10785 # htons(), and htonl() on some platforms, such
10786 # as OpenBSD 6.3 with Clang 5.0.1. I guess the
10787 # problem is that the macro that ultimately does
10788 # the byte-swapping involves a conditional
10789 # expression that tests whether the value being
10790 # swapped is a compile-time constant or not,
10791 # using __builtin_constant_p(), and, depending
10792 # on whether it is, does a compile-time swap or
10793 # a run-time swap; perhaps the compiler always
10794 # considers one of the two results of the
10795 # conditional expressin is never evaluated,
10796 # because the conditional check is done at
10797 # compile time, and thus always says "that
10798 # expression is never executed".
10799 #
10800 # (Perhaps there should be a way of flagging
10801 # an expression that you *want* evaluated at
10802 # compile time, so that the compiler 1) warns
10803 # if it *can't* be evaluated at compile time
10804 # and 2) *doesn't* warn that the true or false
10805 # branch will never be reached.)
10806 #
10807
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
10809 $as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
10810 save_CFLAGS="$CFLAGS"
10811 CFLAGS="$CFLAGS -Wunreachable-code"
10812 #
10813 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10814 # but no mechanism is provided to turn AC_LANG_WERROR on
10815 # *and then turn it back off*, so that we *only* do it when
10816 # testing compiler options - 15 years after somebody asked
10817 # for it:
10818 #
10819 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10820 #
10821 save_ac_c_werror_flag="$ac_c_werror_flag"
10822 ac_c_werror_flag=yes
10823 #
10824 # We use AC_LANG_SOURCE() so that we can control the complete
10825 # content of the program being compiled. We do not, for example,
10826 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10827 # as it will generate a warning with -Wold-style-definition, meaning
10828 # that we would treat it as not working, as the test will fail if
10829 # *any* error output, including a warning due to the flag we're
10830 # testing, is generated; see
10831 #
10832 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10833 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10834 #
10835 # This may, as per those two messages, be fixed in autoonf 2.70,
10836 # but we only require 2.64 or newer for now.
10837 #
10838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10839 /* end confdefs.h. */
10840 int main(void) { return 0; }
10841 _ACEOF
10842 if ac_fn_c_try_compile "$LINENO"; then :
10843
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10845 $as_echo "yes" >&6; }
10846 can_add_to_cflags=yes
10847 #
10848 # The compile supports this; do we have some C code for
10849 # which the warning should *not* appear?
10850 # We test the fourth argument because the third argument
10851 # could contain quotes, breaking the test.
10852 #
10853 if test "xgenerates warnings from ntohs()" != "x"
10854 then
10855 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
10857 $as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
10858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10859 /* end confdefs.h. */
10860 #include <arpa/inet.h>
10861
10862 unsigned short
10863 testme(unsigned short a)
10864 {
10865 return ntohs(a);
10866 }
10867
10868 _ACEOF
10869 if ac_fn_c_try_compile "$LINENO"; then :
10870
10871 #
10872 # Not a problem.
10873 #
10874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875 $as_echo "no" >&6; }
10876
10877 else
10878
10879 #
10880 # A problem.
10881 #
10882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10883 $as_echo "yes" >&6; }
10884 can_add_to_cflags=no
10885
10886 fi
10887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888 fi
10889 CFLAGS="$save_CFLAGS"
10890 if test x"$can_add_to_cflags" = "xyes"
10891 then
10892 V_CCOPT="$V_CCOPT -Wunreachable-code"
10893 fi
10894
10895 else
10896
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898 $as_echo "no" >&6; }
10899 CFLAGS="$save_CFLAGS"
10900
10901 fi
10902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10903 ac_c_werror_flag="$save_ac_c_werror_flag"
10904
10905
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
10907 $as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
10908 save_CFLAGS="$CFLAGS"
10909 CFLAGS="$CFLAGS -Wshorten-64-to-32"
10910 #
10911 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10912 # but no mechanism is provided to turn AC_LANG_WERROR on
10913 # *and then turn it back off*, so that we *only* do it when
10914 # testing compiler options - 15 years after somebody asked
10915 # for it:
10916 #
10917 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10918 #
10919 save_ac_c_werror_flag="$ac_c_werror_flag"
10920 ac_c_werror_flag=yes
10921 #
10922 # We use AC_LANG_SOURCE() so that we can control the complete
10923 # content of the program being compiled. We do not, for example,
10924 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10925 # as it will generate a warning with -Wold-style-definition, meaning
10926 # that we would treat it as not working, as the test will fail if
10927 # *any* error output, including a warning due to the flag we're
10928 # testing, is generated; see
10929 #
10930 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10931 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10932 #
10933 # This may, as per those two messages, be fixed in autoonf 2.70,
10934 # but we only require 2.64 or newer for now.
10935 #
10936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h. */
10938 int main(void) { return 0; }
10939 _ACEOF
10940 if ac_fn_c_try_compile "$LINENO"; then :
10941
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10943 $as_echo "yes" >&6; }
10944 can_add_to_cflags=yes
10945 #
10946 # The compile supports this; do we have some C code for
10947 # which the warning should *not* appear?
10948 # We test the fourth argument because the third argument
10949 # could contain quotes, breaking the test.
10950 #
10951 if test "x" != "x"
10952 then
10953 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
10955 $as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
10956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10957 /* end confdefs.h. */
10958
10959 _ACEOF
10960 if ac_fn_c_try_compile "$LINENO"; then :
10961
10962 #
10963 # Not a problem.
10964 #
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966 $as_echo "no" >&6; }
10967
10968 else
10969
10970 #
10971 # A problem.
10972 #
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10974 $as_echo "yes" >&6; }
10975 can_add_to_cflags=no
10976
10977 fi
10978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979 fi
10980 CFLAGS="$save_CFLAGS"
10981 if test x"$can_add_to_cflags" = "xyes"
10982 then
10983 V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
10984 fi
10985
10986 else
10987
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989 $as_echo "no" >&6; }
10990 CFLAGS="$save_CFLAGS"
10991
10992 fi
10993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10994 ac_c_werror_flag="$save_ac_c_werror_flag"
10995
10996 fi
10997
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
10999 $as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
11000 if test "$GCC" = yes ; then
11001 #
11002 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
11003 # though it's not); we assume that, in this case, the flag
11004 # would be -M.
11005 #
11006 ac_lbl_dependency_flag="-M"
11007 else
11008 #
11009 # Not GCC or a compiler deemed to be GCC; what platform is
11010 # this? (We're assuming that if the compiler isn't GCC
11011 # it's the compiler from the vendor of the OS; that won't
11012 # necessarily be true for x86 platforms, where it might be
11013 # the Intel C compiler.)
11014 #
11015 case "$host_os" in
11016
11017 irix*|osf*|darwin*)
11018 #
11019 # MIPS C for IRIX, DEC C, and clang all use -M.
11020 #
11021 ac_lbl_dependency_flag="-M"
11022 ;;
11023
11024 solaris*)
11025 #
11026 # Sun C uses -xM.
11027 #
11028 ac_lbl_dependency_flag="-xM"
11029 ;;
11030
11031 hpux*)
11032 #
11033 # HP's older C compilers don't support this.
11034 # HP's newer C compilers support this with
11035 # either +M or +Make; the older compilers
11036 # interpret +M as something completely
11037 # different, so we use +Make so we don't
11038 # think it works with the older compilers.
11039 #
11040 ac_lbl_dependency_flag="+Make"
11041 ;;
11042
11043 *)
11044 #
11045 # Not one of the above; assume no support for
11046 # generating dependencies.
11047 #
11048 ac_lbl_dependency_flag=""
11049 ;;
11050 esac
11051 fi
11052
11053 #
11054 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
11055 # complain about it?
11056 #
11057 # Note: clang doesn't seem to exit with an error status when handed
11058 # an unknown non-warning error, even if you pass it
11059 # -Werror=unknown-warning-option. However, it always supports
11060 # -M, so the fact that this test always succeeds with clang
11061 # isn't an issue.
11062 #
11063 if test ! -z "$ac_lbl_dependency_flag"; then
11064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11065 /* end confdefs.h. */
11066 int main(void) { return 0; }
11067 _ACEOF
11068 if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
11069 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
11070 ac_status=$?
11071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11072 test $ac_status = 0; }; then
11073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
11074 $as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
11075 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
11076 MKDEP='${top_srcdir}/mkdep'
11077 else
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079 $as_echo "no" >&6; }
11080 #
11081 # We can't run mkdep, so have "make depend" do
11082 # nothing.
11083 #
11084 MKDEP='${top_srcdir}/nomkdep'
11085 fi
11086 rm -rf conftest*
11087 else
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11089 $as_echo "no" >&6; }
11090 #
11091 # We can't run mkdep, so have "make depend" do
11092 # nothing.
11093 #
11094 MKDEP='${top_srcdir}/nomkdep'
11095 fi
11096
11097
11098
11099 #
11100 # We used to set -n32 for IRIX 6 when not using GCC (presumed
11101 # to mean that we're using MIPS C or MIPSpro C); it specified
11102 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
11103 # not sure why that would be something to do *only* with a
11104 # .devel file; why should the ABI for which we produce code
11105 # depend on .devel?
11106 #
11107 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
11108 name="lbl/os-$os.h"
11109 if test -f $name ; then
11110 ln -s $name os-proto.h
11111
11112 $as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
11113
11114 else
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
11116 $as_echo "$as_me: WARNING: can't find $name" >&2;}
11117 fi
11118 fi
11119
11120 #
11121 # Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
11122 #
11123 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
11124 #include <sys/types.h>
11125 #include <sys/socket.h>
11126
11127 "
11128 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11129
11130 cat >>confdefs.h <<_ACEOF
11131 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11132 _ACEOF
11133
11134
11135 fi
11136
11137
11138 #
11139 # Check to see if there's a sockaddr_storage structure.
11140 #
11141 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
11142 #include <sys/types.h>
11143 #include <sys/socket.h>
11144
11145 "
11146 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11147
11148 cat >>confdefs.h <<_ACEOF
11149 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11150 _ACEOF
11151
11152
11153 fi
11154
11155
11156 #
11157 # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
11158 # dl_module_id_1 member.
11159 #
11160 # NOTE: any failure means we conclude that it doesn't have that member,
11161 # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
11162 # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
11163 # it doesn't have that member (which is OK, as either we won't be
11164 # using code that would use that member, or we wouldn't compile in
11165 # any case).
11166 #
11167 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" "
11168 #include <sys/types.h>
11169 #include <sys/dlpi.h>
11170 #include <sys/dlpi_ext.h>
11171
11172 "
11173 if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
11174
11175 cat >>confdefs.h <<_ACEOF
11176 #define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
11177 _ACEOF
11178
11179
11180 fi
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214 #
11215 # Various Linux-specific mechanisms.
11216 #
11217 # Check whether --enable-usb was given.
11218 if test "${enable_usb+set}" = set; then :
11219 enableval=$enable_usb;
11220 else
11221 enable_usb=yes
11222 fi
11223
11224
11225 #
11226 # If somebody requested an XXX-only pcap, that doesn't include
11227 # additional mechanisms.
11228 #
11229 if test "xxx_only" != yes; then
11230 case "$host_os" in
11231 linux*)
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
11233 $as_echo_n "checking for Linux usbmon USB sniffing support... " >&6; }
11234 if test "x$enable_usb" != "xno" ; then
11235
11236 $as_echo "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
11237
11238 MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11240 $as_echo "yes" >&6; }
11241 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
11242 if test $? -ne 0 ; then
11243 ac_usb_dev_name="usbmon"
11244 fi
11245
11246 cat >>confdefs.h <<_ACEOF
11247 #define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
11248 _ACEOF
11249
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
11251 $as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
11252 #
11253 # Do we have a version of <linux/compiler.h> available?
11254 # If so, we might need it for <linux/usbdevice_fs.h>.
11255 #
11256 for ac_header in linux/compiler.h
11257 do :
11258 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
11259 if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
11260 cat >>confdefs.h <<_ACEOF
11261 #define HAVE_LINUX_COMPILER_H 1
11262 _ACEOF
11263
11264 fi
11265
11266 done
11267
11268 if test "$ac_cv_header_linux_compiler_h" = yes; then
11269 #
11270 # Yes - include it when testing for <linux/usbdevice_fs.h>.
11271 #
11272 for ac_header in linux/usbdevice_fs.h
11273 do :
11274 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
11275 "
11276 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
11277 cat >>confdefs.h <<_ACEOF
11278 #define HAVE_LINUX_USBDEVICE_FS_H 1
11279 _ACEOF
11280
11281 fi
11282
11283 done
11284
11285 else
11286 for ac_header in linux/usbdevice_fs.h
11287 do :
11288 ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
11289 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
11290 cat >>confdefs.h <<_ACEOF
11291 #define HAVE_LINUX_USBDEVICE_FS_H 1
11292 _ACEOF
11293
11294 fi
11295
11296 done
11297
11298 fi
11299 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
11300 #
11301 # OK, does it define bRequestType? Older versions of the kernel
11302 # define fields with names like "requesttype, "request", and
11303 # "value", rather than "bRequestType", "bRequest", and
11304 # "wValue".
11305 #
11306 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
11307 $ac_includes_default
11308 #ifdef HAVE_LINUX_COMPILER_H
11309 #include <linux/compiler.h>
11310 #endif
11311 #include <linux/usbdevice_fs.h>
11312
11313 "
11314 if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
11315
11316 cat >>confdefs.h <<_ACEOF
11317 #define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
11318 _ACEOF
11319
11320
11321 fi
11322
11323 fi
11324 else
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326 $as_echo "no" >&6; }
11327 fi
11328
11329 #
11330 # Life's too short to deal with trying to get this to compile
11331 # if you don't get the right types defined with
11332 # __KERNEL_STRICT_NAMES getting defined by some other include.
11333 #
11334 # Check whether the includes Just Work. If not, don't turn on
11335 # netfilter support.
11336 #
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
11338 $as_echo_n "checking whether we can compile the netfilter support... " >&6; }
11339 if ${ac_cv_netfilter_can_compile+:} false; then :
11340 $as_echo_n "(cached) " >&6
11341 else
11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343 /* end confdefs.h. */
11344
11345 $ac_includes_default
11346 #include <sys/socket.h>
11347 #include <netinet/in.h>
11348 #include <linux/types.h>
11349
11350 #include <linux/netlink.h>
11351 #include <linux/netfilter.h>
11352 #include <linux/netfilter/nfnetlink.h>
11353 #include <linux/netfilter/nfnetlink_log.h>
11354 #include <linux/netfilter/nfnetlink_queue.h>
11355 int
11356 main ()
11357 {
11358
11359 ;
11360 return 0;
11361 }
11362 _ACEOF
11363 if ac_fn_c_try_compile "$LINENO"; then :
11364 ac_cv_netfilter_can_compile=yes
11365 else
11366 ac_cv_netfilter_can_compile=no
11367 fi
11368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11369 fi
11370
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
11372 $as_echo "$ac_cv_netfilter_can_compile" >&6; }
11373 if test $ac_cv_netfilter_can_compile = yes ; then
11374
11375 $as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
11376
11377 MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
11378 fi
11379 ;;
11380 esac
11381 fi
11382
11383
11384
11385 # Check whether --enable-netmap was given.
11386 if test "${enable_netmap+set}" = set; then :
11387 enableval=$enable_netmap;
11388 else
11389 enable_netmap=yes
11390 fi
11391
11392
11393 if test "x$enable_netmap" != "xno" ; then
11394 #
11395 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
11396 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
11397 # is defined, for example, as it includes a non-existent malloc.h
11398 # header.
11399 #
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
11401 $as_echo_n "checking whether we can compile the netmap support... " >&6; }
11402 if ${ac_cv_net_netmap_user_can_compile+:} false; then :
11403 $as_echo_n "(cached) " >&6
11404 else
11405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406 /* end confdefs.h. */
11407
11408 $ac_includes_default
11409 #define NETMAP_WITH_LIBS
11410 #include <net/netmap_user.h>
11411 int
11412 main ()
11413 {
11414
11415 ;
11416 return 0;
11417 }
11418 _ACEOF
11419 if ac_fn_c_try_compile "$LINENO"; then :
11420 ac_cv_net_netmap_user_can_compile=yes
11421 else
11422 ac_cv_net_netmap_user_can_compile=no
11423 fi
11424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
11428 $as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
11429 if test $ac_cv_net_netmap_user_can_compile = yes ; then
11430
11431 $as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
11432
11433 MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
11434 fi
11435
11436 fi
11437
11438 # Check for DPDK support.
11439
11440 # Check whether --with-dpdk was given.
11441 if test "${with_dpdk+set}" = set; then :
11442 withval=$with_dpdk;
11443 if test "$withval" = no
11444 then
11445 # User doesn't want DPDK support.
11446 want_dpdk=no
11447 elif test "$withval" = yes
11448 then
11449 # User wants DPDK support but hasn't specified a directory.
11450 want_dpdk=yes
11451 else
11452 # User wants DPDK support and has specified a directory,
11453 # so use the provided value.
11454 want_dpdk=yes
11455 dpdk_dir=$withval
11456 fi
11457
11458 else
11459
11460 if test "$V_PCAP" = dpdk; then
11461 # User requested DPDK-only libpcap, so we'd better have
11462 # the DPDK API.
11463 want_dpdk=yes
11464 elif test "xxx_only" = yes; then
11465 # User requested something-else-only pcap, so they don't
11466 # want DPDK support.
11467 want_dpdk=no
11468 else
11469 #
11470 # Use DPDK API if present, otherwise don't
11471 #
11472 want_dpdk=ifpresent
11473 fi
11474
11475 fi
11476
11477
11478 if test "$want_dpdk" != no; then
11479 if test "x$PKGCONFIG" != "xno"
11480 then
11481 #
11482 # We have pkg-config; see if we have DPDK installed
11483 # as a package.
11484 #
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPDK with pkg-config" >&5
11486 $as_echo_n "checking for DPDK with pkg-config... " >&6; }
11487 if "$PKGCONFIG" libdpdk
11488 then
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
11490 $as_echo "found" >&6; }
11491 found_dpdk_with_pkg_config=yes
11492 DPDK_CFLAGS=`"$PKGCONFIG" --cflags libdpdk`
11493 DPDK_LDFLAGS=`"$PKGCONFIG" --libs libdpdk`
11494 else
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11496 $as_echo "not found" >&6; }
11497 fi
11498 fi
11499
11500 #
11501 # If we didn't find it with pkg-config, try checking for
11502 # it manually.
11503 #
11504 if test "x$found_dpdk_with_pkg_config" != "xyes"
11505 then
11506 if test -z "$dpdk_dir"; then
11507 #
11508 # The user didn't specify a directory containing
11509 # the DPDK headers and libraries. If we find
11510 # a /usr/local/include/dpdk directory, assume
11511 # it's /usr/local, otherwise assume it's /usr.
11512 #
11513 if test -d "/usr/local/include/dpdk"; then
11514 dpdk_dir="/usr/local"
11515 else
11516 dpdk_dir="/usr"
11517 fi
11518 fi
11519 #
11520 # The convention appears to be that 1) there's a "dpdk"
11521 # subdirectory of the include directory, containing DPDK
11522 # headers (at least in the installation on Ubuntu with
11523 # the system DPDK packages) and 2) includes of DPDK
11524 # headers don't use "dpdk/{header}" (at least from the
11525 # way the DPDK documentation is written).
11526 #
11527 # So we add "/dpdk" to the include directory, and always
11528 # add that to the list of include directories to search.
11529 #
11530 dpdk_inc_dir="$dpdk_dir/include/dpdk"
11531 dpdk_inc_flags="-I$dpdk_inc_dir"
11532 dpdk_lib_dir="$dpdk_dir/lib"
11533 #
11534 # Handle multiarch systems.
11535 #
11536 # Step 1: run the C compiler with the -dumpmachine option;
11537 # if it succeeds, the output would be the multiarch directory
11538 # name if your system has multiarch directories.
11539 #
11540 multiarch_dir=`$CC -dumpmachine 2>/dev/null`
11541 if test ! -z "$multiarch_dir"
11542 then
11543 #
11544 # OK, we have a multiarch directory.
11545 #
11546 # Now deal with includes. On Ubuntu 20.04, for
11547 # example, we have /usr/include/dpdk *and*
11548 # /usr/include/$multiarch_dir/dpdk, and must
11549 # search both.
11550 #
11551 if test -d "$dpdk_dir/include/$multiarch_dir/dpdk"
11552 then
11553 dpdk_inc_flags="-I$dpdk_dir/include/$multiarch_dir/dpdk $dpdk_inc_flags"
11554 fi
11555
11556 #
11557 # Now deal with libraries.
11558 #
11559 if test -d "$dpdk_lib_dir/$multiarch_dir"
11560 then
11561 dpdk_lib_dir="$dpdk_lib_dir/$multiarch_dir"
11562 fi
11563 fi
11564 DPDK_MACHINE_CFLAGS="-march=native"
11565 DPDK_CFLAGS="$DPDK_MACHINE_CFLAGS $dpdk_inc_flags"
11566 DPDK_LDFLAGS="-L$dpdk_lib_dir -ldpdk -lrt -lm -lnuma -ldl -pthread"
11567 fi
11568
11569 save_CFLAGS="$CFLAGS"
11570 save_LIBS="$LIBS"
11571 save_LDFLAGS="$LDFLAGS"
11572 CFLAGS="$CFLAGS $DPDK_CFLAGS"
11573 LIBS="$LIBS $DPDK_LDFLAGS"
11574 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11575
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the DPDK support" >&5
11577 $as_echo_n "checking whether we can compile the DPDK support... " >&6; }
11578 if ${ac_cv_dpdk_can_compile+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580 else
11581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11582 /* end confdefs.h. */
11583
11584 $ac_includes_default
11585 #include <rte_common.h>
11586 int
11587 main ()
11588 {
11589
11590 ;
11591 return 0;
11592 }
11593 _ACEOF
11594 if ac_fn_c_try_compile "$LINENO"; then :
11595 ac_cv_dpdk_can_compile=yes
11596 else
11597 ac_cv_dpdk_can_compile=no
11598 fi
11599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11600 fi
11601
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dpdk_can_compile" >&5
11603 $as_echo "$ac_cv_dpdk_can_compile" >&6; }
11604
11605 #
11606 # We include rte_bus.h, and older versions of DPDK
11607 # didn't have it, so check for it.
11608 #
11609 if test "$ac_cv_dpdk_can_compile" = yes; then
11610 #
11611 # This runs the preprocessor, so make sure it
11612 # looks in the DPDK directories. Instead of
11613 # including dpdk/XXX.h, we include just XXX.h
11614 # and assume DPDK_CFLAGS is the directory
11615 # containing the DPDK headers (that's how
11616 # pkg-config sets it, at least on Ubuntu),
11617 # so just looking under /usr/include won't
11618 # find it.
11619 #
11620 save_CPPFLAGS="$CPPFLAGS"
11621 CPPFLAGS="$CPPFLAGS $DPDK_CFLAGS"
11622 ac_fn_c_check_header_mongrel "$LINENO" "rte_bus.h" "ac_cv_header_rte_bus_h" "$ac_includes_default"
11623 if test "x$ac_cv_header_rte_bus_h" = xyes; then :
11624
11625 fi
11626
11627
11628 CPPFLAGS="$save_CPPFLAGS"
11629 fi
11630
11631 #
11632 # We call rte_eth_dev_count_avail(), and older versions
11633 # of DPDK didn't have it, so check for it.
11634 #
11635 if test "$ac_cv_header_rte_bus_h" = yes; then
11636 ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
11637 if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes; then :
11638
11639 fi
11640
11641 fi
11642
11643 CFLAGS="$save_CFLAGS"
11644 LIBS="$save_LIBS"
11645 LDFLAGS="$save_LDFLAGS"
11646
11647 if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
11648 CFLAGS="$CFLAGS $DPDK_CFLAGS"
11649 LIBS="$LIBS $DPDK_LDFLAGS"
11650 LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11651 V_INCLS="$V_INCLS $DPDK_CFLAGS"
11652
11653 $as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
11654
11655 if test $V_PCAP != dpdk ; then
11656 MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
11657 fi
11658
11659 #
11660 # Check whether the rte_ether.h file defines
11661 # struct ether_addr or struct rte_ether_addr.
11662 #
11663 # ("API compatibility? That's for losers!")
11664 #
11665 ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
11666 #include <rte_ether.h>
11667
11668 "
11669 if test "x$ac_cv_type_struct_rte_ether_addr" = xyes; then :
11670
11671 cat >>confdefs.h <<_ACEOF
11672 #define HAVE_STRUCT_RTE_ETHER_ADDR 1
11673 _ACEOF
11674
11675
11676 fi
11677
11678 else
11679 if test "$V_PCAP" = dpdk; then
11680 # User requested DPDK-only capture support, but
11681 # we couldn't the DPDK API support at all, or we
11682 # found it but it wasn't a sufficiently recent
11683 # version.
11684 if test "$ac_cv_dpdk_can_compile" != yes; then
11685 #
11686 # Couldn't even find the headers.
11687 #
11688 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
11689 else
11690 #
11691 # Found the headers, but we couldn't find
11692 # rte_bus.h or rte_eth_dev_count_avail(),
11693 # we don't have a sufficiently recent
11694 # version of DPDK.
11695 #
11696 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we require DPDK 18.x or later; install a newer version of DPDK, or don't request DPDK support" "$LINENO" 5
11697 fi
11698 fi
11699
11700 if test "$want_dpdk" = yes; then
11701 # User requested DPDK-only capture support, but
11702 # we couldn't the DPDK API support at all, or we
11703 # found it but it wasn't a sufficiently recent
11704 # version.
11705 if test "$ac_cv_dpdk_can_compile" != yes; then
11706 #
11707 # Couldn't even find the headers.
11708 #
11709 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
11710 else
11711 #
11712 # Found the headers, but we couldn't find
11713 # rte_bus.h or rte_eth_dev_count_avail(),
11714 # we don't have a sufficiently recent
11715 # version of DPDK.
11716 #
11717 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we require DPDK 18.x or later: install a newer version of DPDK, or don't request DPDK support" "$LINENO" 5
11718 fi
11719 fi
11720 fi
11721 fi
11722
11723
11724 # Check whether --enable-bluetooth was given.
11725 if test "${enable_bluetooth+set}" = set; then :
11726 enableval=$enable_bluetooth;
11727 else
11728 enable_bluetooth=ifsupportavailable
11729 fi
11730
11731
11732 if test "xxx_only" = yes; then
11733 # User requested something-else-only pcap, so they don't
11734 # want Bluetooth support.
11735 enable_bluetooth=no
11736 fi
11737
11738 if test "x$enable_bluetooth" != "xno" ; then
11739 case "$host_os" in
11740 linux*)
11741 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
11742 if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
11743
11744 #
11745 # We have bluetooth.h, so we support Bluetooth
11746 # sniffing.
11747 #
11748
11749 $as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
11750
11751 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
11753 $as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
11754 ac_lbl_bluetooth_available=yes
11755
11756 #
11757 # OK, does struct sockaddr_hci have an hci_channel
11758 # member?
11759 #
11760 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
11761 #include <bluetooth/bluetooth.h>
11762 #include <bluetooth/hci.h>
11763
11764 "
11765 if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
11766
11767 cat >>confdefs.h <<_ACEOF
11768 #define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
11769 _ACEOF
11770
11771
11772 #
11773 # Yes; is HCI_CHANNEL_MONITOR defined?
11774 #
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
11776 $as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
11777 if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
11778 $as_echo_n "(cached) " >&6
11779 else
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h. */
11782
11783 #include <bluetooth/bluetooth.h>
11784 #include <bluetooth/hci.h>
11785
11786 int
11787 main ()
11788 {
11789
11790 u_int i = HCI_CHANNEL_MONITOR;
11791
11792 ;
11793 return 0;
11794 }
11795 _ACEOF
11796 if ac_fn_c_try_compile "$LINENO"; then :
11797
11798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11799 $as_echo "yes" >&6; }
11800
11801 $as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
11802
11803 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
11804
11805 else
11806
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11808 $as_echo "no" >&6; }
11809
11810 fi
11811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11812 fi
11813
11814
11815 fi
11816
11817
11818 else
11819
11820 #
11821 # We don't have bluetooth.h, so we don't support
11822 # Bluetooth sniffing.
11823 #
11824 if test "x$enable_bluetooth" = "xyes" ; then
11825 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
11826 else
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
11828 $as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
11829 fi
11830
11831 fi
11832
11833
11834 ;;
11835 *)
11836 if test "x$enable_bluetooth" = "xyes" ; then
11837 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
11838 else
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
11840 $as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
11841 fi
11842 ;;
11843 esac
11844
11845 fi
11846
11847 # Check whether --enable-dbus was given.
11848 if test "${enable_dbus+set}" = set; then :
11849 enableval=$enable_dbus;
11850 else
11851 enable_dbus=ifavailable
11852 fi
11853
11854
11855 if test "xxx_only" = yes; then
11856 # User requested something-else-only pcap, so they don't
11857 # want D-Bus support.
11858 enable_dbus=no
11859 fi
11860
11861 if test "x$enable_dbus" != "xno"; then
11862 if test "x$enable_dbus" = "xyes"; then
11863 case "$host_os" in
11864
11865 darwin*)
11866 #
11867 # We don't support D-Bus sniffing on macOS; see
11868 #
11869 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
11870 #
11871 # The user requested it, so fail.
11872 #
11873 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
11874 esac
11875 else
11876 case "$host_os" in
11877
11878 darwin*)
11879 #
11880 # We don't support D-Bus sniffing on macOS; see
11881 #
11882 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
11883 #
11884 # The user dind't explicitly request it, so just
11885 # silently refuse to enable it.
11886 #
11887 enable_dbus="no"
11888 ;;
11889 esac
11890 fi
11891 fi
11892
11893 if test "x$enable_dbus" != "xno"; then
11894 if test "x$PKGCONFIG" != "xno"; then
11895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
11896 $as_echo_n "checking for D-Bus... " >&6; }
11897 if "$PKGCONFIG" dbus-1; then
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11899 $as_echo "yes" >&6; }
11900 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
11901 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
11902 save_CFLAGS="$CFLAGS"
11903 save_LIBS="$LIBS"
11904 CFLAGS="$CFLAGS $DBUS_CFLAGS"
11905 LIBS="$LIBS $DBUS_LIBS"
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
11907 $as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
11908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909 /* end confdefs.h. */
11910 #include <string.h>
11911
11912 #include <time.h>
11913 #include <sys/time.h>
11914
11915 #include <dbus/dbus.h>
11916 int
11917 main ()
11918 {
11919 return dbus_connection_read_write(NULL, 0);
11920 ;
11921 return 0;
11922 }
11923 _ACEOF
11924 if ac_fn_c_try_link "$LINENO"; then :
11925
11926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11927 $as_echo "yes" >&6; }
11928
11929 $as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
11930
11931 MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
11932 V_INCLS="$V_INCLS $DBUS_CFLAGS"
11933
11934 else
11935
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11937 $as_echo "no" >&6; }
11938 if test "x$enable_dbus" = "xyes"; then
11939 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
11940 fi
11941 LIBS="$save_LIBS"
11942
11943 fi
11944 rm -f core conftest.err conftest.$ac_objext \
11945 conftest$ac_exeext conftest.$ac_ext
11946 CFLAGS="$save_CFLAGS"
11947 else
11948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949 $as_echo "no" >&6; }
11950 if test "x$enable_dbus" = "xyes"; then
11951 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
11952 fi
11953 fi
11954 fi
11955
11956 fi
11957
11958 # Check whether --enable-rdma was given.
11959 if test "${enable_rdma+set}" = set; then :
11960 enableval=$enable_rdma;
11961 else
11962 enable_rdma=ifavailable
11963 fi
11964
11965
11966 if test "xxx_only" = yes; then
11967 # User requested something-else-only pcap, so they don't
11968 # want RDMA support.
11969 enable_rdma=no
11970 fi
11971
11972 if test "x$enable_rdma" != "xno"; then
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
11974 $as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
11975 if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
11976 $as_echo_n "(cached) " >&6
11977 else
11978 ac_check_lib_save_LIBS=$LIBS
11979 LIBS="-libverbs $LIBS"
11980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11981 /* end confdefs.h. */
11982
11983 /* Override any GCC internal prototype to avoid an error.
11984 Use char because int might match the return type of a GCC
11985 builtin and then its argument prototype would still apply. */
11986 #ifdef __cplusplus
11987 extern "C"
11988 #endif
11989 char ibv_get_device_list ();
11990 int
11991 main ()
11992 {
11993 return ibv_get_device_list ();
11994 ;
11995 return 0;
11996 }
11997 _ACEOF
11998 if ac_fn_c_try_link "$LINENO"; then :
11999 ac_cv_lib_ibverbs_ibv_get_device_list=yes
12000 else
12001 ac_cv_lib_ibverbs_ibv_get_device_list=no
12002 fi
12003 rm -f core conftest.err conftest.$ac_objext \
12004 conftest$ac_exeext conftest.$ac_ext
12005 LIBS=$ac_check_lib_save_LIBS
12006 fi
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
12008 $as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
12009 if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
12010
12011 ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
12012 if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
12013
12014 #
12015 # ibv_create_flow may be defined as a static inline
12016 # function in infiniband/verbs.h, so we can't
12017 # use AC_CHECK_LIB.
12018 #
12019 # Too bad autoconf has no AC_SYMBOL_EXISTS()
12020 # macro that works like CMake's check_symbol_exists()
12021 # function, to check do a compile check like
12022 # this (they do a clever trick to avoid having
12023 # to know the function's signature).
12024 #
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
12026 $as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
12027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12028 /* end confdefs.h. */
12029
12030 #include <infiniband/verbs.h>
12031
12032 int
12033 main ()
12034 {
12035
12036 (void) ibv_create_flow((struct ibv_qp *) NULL,
12037 (struct ibv_flow_attr *) NULL);
12038
12039 ;
12040 return 0;
12041 }
12042 _ACEOF
12043 if ac_fn_c_try_link "$LINENO"; then :
12044
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12046 $as_echo "yes" >&6; }
12047
12048 $as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
12049
12050 MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
12051 LIBS="-libverbs $LIBS"
12052
12053 else
12054
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12056 $as_echo "no" >&6; }
12057
12058
12059 fi
12060 rm -f core conftest.err conftest.$ac_objext \
12061 conftest$ac_exeext conftest.$ac_ext
12062
12063 fi
12064
12065
12066
12067 fi
12068
12069
12070 fi
12071
12072 # Find a good install program. We prefer a C program (faster),
12073 # so one script is as good as another. But avoid the broken or
12074 # incompatible versions:
12075 # SysV /etc/install, /usr/sbin/install
12076 # SunOS /usr/etc/install
12077 # IRIX /sbin/install
12078 # AIX /bin/install
12079 # AmigaOS /C/install, which installs bootblocks on floppy discs
12080 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
12081 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
12082 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
12083 # OS/2's system install, which has a completely different semantic
12084 # ./install, which can be erroneously created by make from ./install.sh.
12085 # Reject install programs that cannot install multiple files.
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
12087 $as_echo_n "checking for a BSD-compatible install... " >&6; }
12088 if test -z "$INSTALL"; then
12089 if ${ac_cv_path_install+:} false; then :
12090 $as_echo_n "(cached) " >&6
12091 else
12092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12093 for as_dir in $PATH
12094 do
12095 IFS=$as_save_IFS
12096 test -z "$as_dir" && as_dir=.
12097 # Account for people who put trailing slashes in PATH elements.
12098 case $as_dir/ in #((
12099 ./ | .// | /[cC]/* | \
12100 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
12101 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
12102 /usr/ucb/* ) ;;
12103 *)
12104 # OSF1 and SCO ODT 3.0 have their own names for install.
12105 # Don't use installbsd from OSF since it installs stuff as root
12106 # by default.
12107 for ac_prog in ginstall scoinst install; do
12108 for ac_exec_ext in '' $ac_executable_extensions; do
12109 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
12110 if test $ac_prog = install &&
12111 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
12112 # AIX install. It has an incompatible calling convention.
12113 :
12114 elif test $ac_prog = install &&
12115 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
12116 # program-specific install script used by HP pwplus--don't use.
12117 :
12118 else
12119 rm -rf conftest.one conftest.two conftest.dir
12120 echo one > conftest.one
12121 echo two > conftest.two
12122 mkdir conftest.dir
12123 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
12124 test -s conftest.one && test -s conftest.two &&
12125 test -s conftest.dir/conftest.one &&
12126 test -s conftest.dir/conftest.two
12127 then
12128 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
12129 break 3
12130 fi
12131 fi
12132 fi
12133 done
12134 done
12135 ;;
12136 esac
12137
12138 done
12139 IFS=$as_save_IFS
12140
12141 rm -rf conftest.one conftest.two conftest.dir
12142
12143 fi
12144 if test "${ac_cv_path_install+set}" = set; then
12145 INSTALL=$ac_cv_path_install
12146 else
12147 # As a last resort, use the slow shell script. Don't cache a
12148 # value for INSTALL within a source directory, because that will
12149 # break other packages using the cache if that directory is
12150 # removed, or if the value is a relative name.
12151 INSTALL=$ac_install_sh
12152 fi
12153 fi
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
12155 $as_echo "$INSTALL" >&6; }
12156
12157 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
12158 # It thinks the first close brace ends the variable substitution.
12159 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
12160
12161 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
12162
12163 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
12164
12165
12166 ac_config_headers="$ac_config_headers config.h"
12167
12168
12169 ac_config_commands="$ac_config_commands default-1"
12170
12171 ac_config_files="$ac_config_files Makefile grammar.y 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"
12172
12173 cat >confcache <<\_ACEOF
12174 # This file is a shell script that caches the results of configure
12175 # tests run on this system so they can be shared between configure
12176 # scripts and configure runs, see configure's option --config-cache.
12177 # It is not useful on other systems. If it contains results you don't
12178 # want to keep, you may remove or edit it.
12179 #
12180 # config.status only pays attention to the cache file if you give it
12181 # the --recheck option to rerun configure.
12182 #
12183 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12184 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12185 # following values.
12186
12187 _ACEOF
12188
12189 # The following way of writing the cache mishandles newlines in values,
12190 # but we know of no workaround that is simple, portable, and efficient.
12191 # So, we kill variables containing newlines.
12192 # Ultrix sh set writes to stderr and can't be redirected directly,
12193 # and sets the high bit in the cache file unless we assign to the vars.
12194 (
12195 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12196 eval ac_val=\$$ac_var
12197 case $ac_val in #(
12198 *${as_nl}*)
12199 case $ac_var in #(
12200 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12201 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12202 esac
12203 case $ac_var in #(
12204 _ | IFS | as_nl) ;; #(
12205 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12206 *) { eval $ac_var=; unset $ac_var;} ;;
12207 esac ;;
12208 esac
12209 done
12210
12211 (set) 2>&1 |
12212 case $as_nl`(ac_space=' '; set) 2>&1` in #(
12213 *${as_nl}ac_space=\ *)
12214 # `set' does not quote correctly, so add quotes: double-quote
12215 # substitution turns \\\\ into \\, and sed turns \\ into \.
12216 sed -n \
12217 "s/'/'\\\\''/g;
12218 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12219 ;; #(
12220 *)
12221 # `set' quotes correctly as required by POSIX, so do not add quotes.
12222 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12223 ;;
12224 esac |
12225 sort
12226 ) |
12227 sed '
12228 /^ac_cv_env_/b end
12229 t clear
12230 :clear
12231 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12232 t end
12233 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12234 :end' >>confcache
12235 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12236 if test -w "$cache_file"; then
12237 if test "x$cache_file" != "x/dev/null"; then
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12239 $as_echo "$as_me: updating cache $cache_file" >&6;}
12240 if test ! -f "$cache_file" || test -h "$cache_file"; then
12241 cat confcache >"$cache_file"
12242 else
12243 case $cache_file in #(
12244 */* | ?:*)
12245 mv -f confcache "$cache_file"$$ &&
12246 mv -f "$cache_file"$$ "$cache_file" ;; #(
12247 *)
12248 mv -f confcache "$cache_file" ;;
12249 esac
12250 fi
12251 fi
12252 else
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12254 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12255 fi
12256 fi
12257 rm -f confcache
12258
12259 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12260 # Let make expand exec_prefix.
12261 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12262
12263 DEFS=-DHAVE_CONFIG_H
12264
12265 ac_libobjs=
12266 ac_ltlibobjs=
12267 U=
12268 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12269 # 1. Remove the extension, and $U if already installed.
12270 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12271 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12272 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
12273 # will be set to the directory where LIBOBJS objects are built.
12274 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12275 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12276 done
12277 LIBOBJS=$ac_libobjs
12278
12279 LTLIBOBJS=$ac_ltlibobjs
12280
12281
12282
12283 : "${CONFIG_STATUS=./config.status}"
12284 ac_write_fail=0
12285 ac_clean_files_save=$ac_clean_files
12286 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12288 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12289 as_write_fail=0
12290 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12291 #! $SHELL
12292 # Generated by $as_me.
12293 # Run this file to recreate the current configuration.
12294 # Compiler output produced by configure, useful for debugging
12295 # configure, is in config.log if it exists.
12296
12297 debug=false
12298 ac_cs_recheck=false
12299 ac_cs_silent=false
12300
12301 SHELL=\${CONFIG_SHELL-$SHELL}
12302 export SHELL
12303 _ASEOF
12304 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12305 ## -------------------- ##
12306 ## M4sh Initialization. ##
12307 ## -------------------- ##
12308
12309 # Be more Bourne compatible
12310 DUALCASE=1; export DUALCASE # for MKS sh
12311 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12312 emulate sh
12313 NULLCMD=:
12314 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12315 # is contrary to our usage. Disable this feature.
12316 alias -g '${1+"$@"}'='"$@"'
12317 setopt NO_GLOB_SUBST
12318 else
12319 case `(set -o) 2>/dev/null` in #(
12320 *posix*) :
12321 set -o posix ;; #(
12322 *) :
12323 ;;
12324 esac
12325 fi
12326
12327
12328 as_nl='
12329 '
12330 export as_nl
12331 # Printing a long string crashes Solaris 7 /usr/bin/printf.
12332 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12333 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12334 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12335 # Prefer a ksh shell builtin over an external printf program on Solaris,
12336 # but without wasting forks for bash or zsh.
12337 if test -z "$BASH_VERSION$ZSH_VERSION" \
12338 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12339 as_echo='print -r --'
12340 as_echo_n='print -rn --'
12341 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12342 as_echo='printf %s\n'
12343 as_echo_n='printf %s'
12344 else
12345 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12346 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12347 as_echo_n='/usr/ucb/echo -n'
12348 else
12349 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12350 as_echo_n_body='eval
12351 arg=$1;
12352 case $arg in #(
12353 *"$as_nl"*)
12354 expr "X$arg" : "X\\(.*\\)$as_nl";
12355 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12356 esac;
12357 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12358 '
12359 export as_echo_n_body
12360 as_echo_n='sh -c $as_echo_n_body as_echo'
12361 fi
12362 export as_echo_body
12363 as_echo='sh -c $as_echo_body as_echo'
12364 fi
12365
12366 # The user is always right.
12367 if test "${PATH_SEPARATOR+set}" != set; then
12368 PATH_SEPARATOR=:
12369 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12370 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12371 PATH_SEPARATOR=';'
12372 }
12373 fi
12374
12375
12376 # IFS
12377 # We need space, tab and new line, in precisely that order. Quoting is
12378 # there to prevent editors from complaining about space-tab.
12379 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
12380 # splitting by setting IFS to empty value.)
12381 IFS=" "" $as_nl"
12382
12383 # Find who we are. Look in the path if we contain no directory separator.
12384 as_myself=
12385 case $0 in #((
12386 *[\\/]* ) as_myself=$0 ;;
12387 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12388 for as_dir in $PATH
12389 do
12390 IFS=$as_save_IFS
12391 test -z "$as_dir" && as_dir=.
12392 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12393 done
12394 IFS=$as_save_IFS
12395
12396 ;;
12397 esac
12398 # We did not find ourselves, most probably we were run as `sh COMMAND'
12399 # in which case we are not to be found in the path.
12400 if test "x$as_myself" = x; then
12401 as_myself=$0
12402 fi
12403 if test ! -f "$as_myself"; then
12404 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12405 exit 1
12406 fi
12407
12408 # Unset variables that we do not need and which cause bugs (e.g. in
12409 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
12410 # suppresses any "Segmentation fault" message there. '((' could
12411 # trigger a bug in pdksh 5.2.14.
12412 for as_var in BASH_ENV ENV MAIL MAILPATH
12413 do eval test x\${$as_var+set} = xset \
12414 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12415 done
12416 PS1='$ '
12417 PS2='> '
12418 PS4='+ '
12419
12420 # NLS nuisances.
12421 LC_ALL=C
12422 export LC_ALL
12423 LANGUAGE=C
12424 export LANGUAGE
12425
12426 # CDPATH.
12427 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12428
12429
12430 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12431 # ----------------------------------------
12432 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12433 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12434 # script with STATUS, using 1 if that was 0.
12435 as_fn_error ()
12436 {
12437 as_status=$1; test $as_status -eq 0 && as_status=1
12438 if test "$4"; then
12439 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12440 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12441 fi
12442 $as_echo "$as_me: error: $2" >&2
12443 as_fn_exit $as_status
12444 } # as_fn_error
12445
12446
12447 # as_fn_set_status STATUS
12448 # -----------------------
12449 # Set $? to STATUS, without forking.
12450 as_fn_set_status ()
12451 {
12452 return $1
12453 } # as_fn_set_status
12454
12455 # as_fn_exit STATUS
12456 # -----------------
12457 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12458 as_fn_exit ()
12459 {
12460 set +e
12461 as_fn_set_status $1
12462 exit $1
12463 } # as_fn_exit
12464
12465 # as_fn_unset VAR
12466 # ---------------
12467 # Portably unset VAR.
12468 as_fn_unset ()
12469 {
12470 { eval $1=; unset $1;}
12471 }
12472 as_unset=as_fn_unset
12473 # as_fn_append VAR VALUE
12474 # ----------------------
12475 # Append the text in VALUE to the end of the definition contained in VAR. Take
12476 # advantage of any shell optimizations that allow amortized linear growth over
12477 # repeated appends, instead of the typical quadratic growth present in naive
12478 # implementations.
12479 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12480 eval 'as_fn_append ()
12481 {
12482 eval $1+=\$2
12483 }'
12484 else
12485 as_fn_append ()
12486 {
12487 eval $1=\$$1\$2
12488 }
12489 fi # as_fn_append
12490
12491 # as_fn_arith ARG...
12492 # ------------------
12493 # Perform arithmetic evaluation on the ARGs, and store the result in the
12494 # global $as_val. Take advantage of shells that can avoid forks. The arguments
12495 # must be portable across $(()) and expr.
12496 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12497 eval 'as_fn_arith ()
12498 {
12499 as_val=$(( $* ))
12500 }'
12501 else
12502 as_fn_arith ()
12503 {
12504 as_val=`expr "$@" || test $? -eq 1`
12505 }
12506 fi # as_fn_arith
12507
12508
12509 if expr a : '\(a\)' >/dev/null 2>&1 &&
12510 test "X`expr 00001 : '.*\(...\)'`" = X001; then
12511 as_expr=expr
12512 else
12513 as_expr=false
12514 fi
12515
12516 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12517 as_basename=basename
12518 else
12519 as_basename=false
12520 fi
12521
12522 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12523 as_dirname=dirname
12524 else
12525 as_dirname=false
12526 fi
12527
12528 as_me=`$as_basename -- "$0" ||
12529 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12530 X"$0" : 'X\(//\)$' \| \
12531 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12532 $as_echo X/"$0" |
12533 sed '/^.*\/\([^/][^/]*\)\/*$/{
12534 s//\1/
12535 q
12536 }
12537 /^X\/\(\/\/\)$/{
12538 s//\1/
12539 q
12540 }
12541 /^X\/\(\/\).*/{
12542 s//\1/
12543 q
12544 }
12545 s/.*/./; q'`
12546
12547 # Avoid depending upon Character Ranges.
12548 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12549 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12550 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12551 as_cr_digits='0123456789'
12552 as_cr_alnum=$as_cr_Letters$as_cr_digits
12553
12554 ECHO_C= ECHO_N= ECHO_T=
12555 case `echo -n x` in #(((((
12556 -n*)
12557 case `echo 'xy\c'` in
12558 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
12559 xy) ECHO_C='\c';;
12560 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
12561 ECHO_T=' ';;
12562 esac;;
12563 *)
12564 ECHO_N='-n';;
12565 esac
12566
12567 rm -f conf$$ conf$$.exe conf$$.file
12568 if test -d conf$$.dir; then
12569 rm -f conf$$.dir/conf$$.file
12570 else
12571 rm -f conf$$.dir
12572 mkdir conf$$.dir 2>/dev/null
12573 fi
12574 if (echo >conf$$.file) 2>/dev/null; then
12575 if ln -s conf$$.file conf$$ 2>/dev/null; then
12576 as_ln_s='ln -s'
12577 # ... but there are two gotchas:
12578 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12579 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12580 # In both cases, we have to default to `cp -pR'.
12581 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12582 as_ln_s='cp -pR'
12583 elif ln conf$$.file conf$$ 2>/dev/null; then
12584 as_ln_s=ln
12585 else
12586 as_ln_s='cp -pR'
12587 fi
12588 else
12589 as_ln_s='cp -pR'
12590 fi
12591 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12592 rmdir conf$$.dir 2>/dev/null
12593
12594
12595 # as_fn_mkdir_p
12596 # -------------
12597 # Create "$as_dir" as a directory, including parents if necessary.
12598 as_fn_mkdir_p ()
12599 {
12600
12601 case $as_dir in #(
12602 -*) as_dir=./$as_dir;;
12603 esac
12604 test -d "$as_dir" || eval $as_mkdir_p || {
12605 as_dirs=
12606 while :; do
12607 case $as_dir in #(
12608 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12609 *) as_qdir=$as_dir;;
12610 esac
12611 as_dirs="'$as_qdir' $as_dirs"
12612 as_dir=`$as_dirname -- "$as_dir" ||
12613 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12614 X"$as_dir" : 'X\(//\)[^/]' \| \
12615 X"$as_dir" : 'X\(//\)$' \| \
12616 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12617 $as_echo X"$as_dir" |
12618 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12619 s//\1/
12620 q
12621 }
12622 /^X\(\/\/\)[^/].*/{
12623 s//\1/
12624 q
12625 }
12626 /^X\(\/\/\)$/{
12627 s//\1/
12628 q
12629 }
12630 /^X\(\/\).*/{
12631 s//\1/
12632 q
12633 }
12634 s/.*/./; q'`
12635 test -d "$as_dir" && break
12636 done
12637 test -z "$as_dirs" || eval "mkdir $as_dirs"
12638 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
12639
12640
12641 } # as_fn_mkdir_p
12642 if mkdir -p . 2>/dev/null; then
12643 as_mkdir_p='mkdir -p "$as_dir"'
12644 else
12645 test -d ./-p && rmdir ./-p
12646 as_mkdir_p=false
12647 fi
12648
12649
12650 # as_fn_executable_p FILE
12651 # -----------------------
12652 # Test if FILE is an executable regular file.
12653 as_fn_executable_p ()
12654 {
12655 test -f "$1" && test -x "$1"
12656 } # as_fn_executable_p
12657 as_test_x='test -x'
12658 as_executable_p=as_fn_executable_p
12659
12660 # Sed expression to map a string onto a valid CPP name.
12661 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12662
12663 # Sed expression to map a string onto a valid variable name.
12664 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12665
12666
12667 exec 6>&1
12668 ## ----------------------------------- ##
12669 ## Main body of $CONFIG_STATUS script. ##
12670 ## ----------------------------------- ##
12671 _ASEOF
12672 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
12673
12674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12675 # Save the log message, to keep $0 and so on meaningful, and to
12676 # report actual input values of CONFIG_FILES etc. instead of their
12677 # values after options handling.
12678 ac_log="
12679 This file was extended by pcap $as_me 1.10.2-PRE-GIT, which was
12680 generated by GNU Autoconf 2.69. Invocation command line was
12681
12682 CONFIG_FILES = $CONFIG_FILES
12683 CONFIG_HEADERS = $CONFIG_HEADERS
12684 CONFIG_LINKS = $CONFIG_LINKS
12685 CONFIG_COMMANDS = $CONFIG_COMMANDS
12686 $ $0 $@
12687
12688 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12689 "
12690
12691 _ACEOF
12692
12693 case $ac_config_files in *"
12694 "*) set x $ac_config_files; shift; ac_config_files=$*;;
12695 esac
12696
12697 case $ac_config_headers in *"
12698 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12699 esac
12700
12701
12702 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12703 # Files that config.status was made for.
12704 config_files="$ac_config_files"
12705 config_headers="$ac_config_headers"
12706 config_commands="$ac_config_commands"
12707
12708 _ACEOF
12709
12710 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12711 ac_cs_usage="\
12712 \`$as_me' instantiates files and other configuration actions
12713 from templates according to the current configuration. Unless the files
12714 and actions are specified as TAGs, all are instantiated by default.
12715
12716 Usage: $0 [OPTION]... [TAG]...
12717
12718 -h, --help print this help, then exit
12719 -V, --version print version number and configuration settings, then exit
12720 --config print configuration, then exit
12721 -q, --quiet, --silent
12722 do not print progress messages
12723 -d, --debug don't remove temporary files
12724 --recheck update $as_me by reconfiguring in the same conditions
12725 --file=FILE[:TEMPLATE]
12726 instantiate the configuration file FILE
12727 --header=FILE[:TEMPLATE]
12728 instantiate the configuration header FILE
12729
12730 Configuration files:
12731 $config_files
12732
12733 Configuration headers:
12734 $config_headers
12735
12736 Configuration commands:
12737 $config_commands
12738
12739 Report bugs to the package provider."
12740
12741 _ACEOF
12742 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12743 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
12744 ac_cs_version="\\
12745 pcap config.status 1.10.2-PRE-GIT
12746 configured by $0, generated by GNU Autoconf 2.69,
12747 with options \\"\$ac_cs_config\\"
12748
12749 Copyright (C) 2012 Free Software Foundation, Inc.
12750 This config.status script is free software; the Free Software Foundation
12751 gives unlimited permission to copy, distribute and modify it."
12752
12753 ac_pwd='$ac_pwd'
12754 srcdir='$srcdir'
12755 INSTALL='$INSTALL'
12756 test -n "\$AWK" || AWK=awk
12757 _ACEOF
12758
12759 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12760 # The default lists apply if the user does not specify any file.
12761 ac_need_defaults=:
12762 while test $# != 0
12763 do
12764 case $1 in
12765 --*=?*)
12766 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12767 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12768 ac_shift=:
12769 ;;
12770 --*=)
12771 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12772 ac_optarg=
12773 ac_shift=:
12774 ;;
12775 *)
12776 ac_option=$1
12777 ac_optarg=$2
12778 ac_shift=shift
12779 ;;
12780 esac
12781
12782 case $ac_option in
12783 # Handling of the options.
12784 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12785 ac_cs_recheck=: ;;
12786 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12787 $as_echo "$ac_cs_version"; exit ;;
12788 --config | --confi | --conf | --con | --co | --c )
12789 $as_echo "$ac_cs_config"; exit ;;
12790 --debug | --debu | --deb | --de | --d | -d )
12791 debug=: ;;
12792 --file | --fil | --fi | --f )
12793 $ac_shift
12794 case $ac_optarg in
12795 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12796 '') as_fn_error $? "missing file argument" ;;
12797 esac
12798 as_fn_append CONFIG_FILES " '$ac_optarg'"
12799 ac_need_defaults=false;;
12800 --header | --heade | --head | --hea )
12801 $ac_shift
12802 case $ac_optarg in
12803 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12804 esac
12805 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
12806 ac_need_defaults=false;;
12807 --he | --h)
12808 # Conflict between --help and --header
12809 as_fn_error $? "ambiguous option: \`$1'
12810 Try \`$0 --help' for more information.";;
12811 --help | --hel | -h )
12812 $as_echo "$ac_cs_usage"; exit ;;
12813 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12814 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12815 ac_cs_silent=: ;;
12816
12817 # This is an error.
12818 -*) as_fn_error $? "unrecognized option: \`$1'
12819 Try \`$0 --help' for more information." ;;
12820
12821 *) as_fn_append ac_config_targets " $1"
12822 ac_need_defaults=false ;;
12823
12824 esac
12825 shift
12826 done
12827
12828 ac_configure_extra_args=
12829
12830 if $ac_cs_silent; then
12831 exec 6>/dev/null
12832 ac_configure_extra_args="$ac_configure_extra_args --silent"
12833 fi
12834
12835 _ACEOF
12836 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12837 if \$ac_cs_recheck; then
12838 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12839 shift
12840 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
12841 CONFIG_SHELL='$SHELL'
12842 export CONFIG_SHELL
12843 exec "\$@"
12844 fi
12845
12846 _ACEOF
12847 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12848 exec 5>>config.log
12849 {
12850 echo
12851 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12852 ## Running $as_me. ##
12853 _ASBOX
12854 $as_echo "$ac_log"
12855 } >&5
12856
12857 _ACEOF
12858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12859 #
12860 # INIT-COMMANDS
12861 #
12862
12863
12864 _ACEOF
12865
12866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12867
12868 # Handling of arguments.
12869 for ac_config_target in $ac_config_targets
12870 do
12871 case $ac_config_target in
12872 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
12873 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
12874 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12875 "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;;
12876 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
12877 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
12878 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
12879 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
12880 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
12881 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
12882 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
12883 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
12884 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
12885 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
12886 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
12887 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
12888 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
12889 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
12890 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
12891 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
12892 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
12893 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
12894 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
12895 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
12896
12897 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
12898 esac
12899 done
12900
12901
12902 # If the user did not use the arguments to specify the items to instantiate,
12903 # then the envvar interface is used. Set only those that are not.
12904 # We use the long form for the default assignment because of an extremely
12905 # bizarre bug on SunOS 4.1.3.
12906 if $ac_need_defaults; then
12907 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12908 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12909 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12910 fi
12911
12912 # Have a temporary directory for convenience. Make it in the build tree
12913 # simply because there is no reason against having it here, and in addition,
12914 # creating and moving files from /tmp can sometimes cause problems.
12915 # Hook for its removal unless debugging.
12916 # Note that there is a small window in which the directory will not be cleaned:
12917 # after its creation but before its name has been assigned to `$tmp'.
12918 $debug ||
12919 {
12920 tmp= ac_tmp=
12921 trap 'exit_status=$?
12922 : "${ac_tmp:=$tmp}"
12923 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
12924 ' 0
12925 trap 'as_fn_exit 1' 1 2 13 15
12926 }
12927 # Create a (secure) tmp directory for tmp files.
12928
12929 {
12930 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12931 test -d "$tmp"
12932 } ||
12933 {
12934 tmp=./conf$$-$RANDOM
12935 (umask 077 && mkdir "$tmp")
12936 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
12937 ac_tmp=$tmp
12938
12939 # Set up the scripts for CONFIG_FILES section.
12940 # No need to generate them if there are no CONFIG_FILES.
12941 # This happens for instance with `./config.status config.h'.
12942 if test -n "$CONFIG_FILES"; then
12943
12944
12945 ac_cr=`echo X | tr X '\015'`
12946 # On cygwin, bash can eat \r inside `` if the user requested igncr.
12947 # But we know of no other shell where ac_cr would be empty at this
12948 # point, so we can use a bashism as a fallback.
12949 if test "x$ac_cr" = x; then
12950 eval ac_cr=\$\'\\r\'
12951 fi
12952 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
12953 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
12954 ac_cs_awk_cr='\\r'
12955 else
12956 ac_cs_awk_cr=$ac_cr
12957 fi
12958
12959 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
12960 _ACEOF
12961
12962
12963 {
12964 echo "cat >conf$$subs.awk <<_ACEOF" &&
12965 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
12966 echo "_ACEOF"
12967 } >conf$$subs.sh ||
12968 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12969 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
12970 ac_delim='%!_!# '
12971 for ac_last_try in false false false false false :; do
12972 . ./conf$$subs.sh ||
12973 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12974
12975 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
12976 if test $ac_delim_n = $ac_delim_num; then
12977 break
12978 elif $ac_last_try; then
12979 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12980 else
12981 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12982 fi
12983 done
12984 rm -f conf$$subs.sh
12985
12986 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12987 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
12988 _ACEOF
12989 sed -n '
12990 h
12991 s/^/S["/; s/!.*/"]=/
12992 p
12993 g
12994 s/^[^!]*!//
12995 :repl
12996 t repl
12997 s/'"$ac_delim"'$//
12998 t delim
12999 :nl
13000 h
13001 s/\(.\{148\}\)..*/\1/
13002 t more1
13003 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13004 p
13005 n
13006 b repl
13007 :more1
13008 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13009 p
13010 g
13011 s/.\{148\}//
13012 t nl
13013 :delim
13014 h
13015 s/\(.\{148\}\)..*/\1/
13016 t more2
13017 s/["\\]/\\&/g; s/^/"/; s/$/"/
13018 p
13019 b
13020 :more2
13021 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13022 p
13023 g
13024 s/.\{148\}//
13025 t delim
13026 ' <conf$$subs.awk | sed '
13027 /^[^""]/{
13028 N
13029 s/\n//
13030 }
13031 ' >>$CONFIG_STATUS || ac_write_fail=1
13032 rm -f conf$$subs.awk
13033 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13034 _ACAWK
13035 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
13036 for (key in S) S_is_set[key] = 1
13037 FS = "\a"
13038
13039 }
13040 {
13041 line = $ 0
13042 nfields = split(line, field, "@")
13043 substed = 0
13044 len = length(field[1])
13045 for (i = 2; i < nfields; i++) {
13046 key = field[i]
13047 keylen = length(key)
13048 if (S_is_set[key]) {
13049 value = S[key]
13050 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13051 len += length(value) + length(field[++i])
13052 substed = 1
13053 } else
13054 len += 1 + keylen
13055 }
13056
13057 print line
13058 }
13059
13060 _ACAWK
13061 _ACEOF
13062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13063 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13064 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13065 else
13066 cat
13067 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13068 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
13069 _ACEOF
13070
13071 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13072 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
13073 # trailing colons and then remove the whole line if VPATH becomes empty
13074 # (actually we leave an empty line to preserve line numbers).
13075 if test "x$srcdir" = x.; then
13076 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
13077 h
13078 s///
13079 s/^/:/
13080 s/[ ]*$/:/
13081 s/:\$(srcdir):/:/g
13082 s/:\${srcdir}:/:/g
13083 s/:@srcdir@:/:/g
13084 s/^:*//
13085 s/:*$//
13086 x
13087 s/\(=[ ]*\).*/\1/
13088 G
13089 s/\n//
13090 s/^[^=]*=[ ]*$//
13091 }'
13092 fi
13093
13094 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13095 fi # test -n "$CONFIG_FILES"
13096
13097 # Set up the scripts for CONFIG_HEADERS section.
13098 # No need to generate them if there are no CONFIG_HEADERS.
13099 # This happens for instance with `./config.status Makefile'.
13100 if test -n "$CONFIG_HEADERS"; then
13101 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
13102 BEGIN {
13103 _ACEOF
13104
13105 # Transform confdefs.h into an awk script `defines.awk', embedded as
13106 # here-document in config.status, that substitutes the proper values into
13107 # config.h.in to produce config.h.
13108
13109 # Create a delimiter string that does not exist in confdefs.h, to ease
13110 # handling of long lines.
13111 ac_delim='%!_!# '
13112 for ac_last_try in false false :; do
13113 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13114 if test -z "$ac_tt"; then
13115 break
13116 elif $ac_last_try; then
13117 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
13118 else
13119 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13120 fi
13121 done
13122
13123 # For the awk script, D is an array of macro values keyed by name,
13124 # likewise P contains macro parameters if any. Preserve backslash
13125 # newline sequences.
13126
13127 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13128 sed -n '
13129 s/.\{148\}/&'"$ac_delim"'/g
13130 t rset
13131 :rset
13132 s/^[ ]*#[ ]*define[ ][ ]*/ /
13133 t def
13134 d
13135 :def
13136 s/\\$//
13137 t bsnl
13138 s/["\\]/\\&/g
13139 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
13140 D["\1"]=" \3"/p
13141 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
13142 d
13143 :bsnl
13144 s/["\\]/\\&/g
13145 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
13146 D["\1"]=" \3\\\\\\n"\\/p
13147 t cont
13148 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13149 t cont
13150 d
13151 :cont
13152 n
13153 s/.\{148\}/&'"$ac_delim"'/g
13154 t clear
13155 :clear
13156 s/\\$//
13157 t bsnlc
13158 s/["\\]/\\&/g; s/^/"/; s/$/"/p
13159 d
13160 :bsnlc
13161 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13162 b cont
13163 ' <confdefs.h | sed '
13164 s/'"$ac_delim"'/"\\\
13165 "/g' >>$CONFIG_STATUS || ac_write_fail=1
13166
13167 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13168 for (key in D) D_is_set[key] = 1
13169 FS = "\a"
13170 }
13171 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13172 line = \$ 0
13173 split(line, arg, " ")
13174 if (arg[1] == "#") {
13175 defundef = arg[2]
13176 mac1 = arg[3]
13177 } else {
13178 defundef = substr(arg[1], 2)
13179 mac1 = arg[2]
13180 }
13181 split(mac1, mac2, "(") #)
13182 macro = mac2[1]
13183 prefix = substr(line, 1, index(line, defundef) - 1)
13184 if (D_is_set[macro]) {
13185 # Preserve the white space surrounding the "#".
13186 print prefix "define", macro P[macro] D[macro]
13187 next
13188 } else {
13189 # Replace #undef with comments. This is necessary, for example,
13190 # in the case of _POSIX_SOURCE, which is predefined and required
13191 # on some systems where configure will not decide to define it.
13192 if (defundef == "undef") {
13193 print "/*", prefix defundef, macro, "*/"
13194 next
13195 }
13196 }
13197 }
13198 { print }
13199 _ACAWK
13200 _ACEOF
13201 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13202 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13203 fi # test -n "$CONFIG_HEADERS"
13204
13205
13206 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
13207 shift
13208 for ac_tag
13209 do
13210 case $ac_tag in
13211 :[FHLC]) ac_mode=$ac_tag; continue;;
13212 esac
13213 case $ac_mode$ac_tag in
13214 :[FHL]*:*);;
13215 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
13216 :[FH]-) ac_tag=-:-;;
13217 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13218 esac
13219 ac_save_IFS=$IFS
13220 IFS=:
13221 set x $ac_tag
13222 IFS=$ac_save_IFS
13223 shift
13224 ac_file=$1
13225 shift
13226
13227 case $ac_mode in
13228 :L) ac_source=$1;;
13229 :[FH])
13230 ac_file_inputs=
13231 for ac_f
13232 do
13233 case $ac_f in
13234 -) ac_f="$ac_tmp/stdin";;
13235 *) # Look for the file first in the build tree, then in the source tree
13236 # (if the path is not absolute). The absolute path cannot be DOS-style,
13237 # because $ac_f cannot contain `:'.
13238 test -f "$ac_f" ||
13239 case $ac_f in
13240 [\\/$]*) false;;
13241 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13242 esac ||
13243 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13244 esac
13245 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13246 as_fn_append ac_file_inputs " '$ac_f'"
13247 done
13248
13249 # Let's still pretend it is `configure' which instantiates (i.e., don't
13250 # use $as_me), people would be surprised to read:
13251 # /* config.h. Generated by config.status. */
13252 configure_input='Generated from '`
13253 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13254 `' by configure.'
13255 if test x"$ac_file" != x-; then
13256 configure_input="$ac_file. $configure_input"
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13258 $as_echo "$as_me: creating $ac_file" >&6;}
13259 fi
13260 # Neutralize special characters interpreted by sed in replacement strings.
13261 case $configure_input in #(
13262 *\&* | *\|* | *\\* )
13263 ac_sed_conf_input=`$as_echo "$configure_input" |
13264 sed 's/[\\\\&|]/\\\\&/g'`;; #(
13265 *) ac_sed_conf_input=$configure_input;;
13266 esac
13267
13268 case $ac_tag in
13269 *:-:* | *:-) cat >"$ac_tmp/stdin" \
13270 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
13271 esac
13272 ;;
13273 esac
13274
13275 ac_dir=`$as_dirname -- "$ac_file" ||
13276 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13277 X"$ac_file" : 'X\(//\)[^/]' \| \
13278 X"$ac_file" : 'X\(//\)$' \| \
13279 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13280 $as_echo X"$ac_file" |
13281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13282 s//\1/
13283 q
13284 }
13285 /^X\(\/\/\)[^/].*/{
13286 s//\1/
13287 q
13288 }
13289 /^X\(\/\/\)$/{
13290 s//\1/
13291 q
13292 }
13293 /^X\(\/\).*/{
13294 s//\1/
13295 q
13296 }
13297 s/.*/./; q'`
13298 as_dir="$ac_dir"; as_fn_mkdir_p
13299 ac_builddir=.
13300
13301 case "$ac_dir" in
13302 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13303 *)
13304 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13305 # A ".." for each directory in $ac_dir_suffix.
13306 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13307 case $ac_top_builddir_sub in
13308 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13309 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13310 esac ;;
13311 esac
13312 ac_abs_top_builddir=$ac_pwd
13313 ac_abs_builddir=$ac_pwd$ac_dir_suffix
13314 # for backward compatibility:
13315 ac_top_builddir=$ac_top_build_prefix
13316
13317 case $srcdir in
13318 .) # We are building in place.
13319 ac_srcdir=.
13320 ac_top_srcdir=$ac_top_builddir_sub
13321 ac_abs_top_srcdir=$ac_pwd ;;
13322 [\\/]* | ?:[\\/]* ) # Absolute name.
13323 ac_srcdir=$srcdir$ac_dir_suffix;
13324 ac_top_srcdir=$srcdir
13325 ac_abs_top_srcdir=$srcdir ;;
13326 *) # Relative name.
13327 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13328 ac_top_srcdir=$ac_top_build_prefix$srcdir
13329 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13330 esac
13331 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13332
13333
13334 case $ac_mode in
13335 :F)
13336 #
13337 # CONFIG_FILE
13338 #
13339
13340 case $INSTALL in
13341 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13342 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13343 esac
13344 _ACEOF
13345
13346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13347 # If the template does not know about datarootdir, expand it.
13348 # FIXME: This hack should be removed a few years after 2.60.
13349 ac_datarootdir_hack=; ac_datarootdir_seen=
13350 ac_sed_dataroot='
13351 /datarootdir/ {
13352 p
13353 q
13354 }
13355 /@datadir@/p
13356 /@docdir@/p
13357 /@infodir@/p
13358 /@localedir@/p
13359 /@mandir@/p'
13360 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13361 *datarootdir*) ac_datarootdir_seen=yes;;
13362 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13364 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13365 _ACEOF
13366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13367 ac_datarootdir_hack='
13368 s&@datadir@&$datadir&g
13369 s&@docdir@&$docdir&g
13370 s&@infodir@&$infodir&g
13371 s&@localedir@&$localedir&g
13372 s&@mandir@&$mandir&g
13373 s&\\\${datarootdir}&$datarootdir&g' ;;
13374 esac
13375 _ACEOF
13376
13377 # Neutralize VPATH when `$srcdir' = `.'.
13378 # Shell code in configure.ac might set extrasub.
13379 # FIXME: do we really want to maintain this feature?
13380 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13381 ac_sed_extra="$ac_vpsub
13382 $extrasub
13383 _ACEOF
13384 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13385 :t
13386 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13387 s|@configure_input@|$ac_sed_conf_input|;t t
13388 s&@top_builddir@&$ac_top_builddir_sub&;t t
13389 s&@top_build_prefix@&$ac_top_build_prefix&;t t
13390 s&@srcdir@&$ac_srcdir&;t t
13391 s&@abs_srcdir@&$ac_abs_srcdir&;t t
13392 s&@top_srcdir@&$ac_top_srcdir&;t t
13393 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13394 s&@builddir@&$ac_builddir&;t t
13395 s&@abs_builddir@&$ac_abs_builddir&;t t
13396 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13397 s&@INSTALL@&$ac_INSTALL&;t t
13398 $ac_datarootdir_hack
13399 "
13400 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13401 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13402
13403 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13404 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13405 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
13406 "$ac_tmp/out"`; test -z "$ac_out"; } &&
13407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13408 which seems to be undefined. Please make sure it is defined" >&5
13409 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13410 which seems to be undefined. Please make sure it is defined" >&2;}
13411
13412 rm -f "$ac_tmp/stdin"
13413 case $ac_file in
13414 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13415 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13416 esac \
13417 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13418 ;;
13419 :H)
13420 #
13421 # CONFIG_HEADER
13422 #
13423 if test x"$ac_file" != x-; then
13424 {
13425 $as_echo "/* $configure_input */" \
13426 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13427 } >"$ac_tmp/config.h" \
13428 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13429 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13431 $as_echo "$as_me: $ac_file is unchanged" >&6;}
13432 else
13433 rm -f "$ac_file"
13434 mv "$ac_tmp/config.h" "$ac_file" \
13435 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13436 fi
13437 else
13438 $as_echo "/* $configure_input */" \
13439 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13440 || as_fn_error $? "could not create -" "$LINENO" 5
13441 fi
13442 ;;
13443
13444 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13445 $as_echo "$as_me: executing $ac_file commands" >&6;}
13446 ;;
13447 esac
13448
13449
13450 case $ac_file$ac_mode in
13451 "default-1":C) if test -f .devel; then
13452 echo timestamp > stamp-h
13453 cat $srcdir/Makefile-devel-adds >> Makefile
13454 make depend || exit 1
13455 fi ;;
13456
13457 esac
13458 done # for ac_tag
13459
13460
13461 as_fn_exit 0
13462 _ACEOF
13463 ac_clean_files=$ac_clean_files_save
13464
13465 test $ac_write_fail = 0 ||
13466 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13467
13468
13469 # configure is writing to config.log, and then calls config.status.
13470 # config.status does its own redirection, appending to config.log.
13471 # Unfortunately, on DOS this fails, as config.log is still kept open
13472 # by configure, so config.status won't be able to write to it; its
13473 # output is simply discarded. So we exec the FD to /dev/null,
13474 # effectively closing config.log, so it can be properly (re)opened and
13475 # appended to by config.status. When coming back to configure, we
13476 # need to make the FD available again.
13477 if test "$no_create" != yes; then
13478 ac_cs_success=:
13479 ac_config_status_args=
13480 test "$silent" = yes &&
13481 ac_config_status_args="$ac_config_status_args --quiet"
13482 exec 5>/dev/null
13483 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13484 exec 5>>config.log
13485 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13486 # would make configure fail if this is the last instruction.
13487 $ac_cs_success || as_fn_exit 1
13488 fi
13489 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13491 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13492 fi
13493
13494 exit 0