configure revision 1.1.1.11 1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for pcap 1.10.6.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7 # Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 as_nop=:
19 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20 then :
21 emulate sh
22 NULLCMD=:
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
26 setopt NO_GLOB_SUBST
27 else $as_nop
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
33 esac
34 fi
35
36
37
38 # Reset variables that may have inherited troublesome values from
39 # the environment.
40
41 # IFS needs to be set, to space, tab, and newline, in precisely that order.
42 # (If _AS_PATH_WALK were called with IFS unset, it would have the
43 # side effect of setting IFS to empty, thus disabling word splitting.)
44 # Quoting is to prevent editors from complaining about space-tab.
45 as_nl='
46 '
47 export as_nl
48 IFS=" "" $as_nl"
49
50 PS1='$ '
51 PS2='> '
52 PS4='+ '
53
54 # Ensure predictable behavior from utilities with locale-dependent output.
55 LC_ALL=C
56 export LC_ALL
57 LANGUAGE=C
58 export LANGUAGE
59
60 # We cannot yet rely on "unset" to work, but we need these variables
61 # to be unset--not just set to an empty or harmless value--now, to
62 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
63 # also avoids known problems related to "unset" and subshell syntax
64 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
66 do eval test \${$as_var+y} \
67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68 done
69
70 # Ensure that fds 0, 1, and 2 are open.
71 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
72 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
73 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
74
75 # The user is always right.
76 if ${PATH_SEPARATOR+false} :; then
77 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82 fi
83
84
85 # Find who we are. Look in the path if we contain no directory separator.
86 as_myself=
87 case $0 in #((
88 *[\\/]* ) as_myself=$0 ;;
89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90 for as_dir in $PATH
91 do
92 IFS=$as_save_IFS
93 case $as_dir in #(((
94 '') as_dir=./ ;;
95 */) ;;
96 *) as_dir=$as_dir/ ;;
97 esac
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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114
115 # Use a proper internal environment variable to ensure we don't fall
116 # into an infinite loop, continuously re-executing ourselves.
117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118 _as_can_reexec=no; export _as_can_reexec;
119 # We cannot yet assume a decent shell, so we have to provide a
120 # neutralization value for shells without unset; and this also
121 # works around shells that cannot unset nonexistent variables.
122 # Preserve -v and -x to the replacement shell.
123 BASH_ENV=/dev/null
124 ENV=/dev/null
125 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126 case $- in # ((((
127 *v*x* | *x*v* ) as_opts=-vx ;;
128 *v* ) as_opts=-v ;;
129 *x* ) as_opts=-x ;;
130 * ) as_opts= ;;
131 esac
132 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133 # Admittedly, this is quite paranoid, since all the known shells bail
134 # out after a failed `exec'.
135 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
136 exit 255
137 fi
138 # We don't want this to propagate to other subprocesses.
139 { _as_can_reexec=; unset _as_can_reexec;}
140 if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="as_nop=:
142 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
143 then :
144 emulate sh
145 NULLCMD=:
146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147 # is contrary to our usage. Disable this feature.
148 alias -g '\${1+\"\$@\"}'='\"\$@\"'
149 setopt NO_GLOB_SUBST
150 else \$as_nop
151 case \`(set -o) 2>/dev/null\` in #(
152 *posix*) :
153 set -o posix ;; #(
154 *) :
155 ;;
156 esac
157 fi
158 "
159 as_required="as_fn_return () { (exit \$1); }
160 as_fn_success () { as_fn_return 0; }
161 as_fn_failure () { as_fn_return 1; }
162 as_fn_ret_success () { return 0; }
163 as_fn_ret_failure () { return 1; }
164
165 exitcode=0
166 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
167 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
170 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
171 then :
172
173 else \$as_nop
174 exitcode=1; echo positional parameters were not saved.
175 fi
176 test x\$exitcode = x0 || exit 1
177 blah=\$(echo \$(echo blah))
178 test x\"\$blah\" = xblah || exit 1
179 test -x / || exit 1"
180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184 test \$(( 1 + 1 )) = 2 || exit 1"
185 if (eval "$as_required") 2>/dev/null
186 then :
187 as_have_required=yes
188 else $as_nop
189 as_have_required=no
190 fi
191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
192 then :
193
194 else $as_nop
195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196 as_found=false
197 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198 do
199 IFS=$as_save_IFS
200 case $as_dir in #(((
201 '') as_dir=./ ;;
202 */) ;;
203 *) as_dir=$as_dir/ ;;
204 esac
205 as_found=:
206 case $as_dir in #(
207 /*)
208 for as_base in sh bash ksh sh5; do
209 # Try only shells that exist, to save several forks.
210 as_shell=$as_dir$as_base
211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
213 then :
214 CONFIG_SHELL=$as_shell as_have_required=yes
215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
216 then :
217 break 2
218 fi
219 fi
220 done;;
221 esac
222 as_found=false
223 done
224 IFS=$as_save_IFS
225 if $as_found
226 then :
227
228 else $as_nop
229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
231 then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233 fi
234 fi
235
236
237 if test "x$CONFIG_SHELL" != x
238 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 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno
261 then :
262 printf "%s\n" "$0: This script requires a shell more modern than all"
263 printf "%s\n" "$0: the shells that I found on your system."
264 if test ${ZSH_VERSION+y} ; then
265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
267 else
268 printf "%s\n" "$0: Please tell bug-autoconf (at] gnu.org about your system,
269 $0: including any error possibly output before this
270 $0: message. Then install a modern shell, or manually run
271 $0: the script under such a shell if you do have one."
272 fi
273 exit 1
274 fi
275 fi
276 fi
277 SHELL=${CONFIG_SHELL-/bin/sh}
278 export SHELL
279 # Unset more variables known to interfere with behavior of common tools.
280 CLICOLOR_FORCE= GREP_OPTIONS=
281 unset CLICOLOR_FORCE GREP_OPTIONS
282
283 ## --------------------- ##
284 ## M4sh Shell Functions. ##
285 ## --------------------- ##
286 # as_fn_unset VAR
287 # ---------------
288 # Portably unset VAR.
289 as_fn_unset ()
290 {
291 { eval $1=; unset $1;}
292 }
293 as_unset=as_fn_unset
294
295
296 # as_fn_set_status STATUS
297 # -----------------------
298 # Set $? to STATUS, without forking.
299 as_fn_set_status ()
300 {
301 return $1
302 } # as_fn_set_status
303
304 # as_fn_exit STATUS
305 # -----------------
306 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307 as_fn_exit ()
308 {
309 set +e
310 as_fn_set_status $1
311 exit $1
312 } # as_fn_exit
313 # as_fn_nop
314 # ---------
315 # Do nothing but, unlike ":", preserve the value of $?.
316 as_fn_nop ()
317 {
318 return $?
319 }
320 as_nop=as_fn_nop
321
322 # as_fn_mkdir_p
323 # -------------
324 # Create "$as_dir" as a directory, including parents if necessary.
325 as_fn_mkdir_p ()
326 {
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
344 printf "%s\n" X"$as_dir" |
345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
366
367
368 } # as_fn_mkdir_p
369
370 # as_fn_executable_p FILE
371 # -----------------------
372 # Test if FILE is an executable regular file.
373 as_fn_executable_p ()
374 {
375 test -f "$1" && test -x "$1"
376 } # as_fn_executable_p
377 # as_fn_append VAR VALUE
378 # ----------------------
379 # Append the text in VALUE to the end of the definition contained in VAR. Take
380 # advantage of any shell optimizations that allow amortized linear growth over
381 # repeated appends, instead of the typical quadratic growth present in naive
382 # implementations.
383 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384 then :
385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
389 else $as_nop
390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402 then :
403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
407 else $as_nop
408 as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 }
412 fi # as_fn_arith
413
414 # as_fn_nop
415 # ---------
416 # Do nothing but, unlike ":", preserve the value of $?.
417 as_fn_nop ()
418 {
419 return $?
420 }
421 as_nop=as_fn_nop
422
423 # as_fn_error STATUS ERROR [LINENO LOG_FD]
424 # ----------------------------------------
425 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
427 # script with STATUS, using 1 if that was 0.
428 as_fn_error ()
429 {
430 as_status=$1; test $as_status -eq 0 && as_status=1
431 if test "$4"; then
432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
434 fi
435 printf "%s\n" "$as_me: error: $2" >&2
436 as_fn_exit $as_status
437 } # as_fn_error
438
439 if expr a : '\(a\)' >/dev/null 2>&1 &&
440 test "X`expr 00001 : '.*\(...\)'`" = X001; then
441 as_expr=expr
442 else
443 as_expr=false
444 fi
445
446 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
447 as_basename=basename
448 else
449 as_basename=false
450 fi
451
452 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453 as_dirname=dirname
454 else
455 as_dirname=false
456 fi
457
458 as_me=`$as_basename -- "$0" ||
459 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460 X"$0" : 'X\(//\)$' \| \
461 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
462 printf "%s\n" X/"$0" |
463 sed '/^.*\/\([^/][^/]*\)\/*$/{
464 s//\1/
465 q
466 }
467 /^X\/\(\/\/\)$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\).*/{
472 s//\1/
473 q
474 }
475 s/.*/./; q'`
476
477 # Avoid depending upon Character Ranges.
478 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
479 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
481 as_cr_digits='0123456789'
482 as_cr_alnum=$as_cr_Letters$as_cr_digits
483
484
485 as_lineno_1=$LINENO as_lineno_1a=$LINENO
486 as_lineno_2=$LINENO as_lineno_2a=$LINENO
487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
490 sed -n '
491 p
492 /[$]LINENO/=
493 ' <$as_myself |
494 sed '
495 s/[$]LINENO.*/&-/
496 t lineno
497 b
498 :lineno
499 N
500 :loop
501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
502 t loop
503 s/-\n.*//
504 ' >$as_me.lineno &&
505 chmod +x "$as_me.lineno" ||
506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
507
508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509 # already done that, so ensure we don't try to do so again and fall
510 # in an infinite loop. This has already happened in practice.
511 _as_can_reexec=no; export _as_can_reexec
512 # Don't try to exec as it changes $[0], causing all sort of problems
513 # (the dirname of $[0] is not the place where we might find the
514 # original and so on. Autoconf is especially sensitive to this).
515 . "./$as_me.lineno"
516 # Exit status is that of the last command.
517 exit
518 }
519
520
521 # Determine whether it's possible to make 'echo' print without a newline.
522 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
523 # for compatibility with existing Makefiles.
524 ECHO_C= ECHO_N= ECHO_T=
525 case `echo -n x` in #(((((
526 -n*)
527 case `echo 'xy\c'` in
528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
529 xy) ECHO_C='\c';;
530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
531 ECHO_T=' ';;
532 esac;;
533 *)
534 ECHO_N='-n';;
535 esac
536
537 # For backward compatibility with old third-party macros, we provide
538 # the shell variables $as_echo and $as_echo_n. New code should use
539 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
540 as_echo='printf %s\n'
541 as_echo_n='printf %s'
542
543
544 rm -f conf$$ conf$$.exe conf$$.file
545 if test -d conf$$.dir; then
546 rm -f conf$$.dir/conf$$.file
547 else
548 rm -f conf$$.dir
549 mkdir conf$$.dir 2>/dev/null
550 fi
551 if (echo >conf$$.file) 2>/dev/null; then
552 if ln -s conf$$.file conf$$ 2>/dev/null; then
553 as_ln_s='ln -s'
554 # ... but there are two gotchas:
555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
557 # In both cases, we have to default to `cp -pR'.
558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
559 as_ln_s='cp -pR'
560 elif ln conf$$.file conf$$ 2>/dev/null; then
561 as_ln_s=ln
562 else
563 as_ln_s='cp -pR'
564 fi
565 else
566 as_ln_s='cp -pR'
567 fi
568 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569 rmdir conf$$.dir 2>/dev/null
570
571 if mkdir -p . 2>/dev/null; then
572 as_mkdir_p='mkdir -p "$as_dir"'
573 else
574 test -d ./-p && rmdir ./-p
575 as_mkdir_p=false
576 fi
577
578 as_test_x='test -x'
579 as_executable_p=as_fn_executable_p
580
581 # Sed expression to map a string onto a valid CPP name.
582 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583
584 # Sed expression to map a string onto a valid variable name.
585 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586
587
588 test -n "$DJDIR" || exec 7<&0 </dev/null
589 exec 6>&1
590
591 # Name of the host.
592 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
593 # so uname gets run too.
594 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595
596 #
597 # Initializations.
598 #
599 ac_default_prefix=/usr/local
600 ac_clean_files=
601 ac_config_libobj_dir=.
602 LIBOBJS=
603 cross_compiling=no
604 subdirs=
605 MFLAGS=
606 MAKEFLAGS=
607
608 # Identity of this package.
609 PACKAGE_NAME='pcap'
610 PACKAGE_TARNAME='pcap'
611 PACKAGE_VERSION='1.10.6'
612 PACKAGE_STRING='pcap 1.10.6'
613 PACKAGE_BUGREPORT=''
614 PACKAGE_URL=''
615
616 ac_unique_file="pcap.c"
617 # Factoring default headers for most tests.
618 ac_includes_default="\
619 #include <stddef.h>
620 #ifdef HAVE_STDIO_H
621 # include <stdio.h>
622 #endif
623 #ifdef HAVE_STDLIB_H
624 # include <stdlib.h>
625 #endif
626 #ifdef HAVE_STRING_H
627 # include <string.h>
628 #endif
629 #ifdef HAVE_INTTYPES_H
630 # include <inttypes.h>
631 #endif
632 #ifdef HAVE_STDINT_H
633 # include <stdint.h>
634 #endif
635 #ifdef HAVE_STRINGS_H
636 # include <strings.h>
637 #endif
638 #ifdef HAVE_SYS_TYPES_H
639 # include <sys/types.h>
640 #endif
641 #ifdef HAVE_SYS_STAT_H
642 # include <sys/stat.h>
643 #endif
644 #ifdef HAVE_UNISTD_H
645 # include <unistd.h>
646 #endif"
647
648 ac_header_c_list=
649 ac_subst_vars='LTLIBOBJS
650 RPCAPD_LIBS
651 INSTALL_RPCAPD
652 BUILD_RPCAPD
653 PTHREAD_LIBS
654 REMOTE_C_SRC
655 MODULE_C_SRC
656 PLATFORM_C_SRC
657 ADDLARCHIVEOBJS
658 ADDLOBJS
659 RPATH
660 V_SONAME_OPT
661 V_SHLIB_OPT
662 V_SHLIB_CMD
663 V_SHLIB_CCOPT
664 INSTALL_DATA
665 INSTALL_SCRIPT
666 INSTALL_PROGRAM
667 PCAP_SUPPORT_RDMASNIFF
668 LIBIBVERBS_LIBS_STATIC
669 LIBIBVERBS_LIBS
670 LIBIBVERBS_CFLAGS
671 PCAP_SUPPORT_DBUS
672 DBUS_LIBS_STATIC
673 DBUS_LIBS
674 DBUS_CFLAGS
675 PCAP_SUPPORT_BT
676 PCAP_SUPPORT_DPDK
677 DPDK_LIBS_STATIC
678 DPDK_LIBS
679 DPDK_CFLAGS
680 PCAP_SUPPORT_NETMAP
681 PCAP_SUPPORT_NETFILTER
682 PCAP_SUPPORT_LINUX_USBMON
683 MKDEP
684 DEPENDENCY_CFLAG
685 LN_S
686 AR
687 RANLIB
688 MAN_ADMIN_COMMANDS
689 MAN_MISC_INFO
690 MAN_FILE_FORMATS
691 MAN_DEVICES
692 DYEXT
693 V_PROG_LDFLAGS_FAT
694 V_PROG_CCOPT_FAT
695 V_LIB_LDFLAGS_FAT
696 V_LIB_CCOPT_FAT
697 REENTRANT_PARSER
698 BISON_BYACC
699 LEXLIB
700 LEX_OUTPUT_ROOT
701 LEX
702 OPENSSL_LIBS_STATIC
703 OPENSSL_LIBS
704 OPENSSL_CFLAGS
705 LIBNL_LIBS_STATIC
706 LIBNL_LIBS
707 LIBNL_CFLAGS
708 BREW
709 PKG_CONFIG_LIBDIR
710 PKG_CONFIG_PATH
711 PKG_CONFIG
712 VALGRINDTEST_SRC
713 LIBOBJS
714 OBJEXT
715 EXEEXT
716 ac_ct_CC
717 CPPFLAGS
718 LDFLAGS
719 CFLAGS
720 CC
721 SHLICC2
722 target_os
723 target_vendor
724 target_cpu
725 target
726 host_os
727 host_vendor
728 host_cpu
729 host
730 build_os
731 build_vendor
732 build_cpu
733 build
734 LIBS_PRIVATE
735 REQUIRES_PRIVATE
736 LIBS_STATIC
737 V_INCLS
738 V_DEFS
739 V_CCOPT
740 target_alias
741 host_alias
742 build_alias
743 LIBS
744 ECHO_T
745 ECHO_N
746 ECHO_C
747 DEFS
748 mandir
749 localedir
750 libdir
751 psdir
752 pdfdir
753 dvidir
754 htmldir
755 infodir
756 docdir
757 oldincludedir
758 includedir
759 runstatedir
760 localstatedir
761 sharedstatedir
762 sysconfdir
763 datadir
764 datarootdir
765 libexecdir
766 sbindir
767 bindir
768 program_transform_name
769 prefix
770 exec_prefix
771 PACKAGE_URL
772 PACKAGE_BUGREPORT
773 PACKAGE_STRING
774 PACKAGE_VERSION
775 PACKAGE_TARNAME
776 PACKAGE_NAME
777 PATH_SEPARATOR
778 SHELL'
779 ac_subst_files=''
780 ac_user_opts='
781 enable_option_checking
782 with_gcc
783 enable_largefile
784 enable_instrument_functions
785 enable_protochain
786 with_pcap
787 with_libnl
788 enable_ipv6
789 with_dag
790 with_dag_includes
791 with_dag_libraries
792 with_septel
793 with_snf
794 with_snf_includes
795 with_snf_libraries
796 with_turbocap
797 enable_remote
798 enable_optimizer_dbg
799 enable_yydebug
800 enable_universal
801 enable_shared
802 enable_usb
803 enable_netmap
804 with_dpdk
805 enable_bluetooth
806 enable_dbus
807 enable_rdma
808 '
809 ac_precious_vars='build_alias
810 host_alias
811 target_alias
812 CC
813 CFLAGS
814 LDFLAGS
815 LIBS
816 CPPFLAGS
817 PKG_CONFIG
818 PKG_CONFIG_PATH
819 PKG_CONFIG_LIBDIR
820 LIBNL_CFLAGS
821 LIBNL_LIBS
822 LIBNL_LIBS_STATIC
823 OPENSSL_CFLAGS
824 OPENSSL_LIBS
825 OPENSSL_LIBS_STATIC
826 DPDK_CFLAGS
827 DPDK_LIBS
828 DPDK_LIBS_STATIC
829 DBUS_CFLAGS
830 DBUS_LIBS
831 DBUS_LIBS_STATIC
832 LIBIBVERBS_CFLAGS
833 LIBIBVERBS_LIBS
834 LIBIBVERBS_LIBS_STATIC'
835
836
837 # Initialize some variables set by options.
838 ac_init_help=
839 ac_init_version=false
840 ac_unrecognized_opts=
841 ac_unrecognized_sep=
842 # The variables have the same names as the options, with
843 # dashes changed to underlines.
844 cache_file=/dev/null
845 exec_prefix=NONE
846 no_create=
847 no_recursion=
848 prefix=NONE
849 program_prefix=NONE
850 program_suffix=NONE
851 program_transform_name=s,x,x,
852 silent=
853 site=
854 srcdir=
855 verbose=
856 x_includes=NONE
857 x_libraries=NONE
858
859 # Installation directory options.
860 # These are left unexpanded so users can "make install exec_prefix=/foo"
861 # and all the variables that are supposed to be based on exec_prefix
862 # by default will actually change.
863 # Use braces instead of parens because sh, perl, etc. also accept them.
864 # (The list follows the same order as the GNU Coding Standards.)
865 bindir='${exec_prefix}/bin'
866 sbindir='${exec_prefix}/sbin'
867 libexecdir='${exec_prefix}/libexec'
868 datarootdir='${prefix}/share'
869 datadir='${datarootdir}'
870 sysconfdir='${prefix}/etc'
871 sharedstatedir='${prefix}/com'
872 localstatedir='${prefix}/var'
873 runstatedir='${localstatedir}/run'
874 includedir='${prefix}/include'
875 oldincludedir='/usr/include'
876 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
877 infodir='${datarootdir}/info'
878 htmldir='${docdir}'
879 dvidir='${docdir}'
880 pdfdir='${docdir}'
881 psdir='${docdir}'
882 libdir='${exec_prefix}/lib'
883 localedir='${datarootdir}/locale'
884 mandir='${datarootdir}/man'
885
886 ac_prev=
887 ac_dashdash=
888 for ac_option
889 do
890 # If the previous option needs an argument, assign it.
891 if test -n "$ac_prev"; then
892 eval $ac_prev=\$ac_option
893 ac_prev=
894 continue
895 fi
896
897 case $ac_option in
898 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
899 *=) ac_optarg= ;;
900 *) ac_optarg=yes ;;
901 esac
902
903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
906
907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
910 bindir=$ac_optarg ;;
911
912 -build | --build | --buil | --bui | --bu)
913 ac_prev=build_alias ;;
914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
915 build_alias=$ac_optarg ;;
916
917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
922 cache_file=$ac_optarg ;;
923
924 --config-cache | -C)
925 cache_file=config.cache ;;
926
927 -datadir | --datadir | --datadi | --datad)
928 ac_prev=datadir ;;
929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
930 datadir=$ac_optarg ;;
931
932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
938
939 -disable-* | --disable-*)
940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
941 # Reject names that are not valid shell variable names.
942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
943 as_fn_error $? "invalid feature name: \`$ac_useropt'"
944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948 "enable_$ac_useropt"
949 "*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=no ;;
954
955 -docdir | --docdir | --docdi | --doc | --do)
956 ac_prev=docdir ;;
957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
958 docdir=$ac_optarg ;;
959
960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
961 ac_prev=dvidir ;;
962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
963 dvidir=$ac_optarg ;;
964
965 -enable-* | --enable-*)
966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
967 # Reject names that are not valid shell variable names.
968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969 as_fn_error $? "invalid feature name: \`$ac_useropt'"
970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974 "enable_$ac_useropt"
975 "*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=\$ac_optarg ;;
980
981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
983 | --exec | --exe | --ex)
984 ac_prev=exec_prefix ;;
985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
987 | --exec=* | --exe=* | --ex=*)
988 exec_prefix=$ac_optarg ;;
989
990 -gas | --gas | --ga | --g)
991 # Obsolete; use --with-gas.
992 with_gas=yes ;;
993
994 -help | --help | --hel | --he | -h)
995 ac_init_help=long ;;
996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
997 ac_init_help=recursive ;;
998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
999 ac_init_help=short ;;
1000
1001 -host | --host | --hos | --ho)
1002 ac_prev=host_alias ;;
1003 -host=* | --host=* | --hos=* | --ho=*)
1004 host_alias=$ac_optarg ;;
1005
1006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1007 ac_prev=htmldir ;;
1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1009 | --ht=*)
1010 htmldir=$ac_optarg ;;
1011
1012 -includedir | --includedir | --includedi | --included | --include \
1013 | --includ | --inclu | --incl | --inc)
1014 ac_prev=includedir ;;
1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1016 | --includ=* | --inclu=* | --incl=* | --inc=*)
1017 includedir=$ac_optarg ;;
1018
1019 -infodir | --infodir | --infodi | --infod | --info | --inf)
1020 ac_prev=infodir ;;
1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1022 infodir=$ac_optarg ;;
1023
1024 -libdir | --libdir | --libdi | --libd)
1025 ac_prev=libdir ;;
1026 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1027 libdir=$ac_optarg ;;
1028
1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1030 | --libexe | --libex | --libe)
1031 ac_prev=libexecdir ;;
1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1033 | --libexe=* | --libex=* | --libe=*)
1034 libexecdir=$ac_optarg ;;
1035
1036 -localedir | --localedir | --localedi | --localed | --locale)
1037 ac_prev=localedir ;;
1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1039 localedir=$ac_optarg ;;
1040
1041 -localstatedir | --localstatedir | --localstatedi | --localstated \
1042 | --localstate | --localstat | --localsta | --localst | --locals)
1043 ac_prev=localstatedir ;;
1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1046 localstatedir=$ac_optarg ;;
1047
1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1049 ac_prev=mandir ;;
1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1051 mandir=$ac_optarg ;;
1052
1053 -nfp | --nfp | --nf)
1054 # Obsolete; use --without-fp.
1055 with_fp=no ;;
1056
1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1058 | --no-cr | --no-c | -n)
1059 no_create=yes ;;
1060
1061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1063 no_recursion=yes ;;
1064
1065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1067 | --oldin | --oldi | --old | --ol | --o)
1068 ac_prev=oldincludedir ;;
1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1072 oldincludedir=$ac_optarg ;;
1073
1074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1075 ac_prev=prefix ;;
1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1077 prefix=$ac_optarg ;;
1078
1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1080 | --program-pre | --program-pr | --program-p)
1081 ac_prev=program_prefix ;;
1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1084 program_prefix=$ac_optarg ;;
1085
1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1087 | --program-suf | --program-su | --program-s)
1088 ac_prev=program_suffix ;;
1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1091 program_suffix=$ac_optarg ;;
1092
1093 -program-transform-name | --program-transform-name \
1094 | --program-transform-nam | --program-transform-na \
1095 | --program-transform-n | --program-transform- \
1096 | --program-transform | --program-transfor \
1097 | --program-transfo | --program-transf \
1098 | --program-trans | --program-tran \
1099 | --progr-tra | --program-tr | --program-t)
1100 ac_prev=program_transform_name ;;
1101 -program-transform-name=* | --program-transform-name=* \
1102 | --program-transform-nam=* | --program-transform-na=* \
1103 | --program-transform-n=* | --program-transform-=* \
1104 | --program-transform=* | --program-transfor=* \
1105 | --program-transfo=* | --program-transf=* \
1106 | --program-trans=* | --program-tran=* \
1107 | --progr-tra=* | --program-tr=* | --program-t=*)
1108 program_transform_name=$ac_optarg ;;
1109
1110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1111 ac_prev=pdfdir ;;
1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1113 pdfdir=$ac_optarg ;;
1114
1115 -psdir | --psdir | --psdi | --psd | --ps)
1116 ac_prev=psdir ;;
1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1118 psdir=$ac_optarg ;;
1119
1120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1121 | -silent | --silent | --silen | --sile | --sil)
1122 silent=yes ;;
1123
1124 -runstatedir | --runstatedir | --runstatedi | --runstated \
1125 | --runstate | --runstat | --runsta | --runst | --runs \
1126 | --run | --ru | --r)
1127 ac_prev=runstatedir ;;
1128 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1129 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1130 | --run=* | --ru=* | --r=*)
1131 runstatedir=$ac_optarg ;;
1132
1133 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1134 ac_prev=sbindir ;;
1135 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1136 | --sbi=* | --sb=*)
1137 sbindir=$ac_optarg ;;
1138
1139 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1140 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1141 | --sharedst | --shareds | --shared | --share | --shar \
1142 | --sha | --sh)
1143 ac_prev=sharedstatedir ;;
1144 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1145 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1146 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1147 | --sha=* | --sh=*)
1148 sharedstatedir=$ac_optarg ;;
1149
1150 -site | --site | --sit)
1151 ac_prev=site ;;
1152 -site=* | --site=* | --sit=*)
1153 site=$ac_optarg ;;
1154
1155 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1156 ac_prev=srcdir ;;
1157 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1158 srcdir=$ac_optarg ;;
1159
1160 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1161 | --syscon | --sysco | --sysc | --sys | --sy)
1162 ac_prev=sysconfdir ;;
1163 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1164 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1165 sysconfdir=$ac_optarg ;;
1166
1167 -target | --target | --targe | --targ | --tar | --ta | --t)
1168 ac_prev=target_alias ;;
1169 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1170 target_alias=$ac_optarg ;;
1171
1172 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1173 verbose=yes ;;
1174
1175 -version | --version | --versio | --versi | --vers | -V)
1176 ac_init_version=: ;;
1177
1178 -with-* | --with-*)
1179 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1180 # Reject names that are not valid shell variable names.
1181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1182 as_fn_error $? "invalid package name: \`$ac_useropt'"
1183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187 "with_$ac_useropt"
1188 "*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=\$ac_optarg ;;
1193
1194 -without-* | --without-*)
1195 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1196 # Reject names that are not valid shell variable names.
1197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1198 as_fn_error $? "invalid package name: \`$ac_useropt'"
1199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203 "with_$ac_useropt"
1204 "*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=no ;;
1209
1210 --x)
1211 # Obsolete; use --with-x.
1212 with_x=yes ;;
1213
1214 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1215 | --x-incl | --x-inc | --x-in | --x-i)
1216 ac_prev=x_includes ;;
1217 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1218 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1219 x_includes=$ac_optarg ;;
1220
1221 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1222 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1223 ac_prev=x_libraries ;;
1224 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1225 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1226 x_libraries=$ac_optarg ;;
1227
1228 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1229 Try \`$0 --help' for more information"
1230 ;;
1231
1232 *=*)
1233 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1234 # Reject names that are not valid shell variable names.
1235 case $ac_envvar in #(
1236 '' | [0-9]* | *[!_$as_cr_alnum]* )
1237 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1238 esac
1239 eval $ac_envvar=\$ac_optarg
1240 export $ac_envvar ;;
1241
1242 *)
1243 # FIXME: should be removed in autoconf 3.0.
1244 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1245 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1246 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1247 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1248 ;;
1249
1250 esac
1251 done
1252
1253 if test -n "$ac_prev"; then
1254 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1255 as_fn_error $? "missing argument to $ac_option"
1256 fi
1257
1258 if test -n "$ac_unrecognized_opts"; then
1259 case $enable_option_checking in
1260 no) ;;
1261 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1262 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1263 esac
1264 fi
1265
1266 # Check all directory arguments for consistency.
1267 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1268 datadir sysconfdir sharedstatedir localstatedir includedir \
1269 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1270 libdir localedir mandir runstatedir
1271 do
1272 eval ac_val=\$$ac_var
1273 # Remove trailing slashes.
1274 case $ac_val in
1275 */ )
1276 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1277 eval $ac_var=\$ac_val;;
1278 esac
1279 # Be sure to have absolute directory names.
1280 case $ac_val in
1281 [\\/$]* | ?:[\\/]* ) continue;;
1282 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1283 esac
1284 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1285 done
1286
1287 # There might be people who depend on the old broken behavior: `$host'
1288 # used to hold the argument of --host etc.
1289 # FIXME: To remove some day.
1290 build=$build_alias
1291 host=$host_alias
1292 target=$target_alias
1293
1294 # FIXME: To remove some day.
1295 if test "x$host_alias" != x; then
1296 if test "x$build_alias" = x; then
1297 cross_compiling=maybe
1298 elif test "x$build_alias" != "x$host_alias"; then
1299 cross_compiling=yes
1300 fi
1301 fi
1302
1303 ac_tool_prefix=
1304 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1305
1306 test "$silent" = yes && exec 6>/dev/null
1307
1308
1309 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1310 ac_ls_di=`ls -di .` &&
1311 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1312 as_fn_error $? "working directory cannot be determined"
1313 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1314 as_fn_error $? "pwd does not report name of working directory"
1315
1316
1317 # Find the source files, if location was not specified.
1318 if test -z "$srcdir"; then
1319 ac_srcdir_defaulted=yes
1320 # Try the directory containing this script, then the parent directory.
1321 ac_confdir=`$as_dirname -- "$as_myself" ||
1322 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1323 X"$as_myself" : 'X\(//\)[^/]' \| \
1324 X"$as_myself" : 'X\(//\)$' \| \
1325 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1326 printf "%s\n" X"$as_myself" |
1327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\/\)[^/].*/{
1332 s//\1/
1333 q
1334 }
1335 /^X\(\/\/\)$/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\).*/{
1340 s//\1/
1341 q
1342 }
1343 s/.*/./; q'`
1344 srcdir=$ac_confdir
1345 if test ! -r "$srcdir/$ac_unique_file"; then
1346 srcdir=..
1347 fi
1348 else
1349 ac_srcdir_defaulted=no
1350 fi
1351 if test ! -r "$srcdir/$ac_unique_file"; then
1352 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1353 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1354 fi
1355 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1356 ac_abs_confdir=`(
1357 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1358 pwd)`
1359 # When building in place, set srcdir=.
1360 if test "$ac_abs_confdir" = "$ac_pwd"; then
1361 srcdir=.
1362 fi
1363 # Remove unnecessary trailing slashes from srcdir.
1364 # Double slashes in file names in object file debugging info
1365 # mess up M-x gdb in Emacs.
1366 case $srcdir in
1367 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1368 esac
1369 for ac_var in $ac_precious_vars; do
1370 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1371 eval ac_env_${ac_var}_value=\$${ac_var}
1372 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1373 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1374 done
1375
1376 #
1377 # Report the --help message.
1378 #
1379 if test "$ac_init_help" = "long"; then
1380 # Omit some internal or obsolete options to make the list less imposing.
1381 # This message is too long to be a string in the A/UX 3.1 sh.
1382 cat <<_ACEOF
1383 \`configure' configures pcap 1.10.6 to adapt to many kinds of systems.
1384
1385 Usage: $0 [OPTION]... [VAR=VALUE]...
1386
1387 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1388 VAR=VALUE. See below for descriptions of some of the useful variables.
1389
1390 Defaults for the options are specified in brackets.
1391
1392 Configuration:
1393 -h, --help display this help and exit
1394 --help=short display options specific to this package
1395 --help=recursive display the short help of all the included packages
1396 -V, --version display version information and exit
1397 -q, --quiet, --silent do not print \`checking ...' messages
1398 --cache-file=FILE cache test results in FILE [disabled]
1399 -C, --config-cache alias for \`--cache-file=config.cache'
1400 -n, --no-create do not create output files
1401 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1402
1403 Installation directories:
1404 --prefix=PREFIX install architecture-independent files in PREFIX
1405 [$ac_default_prefix]
1406 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1407 [PREFIX]
1408
1409 By default, \`make install' will install all the files in
1410 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1411 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1412 for instance \`--prefix=\$HOME'.
1413
1414 For better control, use the options below.
1415
1416 Fine tuning of the installation directories:
1417 --bindir=DIR user executables [EPREFIX/bin]
1418 --sbindir=DIR system admin executables [EPREFIX/sbin]
1419 --libexecdir=DIR program executables [EPREFIX/libexec]
1420 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1421 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1422 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1423 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1424 --libdir=DIR object code libraries [EPREFIX/lib]
1425 --includedir=DIR C header files [PREFIX/include]
1426 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1427 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1428 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1429 --infodir=DIR info documentation [DATAROOTDIR/info]
1430 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1431 --mandir=DIR man documentation [DATAROOTDIR/man]
1432 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap]
1433 --htmldir=DIR html documentation [DOCDIR]
1434 --dvidir=DIR dvi documentation [DOCDIR]
1435 --pdfdir=DIR pdf documentation [DOCDIR]
1436 --psdir=DIR ps documentation [DOCDIR]
1437 _ACEOF
1438
1439 cat <<\_ACEOF
1440
1441 System types:
1442 --build=BUILD configure for building on BUILD [guessed]
1443 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1444 --target=TARGET configure for building compilers for TARGET [HOST]
1445 _ACEOF
1446 fi
1447
1448 if test -n "$ac_init_help"; then
1449 case $ac_init_help in
1450 short | recursive ) echo "Configuration of pcap 1.10.6:";;
1451 esac
1452 cat <<\_ACEOF
1453
1454 Optional Features:
1455 --disable-option-checking ignore unrecognized --enable/--with options
1456 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1457 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1458 --disable-largefile omit support for large files
1459 --enable-instrument-functions
1460 enable instrument functions code [default=no]
1461 --disable-protochain disable \"protochain\" insn
1462 --enable-ipv6 build IPv6-capable version [default=yes]
1463 --enable-remote enable remote packet capture [default=no]
1464 --enable-optimizer-dbg build optimizer debugging code
1465 --enable-yydebug build parser debugging code
1466 --disable-universal don't build universal on macOS
1467 --enable-shared build shared libraries [default=yes, if support
1468 available]
1469 --enable-usb enable Linux usbmon USB capture support
1470 [default=yes, if support available]
1471 --enable-netmap enable netmap support [default=yes, if support
1472 available]
1473 --enable-bluetooth enable Bluetooth support [default=yes, if support
1474 available]
1475 --enable-dbus enable D-Bus capture support [default=yes, if
1476 support available]
1477 --enable-rdma enable RDMA capture support [default=yes, if support
1478 available]
1479
1480 Optional Packages:
1481 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1482 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1483 --without-gcc don't use gcc
1484 --with-pcap=TYPE use packet capture TYPE
1485 --without-libnl disable libnl support [default=yes, on Linux, if
1486 present]
1487 --with-dag[=DIR] include Endace DAG support (located in directory
1488 DIR, if supplied). [default=yes, if present]
1489 --with-dag-includes=IDIR
1490 Endace DAG include directory, if not DIR/include
1491 --with-dag-libraries=LDIR
1492 Endace DAG library directory, if not DIR/lib
1493 --with-septel[=DIR] include Septel support (located in directory DIR, if
1494 supplied). [default=yes, if present]
1495 --with-snf[=DIR] include Myricom SNF support (located in directory
1496 DIR, if supplied). [default=yes, if present]
1497 --with-snf-includes=IDIR
1498 Myricom SNF include directory, if not DIR/include
1499 --with-snf-libraries=LDIR
1500 Myricom SNF library directory, if not DIR/lib
1501 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1502 directory DIR, if supplied). [default=yes, if
1503 present]
1504 --with-dpdk[=DIR] include DPDK support (located in directory DIR, if
1505 supplied). [default=no]
1506
1507 Some influential environment variables:
1508 CC C compiler command
1509 CFLAGS C compiler flags
1510 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1511 nonstandard directory <lib dir>
1512 LIBS libraries to pass to the linker, e.g. -l<library>
1513 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1514 you have headers in a nonstandard directory <include dir>
1515 PKG_CONFIG path to pkg-config utility
1516 PKG_CONFIG_PATH
1517 directories to add to pkg-config's search path
1518 PKG_CONFIG_LIBDIR
1519 path overriding pkg-config's built-in search path
1520 LIBNL_CFLAGS
1521 C compiler flags for libnl-genl-3.0, overriding pkg-config
1522 LIBNL_LIBS linker flags for libnl-genl-3.0, overriding pkg-config
1523 LIBNL_LIBS_STATIC
1524 static-link linker flags for libnl-genl-3.0, overriding
1525 pkg-config
1526 OPENSSL_CFLAGS
1527 C compiler flags for openssl, overriding pkg-config
1528 OPENSSL_LIBS
1529 linker flags for openssl, overriding pkg-config
1530 OPENSSL_LIBS_STATIC
1531 static-link linker flags for openssl, overriding pkg-config
1532 DPDK_CFLAGS C compiler flags for libdpdk, overriding pkg-config
1533 DPDK_LIBS linker flags for libdpdk, overriding pkg-config
1534 DPDK_LIBS_STATIC
1535 static-link linker flags for libdpdk, overriding pkg-config
1536 DBUS_CFLAGS C compiler flags for dbus-1, overriding pkg-config
1537 DBUS_LIBS linker flags for dbus-1, overriding pkg-config
1538 DBUS_LIBS_STATIC
1539 static-link linker flags for dbus-1, overriding pkg-config
1540 LIBIBVERBS_CFLAGS
1541 C compiler flags for libibverbs, overriding pkg-config
1542 LIBIBVERBS_LIBS
1543 linker flags for libibverbs, overriding pkg-config
1544 LIBIBVERBS_LIBS_STATIC
1545 static-link linker flags for libibverbs, overriding pkg-config
1546
1547 Use these variables to override the choices made by `configure' or to help
1548 it to find libraries and programs with nonstandard names/locations.
1549
1550 Report bugs to the package provider.
1551 _ACEOF
1552 ac_status=$?
1553 fi
1554
1555 if test "$ac_init_help" = "recursive"; then
1556 # If there are subdirs, report their specific --help.
1557 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1558 test -d "$ac_dir" ||
1559 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1560 continue
1561 ac_builddir=.
1562
1563 case "$ac_dir" in
1564 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565 *)
1566 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1567 # A ".." for each directory in $ac_dir_suffix.
1568 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1569 case $ac_top_builddir_sub in
1570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1572 esac ;;
1573 esac
1574 ac_abs_top_builddir=$ac_pwd
1575 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1576 # for backward compatibility:
1577 ac_top_builddir=$ac_top_build_prefix
1578
1579 case $srcdir in
1580 .) # We are building in place.
1581 ac_srcdir=.
1582 ac_top_srcdir=$ac_top_builddir_sub
1583 ac_abs_top_srcdir=$ac_pwd ;;
1584 [\\/]* | ?:[\\/]* ) # Absolute name.
1585 ac_srcdir=$srcdir$ac_dir_suffix;
1586 ac_top_srcdir=$srcdir
1587 ac_abs_top_srcdir=$srcdir ;;
1588 *) # Relative name.
1589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1590 ac_top_srcdir=$ac_top_build_prefix$srcdir
1591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1592 esac
1593 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1594
1595 cd "$ac_dir" || { ac_status=$?; continue; }
1596 # Check for configure.gnu first; this name is used for a wrapper for
1597 # Metaconfig's "Configure" on case-insensitive file systems.
1598 if test -f "$ac_srcdir/configure.gnu"; then
1599 echo &&
1600 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1601 elif test -f "$ac_srcdir/configure"; then
1602 echo &&
1603 $SHELL "$ac_srcdir/configure" --help=recursive
1604 else
1605 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1606 fi || ac_status=$?
1607 cd "$ac_pwd" || { ac_status=$?; break; }
1608 done
1609 fi
1610
1611 test -n "$ac_init_help" && exit $ac_status
1612 if $ac_init_version; then
1613 cat <<\_ACEOF
1614 pcap configure 1.10.6
1615 generated by GNU Autoconf 2.71
1616
1617 Copyright (C) 2021 Free Software Foundation, Inc.
1618 This configure script is free software; the Free Software Foundation
1619 gives unlimited permission to copy, distribute and modify it.
1620 _ACEOF
1621 exit
1622 fi
1623
1624 ## ------------------------ ##
1625 ## Autoconf initialization. ##
1626 ## ------------------------ ##
1627
1628 # ac_fn_c_try_compile LINENO
1629 # --------------------------
1630 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1631 ac_fn_c_try_compile ()
1632 {
1633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1634 rm -f conftest.$ac_objext conftest.beam
1635 if { { ac_try="$ac_compile"
1636 case "(($ac_try" in
1637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1638 *) ac_try_echo=$ac_try;;
1639 esac
1640 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1641 printf "%s\n" "$ac_try_echo"; } >&5
1642 (eval "$ac_compile") 2>conftest.err
1643 ac_status=$?
1644 if test -s conftest.err; then
1645 grep -v '^ *+' conftest.err >conftest.er1
1646 cat conftest.er1 >&5
1647 mv -f conftest.er1 conftest.err
1648 fi
1649 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1650 test $ac_status = 0; } && {
1651 test -z "$ac_c_werror_flag" ||
1652 test ! -s conftest.err
1653 } && test -s conftest.$ac_objext
1654 then :
1655 ac_retval=0
1656 else $as_nop
1657 printf "%s\n" "$as_me: failed program was:" >&5
1658 sed 's/^/| /' conftest.$ac_ext >&5
1659
1660 ac_retval=1
1661 fi
1662 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1663 as_fn_set_status $ac_retval
1664
1665 } # ac_fn_c_try_compile
1666
1667 # ac_fn_c_try_link LINENO
1668 # -----------------------
1669 # Try to link conftest.$ac_ext, and return whether this succeeded.
1670 ac_fn_c_try_link ()
1671 {
1672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1673 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1674 if { { ac_try="$ac_link"
1675 case "(($ac_try" in
1676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1677 *) ac_try_echo=$ac_try;;
1678 esac
1679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1680 printf "%s\n" "$ac_try_echo"; } >&5
1681 (eval "$ac_link") 2>conftest.err
1682 ac_status=$?
1683 if test -s conftest.err; then
1684 grep -v '^ *+' conftest.err >conftest.er1
1685 cat conftest.er1 >&5
1686 mv -f conftest.er1 conftest.err
1687 fi
1688 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1689 test $ac_status = 0; } && {
1690 test -z "$ac_c_werror_flag" ||
1691 test ! -s conftest.err
1692 } && test -s conftest$ac_exeext && {
1693 test "$cross_compiling" = yes ||
1694 test -x conftest$ac_exeext
1695 }
1696 then :
1697 ac_retval=0
1698 else $as_nop
1699 printf "%s\n" "$as_me: failed program was:" >&5
1700 sed 's/^/| /' conftest.$ac_ext >&5
1701
1702 ac_retval=1
1703 fi
1704 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1705 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1706 # interfere with the next link command; also delete a directory that is
1707 # left behind by Apple's compiler. We do this before executing the actions.
1708 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1709 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1710 as_fn_set_status $ac_retval
1711
1712 } # ac_fn_c_try_link
1713
1714 # ac_fn_c_try_run LINENO
1715 # ----------------------
1716 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1717 # executables *can* be run.
1718 ac_fn_c_try_run ()
1719 {
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 if { { ac_try="$ac_link"
1722 case "(($ac_try" in
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1725 esac
1726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727 printf "%s\n" "$ac_try_echo"; } >&5
1728 (eval "$ac_link") 2>&5
1729 ac_status=$?
1730 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1731 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1732 { { case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735 esac
1736 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737 printf "%s\n" "$ac_try_echo"; } >&5
1738 (eval "$ac_try") 2>&5
1739 ac_status=$?
1740 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741 test $ac_status = 0; }; }
1742 then :
1743 ac_retval=0
1744 else $as_nop
1745 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1746 printf "%s\n" "$as_me: failed program was:" >&5
1747 sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=$ac_status
1750 fi
1751 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1753 as_fn_set_status $ac_retval
1754
1755 } # ac_fn_c_try_run
1756
1757 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1758 # --------------------------------------------
1759 # Tries to find the compile-time value of EXPR in a program that includes
1760 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1761 # computed
1762 ac_fn_c_compute_int ()
1763 {
1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1765 if test "$cross_compiling" = yes; then
1766 # Depending upon the size, compute the lo and hi bounds.
1767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1768 /* end confdefs.h. */
1769 $4
1770 int
1771 main (void)
1772 {
1773 static int test_array [1 - 2 * !(($2) >= 0)];
1774 test_array [0] = 0;
1775 return test_array [0];
1776
1777 ;
1778 return 0;
1779 }
1780 _ACEOF
1781 if ac_fn_c_try_compile "$LINENO"
1782 then :
1783 ac_lo=0 ac_mid=0
1784 while :; do
1785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786 /* end confdefs.h. */
1787 $4
1788 int
1789 main (void)
1790 {
1791 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1792 test_array [0] = 0;
1793 return test_array [0];
1794
1795 ;
1796 return 0;
1797 }
1798 _ACEOF
1799 if ac_fn_c_try_compile "$LINENO"
1800 then :
1801 ac_hi=$ac_mid; break
1802 else $as_nop
1803 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1804 if test $ac_lo -le $ac_mid; then
1805 ac_lo= ac_hi=
1806 break
1807 fi
1808 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1809 fi
1810 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1811 done
1812 else $as_nop
1813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814 /* end confdefs.h. */
1815 $4
1816 int
1817 main (void)
1818 {
1819 static int test_array [1 - 2 * !(($2) < 0)];
1820 test_array [0] = 0;
1821 return test_array [0];
1822
1823 ;
1824 return 0;
1825 }
1826 _ACEOF
1827 if ac_fn_c_try_compile "$LINENO"
1828 then :
1829 ac_hi=-1 ac_mid=-1
1830 while :; do
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h. */
1833 $4
1834 int
1835 main (void)
1836 {
1837 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1838 test_array [0] = 0;
1839 return test_array [0];
1840
1841 ;
1842 return 0;
1843 }
1844 _ACEOF
1845 if ac_fn_c_try_compile "$LINENO"
1846 then :
1847 ac_lo=$ac_mid; break
1848 else $as_nop
1849 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1850 if test $ac_mid -le $ac_hi; then
1851 ac_lo= ac_hi=
1852 break
1853 fi
1854 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1855 fi
1856 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1857 done
1858 else $as_nop
1859 ac_lo= ac_hi=
1860 fi
1861 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1862 fi
1863 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1864 # Binary search between lo and hi bounds.
1865 while test "x$ac_lo" != "x$ac_hi"; do
1866 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868 /* end confdefs.h. */
1869 $4
1870 int
1871 main (void)
1872 {
1873 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1874 test_array [0] = 0;
1875 return test_array [0];
1876
1877 ;
1878 return 0;
1879 }
1880 _ACEOF
1881 if ac_fn_c_try_compile "$LINENO"
1882 then :
1883 ac_hi=$ac_mid
1884 else $as_nop
1885 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1886 fi
1887 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1888 done
1889 case $ac_lo in #((
1890 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1891 '') ac_retval=1 ;;
1892 esac
1893 else
1894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1895 /* end confdefs.h. */
1896 $4
1897 static long int longval (void) { return $2; }
1898 static unsigned long int ulongval (void) { return $2; }
1899 #include <stdio.h>
1900 #include <stdlib.h>
1901 int
1902 main (void)
1903 {
1904
1905 FILE *f = fopen ("conftest.val", "w");
1906 if (! f)
1907 return 1;
1908 if (($2) < 0)
1909 {
1910 long int i = longval ();
1911 if (i != ($2))
1912 return 1;
1913 fprintf (f, "%ld", i);
1914 }
1915 else
1916 {
1917 unsigned long int i = ulongval ();
1918 if (i != ($2))
1919 return 1;
1920 fprintf (f, "%lu", i);
1921 }
1922 /* Do not output a trailing newline, as this causes \r\n confusion
1923 on some platforms. */
1924 return ferror (f) || fclose (f) != 0;
1925
1926 ;
1927 return 0;
1928 }
1929 _ACEOF
1930 if ac_fn_c_try_run "$LINENO"
1931 then :
1932 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1933 else $as_nop
1934 ac_retval=1
1935 fi
1936 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1937 conftest.$ac_objext conftest.beam conftest.$ac_ext
1938 rm -f conftest.val
1939
1940 fi
1941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1942 as_fn_set_status $ac_retval
1943
1944 } # ac_fn_c_compute_int
1945
1946 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1947 # -------------------------------------------------------
1948 # Tests whether HEADER exists and can be compiled using the include files in
1949 # INCLUDES, setting the cache variable VAR accordingly.
1950 ac_fn_c_check_header_compile ()
1951 {
1952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1954 printf %s "checking for $2... " >&6; }
1955 if eval test \${$3+y}
1956 then :
1957 printf %s "(cached) " >&6
1958 else $as_nop
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960 /* end confdefs.h. */
1961 $4
1962 #include <$2>
1963 _ACEOF
1964 if ac_fn_c_try_compile "$LINENO"
1965 then :
1966 eval "$3=yes"
1967 else $as_nop
1968 eval "$3=no"
1969 fi
1970 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1971 fi
1972 eval ac_res=\$$3
1973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1974 printf "%s\n" "$ac_res" >&6; }
1975 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1976
1977 } # ac_fn_c_check_header_compile
1978
1979 # ac_fn_c_check_func LINENO FUNC VAR
1980 # ----------------------------------
1981 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1982 ac_fn_c_check_func ()
1983 {
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986 printf %s "checking for $2... " >&6; }
1987 if eval test \${$3+y}
1988 then :
1989 printf %s "(cached) " >&6
1990 else $as_nop
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992 /* end confdefs.h. */
1993 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1995 #define $2 innocuous_$2
1996
1997 /* System header to define __stub macros and hopefully few prototypes,
1998 which can conflict with char $2 (); below. */
1999
2000 #include <limits.h>
2001 #undef $2
2002
2003 /* Override any GCC internal prototype to avoid an error.
2004 Use char because int might match the return type of a GCC
2005 builtin and then its argument prototype would still apply. */
2006 #ifdef __cplusplus
2007 extern "C"
2008 #endif
2009 char $2 ();
2010 /* The GNU C library defines this for functions which it implements
2011 to always fail with ENOSYS. Some functions are actually named
2012 something starting with __ and the normal name is an alias. */
2013 #if defined __stub_$2 || defined __stub___$2
2014 choke me
2015 #endif
2016
2017 int
2018 main (void)
2019 {
2020 return $2 ();
2021 ;
2022 return 0;
2023 }
2024 _ACEOF
2025 if ac_fn_c_try_link "$LINENO"
2026 then :
2027 eval "$3=yes"
2028 else $as_nop
2029 eval "$3=no"
2030 fi
2031 rm -f core conftest.err conftest.$ac_objext conftest.beam \
2032 conftest$ac_exeext conftest.$ac_ext
2033 fi
2034 eval ac_res=\$$3
2035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036 printf "%s\n" "$ac_res" >&6; }
2037 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038
2039 } # ac_fn_c_check_func
2040
2041 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2042 # ------------------------------------------------------------------
2043 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2044 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2045 ac_fn_check_decl ()
2046 {
2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048 as_decl_name=`echo $2|sed 's/ *(.*//'`
2049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2050 printf %s "checking whether $as_decl_name is declared... " >&6; }
2051 if eval test \${$3+y}
2052 then :
2053 printf %s "(cached) " >&6
2054 else $as_nop
2055 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2056 eval ac_save_FLAGS=\$$6
2057 as_fn_append $6 " $5"
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059 /* end confdefs.h. */
2060 $4
2061 int
2062 main (void)
2063 {
2064 #ifndef $as_decl_name
2065 #ifdef __cplusplus
2066 (void) $as_decl_use;
2067 #else
2068 (void) $as_decl_name;
2069 #endif
2070 #endif
2071
2072 ;
2073 return 0;
2074 }
2075 _ACEOF
2076 if ac_fn_c_try_compile "$LINENO"
2077 then :
2078 eval "$3=yes"
2079 else $as_nop
2080 eval "$3=no"
2081 fi
2082 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2083 eval $6=\$ac_save_FLAGS
2084
2085 fi
2086 eval ac_res=\$$3
2087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2088 printf "%s\n" "$ac_res" >&6; }
2089 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2090
2091 } # ac_fn_check_decl
2092
2093 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2094 # -------------------------------------------
2095 # Tests whether TYPE exists after having included INCLUDES, setting cache
2096 # variable VAR accordingly.
2097 ac_fn_c_check_type ()
2098 {
2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2101 printf %s "checking for $2... " >&6; }
2102 if eval test \${$3+y}
2103 then :
2104 printf %s "(cached) " >&6
2105 else $as_nop
2106 eval "$3=no"
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108 /* end confdefs.h. */
2109 $4
2110 int
2111 main (void)
2112 {
2113 if (sizeof ($2))
2114 return 0;
2115 ;
2116 return 0;
2117 }
2118 _ACEOF
2119 if ac_fn_c_try_compile "$LINENO"
2120 then :
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h. */
2123 $4
2124 int
2125 main (void)
2126 {
2127 if (sizeof (($2)))
2128 return 0;
2129 ;
2130 return 0;
2131 }
2132 _ACEOF
2133 if ac_fn_c_try_compile "$LINENO"
2134 then :
2135
2136 else $as_nop
2137 eval "$3=yes"
2138 fi
2139 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2140 fi
2141 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2142 fi
2143 eval ac_res=\$$3
2144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145 printf "%s\n" "$ac_res" >&6; }
2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2147
2148 } # ac_fn_c_check_type
2149
2150 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2151 # ----------------------------------------------------
2152 # Tries to find if the field MEMBER exists in type AGGR, after including
2153 # INCLUDES, setting cache variable VAR accordingly.
2154 ac_fn_c_check_member ()
2155 {
2156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2158 printf %s "checking for $2.$3... " >&6; }
2159 if eval test \${$4+y}
2160 then :
2161 printf %s "(cached) " >&6
2162 else $as_nop
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164 /* end confdefs.h. */
2165 $5
2166 int
2167 main (void)
2168 {
2169 static $2 ac_aggr;
2170 if (ac_aggr.$3)
2171 return 0;
2172 ;
2173 return 0;
2174 }
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"
2177 then :
2178 eval "$4=yes"
2179 else $as_nop
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h. */
2182 $5
2183 int
2184 main (void)
2185 {
2186 static $2 ac_aggr;
2187 if (sizeof ac_aggr.$3)
2188 return 0;
2189 ;
2190 return 0;
2191 }
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"
2194 then :
2195 eval "$4=yes"
2196 else $as_nop
2197 eval "$4=no"
2198 fi
2199 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2200 fi
2201 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2202 fi
2203 eval ac_res=\$$4
2204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2205 printf "%s\n" "$ac_res" >&6; }
2206 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207
2208 } # ac_fn_c_check_member
2209 ac_configure_args_raw=
2210 for ac_arg
2211 do
2212 case $ac_arg in
2213 *\'*)
2214 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2215 esac
2216 as_fn_append ac_configure_args_raw " '$ac_arg'"
2217 done
2218
2219 case $ac_configure_args_raw in
2220 *$as_nl*)
2221 ac_safe_unquote= ;;
2222 *)
2223 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2224 ac_unsafe_a="$ac_unsafe_z#~"
2225 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2226 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2227 esac
2228
2229 cat >config.log <<_ACEOF
2230 This file contains any messages produced by compilers while
2231 running configure, to aid debugging if configure makes a mistake.
2232
2233 It was created by pcap $as_me 1.10.6, which was
2234 generated by GNU Autoconf 2.71. Invocation command line was
2235
2236 $ $0$ac_configure_args_raw
2237
2238 _ACEOF
2239 exec 5>>config.log
2240 {
2241 cat <<_ASUNAME
2242 ## --------- ##
2243 ## Platform. ##
2244 ## --------- ##
2245
2246 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2247 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2248 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2249 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2250 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2251
2252 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2253 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2254
2255 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2256 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2257 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2258 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2259 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2260 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2261 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2262
2263 _ASUNAME
2264
2265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2266 for as_dir in $PATH
2267 do
2268 IFS=$as_save_IFS
2269 case $as_dir in #(((
2270 '') as_dir=./ ;;
2271 */) ;;
2272 *) as_dir=$as_dir/ ;;
2273 esac
2274 printf "%s\n" "PATH: $as_dir"
2275 done
2276 IFS=$as_save_IFS
2277
2278 } >&5
2279
2280 cat >&5 <<_ACEOF
2281
2282
2283 ## ----------- ##
2284 ## Core tests. ##
2285 ## ----------- ##
2286
2287 _ACEOF
2288
2289
2290 # Keep a trace of the command line.
2291 # Strip out --no-create and --no-recursion so they do not pile up.
2292 # Strip out --silent because we don't want to record it for future runs.
2293 # Also quote any args containing shell meta-characters.
2294 # Make two passes to allow for proper duplicate-argument suppression.
2295 ac_configure_args=
2296 ac_configure_args0=
2297 ac_configure_args1=
2298 ac_must_keep_next=false
2299 for ac_pass in 1 2
2300 do
2301 for ac_arg
2302 do
2303 case $ac_arg in
2304 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2306 | -silent | --silent | --silen | --sile | --sil)
2307 continue ;;
2308 *\'*)
2309 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2310 esac
2311 case $ac_pass in
2312 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2313 2)
2314 as_fn_append ac_configure_args1 " '$ac_arg'"
2315 if test $ac_must_keep_next = true; then
2316 ac_must_keep_next=false # Got value, back to normal.
2317 else
2318 case $ac_arg in
2319 *=* | --config-cache | -C | -disable-* | --disable-* \
2320 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2321 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2322 | -with-* | --with-* | -without-* | --without-* | --x)
2323 case "$ac_configure_args0 " in
2324 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2325 esac
2326 ;;
2327 -* ) ac_must_keep_next=true ;;
2328 esac
2329 fi
2330 as_fn_append ac_configure_args " '$ac_arg'"
2331 ;;
2332 esac
2333 done
2334 done
2335 { ac_configure_args0=; unset ac_configure_args0;}
2336 { ac_configure_args1=; unset ac_configure_args1;}
2337
2338 # When interrupted or exit'd, cleanup temporary files, and complete
2339 # config.log. We remove comments because anyway the quotes in there
2340 # would cause problems or look ugly.
2341 # WARNING: Use '\'' to represent an apostrophe within the trap.
2342 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2343 trap 'exit_status=$?
2344 # Sanitize IFS.
2345 IFS=" "" $as_nl"
2346 # Save into config.log some information that might help in debugging.
2347 {
2348 echo
2349
2350 printf "%s\n" "## ---------------- ##
2351 ## Cache variables. ##
2352 ## ---------------- ##"
2353 echo
2354 # The following way of writing the cache mishandles newlines in values,
2355 (
2356 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2357 eval ac_val=\$$ac_var
2358 case $ac_val in #(
2359 *${as_nl}*)
2360 case $ac_var in #(
2361 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2362 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2363 esac
2364 case $ac_var in #(
2365 _ | IFS | as_nl) ;; #(
2366 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2367 *) { eval $ac_var=; unset $ac_var;} ;;
2368 esac ;;
2369 esac
2370 done
2371 (set) 2>&1 |
2372 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2373 *${as_nl}ac_space=\ *)
2374 sed -n \
2375 "s/'\''/'\''\\\\'\'''\''/g;
2376 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2377 ;; #(
2378 *)
2379 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2380 ;;
2381 esac |
2382 sort
2383 )
2384 echo
2385
2386 printf "%s\n" "## ----------------- ##
2387 ## Output variables. ##
2388 ## ----------------- ##"
2389 echo
2390 for ac_var in $ac_subst_vars
2391 do
2392 eval ac_val=\$$ac_var
2393 case $ac_val in
2394 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2395 esac
2396 printf "%s\n" "$ac_var='\''$ac_val'\''"
2397 done | sort
2398 echo
2399
2400 if test -n "$ac_subst_files"; then
2401 printf "%s\n" "## ------------------- ##
2402 ## File substitutions. ##
2403 ## ------------------- ##"
2404 echo
2405 for ac_var in $ac_subst_files
2406 do
2407 eval ac_val=\$$ac_var
2408 case $ac_val in
2409 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2410 esac
2411 printf "%s\n" "$ac_var='\''$ac_val'\''"
2412 done | sort
2413 echo
2414 fi
2415
2416 if test -s confdefs.h; then
2417 printf "%s\n" "## ----------- ##
2418 ## confdefs.h. ##
2419 ## ----------- ##"
2420 echo
2421 cat confdefs.h
2422 echo
2423 fi
2424 test "$ac_signal" != 0 &&
2425 printf "%s\n" "$as_me: caught signal $ac_signal"
2426 printf "%s\n" "$as_me: exit $exit_status"
2427 } >&5
2428 rm -f core *.core core.conftest.* &&
2429 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2430 exit $exit_status
2431 ' 0
2432 for ac_signal in 1 2 13 15; do
2433 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2434 done
2435 ac_signal=0
2436
2437 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2438 rm -f -r conftest* confdefs.h
2439
2440 printf "%s\n" "/* confdefs.h */" > confdefs.h
2441
2442 # Predefined preprocessor variables.
2443
2444 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2445
2446 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2447
2448 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2449
2450 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2451
2452 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2453
2454 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2455
2456
2457 # Let the site file select an alternate cache file if it wants to.
2458 # Prefer an explicitly selected file to automatically selected ones.
2459 if test -n "$CONFIG_SITE"; then
2460 ac_site_files="$CONFIG_SITE"
2461 elif test "x$prefix" != xNONE; then
2462 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2463 else
2464 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2465 fi
2466
2467 for ac_site_file in $ac_site_files
2468 do
2469 case $ac_site_file in #(
2470 */*) :
2471 ;; #(
2472 *) :
2473 ac_site_file=./$ac_site_file ;;
2474 esac
2475 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2477 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2478 sed 's/^/| /' "$ac_site_file" >&5
2479 . "$ac_site_file" \
2480 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2481 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2482 as_fn_error $? "failed to load site script $ac_site_file
2483 See \`config.log' for more details" "$LINENO" 5; }
2484 fi
2485 done
2486
2487 if test -r "$cache_file"; then
2488 # Some versions of bash will fail to source /dev/null (special files
2489 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2490 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2492 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2493 case $cache_file in
2494 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2495 *) . "./$cache_file";;
2496 esac
2497 fi
2498 else
2499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2500 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2501 >$cache_file
2502 fi
2503
2504 # Test code for whether the C compiler supports C89 (global declarations)
2505 ac_c_conftest_c89_globals='
2506 /* Does the compiler advertise C89 conformance?
2507 Do not test the value of __STDC__, because some compilers set it to 0
2508 while being otherwise adequately conformant. */
2509 #if !defined __STDC__
2510 # error "Compiler does not advertise C89 conformance"
2511 #endif
2512
2513 #include <stddef.h>
2514 #include <stdarg.h>
2515 struct stat;
2516 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2517 struct buf { int x; };
2518 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2519 static char *e (p, i)
2520 char **p;
2521 int i;
2522 {
2523 return p[i];
2524 }
2525 static char *f (char * (*g) (char **, int), char **p, ...)
2526 {
2527 char *s;
2528 va_list v;
2529 va_start (v,p);
2530 s = g (p, va_arg (v,int));
2531 va_end (v);
2532 return s;
2533 }
2534
2535 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2536 function prototypes and stuff, but not \xHH hex character constants.
2537 These do not provoke an error unfortunately, instead are silently treated
2538 as an "x". The following induces an error, until -std is added to get
2539 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2540 array size at least. It is necessary to write \x00 == 0 to get something
2541 that is true only with -std. */
2542 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2543
2544 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2545 inside strings and character constants. */
2546 #define FOO(x) '\''x'\''
2547 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2548
2549 int test (int i, double x);
2550 struct s1 {int (*f) (int a);};
2551 struct s2 {int (*f) (double a);};
2552 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2553 int, int);'
2554
2555 # Test code for whether the C compiler supports C89 (body of main).
2556 ac_c_conftest_c89_main='
2557 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2558 '
2559
2560 # Test code for whether the C compiler supports C99 (global declarations)
2561 ac_c_conftest_c99_globals='
2562 // Does the compiler advertise C99 conformance?
2563 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2564 # error "Compiler does not advertise C99 conformance"
2565 #endif
2566
2567 #include <stdbool.h>
2568 extern int puts (const char *);
2569 extern int printf (const char *, ...);
2570 extern int dprintf (int, const char *, ...);
2571 extern void *malloc (size_t);
2572
2573 // Check varargs macros. These examples are taken from C99 6.10.3.5.
2574 // dprintf is used instead of fprintf to avoid needing to declare
2575 // FILE and stderr.
2576 #define debug(...) dprintf (2, __VA_ARGS__)
2577 #define showlist(...) puts (#__VA_ARGS__)
2578 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2579 static void
2580 test_varargs_macros (void)
2581 {
2582 int x = 1234;
2583 int y = 5678;
2584 debug ("Flag");
2585 debug ("X = %d\n", x);
2586 showlist (The first, second, and third items.);
2587 report (x>y, "x is %d but y is %d", x, y);
2588 }
2589
2590 // Check long long types.
2591 #define BIG64 18446744073709551615ull
2592 #define BIG32 4294967295ul
2593 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2594 #if !BIG_OK
2595 #error "your preprocessor is broken"
2596 #endif
2597 #if BIG_OK
2598 #else
2599 #error "your preprocessor is broken"
2600 #endif
2601 static long long int bignum = -9223372036854775807LL;
2602 static unsigned long long int ubignum = BIG64;
2603
2604 struct incomplete_array
2605 {
2606 int datasize;
2607 double data[];
2608 };
2609
2610 struct named_init {
2611 int number;
2612 const wchar_t *name;
2613 double average;
2614 };
2615
2616 typedef const char *ccp;
2617
2618 static inline int
2619 test_restrict (ccp restrict text)
2620 {
2621 // See if C++-style comments work.
2622 // Iterate through items via the restricted pointer.
2623 // Also check for declarations in for loops.
2624 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2625 continue;
2626 return 0;
2627 }
2628
2629 // Check varargs and va_copy.
2630 static bool
2631 test_varargs (const char *format, ...)
2632 {
2633 va_list args;
2634 va_start (args, format);
2635 va_list args_copy;
2636 va_copy (args_copy, args);
2637
2638 const char *str = "";
2639 int number = 0;
2640 float fnumber = 0;
2641
2642 while (*format)
2643 {
2644 switch (*format++)
2645 {
2646 case '\''s'\'': // string
2647 str = va_arg (args_copy, const char *);
2648 break;
2649 case '\''d'\'': // int
2650 number = va_arg (args_copy, int);
2651 break;
2652 case '\''f'\'': // float
2653 fnumber = va_arg (args_copy, double);
2654 break;
2655 default:
2656 break;
2657 }
2658 }
2659 va_end (args_copy);
2660 va_end (args);
2661
2662 return *str && number && fnumber;
2663 }
2664 '
2665
2666 # Test code for whether the C compiler supports C99 (body of main).
2667 ac_c_conftest_c99_main='
2668 // Check bool.
2669 _Bool success = false;
2670 success |= (argc != 0);
2671
2672 // Check restrict.
2673 if (test_restrict ("String literal") == 0)
2674 success = true;
2675 char *restrict newvar = "Another string";
2676
2677 // Check varargs.
2678 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2679 test_varargs_macros ();
2680
2681 // Check flexible array members.
2682 struct incomplete_array *ia =
2683 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2684 ia->datasize = 10;
2685 for (int i = 0; i < ia->datasize; ++i)
2686 ia->data[i] = i * 1.234;
2687
2688 // Check named initializers.
2689 struct named_init ni = {
2690 .number = 34,
2691 .name = L"Test wide string",
2692 .average = 543.34343,
2693 };
2694
2695 ni.number = 58;
2696
2697 int dynamic_array[ni.number];
2698 dynamic_array[0] = argv[0][0];
2699 dynamic_array[ni.number - 1] = 543;
2700
2701 // work around unused variable warnings
2702 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2703 || dynamic_array[ni.number - 1] != 543);
2704 '
2705
2706 # Test code for whether the C compiler supports C11 (global declarations)
2707 ac_c_conftest_c11_globals='
2708 // Does the compiler advertise C11 conformance?
2709 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2710 # error "Compiler does not advertise C11 conformance"
2711 #endif
2712
2713 // Check _Alignas.
2714 char _Alignas (double) aligned_as_double;
2715 char _Alignas (0) no_special_alignment;
2716 extern char aligned_as_int;
2717 char _Alignas (0) _Alignas (int) aligned_as_int;
2718
2719 // Check _Alignof.
2720 enum
2721 {
2722 int_alignment = _Alignof (int),
2723 int_array_alignment = _Alignof (int[100]),
2724 char_alignment = _Alignof (char)
2725 };
2726 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2727
2728 // Check _Noreturn.
2729 int _Noreturn does_not_return (void) { for (;;) continue; }
2730
2731 // Check _Static_assert.
2732 struct test_static_assert
2733 {
2734 int x;
2735 _Static_assert (sizeof (int) <= sizeof (long int),
2736 "_Static_assert does not work in struct");
2737 long int y;
2738 };
2739
2740 // Check UTF-8 literals.
2741 #define u8 syntax error!
2742 char const utf8_literal[] = u8"happens to be ASCII" "another string";
2743
2744 // Check duplicate typedefs.
2745 typedef long *long_ptr;
2746 typedef long int *long_ptr;
2747 typedef long_ptr long_ptr;
2748
2749 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2750 struct anonymous
2751 {
2752 union {
2753 struct { int i; int j; };
2754 struct { int k; long int l; } w;
2755 };
2756 int m;
2757 } v1;
2758 '
2759
2760 # Test code for whether the C compiler supports C11 (body of main).
2761 ac_c_conftest_c11_main='
2762 _Static_assert ((offsetof (struct anonymous, i)
2763 == offsetof (struct anonymous, w.k)),
2764 "Anonymous union alignment botch");
2765 v1.i = 2;
2766 v1.w.k = 5;
2767 ok |= v1.i != 5;
2768 '
2769
2770 # Test code for whether the C compiler supports C11 (complete).
2771 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2772 ${ac_c_conftest_c99_globals}
2773 ${ac_c_conftest_c11_globals}
2774
2775 int
2776 main (int argc, char **argv)
2777 {
2778 int ok = 0;
2779 ${ac_c_conftest_c89_main}
2780 ${ac_c_conftest_c99_main}
2781 ${ac_c_conftest_c11_main}
2782 return ok;
2783 }
2784 "
2785
2786 # Test code for whether the C compiler supports C99 (complete).
2787 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2788 ${ac_c_conftest_c99_globals}
2789
2790 int
2791 main (int argc, char **argv)
2792 {
2793 int ok = 0;
2794 ${ac_c_conftest_c89_main}
2795 ${ac_c_conftest_c99_main}
2796 return ok;
2797 }
2798 "
2799
2800 # Test code for whether the C compiler supports C89 (complete).
2801 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2802
2803 int
2804 main (int argc, char **argv)
2805 {
2806 int ok = 0;
2807 ${ac_c_conftest_c89_main}
2808 return ok;
2809 }
2810 "
2811
2812 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2813 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2814 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2815 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2816 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2817 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2818 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2819 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2820 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2821
2822 # Auxiliary files required by this configure script.
2823 ac_aux_files="install-sh config.guess config.sub"
2824
2825 # Locations in which to look for auxiliary files.
2826 ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2827
2828 # Search for a directory containing all of the required auxiliary files,
2829 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2830 # If we don't find one directory that contains all the files we need,
2831 # we report the set of missing files from the *first* directory in
2832 # $ac_aux_dir_candidates and give up.
2833 ac_missing_aux_files=""
2834 ac_first_candidate=:
2835 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2837 as_found=false
2838 for as_dir in $ac_aux_dir_candidates
2839 do
2840 IFS=$as_save_IFS
2841 case $as_dir in #(((
2842 '') as_dir=./ ;;
2843 */) ;;
2844 *) as_dir=$as_dir/ ;;
2845 esac
2846 as_found=:
2847
2848 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
2849 ac_aux_dir_found=yes
2850 ac_install_sh=
2851 for ac_aux in $ac_aux_files
2852 do
2853 # As a special case, if "install-sh" is required, that requirement
2854 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2855 # and $ac_install_sh is set appropriately for whichever one is found.
2856 if test x"$ac_aux" = x"install-sh"
2857 then
2858 if test -f "${as_dir}install-sh"; then
2859 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
2860 ac_install_sh="${as_dir}install-sh -c"
2861 elif test -f "${as_dir}install.sh"; then
2862 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
2863 ac_install_sh="${as_dir}install.sh -c"
2864 elif test -f "${as_dir}shtool"; then
2865 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
2866 ac_install_sh="${as_dir}shtool install -c"
2867 else
2868 ac_aux_dir_found=no
2869 if $ac_first_candidate; then
2870 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
2871 else
2872 break
2873 fi
2874 fi
2875 else
2876 if test -f "${as_dir}${ac_aux}"; then
2877 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
2878 else
2879 ac_aux_dir_found=no
2880 if $ac_first_candidate; then
2881 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
2882 else
2883 break
2884 fi
2885 fi
2886 fi
2887 done
2888 if test "$ac_aux_dir_found" = yes; then
2889 ac_aux_dir="$as_dir"
2890 break
2891 fi
2892 ac_first_candidate=false
2893
2894 as_found=false
2895 done
2896 IFS=$as_save_IFS
2897 if $as_found
2898 then :
2899
2900 else $as_nop
2901 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
2902 fi
2903
2904
2905 # These three variables are undocumented and unsupported,
2906 # and are intended to be withdrawn in a future Autoconf release.
2907 # They can cause serious problems if a builder's source tree is in a directory
2908 # whose full name contains unusual characters.
2909 if test -f "${ac_aux_dir}config.guess"; then
2910 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
2911 fi
2912 if test -f "${ac_aux_dir}config.sub"; then
2913 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
2914 fi
2915 if test -f "$ac_aux_dir/configure"; then
2916 ac_configure="$SHELL ${ac_aux_dir}configure"
2917 fi
2918
2919 # Check that the precious variables saved in the cache have kept the same
2920 # value.
2921 ac_cache_corrupted=false
2922 for ac_var in $ac_precious_vars; do
2923 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2924 eval ac_new_set=\$ac_env_${ac_var}_set
2925 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2926 eval ac_new_val=\$ac_env_${ac_var}_value
2927 case $ac_old_set,$ac_new_set in
2928 set,)
2929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2930 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2931 ac_cache_corrupted=: ;;
2932 ,set)
2933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2934 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2935 ac_cache_corrupted=: ;;
2936 ,);;
2937 *)
2938 if test "x$ac_old_val" != "x$ac_new_val"; then
2939 # differences in whitespace do not lead to failure.
2940 ac_old_val_w=`echo x $ac_old_val`
2941 ac_new_val_w=`echo x $ac_new_val`
2942 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2944 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2945 ac_cache_corrupted=:
2946 else
2947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2948 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2949 eval $ac_var=\$ac_old_val
2950 fi
2951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2952 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2954 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2955 fi;;
2956 esac
2957 # Pass precious variables to config.status.
2958 if test "$ac_new_set" = set; then
2959 case $ac_new_val in
2960 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2961 *) ac_arg=$ac_var=$ac_new_val ;;
2962 esac
2963 case " $ac_configure_args " in
2964 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2965 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2966 esac
2967 fi
2968 done
2969 if $ac_cache_corrupted; then
2970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2971 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2973 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2974 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2975 and start over" "$LINENO" 5
2976 fi
2977 ## -------------------- ##
2978 ## Main body of script. ##
2979 ## -------------------- ##
2980
2981 ac_ext=c
2982 ac_cpp='$CPP $CPPFLAGS'
2983 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2984 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2985 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2986
2987
2988
2989
2990
2991 #
2992 # These are the variables that are used in Makefile, pcap-config, and
2993 # libpcap.pc.
2994 #
2995 # CFLAGS: inherited from the environment, not modified by us except
2996 # for flags required for the platform for which we're building (and
2997 # except temporarily during tests that involve compilation). Used only
2998 # when compiling C source.
2999 #
3000 # LDFLAGS: inherited from the environment, not modified by us.
3001 #
3002 # LIBS: inherited from the environment; we add libraries required by
3003 # libpcap. Libraries that the core libpcap code requires are added
3004 # first; libraries required by additional pcap modules are first
3005 # added to ADDITIONAL_LIBS, and only added to LIBS at the end, after
3006 # we're finished doing configuration tests for the modules.
3007 #
3008 # LIBS_STATIC: libraries with which a program using the libpcap *static*
3009 # library needs to be linked. This is a superset of LIBS, used in
3010 # pcap-config, so that "pcap-config --libs --static" will report them.
3011 # Initialized to LIBS.
3012 #
3013 # REQUIRES_PRIVATE: pkg-config package names for additional libraries
3014 # with which a program using the libpcap *static* library needs to be
3015 # linked and for which a .pc file exists. This is used in libpcap.pc,
3016 # so that "pkg-config --libs --static" will report them, and so that
3017 # those libraries will be determined using the library's .pc file, not
3018 # from our .pc file. Initialized to an empty string.
3019 #
3020 # V_CCOPT: additional compiler flags other than -I and -D flags
3021 # needed when compiling libpcap. Used in Makefile for both C and
3022 # C++ source.
3023 #
3024 # V_DEFS: additional -D compiler flags needed when compiling
3025 # libpcap. Used in Makefile for both C and C++ source.
3026 #
3027 # V_INCLS: additional -I compiler flags needed when compiling
3028 # libpcap. Used in Makefile for both C and C++ source.
3029 #
3030 # ADDITIONAL_LIBS: additional libraries with which the libpcap dynamic
3031 # library needs to be linked. Used in Makefile; not used in pcap-config
3032 # or libpcap.pc, as, in all platforms on which we run, if a dynamic
3033 # library is linked with other dynamic libraries, a program using
3034 # that dynamic library doesn't have to link with those libraries -
3035 # they will be automatically loaded at run time. Initialized to an
3036 # empty string.
3037 #
3038 # ADDITIONAL_LIBS_STATIC: additional libraries with which a program
3039 # using the libpcap *static* library needs to be linked. This is used
3040 # in pcap-config, so that "pcap-config --libs --static" will report
3041 # them. Initialized to an empty string.
3042 #
3043 # REQUIRES_PRIVATE: pkg-config package names for additional libraries
3044 # with which a program using the libpcap *static* library needs to be
3045 # linked and for which a .pc file exists. This is used in libpcap.pc,
3046 # so that "pkg-config --libs --static" will report them, and so that
3047 # those libraries will be determined using the library's .pc file, not
3048 # from our .pc file. Initialized to an empty string.
3049 #
3050 # LIBS_PRIVATE: pkg-config package names for additional libraries with
3051 # which a program using the libpcap *static* library needs to be linked
3052 # and for which a .pc file does not exist. This is used in libpcap.pc,
3053 # so that "pkg-config --libs --static" will report them (those libraries
3054 # cannot be determined using the library's .pc file, as there is no such
3055 # file, so it has to come from our .pc file. Initialized to an empty
3056 # string.
3057 #
3058 LIBS_STATIC=""
3059 REQUIRES_PRIVATE=""
3060 LIBS_PRIVATE=""
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072 # Make sure we can run config.sub.
3073 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3074 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3075
3076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3077 printf %s "checking build system type... " >&6; }
3078 if test ${ac_cv_build+y}
3079 then :
3080 printf %s "(cached) " >&6
3081 else $as_nop
3082 ac_build_alias=$build_alias
3083 test "x$ac_build_alias" = x &&
3084 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
3085 test "x$ac_build_alias" = x &&
3086 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3087 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3088 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
3089
3090 fi
3091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3092 printf "%s\n" "$ac_cv_build" >&6; }
3093 case $ac_cv_build in
3094 *-*-*) ;;
3095 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3096 esac
3097 build=$ac_cv_build
3098 ac_save_IFS=$IFS; IFS='-'
3099 set x $ac_cv_build
3100 shift
3101 build_cpu=$1
3102 build_vendor=$2
3103 shift; shift
3104 # Remember, the first character of IFS is used to create $*,
3105 # except with old shells:
3106 build_os=$*
3107 IFS=$ac_save_IFS
3108 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3109
3110
3111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3112 printf %s "checking host system type... " >&6; }
3113 if test ${ac_cv_host+y}
3114 then :
3115 printf %s "(cached) " >&6
3116 else $as_nop
3117 if test "x$host_alias" = x; then
3118 ac_cv_host=$ac_cv_build
3119 else
3120 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3121 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
3122 fi
3123
3124 fi
3125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3126 printf "%s\n" "$ac_cv_host" >&6; }
3127 case $ac_cv_host in
3128 *-*-*) ;;
3129 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3130 esac
3131 host=$ac_cv_host
3132 ac_save_IFS=$IFS; IFS='-'
3133 set x $ac_cv_host
3134 shift
3135 host_cpu=$1
3136 host_vendor=$2
3137 shift; shift
3138 # Remember, the first character of IFS is used to create $*,
3139 # except with old shells:
3140 host_os=$*
3141 IFS=$ac_save_IFS
3142 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3143
3144
3145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3146 printf %s "checking target system type... " >&6; }
3147 if test ${ac_cv_target+y}
3148 then :
3149 printf %s "(cached) " >&6
3150 else $as_nop
3151 if test "x$target_alias" = x; then
3152 ac_cv_target=$ac_cv_host
3153 else
3154 ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
3155 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
3156 fi
3157
3158 fi
3159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3160 printf "%s\n" "$ac_cv_target" >&6; }
3161 case $ac_cv_target in
3162 *-*-*) ;;
3163 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3164 esac
3165 target=$ac_cv_target
3166 ac_save_IFS=$IFS; IFS='-'
3167 set x $ac_cv_target
3168 shift
3169 target_cpu=$1
3170 target_vendor=$2
3171 shift; shift
3172 # Remember, the first character of IFS is used to create $*,
3173 # except with old shells:
3174 target_os=$*
3175 IFS=$ac_save_IFS
3176 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3177
3178
3179 # The aliases save the names the user supplied, while $host etc.
3180 # will get canonicalized.
3181 test -n "$target_alias" &&
3182 test "$program_prefix$program_suffix$program_transform_name" = \
3183 NONENONEs,x,x, &&
3184 program_prefix=${target_alias}-
3185
3186
3187
3188
3189
3190
3191
3192
3193 # Check whether --with-gcc was given.
3194 if test ${with_gcc+y}
3195 then :
3196 withval=$with_gcc;
3197 fi
3198
3199 V_CCOPT=""
3200 if test "${srcdir}" != "." ; then
3201 V_CCOPT="-I\$(srcdir)"
3202 fi
3203 if test "${CFLAGS+set}" = set; then
3204 LBL_CFLAGS="$CFLAGS"
3205 fi
3206 if test -z "$CC" ; then
3207 case "$host_os" in
3208
3209 bsdi*)
3210 # Extract the first word of "shlicc2", so it can be a program name with args.
3211 set dummy shlicc2; ac_word=$2
3212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3213 printf %s "checking for $ac_word... " >&6; }
3214 if test ${ac_cv_prog_SHLICC2+y}
3215 then :
3216 printf %s "(cached) " >&6
3217 else $as_nop
3218 if test -n "$SHLICC2"; then
3219 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
3220 else
3221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3222 for as_dir in $PATH
3223 do
3224 IFS=$as_save_IFS
3225 case $as_dir in #(((
3226 '') as_dir=./ ;;
3227 */) ;;
3228 *) as_dir=$as_dir/ ;;
3229 esac
3230 for ac_exec_ext in '' $ac_executable_extensions; do
3231 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3232 ac_cv_prog_SHLICC2="yes"
3233 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3234 break 2
3235 fi
3236 done
3237 done
3238 IFS=$as_save_IFS
3239
3240 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
3241 fi
3242 fi
3243 SHLICC2=$ac_cv_prog_SHLICC2
3244 if test -n "$SHLICC2"; then
3245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
3246 printf "%s\n" "$SHLICC2" >&6; }
3247 else
3248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3249 printf "%s\n" "no" >&6; }
3250 fi
3251
3252
3253 if test $SHLICC2 = yes ; then
3254 CC=shlicc2
3255 export CC
3256 fi
3257 ;;
3258 esac
3259 fi
3260 if test -z "$CC" -a "$with_gcc" = no ; then
3261 CC=cc
3262 export CC
3263 fi
3264
3265 #
3266 # We require C99 or later.
3267 # Try to get it, which may involve adding compiler flags;
3268 # if that fails, give up.
3269 #
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279 ac_ext=c
3280 ac_cpp='$CPP $CPPFLAGS'
3281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3284 if test -n "$ac_tool_prefix"; then
3285 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3286 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3288 printf %s "checking for $ac_word... " >&6; }
3289 if test ${ac_cv_prog_CC+y}
3290 then :
3291 printf %s "(cached) " >&6
3292 else $as_nop
3293 if test -n "$CC"; then
3294 ac_cv_prog_CC="$CC" # Let the user override the test.
3295 else
3296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297 for as_dir in $PATH
3298 do
3299 IFS=$as_save_IFS
3300 case $as_dir in #(((
3301 '') as_dir=./ ;;
3302 */) ;;
3303 *) as_dir=$as_dir/ ;;
3304 esac
3305 for ac_exec_ext in '' $ac_executable_extensions; do
3306 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3307 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3308 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3309 break 2
3310 fi
3311 done
3312 done
3313 IFS=$as_save_IFS
3314
3315 fi
3316 fi
3317 CC=$ac_cv_prog_CC
3318 if test -n "$CC"; then
3319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3320 printf "%s\n" "$CC" >&6; }
3321 else
3322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3323 printf "%s\n" "no" >&6; }
3324 fi
3325
3326
3327 fi
3328 if test -z "$ac_cv_prog_CC"; then
3329 ac_ct_CC=$CC
3330 # Extract the first word of "gcc", so it can be a program name with args.
3331 set dummy gcc; ac_word=$2
3332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3333 printf %s "checking for $ac_word... " >&6; }
3334 if test ${ac_cv_prog_ac_ct_CC+y}
3335 then :
3336 printf %s "(cached) " >&6
3337 else $as_nop
3338 if test -n "$ac_ct_CC"; then
3339 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3340 else
3341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3342 for as_dir in $PATH
3343 do
3344 IFS=$as_save_IFS
3345 case $as_dir in #(((
3346 '') as_dir=./ ;;
3347 */) ;;
3348 *) as_dir=$as_dir/ ;;
3349 esac
3350 for ac_exec_ext in '' $ac_executable_extensions; do
3351 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3352 ac_cv_prog_ac_ct_CC="gcc"
3353 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3354 break 2
3355 fi
3356 done
3357 done
3358 IFS=$as_save_IFS
3359
3360 fi
3361 fi
3362 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3363 if test -n "$ac_ct_CC"; then
3364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3365 printf "%s\n" "$ac_ct_CC" >&6; }
3366 else
3367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368 printf "%s\n" "no" >&6; }
3369 fi
3370
3371 if test "x$ac_ct_CC" = x; then
3372 CC=""
3373 else
3374 case $cross_compiling:$ac_tool_warned in
3375 yes:)
3376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3377 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3378 ac_tool_warned=yes ;;
3379 esac
3380 CC=$ac_ct_CC
3381 fi
3382 else
3383 CC="$ac_cv_prog_CC"
3384 fi
3385
3386 if test -z "$CC"; then
3387 if test -n "$ac_tool_prefix"; then
3388 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3389 set dummy ${ac_tool_prefix}cc; ac_word=$2
3390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3391 printf %s "checking for $ac_word... " >&6; }
3392 if test ${ac_cv_prog_CC+y}
3393 then :
3394 printf %s "(cached) " >&6
3395 else $as_nop
3396 if test -n "$CC"; then
3397 ac_cv_prog_CC="$CC" # Let the user override the test.
3398 else
3399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3400 for as_dir in $PATH
3401 do
3402 IFS=$as_save_IFS
3403 case $as_dir in #(((
3404 '') as_dir=./ ;;
3405 */) ;;
3406 *) as_dir=$as_dir/ ;;
3407 esac
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3410 ac_cv_prog_CC="${ac_tool_prefix}cc"
3411 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3412 break 2
3413 fi
3414 done
3415 done
3416 IFS=$as_save_IFS
3417
3418 fi
3419 fi
3420 CC=$ac_cv_prog_CC
3421 if test -n "$CC"; then
3422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3423 printf "%s\n" "$CC" >&6; }
3424 else
3425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426 printf "%s\n" "no" >&6; }
3427 fi
3428
3429
3430 fi
3431 fi
3432 if test -z "$CC"; then
3433 # Extract the first word of "cc", so it can be a program name with args.
3434 set dummy cc; ac_word=$2
3435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3436 printf %s "checking for $ac_word... " >&6; }
3437 if test ${ac_cv_prog_CC+y}
3438 then :
3439 printf %s "(cached) " >&6
3440 else $as_nop
3441 if test -n "$CC"; then
3442 ac_cv_prog_CC="$CC" # Let the user override the test.
3443 else
3444 ac_prog_rejected=no
3445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446 for as_dir in $PATH
3447 do
3448 IFS=$as_save_IFS
3449 case $as_dir in #(((
3450 '') as_dir=./ ;;
3451 */) ;;
3452 *) as_dir=$as_dir/ ;;
3453 esac
3454 for ac_exec_ext in '' $ac_executable_extensions; do
3455 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3456 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3457 ac_prog_rejected=yes
3458 continue
3459 fi
3460 ac_cv_prog_CC="cc"
3461 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3462 break 2
3463 fi
3464 done
3465 done
3466 IFS=$as_save_IFS
3467
3468 if test $ac_prog_rejected = yes; then
3469 # We found a bogon in the path, so make sure we never use it.
3470 set dummy $ac_cv_prog_CC
3471 shift
3472 if test $# != 0; then
3473 # We chose a different compiler from the bogus one.
3474 # However, it has the same basename, so the bogon will be chosen
3475 # first if we set CC to just the basename; use the full file name.
3476 shift
3477 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3478 fi
3479 fi
3480 fi
3481 fi
3482 CC=$ac_cv_prog_CC
3483 if test -n "$CC"; then
3484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3485 printf "%s\n" "$CC" >&6; }
3486 else
3487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3488 printf "%s\n" "no" >&6; }
3489 fi
3490
3491
3492 fi
3493 if test -z "$CC"; then
3494 if test -n "$ac_tool_prefix"; then
3495 for ac_prog in cl.exe
3496 do
3497 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3498 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3500 printf %s "checking for $ac_word... " >&6; }
3501 if test ${ac_cv_prog_CC+y}
3502 then :
3503 printf %s "(cached) " >&6
3504 else $as_nop
3505 if test -n "$CC"; then
3506 ac_cv_prog_CC="$CC" # Let the user override the test.
3507 else
3508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3509 for as_dir in $PATH
3510 do
3511 IFS=$as_save_IFS
3512 case $as_dir in #(((
3513 '') as_dir=./ ;;
3514 */) ;;
3515 *) as_dir=$as_dir/ ;;
3516 esac
3517 for ac_exec_ext in '' $ac_executable_extensions; do
3518 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3519 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3520 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3521 break 2
3522 fi
3523 done
3524 done
3525 IFS=$as_save_IFS
3526
3527 fi
3528 fi
3529 CC=$ac_cv_prog_CC
3530 if test -n "$CC"; then
3531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3532 printf "%s\n" "$CC" >&6; }
3533 else
3534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3535 printf "%s\n" "no" >&6; }
3536 fi
3537
3538
3539 test -n "$CC" && break
3540 done
3541 fi
3542 if test -z "$CC"; then
3543 ac_ct_CC=$CC
3544 for ac_prog in cl.exe
3545 do
3546 # Extract the first word of "$ac_prog", so it can be a program name with args.
3547 set dummy $ac_prog; ac_word=$2
3548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3549 printf %s "checking for $ac_word... " >&6; }
3550 if test ${ac_cv_prog_ac_ct_CC+y}
3551 then :
3552 printf %s "(cached) " >&6
3553 else $as_nop
3554 if test -n "$ac_ct_CC"; then
3555 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3556 else
3557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3558 for as_dir in $PATH
3559 do
3560 IFS=$as_save_IFS
3561 case $as_dir in #(((
3562 '') as_dir=./ ;;
3563 */) ;;
3564 *) as_dir=$as_dir/ ;;
3565 esac
3566 for ac_exec_ext in '' $ac_executable_extensions; do
3567 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3568 ac_cv_prog_ac_ct_CC="$ac_prog"
3569 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3570 break 2
3571 fi
3572 done
3573 done
3574 IFS=$as_save_IFS
3575
3576 fi
3577 fi
3578 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3579 if test -n "$ac_ct_CC"; then
3580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3581 printf "%s\n" "$ac_ct_CC" >&6; }
3582 else
3583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584 printf "%s\n" "no" >&6; }
3585 fi
3586
3587
3588 test -n "$ac_ct_CC" && break
3589 done
3590
3591 if test "x$ac_ct_CC" = x; then
3592 CC=""
3593 else
3594 case $cross_compiling:$ac_tool_warned in
3595 yes:)
3596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3597 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3598 ac_tool_warned=yes ;;
3599 esac
3600 CC=$ac_ct_CC
3601 fi
3602 fi
3603
3604 fi
3605 if test -z "$CC"; then
3606 if test -n "$ac_tool_prefix"; then
3607 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3608 set dummy ${ac_tool_prefix}clang; ac_word=$2
3609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610 printf %s "checking for $ac_word... " >&6; }
3611 if test ${ac_cv_prog_CC+y}
3612 then :
3613 printf %s "(cached) " >&6
3614 else $as_nop
3615 if test -n "$CC"; then
3616 ac_cv_prog_CC="$CC" # Let the user override the test.
3617 else
3618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619 for as_dir in $PATH
3620 do
3621 IFS=$as_save_IFS
3622 case $as_dir in #(((
3623 '') as_dir=./ ;;
3624 */) ;;
3625 *) as_dir=$as_dir/ ;;
3626 esac
3627 for ac_exec_ext in '' $ac_executable_extensions; do
3628 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3629 ac_cv_prog_CC="${ac_tool_prefix}clang"
3630 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3631 break 2
3632 fi
3633 done
3634 done
3635 IFS=$as_save_IFS
3636
3637 fi
3638 fi
3639 CC=$ac_cv_prog_CC
3640 if test -n "$CC"; then
3641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3642 printf "%s\n" "$CC" >&6; }
3643 else
3644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645 printf "%s\n" "no" >&6; }
3646 fi
3647
3648
3649 fi
3650 if test -z "$ac_cv_prog_CC"; then
3651 ac_ct_CC=$CC
3652 # Extract the first word of "clang", so it can be a program name with args.
3653 set dummy clang; ac_word=$2
3654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3655 printf %s "checking for $ac_word... " >&6; }
3656 if test ${ac_cv_prog_ac_ct_CC+y}
3657 then :
3658 printf %s "(cached) " >&6
3659 else $as_nop
3660 if test -n "$ac_ct_CC"; then
3661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3662 else
3663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664 for as_dir in $PATH
3665 do
3666 IFS=$as_save_IFS
3667 case $as_dir in #(((
3668 '') as_dir=./ ;;
3669 */) ;;
3670 *) as_dir=$as_dir/ ;;
3671 esac
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3674 ac_cv_prog_ac_ct_CC="clang"
3675 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3676 break 2
3677 fi
3678 done
3679 done
3680 IFS=$as_save_IFS
3681
3682 fi
3683 fi
3684 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3685 if test -n "$ac_ct_CC"; then
3686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3687 printf "%s\n" "$ac_ct_CC" >&6; }
3688 else
3689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3690 printf "%s\n" "no" >&6; }
3691 fi
3692
3693 if test "x$ac_ct_CC" = x; then
3694 CC=""
3695 else
3696 case $cross_compiling:$ac_tool_warned in
3697 yes:)
3698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3699 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3700 ac_tool_warned=yes ;;
3701 esac
3702 CC=$ac_ct_CC
3703 fi
3704 else
3705 CC="$ac_cv_prog_CC"
3706 fi
3707
3708 fi
3709
3710
3711 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3712 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3713 as_fn_error $? "no acceptable C compiler found in \$PATH
3714 See \`config.log' for more details" "$LINENO" 5; }
3715
3716 # Provide some information about the compiler.
3717 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3718 set X $ac_compile
3719 ac_compiler=$2
3720 for ac_option in --version -v -V -qversion -version; do
3721 { { ac_try="$ac_compiler $ac_option >&5"
3722 case "(($ac_try" in
3723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3724 *) ac_try_echo=$ac_try;;
3725 esac
3726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3727 printf "%s\n" "$ac_try_echo"; } >&5
3728 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3729 ac_status=$?
3730 if test -s conftest.err; then
3731 sed '10a\
3732 ... rest of stderr output deleted ...
3733 10q' conftest.err >conftest.er1
3734 cat conftest.er1 >&5
3735 fi
3736 rm -f conftest.er1 conftest.err
3737 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3738 test $ac_status = 0; }
3739 done
3740
3741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3742 /* end confdefs.h. */
3743
3744 int
3745 main (void)
3746 {
3747
3748 ;
3749 return 0;
3750 }
3751 _ACEOF
3752 ac_clean_files_save=$ac_clean_files
3753 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3754 # Try to create an executable without -o first, disregard a.out.
3755 # It will help us diagnose broken compilers, and finding out an intuition
3756 # of exeext.
3757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3758 printf %s "checking whether the C compiler works... " >&6; }
3759 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3760
3761 # The possible output files:
3762 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3763
3764 ac_rmfiles=
3765 for ac_file in $ac_files
3766 do
3767 case $ac_file in
3768 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3769 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3770 esac
3771 done
3772 rm -f $ac_rmfiles
3773
3774 if { { ac_try="$ac_link_default"
3775 case "(($ac_try" in
3776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3777 *) ac_try_echo=$ac_try;;
3778 esac
3779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3780 printf "%s\n" "$ac_try_echo"; } >&5
3781 (eval "$ac_link_default") 2>&5
3782 ac_status=$?
3783 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3784 test $ac_status = 0; }
3785 then :
3786 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3787 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3788 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3789 # so that the user can short-circuit this test for compilers unknown to
3790 # Autoconf.
3791 for ac_file in $ac_files ''
3792 do
3793 test -f "$ac_file" || continue
3794 case $ac_file in
3795 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3796 ;;
3797 [ab].out )
3798 # We found the default executable, but exeext='' is most
3799 # certainly right.
3800 break;;
3801 *.* )
3802 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3803 then :; else
3804 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3805 fi
3806 # We set ac_cv_exeext here because the later test for it is not
3807 # safe: cross compilers may not add the suffix if given an `-o'
3808 # argument, so we may need to know it at that point already.
3809 # Even if this section looks crufty: it has the advantage of
3810 # actually working.
3811 break;;
3812 * )
3813 break;;
3814 esac
3815 done
3816 test "$ac_cv_exeext" = no && ac_cv_exeext=
3817
3818 else $as_nop
3819 ac_file=''
3820 fi
3821 if test -z "$ac_file"
3822 then :
3823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824 printf "%s\n" "no" >&6; }
3825 printf "%s\n" "$as_me: failed program was:" >&5
3826 sed 's/^/| /' conftest.$ac_ext >&5
3827
3828 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3829 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3830 as_fn_error 77 "C compiler cannot create executables
3831 See \`config.log' for more details" "$LINENO" 5; }
3832 else $as_nop
3833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3834 printf "%s\n" "yes" >&6; }
3835 fi
3836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3837 printf %s "checking for C compiler default output file name... " >&6; }
3838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3839 printf "%s\n" "$ac_file" >&6; }
3840 ac_exeext=$ac_cv_exeext
3841
3842 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3843 ac_clean_files=$ac_clean_files_save
3844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3845 printf %s "checking for suffix of executables... " >&6; }
3846 if { { ac_try="$ac_link"
3847 case "(($ac_try" in
3848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3849 *) ac_try_echo=$ac_try;;
3850 esac
3851 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3852 printf "%s\n" "$ac_try_echo"; } >&5
3853 (eval "$ac_link") 2>&5
3854 ac_status=$?
3855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3856 test $ac_status = 0; }
3857 then :
3858 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3859 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3860 # work properly (i.e., refer to `conftest.exe'), while it won't with
3861 # `rm'.
3862 for ac_file in conftest.exe conftest conftest.*; do
3863 test -f "$ac_file" || continue
3864 case $ac_file in
3865 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3866 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3867 break;;
3868 * ) break;;
3869 esac
3870 done
3871 else $as_nop
3872 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3873 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3874 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3875 See \`config.log' for more details" "$LINENO" 5; }
3876 fi
3877 rm -f conftest conftest$ac_cv_exeext
3878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3879 printf "%s\n" "$ac_cv_exeext" >&6; }
3880
3881 rm -f conftest.$ac_ext
3882 EXEEXT=$ac_cv_exeext
3883 ac_exeext=$EXEEXT
3884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3885 /* end confdefs.h. */
3886 #include <stdio.h>
3887 int
3888 main (void)
3889 {
3890 FILE *f = fopen ("conftest.out", "w");
3891 return ferror (f) || fclose (f) != 0;
3892
3893 ;
3894 return 0;
3895 }
3896 _ACEOF
3897 ac_clean_files="$ac_clean_files conftest.out"
3898 # Check that the compiler produces executables we can run. If not, either
3899 # the compiler is broken, or we cross compile.
3900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3901 printf %s "checking whether we are cross compiling... " >&6; }
3902 if test "$cross_compiling" != yes; then
3903 { { ac_try="$ac_link"
3904 case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907 esac
3908 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3909 printf "%s\n" "$ac_try_echo"; } >&5
3910 (eval "$ac_link") 2>&5
3911 ac_status=$?
3912 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3913 test $ac_status = 0; }
3914 if { ac_try='./conftest$ac_cv_exeext'
3915 { { case "(($ac_try" in
3916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3917 *) ac_try_echo=$ac_try;;
3918 esac
3919 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3920 printf "%s\n" "$ac_try_echo"; } >&5
3921 (eval "$ac_try") 2>&5
3922 ac_status=$?
3923 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3924 test $ac_status = 0; }; }; then
3925 cross_compiling=no
3926 else
3927 if test "$cross_compiling" = maybe; then
3928 cross_compiling=yes
3929 else
3930 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3931 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3932 as_fn_error 77 "cannot run C compiled programs.
3933 If you meant to cross compile, use \`--host'.
3934 See \`config.log' for more details" "$LINENO" 5; }
3935 fi
3936 fi
3937 fi
3938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3939 printf "%s\n" "$cross_compiling" >&6; }
3940
3941 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3942 ac_clean_files=$ac_clean_files_save
3943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3944 printf %s "checking for suffix of object files... " >&6; }
3945 if test ${ac_cv_objext+y}
3946 then :
3947 printf %s "(cached) " >&6
3948 else $as_nop
3949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3950 /* end confdefs.h. */
3951
3952 int
3953 main (void)
3954 {
3955
3956 ;
3957 return 0;
3958 }
3959 _ACEOF
3960 rm -f conftest.o conftest.obj
3961 if { { ac_try="$ac_compile"
3962 case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965 esac
3966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967 printf "%s\n" "$ac_try_echo"; } >&5
3968 (eval "$ac_compile") 2>&5
3969 ac_status=$?
3970 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }
3972 then :
3973 for ac_file in conftest.o conftest.obj conftest.*; do
3974 test -f "$ac_file" || continue;
3975 case $ac_file in
3976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3977 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3978 break;;
3979 esac
3980 done
3981 else $as_nop
3982 printf "%s\n" "$as_me: failed program was:" >&5
3983 sed 's/^/| /' conftest.$ac_ext >&5
3984
3985 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3987 as_fn_error $? "cannot compute suffix of object files: cannot compile
3988 See \`config.log' for more details" "$LINENO" 5; }
3989 fi
3990 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3991 fi
3992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3993 printf "%s\n" "$ac_cv_objext" >&6; }
3994 OBJEXT=$ac_cv_objext
3995 ac_objext=$OBJEXT
3996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3997 printf %s "checking whether the compiler supports GNU C... " >&6; }
3998 if test ${ac_cv_c_compiler_gnu+y}
3999 then :
4000 printf %s "(cached) " >&6
4001 else $as_nop
4002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4003 /* end confdefs.h. */
4004
4005 int
4006 main (void)
4007 {
4008 #ifndef __GNUC__
4009 choke me
4010 #endif
4011
4012 ;
4013 return 0;
4014 }
4015 _ACEOF
4016 if ac_fn_c_try_compile "$LINENO"
4017 then :
4018 ac_compiler_gnu=yes
4019 else $as_nop
4020 ac_compiler_gnu=no
4021 fi
4022 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4023 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4024
4025 fi
4026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4027 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4029
4030 if test $ac_compiler_gnu = yes; then
4031 GCC=yes
4032 else
4033 GCC=
4034 fi
4035 ac_test_CFLAGS=${CFLAGS+y}
4036 ac_save_CFLAGS=$CFLAGS
4037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4038 printf %s "checking whether $CC accepts -g... " >&6; }
4039 if test ${ac_cv_prog_cc_g+y}
4040 then :
4041 printf %s "(cached) " >&6
4042 else $as_nop
4043 ac_save_c_werror_flag=$ac_c_werror_flag
4044 ac_c_werror_flag=yes
4045 ac_cv_prog_cc_g=no
4046 CFLAGS="-g"
4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048 /* end confdefs.h. */
4049
4050 int
4051 main (void)
4052 {
4053
4054 ;
4055 return 0;
4056 }
4057 _ACEOF
4058 if ac_fn_c_try_compile "$LINENO"
4059 then :
4060 ac_cv_prog_cc_g=yes
4061 else $as_nop
4062 CFLAGS=""
4063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4064 /* end confdefs.h. */
4065
4066 int
4067 main (void)
4068 {
4069
4070 ;
4071 return 0;
4072 }
4073 _ACEOF
4074 if ac_fn_c_try_compile "$LINENO"
4075 then :
4076
4077 else $as_nop
4078 ac_c_werror_flag=$ac_save_c_werror_flag
4079 CFLAGS="-g"
4080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4081 /* end confdefs.h. */
4082
4083 int
4084 main (void)
4085 {
4086
4087 ;
4088 return 0;
4089 }
4090 _ACEOF
4091 if ac_fn_c_try_compile "$LINENO"
4092 then :
4093 ac_cv_prog_cc_g=yes
4094 fi
4095 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4096 fi
4097 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4098 fi
4099 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4100 ac_c_werror_flag=$ac_save_c_werror_flag
4101 fi
4102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4103 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4104 if test $ac_test_CFLAGS; then
4105 CFLAGS=$ac_save_CFLAGS
4106 elif test $ac_cv_prog_cc_g = yes; then
4107 if test "$GCC" = yes; then
4108 CFLAGS="-g -O2"
4109 else
4110 CFLAGS="-g"
4111 fi
4112 else
4113 if test "$GCC" = yes; then
4114 CFLAGS="-O2"
4115 else
4116 CFLAGS=
4117 fi
4118 fi
4119 ac_prog_cc_stdc=no
4120 if test x$ac_prog_cc_stdc = xno
4121 then :
4122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4123 printf %s "checking for $CC option to enable C11 features... " >&6; }
4124 if test ${ac_cv_prog_cc_c11+y}
4125 then :
4126 printf %s "(cached) " >&6
4127 else $as_nop
4128 ac_cv_prog_cc_c11=no
4129 ac_save_CC=$CC
4130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131 /* end confdefs.h. */
4132 $ac_c_conftest_c11_program
4133 _ACEOF
4134 for ac_arg in '' -std=gnu11
4135 do
4136 CC="$ac_save_CC $ac_arg"
4137 if ac_fn_c_try_compile "$LINENO"
4138 then :
4139 ac_cv_prog_cc_c11=$ac_arg
4140 fi
4141 rm -f core conftest.err conftest.$ac_objext conftest.beam
4142 test "x$ac_cv_prog_cc_c11" != "xno" && break
4143 done
4144 rm -f conftest.$ac_ext
4145 CC=$ac_save_CC
4146 fi
4147
4148 if test "x$ac_cv_prog_cc_c11" = xno
4149 then :
4150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4151 printf "%s\n" "unsupported" >&6; }
4152 else $as_nop
4153 if test "x$ac_cv_prog_cc_c11" = x
4154 then :
4155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4156 printf "%s\n" "none needed" >&6; }
4157 else $as_nop
4158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4159 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4160 CC="$CC $ac_cv_prog_cc_c11"
4161 fi
4162 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4163 ac_prog_cc_stdc=c11
4164 fi
4165 fi
4166 if test x$ac_prog_cc_stdc = xno
4167 then :
4168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4169 printf %s "checking for $CC option to enable C99 features... " >&6; }
4170 if test ${ac_cv_prog_cc_c99+y}
4171 then :
4172 printf %s "(cached) " >&6
4173 else $as_nop
4174 ac_cv_prog_cc_c99=no
4175 ac_save_CC=$CC
4176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177 /* end confdefs.h. */
4178 $ac_c_conftest_c99_program
4179 _ACEOF
4180 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4181 do
4182 CC="$ac_save_CC $ac_arg"
4183 if ac_fn_c_try_compile "$LINENO"
4184 then :
4185 ac_cv_prog_cc_c99=$ac_arg
4186 fi
4187 rm -f core conftest.err conftest.$ac_objext conftest.beam
4188 test "x$ac_cv_prog_cc_c99" != "xno" && break
4189 done
4190 rm -f conftest.$ac_ext
4191 CC=$ac_save_CC
4192 fi
4193
4194 if test "x$ac_cv_prog_cc_c99" = xno
4195 then :
4196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4197 printf "%s\n" "unsupported" >&6; }
4198 else $as_nop
4199 if test "x$ac_cv_prog_cc_c99" = x
4200 then :
4201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4202 printf "%s\n" "none needed" >&6; }
4203 else $as_nop
4204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4205 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4206 CC="$CC $ac_cv_prog_cc_c99"
4207 fi
4208 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4209 ac_prog_cc_stdc=c99
4210 fi
4211 fi
4212 if test x$ac_prog_cc_stdc = xno
4213 then :
4214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4215 printf %s "checking for $CC option to enable C89 features... " >&6; }
4216 if test ${ac_cv_prog_cc_c89+y}
4217 then :
4218 printf %s "(cached) " >&6
4219 else $as_nop
4220 ac_cv_prog_cc_c89=no
4221 ac_save_CC=$CC
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h. */
4224 $ac_c_conftest_c89_program
4225 _ACEOF
4226 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4227 do
4228 CC="$ac_save_CC $ac_arg"
4229 if ac_fn_c_try_compile "$LINENO"
4230 then :
4231 ac_cv_prog_cc_c89=$ac_arg
4232 fi
4233 rm -f core conftest.err conftest.$ac_objext conftest.beam
4234 test "x$ac_cv_prog_cc_c89" != "xno" && break
4235 done
4236 rm -f conftest.$ac_ext
4237 CC=$ac_save_CC
4238 fi
4239
4240 if test "x$ac_cv_prog_cc_c89" = xno
4241 then :
4242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4243 printf "%s\n" "unsupported" >&6; }
4244 else $as_nop
4245 if test "x$ac_cv_prog_cc_c89" = x
4246 then :
4247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4248 printf "%s\n" "none needed" >&6; }
4249 else $as_nop
4250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4251 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4252 CC="$CC $ac_cv_prog_cc_c89"
4253 fi
4254 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4255 ac_prog_cc_stdc=c89
4256 fi
4257 fi
4258
4259 ac_ext=c
4260 ac_cpp='$CPP $CPPFLAGS'
4261 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4262 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4263 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4264
4265
4266 if test "$ac_cv_prog_cc_c99" = "no"; then
4267 as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
4268 fi
4269
4270 #
4271 # Try to arrange for large file support.
4272 #
4273
4274 # Check whether --enable-largefile was given.
4275 if test ${enable_largefile+y}
4276 then :
4277 enableval=$enable_largefile;
4278 fi
4279
4280 if test "$enable_largefile" != no; then
4281
4282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4283 printf %s "checking for special C compiler options needed for large files... " >&6; }
4284 if test ${ac_cv_sys_largefile_CC+y}
4285 then :
4286 printf %s "(cached) " >&6
4287 else $as_nop
4288 ac_cv_sys_largefile_CC=no
4289 if test "$GCC" != yes; then
4290 ac_save_CC=$CC
4291 while :; do
4292 # IRIX 6.2 and later do not support large files by default,
4293 # so use the C compiler's -n32 option if that helps.
4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h. */
4296 #include <sys/types.h>
4297 /* Check that off_t can represent 2**63 - 1 correctly.
4298 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4299 since some C++ compilers masquerading as C compilers
4300 incorrectly reject 9223372036854775807. */
4301 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
4302 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4303 && LARGE_OFF_T % 2147483647 == 1)
4304 ? 1 : -1];
4305 int
4306 main (void)
4307 {
4308
4309 ;
4310 return 0;
4311 }
4312 _ACEOF
4313 if ac_fn_c_try_compile "$LINENO"
4314 then :
4315 break
4316 fi
4317 rm -f core conftest.err conftest.$ac_objext conftest.beam
4318 CC="$CC -n32"
4319 if ac_fn_c_try_compile "$LINENO"
4320 then :
4321 ac_cv_sys_largefile_CC=' -n32'; break
4322 fi
4323 rm -f core conftest.err conftest.$ac_objext conftest.beam
4324 break
4325 done
4326 CC=$ac_save_CC
4327 rm -f conftest.$ac_ext
4328 fi
4329 fi
4330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4331 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
4332 if test "$ac_cv_sys_largefile_CC" != no; then
4333 CC=$CC$ac_cv_sys_largefile_CC
4334 fi
4335
4336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4337 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4338 if test ${ac_cv_sys_file_offset_bits+y}
4339 then :
4340 printf %s "(cached) " >&6
4341 else $as_nop
4342 while :; do
4343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4344 /* end confdefs.h. */
4345 #include <sys/types.h>
4346 /* Check that off_t can represent 2**63 - 1 correctly.
4347 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4348 since some C++ compilers masquerading as C compilers
4349 incorrectly reject 9223372036854775807. */
4350 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
4351 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4352 && LARGE_OFF_T % 2147483647 == 1)
4353 ? 1 : -1];
4354 int
4355 main (void)
4356 {
4357
4358 ;
4359 return 0;
4360 }
4361 _ACEOF
4362 if ac_fn_c_try_compile "$LINENO"
4363 then :
4364 ac_cv_sys_file_offset_bits=no; break
4365 fi
4366 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4368 /* end confdefs.h. */
4369 #define _FILE_OFFSET_BITS 64
4370 #include <sys/types.h>
4371 /* Check that off_t can represent 2**63 - 1 correctly.
4372 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4373 since some C++ compilers masquerading as C compilers
4374 incorrectly reject 9223372036854775807. */
4375 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
4376 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4377 && LARGE_OFF_T % 2147483647 == 1)
4378 ? 1 : -1];
4379 int
4380 main (void)
4381 {
4382
4383 ;
4384 return 0;
4385 }
4386 _ACEOF
4387 if ac_fn_c_try_compile "$LINENO"
4388 then :
4389 ac_cv_sys_file_offset_bits=64; break
4390 fi
4391 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4392 ac_cv_sys_file_offset_bits=unknown
4393 break
4394 done
4395 fi
4396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4397 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
4398 case $ac_cv_sys_file_offset_bits in #(
4399 no | unknown) ;;
4400 *)
4401 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
4402 ;;
4403 esac
4404 rm -rf conftest*
4405 if test $ac_cv_sys_file_offset_bits = unknown; then
4406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4407 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
4408 if test ${ac_cv_sys_large_files+y}
4409 then :
4410 printf %s "(cached) " >&6
4411 else $as_nop
4412 while :; do
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414 /* end confdefs.h. */
4415 #include <sys/types.h>
4416 /* Check that off_t can represent 2**63 - 1 correctly.
4417 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4418 since some C++ compilers masquerading as C compilers
4419 incorrectly reject 9223372036854775807. */
4420 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
4421 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4422 && LARGE_OFF_T % 2147483647 == 1)
4423 ? 1 : -1];
4424 int
4425 main (void)
4426 {
4427
4428 ;
4429 return 0;
4430 }
4431 _ACEOF
4432 if ac_fn_c_try_compile "$LINENO"
4433 then :
4434 ac_cv_sys_large_files=no; break
4435 fi
4436 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4438 /* end confdefs.h. */
4439 #define _LARGE_FILES 1
4440 #include <sys/types.h>
4441 /* Check that off_t can represent 2**63 - 1 correctly.
4442 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4443 since some C++ compilers masquerading as C compilers
4444 incorrectly reject 9223372036854775807. */
4445 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
4446 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4447 && LARGE_OFF_T % 2147483647 == 1)
4448 ? 1 : -1];
4449 int
4450 main (void)
4451 {
4452
4453 ;
4454 return 0;
4455 }
4456 _ACEOF
4457 if ac_fn_c_try_compile "$LINENO"
4458 then :
4459 ac_cv_sys_large_files=1; break
4460 fi
4461 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4462 ac_cv_sys_large_files=unknown
4463 break
4464 done
4465 fi
4466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4467 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
4468 case $ac_cv_sys_large_files in #(
4469 no | unknown) ;;
4470 *)
4471 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
4472 ;;
4473 esac
4474 rm -rf conftest*
4475 fi
4476 fi
4477
4478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4479 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4480 if test ${ac_cv_sys_largefile_source+y}
4481 then :
4482 printf %s "(cached) " >&6
4483 else $as_nop
4484 while :; do
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486 /* end confdefs.h. */
4487 #include <sys/types.h> /* for off_t */
4488 #include <stdio.h>
4489 int
4490 main (void)
4491 {
4492 int (*fp) (FILE *, off_t, int) = fseeko;
4493 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4494 ;
4495 return 0;
4496 }
4497 _ACEOF
4498 if ac_fn_c_try_link "$LINENO"
4499 then :
4500 ac_cv_sys_largefile_source=no; break
4501 fi
4502 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4503 conftest$ac_exeext conftest.$ac_ext
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505 /* end confdefs.h. */
4506 #define _LARGEFILE_SOURCE 1
4507 #include <sys/types.h> /* for off_t */
4508 #include <stdio.h>
4509 int
4510 main (void)
4511 {
4512 int (*fp) (FILE *, off_t, int) = fseeko;
4513 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4514 ;
4515 return 0;
4516 }
4517 _ACEOF
4518 if ac_fn_c_try_link "$LINENO"
4519 then :
4520 ac_cv_sys_largefile_source=1; break
4521 fi
4522 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4523 conftest$ac_exeext conftest.$ac_ext
4524 ac_cv_sys_largefile_source=unknown
4525 break
4526 done
4527 fi
4528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4529 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
4530 case $ac_cv_sys_largefile_source in #(
4531 no | unknown) ;;
4532 *)
4533 printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
4534 ;;
4535 esac
4536 rm -rf conftest*
4537
4538 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4539 # in glibc 2.1.3, but that breaks too many other things.
4540 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4541 if test $ac_cv_sys_largefile_source != unknown; then
4542
4543 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
4544
4545 fi
4546
4547
4548 #
4549 # Get the size of a void *, to determine whether this is a 32-bit
4550 # or 64-bit build.
4551 #
4552 ac_header= ac_cache=
4553 for ac_item in $ac_header_c_list
4554 do
4555 if test $ac_cache; then
4556 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4557 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4558 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4559 fi
4560 ac_header= ac_cache=
4561 elif test $ac_header; then
4562 ac_cache=$ac_item
4563 else
4564 ac_header=$ac_item
4565 fi
4566 done
4567
4568
4569
4570
4571
4572
4573
4574
4575 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4576 then :
4577
4578 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4579
4580 fi
4581 # The cast to long int works around a bug in the HP C Compiler
4582 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4583 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4584 # This bug is HP SR number 8606223364.
4585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
4586 printf %s "checking size of void *... " >&6; }
4587 if test ${ac_cv_sizeof_void_p+y}
4588 then :
4589 printf %s "(cached) " >&6
4590 else $as_nop
4591 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
4592 then :
4593
4594 else $as_nop
4595 if test "$ac_cv_type_void_p" = yes; then
4596 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4597 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4598 as_fn_error 77 "cannot compute sizeof (void *)
4599 See \`config.log' for more details" "$LINENO" 5; }
4600 else
4601 ac_cv_sizeof_void_p=0
4602 fi
4603 fi
4604
4605 fi
4606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
4607 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
4608
4609
4610
4611 printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
4612
4613
4614 ac_lbl_c_sizeof_void_p="$ac_cv_sizeof_void_p"
4615
4616 #
4617 # Get the size of a time_t, to know whether it's 32-bit or 64-bit.
4618 #
4619 # The cast to long int works around a bug in the HP C Compiler
4620 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4621 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4622 # This bug is HP SR number 8606223364.
4623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
4624 printf %s "checking size of time_t... " >&6; }
4625 if test ${ac_cv_sizeof_time_t+y}
4626 then :
4627 printf %s "(cached) " >&6
4628 else $as_nop
4629 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "#include <time.h>
4630 "
4631 then :
4632
4633 else $as_nop
4634 if test "$ac_cv_type_time_t" = yes; then
4635 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4636 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4637 as_fn_error 77 "cannot compute sizeof (time_t)
4638 See \`config.log' for more details" "$LINENO" 5; }
4639 else
4640 ac_cv_sizeof_time_t=0
4641 fi
4642 fi
4643
4644 fi
4645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
4646 printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
4647
4648
4649
4650 printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
4651
4652
4653
4654
4655
4656
4657
4658 if test "$GCC" = yes ; then
4659 #
4660 # -Werror forces warnings to be errors.
4661 #
4662 ac_lbl_cc_force_warning_errors=-Werror
4663
4664 #
4665 # Try to have the compiler default to hiding symbols,
4666 # so that only symbols explicitly exported with
4667 # PCAP_API will be visible outside (shared) libraries.
4668 #
4669
4670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
4671 printf %s "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
4672 save_CFLAGS="$CFLAGS"
4673 CFLAGS="$CFLAGS -fvisibility=hidden"
4674 #
4675 # XXX - yes, this depends on the way AC_LANG_WERROR works,
4676 # but no mechanism is provided to turn AC_LANG_WERROR on
4677 # *and then turn it back off*, so that we *only* do it when
4678 # testing compiler options - 15 years after somebody asked
4679 # for it:
4680 #
4681 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
4682 #
4683 save_ac_c_werror_flag="$ac_c_werror_flag"
4684 ac_c_werror_flag=yes
4685 #
4686 # We use AC_LANG_SOURCE() so that we can control the complete
4687 # content of the program being compiled. We do not, for example,
4688 # want the default "int main()" that AC_LANG_PROGRAM() generates,
4689 # as it will generate a warning with -Wold-style-definition, meaning
4690 # that we would treat it as not working, as the test will fail if
4691 # *any* error output, including a warning due to the flag we're
4692 # testing, is generated; see
4693 #
4694 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4695 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4696 #
4697 # This may, as per those two messages, be fixed in autoconf 2.70,
4698 # but we only require 2.69 or newer for now.
4699 #
4700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701 /* end confdefs.h. */
4702 int main(void) { return 0; }
4703 _ACEOF
4704 if ac_fn_c_try_compile "$LINENO"
4705 then :
4706
4707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4708 printf "%s\n" "yes" >&6; }
4709 can_add_to_cflags=yes
4710 #
4711 # The compile supports this; do we have some C code for
4712 # which the warning should *not* appear?
4713 # We test the fourth argument because the third argument
4714 # could contain quotes, breaking the test.
4715 #
4716 if test "x" != "x"
4717 then
4718 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4720 printf %s "checking whether -fvisibility=hidden ... " >&6; }
4721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4722 /* end confdefs.h. */
4723
4724 _ACEOF
4725 if ac_fn_c_try_compile "$LINENO"
4726 then :
4727
4728 #
4729 # Not a problem.
4730 #
4731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732 printf "%s\n" "no" >&6; }
4733
4734 else $as_nop
4735
4736 #
4737 # A problem.
4738 #
4739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4740 printf "%s\n" "yes" >&6; }
4741 can_add_to_cflags=no
4742
4743 fi
4744 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4745 fi
4746 CFLAGS="$save_CFLAGS"
4747 if test x"$can_add_to_cflags" = "xyes"
4748 then
4749 V_CCOPT="$V_CCOPT -fvisibility=hidden"
4750 fi
4751
4752 else $as_nop
4753
4754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755 printf "%s\n" "no" >&6; }
4756 CFLAGS="$save_CFLAGS"
4757
4758 fi
4759 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4760 ac_c_werror_flag="$save_ac_c_werror_flag"
4761
4762 else
4763 V_INCLS="$V_INCLS -I/usr/local/include"
4764 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4765
4766 case "$host_os" in
4767
4768 darwin*)
4769 #
4770 # This is assumed either to be GCC or clang, both
4771 # of which use -Werror to force warnings to be errors.
4772 #
4773 ac_lbl_cc_force_warning_errors=-Werror
4774
4775 #
4776 # Try to have the compiler default to hiding symbols,
4777 # so that only symbols explicitly exported with
4778 # PCAP_API will be visible outside (shared) libraries.
4779 #
4780
4781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
4782 printf %s "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
4783 save_CFLAGS="$CFLAGS"
4784 CFLAGS="$CFLAGS -fvisibility=hidden"
4785 #
4786 # XXX - yes, this depends on the way AC_LANG_WERROR works,
4787 # but no mechanism is provided to turn AC_LANG_WERROR on
4788 # *and then turn it back off*, so that we *only* do it when
4789 # testing compiler options - 15 years after somebody asked
4790 # for it:
4791 #
4792 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
4793 #
4794 save_ac_c_werror_flag="$ac_c_werror_flag"
4795 ac_c_werror_flag=yes
4796 #
4797 # We use AC_LANG_SOURCE() so that we can control the complete
4798 # content of the program being compiled. We do not, for example,
4799 # want the default "int main()" that AC_LANG_PROGRAM() generates,
4800 # as it will generate a warning with -Wold-style-definition, meaning
4801 # that we would treat it as not working, as the test will fail if
4802 # *any* error output, including a warning due to the flag we're
4803 # testing, is generated; see
4804 #
4805 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4806 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4807 #
4808 # This may, as per those two messages, be fixed in autoconf 2.70,
4809 # but we only require 2.69 or newer for now.
4810 #
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812 /* end confdefs.h. */
4813 int main(void) { return 0; }
4814 _ACEOF
4815 if ac_fn_c_try_compile "$LINENO"
4816 then :
4817
4818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4819 printf "%s\n" "yes" >&6; }
4820 can_add_to_cflags=yes
4821 #
4822 # The compile supports this; do we have some C code for
4823 # which the warning should *not* appear?
4824 # We test the fourth argument because the third argument
4825 # could contain quotes, breaking the test.
4826 #
4827 if test "x" != "x"
4828 then
4829 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4831 printf %s "checking whether -fvisibility=hidden ... " >&6; }
4832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4833 /* end confdefs.h. */
4834
4835 _ACEOF
4836 if ac_fn_c_try_compile "$LINENO"
4837 then :
4838
4839 #
4840 # Not a problem.
4841 #
4842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843 printf "%s\n" "no" >&6; }
4844
4845 else $as_nop
4846
4847 #
4848 # A problem.
4849 #
4850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4851 printf "%s\n" "yes" >&6; }
4852 can_add_to_cflags=no
4853
4854 fi
4855 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4856 fi
4857 CFLAGS="$save_CFLAGS"
4858 if test x"$can_add_to_cflags" = "xyes"
4859 then
4860 V_CCOPT="$V_CCOPT -fvisibility=hidden"
4861 fi
4862
4863 else $as_nop
4864
4865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866 printf "%s\n" "no" >&6; }
4867 CFLAGS="$save_CFLAGS"
4868
4869 fi
4870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4871 ac_c_werror_flag="$save_ac_c_werror_flag"
4872
4873 ;;
4874
4875 hpux*)
4876 #
4877 # HP C, which is what we presume we're using, doesn't
4878 # exit with a non-zero exit status if we hand it an
4879 # invalid -W flag, can't be forced to do so even with
4880 # +We, and doesn't handle GCC-style -W flags, so we
4881 # don't want to try using GCC-style -W flags.
4882 #
4883 ac_lbl_cc_dont_try_gcc_dashW=yes
4884 ;;
4885
4886 irix*)
4887 #
4888 # MIPS C, which is what we presume we're using, doesn't
4889 # necessarily exit with a non-zero exit status if we
4890 # hand it an invalid -W flag, can't be forced to do
4891 # so, and doesn't handle GCC-style -W flags, so we
4892 # don't want to try using GCC-style -W flags.
4893 #
4894 ac_lbl_cc_dont_try_gcc_dashW=yes
4895 #
4896 # It also, apparently, defaults to "char" being
4897 # unsigned, unlike most other C implementations;
4898 # I suppose we could say "signed char" whenever
4899 # we want to guarantee a signed "char", but let's
4900 # just force signed chars.
4901 #
4902 # -xansi is normally the default, but the
4903 # configure script was setting it; perhaps -cckr
4904 # was the default in the Old Days. (Then again,
4905 # that would probably be for backwards compatibility
4906 # in the days when ANSI C was Shiny and New, i.e.
4907 # 1989 and the early '90's, so maybe we can just
4908 # drop support for those compilers.)
4909 #
4910 # -g is equivalent to -g2, which turns off
4911 # optimization; we choose -g3, which generates
4912 # debugging information but doesn't turn off
4913 # optimization (even if the optimization would
4914 # cause inaccuracies in debugging).
4915 #
4916 V_CCOPT="$V_CCOPT -xansi -signed -g3"
4917 ;;
4918
4919 osf*)
4920 #
4921 # Presumed to be DEC OSF/1, Digital UNIX, or
4922 # Tru64 UNIX.
4923 #
4924 # The DEC C compiler, which is what we presume we're
4925 # using, doesn't exit with a non-zero exit status if we
4926 # hand it an invalid -W flag, can't be forced to do
4927 # so, and doesn't handle GCC-style -W flags, so we
4928 # don't want to try using GCC-style -W flags.
4929 #
4930 ac_lbl_cc_dont_try_gcc_dashW=yes
4931 #
4932 # -g is equivalent to -g2, which turns off
4933 # optimization; we choose -g3, which generates
4934 # debugging information but doesn't turn off
4935 # optimization (even if the optimization would
4936 # cause inaccuracies in debugging).
4937 #
4938 V_CCOPT="$V_CCOPT -g3"
4939 ;;
4940
4941 solaris*)
4942 #
4943 # Assumed to be Sun C, which requires -errwarn to force
4944 # warnings to be treated as errors.
4945 #
4946 ac_lbl_cc_force_warning_errors=-errwarn
4947
4948 #
4949 # Try to have the compiler default to hiding symbols,
4950 # so that only symbols explicitly exported with
4951 # PCAP_API will be visible outside (shared) libraries.
4952 #
4953
4954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
4955 printf %s "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
4956 save_CFLAGS="$CFLAGS"
4957 CFLAGS="$CFLAGS -xldscope=hidden"
4958 #
4959 # XXX - yes, this depends on the way AC_LANG_WERROR works,
4960 # but no mechanism is provided to turn AC_LANG_WERROR on
4961 # *and then turn it back off*, so that we *only* do it when
4962 # testing compiler options - 15 years after somebody asked
4963 # for it:
4964 #
4965 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
4966 #
4967 save_ac_c_werror_flag="$ac_c_werror_flag"
4968 ac_c_werror_flag=yes
4969 #
4970 # We use AC_LANG_SOURCE() so that we can control the complete
4971 # content of the program being compiled. We do not, for example,
4972 # want the default "int main()" that AC_LANG_PROGRAM() generates,
4973 # as it will generate a warning with -Wold-style-definition, meaning
4974 # that we would treat it as not working, as the test will fail if
4975 # *any* error output, including a warning due to the flag we're
4976 # testing, is generated; see
4977 #
4978 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4979 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4980 #
4981 # This may, as per those two messages, be fixed in autoconf 2.70,
4982 # but we only require 2.69 or newer for now.
4983 #
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 /* end confdefs.h. */
4986 int main(void) { return 0; }
4987 _ACEOF
4988 if ac_fn_c_try_compile "$LINENO"
4989 then :
4990
4991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4992 printf "%s\n" "yes" >&6; }
4993 can_add_to_cflags=yes
4994 #
4995 # The compile supports this; do we have some C code for
4996 # which the warning should *not* appear?
4997 # We test the fourth argument because the third argument
4998 # could contain quotes, breaking the test.
4999 #
5000 if test "x" != "x"
5001 then
5002 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
5003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
5004 printf %s "checking whether -xldscope=hidden ... " >&6; }
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h. */
5007
5008 _ACEOF
5009 if ac_fn_c_try_compile "$LINENO"
5010 then :
5011
5012 #
5013 # Not a problem.
5014 #
5015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016 printf "%s\n" "no" >&6; }
5017
5018 else $as_nop
5019
5020 #
5021 # A problem.
5022 #
5023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5024 printf "%s\n" "yes" >&6; }
5025 can_add_to_cflags=no
5026
5027 fi
5028 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5029 fi
5030 CFLAGS="$save_CFLAGS"
5031 if test x"$can_add_to_cflags" = "xyes"
5032 then
5033 V_CCOPT="$V_CCOPT -xldscope=hidden"
5034 fi
5035
5036 else $as_nop
5037
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039 printf "%s\n" "no" >&6; }
5040 CFLAGS="$save_CFLAGS"
5041
5042 fi
5043 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5044 ac_c_werror_flag="$save_ac_c_werror_flag"
5045
5046 ;;
5047
5048 ultrix*)
5049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
5050 printf %s "checking that Ultrix $CC hacks const in prototypes... " >&6; }
5051 if test ${ac_cv_lbl_cc_const_proto+y}
5052 then :
5053 printf %s "(cached) " >&6
5054 else $as_nop
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056 /* end confdefs.h. */
5057 #include <sys/types.h>
5058 int
5059 main (void)
5060 {
5061 struct a { int b; };
5062 void c(const struct a *)
5063 ;
5064 return 0;
5065 }
5066 _ACEOF
5067 if ac_fn_c_try_compile "$LINENO"
5068 then :
5069 ac_cv_lbl_cc_const_proto=yes
5070 else $as_nop
5071 ac_cv_lbl_cc_const_proto=no
5072 fi
5073 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5074 fi
5075
5076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
5077 printf "%s\n" "$ac_cv_lbl_cc_const_proto" >&6; }
5078 if test $ac_cv_lbl_cc_const_proto = no ; then
5079
5080 printf "%s\n" "#define const /**/" >>confdefs.h
5081
5082 fi
5083 ;;
5084 esac
5085 V_CCOPT="$V_CCOPT -O"
5086 fi
5087
5088
5089 if test "$GCC" = yes ; then
5090 #
5091 # On platforms where we build a shared library:
5092 #
5093 # add options to generate position-independent code,
5094 # if necessary (it's the default in AIX and Darwin/macOS);
5095 #
5096 # define option to set the soname of the shared library,
5097 # if the OS supports that;
5098 #
5099 # add options to specify, at link time, a directory to
5100 # add to the run-time search path, if that's necessary.
5101 #
5102 V_SHLIB_CMD="\$(CC)"
5103 V_SHLIB_OPT="-shared"
5104 case "$host_os" in
5105
5106 aix*)
5107 ;;
5108
5109 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
5110 #
5111 # Platforms where the C compiler is GCC or accepts
5112 # compatible command-line arguments, and the linker
5113 # is the GNU linker or accepts compatible command-line
5114 # arguments.
5115 #
5116 # Some instruction sets require -fPIC on some
5117 # operating systems. Check for them. If you
5118 # have a combination that requires it, add it
5119 # here.
5120 #
5121 PIC_OPT=-fpic
5122 case "$host_cpu" in
5123
5124 sparc64*)
5125 case "$host_os" in
5126
5127 freebsd*|openbsd*|linux*)
5128 PIC_OPT=-fPIC
5129 ;;
5130 esac
5131 ;;
5132 esac
5133 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
5134 V_SONAME_OPT="-Wl,-soname,"
5135 ;;
5136
5137 hpux*)
5138 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5139 #
5140 # XXX - this assumes GCC is using the HP linker,
5141 # rather than the GNU linker, and that the "+h"
5142 # option is used on all HP-UX platforms, both .sl
5143 # and .so.
5144 #
5145 V_SONAME_OPT="-Wl,+h,"
5146 #
5147 # By default, directories specified with -L
5148 # are added to the run-time search path, so
5149 # we don't add them in pcap-config.
5150 #
5151 ;;
5152
5153 solaris*)
5154 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5155 #
5156 # Sun/Oracle's C compiler, GCC, and GCC-compatible
5157 # compilers support -Wl,{comma-separated list of options},
5158 # and we use the C compiler, not ld, for all linking,
5159 # including linking to produce a shared library.
5160 #
5161 V_SONAME_OPT="-Wl,-h,"
5162 ;;
5163 esac
5164 else
5165 #
5166 # Set the appropriate compiler flags and, on platforms
5167 # where we build a shared library:
5168 #
5169 # add options to generate position-independent code,
5170 # if necessary (it's the default in Darwin/macOS);
5171 #
5172 # if we generate ".so" shared libraries, define the
5173 # appropriate options for building the shared library;
5174 #
5175 # add options to specify, at link time, a directory to
5176 # add to the run-time search path, if that's necessary.
5177 #
5178 # Note: spaces after V_SONAME_OPT are significant; on
5179 # some platforms the soname is passed with a GCC-like
5180 # "-Wl,-soname,{soname}" option, with the soname part
5181 # of the option, while on other platforms the C compiler
5182 # driver takes it as a regular option with the soname
5183 # following the option.
5184 #
5185 case "$host_os" in
5186
5187 aix*)
5188 V_SHLIB_CMD="\$(CC)"
5189 V_SHLIB_OPT="-G -bnoentry -bexpall"
5190 ;;
5191
5192 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
5193 #
5194 # Platforms where the C compiler is GCC or accepts
5195 # compatible command-line arguments, and the linker
5196 # is the GNU linker or accepts compatible command-line
5197 # arguments.
5198 #
5199 # XXX - does 64-bit SPARC require -fPIC?
5200 #
5201 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5202 V_SHLIB_CMD="\$(CC)"
5203 V_SHLIB_OPT="-shared"
5204 V_SONAME_OPT="-Wl,-soname,"
5205 ;;
5206
5207 hpux*)
5208 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
5209 V_SHLIB_CMD="\$(LD)"
5210 V_SHLIB_OPT="-b"
5211 V_SONAME_OPT="+h "
5212 #
5213 # By default, directories specified with -L
5214 # are added to the run-time search path, so
5215 # we don't add them in pcap-config.
5216 #
5217 ;;
5218
5219 osf*)
5220 #
5221 # Presumed to be DEC OSF/1, Digital UNIX, or
5222 # Tru64 UNIX.
5223 #
5224 V_SHLIB_CMD="\$(CC)"
5225 V_SHLIB_OPT="-shared"
5226 V_SONAME_OPT="-soname "
5227 ;;
5228
5229 solaris*)
5230 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
5231 V_SHLIB_CMD="\$(CC)"
5232 V_SHLIB_OPT="-G"
5233 #
5234 # Sun/Oracle's C compiler, GCC, and GCC-compatible
5235 # compilers support -Wl,{comma-separated list of options},
5236 # and we use the C compiler, not ld, for all linking,
5237 # including linking to produce a shared library.
5238 #
5239 V_SONAME_OPT="-Wl,-h,"
5240 ;;
5241 esac
5242 fi
5243
5244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5245 printf %s "checking for inline... " >&6; }
5246 save_CFLAGS="$CFLAGS"
5247 CFLAGS="$V_CCOPT"
5248 if test ${ac_cv_lbl_inline+y}
5249 then :
5250 printf %s "(cached) " >&6
5251 else $as_nop
5252
5253 ac_cv_lbl_inline=""
5254 ac_lbl_cc_inline=no
5255 for ac_lbl_inline in inline __inline__ __inline
5256 do
5257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258 /* end confdefs.h. */
5259 #define inline $ac_lbl_inline
5260 static inline struct iltest *foo(void);
5261 struct iltest {
5262 int iltest1;
5263 int iltest2;
5264 };
5265
5266 static inline struct iltest *
5267 foo()
5268 {
5269 static struct iltest xxx;
5270
5271 return &xxx;
5272 }
5273 int
5274 main (void)
5275 {
5276
5277 ;
5278 return 0;
5279 }
5280 _ACEOF
5281 if ac_fn_c_try_compile "$LINENO"
5282 then :
5283 ac_lbl_cc_inline=yes
5284 fi
5285 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5286 if test "$ac_lbl_cc_inline" = yes ; then
5287 break;
5288 fi
5289 done
5290 if test "$ac_lbl_cc_inline" = yes ; then
5291 ac_cv_lbl_inline=$ac_lbl_inline
5292 fi
5293 fi
5294
5295 CFLAGS="$save_CFLAGS"
5296 if test ! -z "$ac_cv_lbl_inline" ; then
5297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
5298 printf "%s\n" "$ac_cv_lbl_inline" >&6; }
5299 else
5300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301 printf "%s\n" "no" >&6; }
5302 fi
5303
5304 printf "%s\n" "#define inline $ac_cv_lbl_inline" >>confdefs.h
5305
5306
5307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5
5308 printf %s "checking for __atomic_load_n... " >&6; }
5309 if test ${ac_cv_have___atomic_load_n+y}
5310 then :
5311 printf %s "(cached) " >&6
5312 else $as_nop
5313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5314 /* end confdefs.h. */
5315
5316 int
5317 main (void)
5318 {
5319
5320 int i = 17;
5321 int j;
5322 j = __atomic_load_n(&i, __ATOMIC_RELAXED);
5323
5324 ;
5325 return 0;
5326 }
5327 _ACEOF
5328 if ac_fn_c_try_link "$LINENO"
5329 then :
5330 ac_have___atomic_load_n=yes
5331 else $as_nop
5332 ac_have___atomic_load_n=no
5333 fi
5334 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5335 conftest$ac_exeext conftest.$ac_ext
5336 fi
5337
5338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5
5339 printf "%s\n" "$ac_have___atomic_load_n" >&6; }
5340 if test $ac_have___atomic_load_n = yes ; then
5341
5342 printf "%s\n" "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h
5343
5344 fi
5345
5346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5
5347 printf %s "checking for __atomic_store_n... " >&6; }
5348 if test ${ac_cv_have___atomic_store_n+y}
5349 then :
5350 printf %s "(cached) " >&6
5351 else $as_nop
5352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5353 /* end confdefs.h. */
5354
5355 int
5356 main (void)
5357 {
5358
5359 int i;
5360 __atomic_store_n(&i, 17, __ATOMIC_RELAXED);
5361
5362 ;
5363 return 0;
5364 }
5365 _ACEOF
5366 if ac_fn_c_try_link "$LINENO"
5367 then :
5368 ac_have___atomic_store_n=yes
5369 else $as_nop
5370 ac_have___atomic_store_n=no
5371 fi
5372 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5373 conftest$ac_exeext conftest.$ac_ext
5374 fi
5375
5376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5
5377 printf "%s\n" "$ac_have___atomic_store_n" >&6; }
5378 if test $ac_have___atomic_store_n = yes ; then
5379
5380 printf "%s\n" "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h
5381
5382 fi
5383
5384 ac_fn_c_check_header_compile "$LINENO" "sys/ioccom.h" "ac_cv_header_sys_ioccom_h" "$ac_includes_default"
5385 if test "x$ac_cv_header_sys_ioccom_h" = xyes
5386 then :
5387 printf "%s\n" "#define HAVE_SYS_IOCCOM_H 1" >>confdefs.h
5388
5389 fi
5390 ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
5391 if test "x$ac_cv_header_sys_sockio_h" = xyes
5392 then :
5393 printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
5394
5395 fi
5396
5397 ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5398 if test "x$ac_cv_header_netpacket_packet_h" = xyes
5399 then :
5400 printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h
5401
5402 fi
5403
5404
5405 #
5406 # Check whether the platform for which we're compiling requires extra
5407 # defines and libraries. If so, add them to CFLAGS and LIBS, as we want
5408 # all subsequent tests to be done with those defines and libraries.
5409 #
5410 case "$host_os" in
5411 haiku*)
5412 #
5413 # Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't
5414 # use them.
5415 #
5416 CFLAGS="$CFLAGS -D_BSD_SOURCE"
5417 #
5418 # Haiku has getpass in libbsd.
5419 #
5420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpass in -lbsd" >&5
5421 printf %s "checking for getpass in -lbsd... " >&6; }
5422 if test ${ac_cv_lib_bsd_getpass+y}
5423 then :
5424 printf %s "(cached) " >&6
5425 else $as_nop
5426 ac_check_lib_save_LIBS=$LIBS
5427 LIBS="-lbsd $LIBS"
5428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5429 /* end confdefs.h. */
5430
5431 /* Override any GCC internal prototype to avoid an error.
5432 Use char because int might match the return type of a GCC
5433 builtin and then its argument prototype would still apply. */
5434 char getpass ();
5435 int
5436 main (void)
5437 {
5438 return getpass ();
5439 ;
5440 return 0;
5441 }
5442 _ACEOF
5443 if ac_fn_c_try_link "$LINENO"
5444 then :
5445 ac_cv_lib_bsd_getpass=yes
5446 else $as_nop
5447 ac_cv_lib_bsd_getpass=no
5448 fi
5449 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5450 conftest$ac_exeext conftest.$ac_ext
5451 LIBS=$ac_check_lib_save_LIBS
5452 fi
5453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getpass" >&5
5454 printf "%s\n" "$ac_cv_lib_bsd_getpass" >&6; }
5455 if test "x$ac_cv_lib_bsd_getpass" = xyes
5456 then :
5457 printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
5458
5459 LIBS="-lbsd $LIBS"
5460
5461 fi
5462
5463 ;;
5464 esac
5465
5466
5467 save_CFLAGS="$CFLAGS"
5468 save_LIBS="$LIBS"
5469 save_LDFLAGS="$LDFLAGS"
5470
5471 if test "$GCC" = yes ; then
5472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
5473 printf %s "checking for ANSI ioctl definitions... " >&6; }
5474 if test ${ac_cv_lbl_gcc_fixincludes+y}
5475 then :
5476 printf %s "(cached) " >&6
5477 else $as_nop
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479 /* end confdefs.h. */
5480 /*
5481 * This generates a "duplicate case value" when fixincludes
5482 * has not be run.
5483 */
5484 # include <sys/types.h>
5485 # include <sys/time.h>
5486 # include <sys/ioctl.h>
5487 # ifdef HAVE_SYS_IOCCOM_H
5488 # include <sys/ioccom.h>
5489 # endif
5490 int
5491 main (void)
5492 {
5493 switch (0) {
5494 case _IO('A', 1):;
5495 case _IO('B', 1):;
5496 }
5497 ;
5498 return 0;
5499 }
5500 _ACEOF
5501 if ac_fn_c_try_compile "$LINENO"
5502 then :
5503 ac_cv_lbl_gcc_fixincludes=yes
5504 else $as_nop
5505 ac_cv_lbl_gcc_fixincludes=no
5506 fi
5507 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5508 fi
5509
5510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
5511 printf "%s\n" "$ac_cv_lbl_gcc_fixincludes" >&6; }
5512 if test $ac_cv_lbl_gcc_fixincludes = no ; then
5513 # Don't cache failure
5514 unset ac_cv_lbl_gcc_fixincludes
5515 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
5516 fi
5517 fi
5518
5519 CFLAGS="$save_CFLAGS"
5520 LIBS="$save_LIBS"
5521 LDFLAGS="$save_LDFLAGS"
5522
5523
5524 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
5525 if test "x$ac_cv_func_strerror_r" = xyes
5526 then :
5527
5528 #
5529 # We have strerror_r; if we define _GNU_SOURCE, is it a
5530 # POSIX-compliant strerror_r() or a GNU strerror_r()?
5531 #
5532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
5533 printf %s "checking whether strerror_r is GNU-style... " >&6; }
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535 /* end confdefs.h. */
5536
5537 #define _GNU_SOURCE
5538 #include <string.h>
5539
5540 /* Define it GNU-style; that will cause an error if it's not GNU-style */
5541 extern char *strerror_r(int, char *, size_t);
5542
5543 int
5544 main(void)
5545 {
5546 return 0;
5547 }
5548
5549
5550 _ACEOF
5551 if ac_fn_c_try_compile "$LINENO"
5552 then :
5553
5554 # GNU-style
5555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5556 printf "%s\n" "yes" >&6; }
5557
5558 printf "%s\n" "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
5559
5560
5561 else $as_nop
5562
5563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5564 printf "%s\n" "no" >&6; }
5565
5566 printf "%s\n" "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
5567
5568
5569 fi
5570 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5571
5572 else $as_nop
5573
5574 #
5575 # We don't have strerror_r; do we have _wcserror_s?
5576 #
5577 ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
5578 if test "x$ac_cv_func__wcserror_s" = xyes
5579 then :
5580 printf "%s\n" "#define HAVE__WCSERROR_S 1" >>confdefs.h
5581
5582 fi
5583
5584
5585 fi
5586
5587
5588 #
5589 # Thanks, IBM, for not providing vsyslog() in AIX!
5590 #
5591 ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5592 if test "x$ac_cv_func_vsyslog" = xyes
5593 then :
5594 printf "%s\n" "#define HAVE_VSYSLOG 1" >>confdefs.h
5595
5596 fi
5597
5598
5599 #
5600 # Make sure we have vsnprintf() and snprintf(); we require them.
5601 #
5602 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5603 if test "x$ac_cv_func_vsnprintf" = xyes
5604 then :
5605
5606 else $as_nop
5607 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5608 fi
5609
5610 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5611 if test "x$ac_cv_func_snprintf" = xyes
5612 then :
5613
5614 else $as_nop
5615 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5616 fi
5617
5618
5619 needasprintf=no
5620
5621 for ac_func in vasprintf asprintf
5622 do :
5623 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
5624 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5625 if eval test \"x\$"$as_ac_var"\" = x"yes"
5626 then :
5627 cat >>confdefs.h <<_ACEOF
5628 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
5629 _ACEOF
5630
5631 else $as_nop
5632 needasprintf=yes
5633 fi
5634
5635 done
5636 if test $needasprintf = yes; then
5637 case " $LIBOBJS " in
5638 *" asprintf.$ac_objext "* ) ;;
5639 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5640 ;;
5641 esac
5642
5643 fi
5644
5645 needstrlcat=no
5646
5647 for ac_func in strlcat
5648 do :
5649 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5650 if test "x$ac_cv_func_strlcat" = xyes
5651 then :
5652 printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
5653
5654 else $as_nop
5655 needstrlcat=yes
5656 fi
5657
5658 done
5659 if test $needstrlcat = yes; then
5660 case " $LIBOBJS " in
5661 *" strlcat.$ac_objext "* ) ;;
5662 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5663 ;;
5664 esac
5665
5666 fi
5667
5668 needstrlcpy=no
5669
5670 for ac_func in strlcpy
5671 do :
5672 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5673 if test "x$ac_cv_func_strlcpy" = xyes
5674 then :
5675 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
5676
5677 else $as_nop
5678 needstrlcpy=yes
5679 fi
5680
5681 done
5682 if test $needstrlcpy = yes; then
5683 case " $LIBOBJS " in
5684 *" strlcpy.$ac_objext "* ) ;;
5685 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5686 ;;
5687 esac
5688
5689 fi
5690
5691 needstrtok_r=no
5692
5693 for ac_func in strtok_r
5694 do :
5695 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5696 if test "x$ac_cv_func_strtok_r" = xyes
5697 then :
5698 printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h
5699
5700 else $as_nop
5701 needstrtok_r=yes
5702 fi
5703
5704 done
5705 if test $needstrtok_r = yes; then
5706 case " $LIBOBJS " in
5707 *" strtok_r.$ac_objext "* ) ;;
5708 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5709 ;;
5710 esac
5711
5712 fi
5713
5714 #
5715 # Do we have ffs(), and is it declared in <strings.h>?
5716 #
5717 ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5718 if test "x$ac_cv_func_ffs" = xyes
5719 then :
5720 printf "%s\n" "#define HAVE_FFS 1" >>confdefs.h
5721
5722 fi
5723
5724 if test "$ac_cv_func_ffs" = yes; then
5725 #
5726 # We have ffs(); is it declared in <strings.h>?
5727 #
5728 # This test fails if we don't have <strings.h> or if we do
5729 # but it doesn't declare ffs().
5730 #
5731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
5732 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
5733 if test ${ac_cv_c_undeclared_builtin_options+y}
5734 then :
5735 printf %s "(cached) " >&6
5736 else $as_nop
5737 ac_save_CFLAGS=$CFLAGS
5738 ac_cv_c_undeclared_builtin_options='cannot detect'
5739 for ac_arg in '' -fno-builtin; do
5740 CFLAGS="$ac_save_CFLAGS $ac_arg"
5741 # This test program should *not* compile successfully.
5742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5743 /* end confdefs.h. */
5744
5745 int
5746 main (void)
5747 {
5748 (void) strchr;
5749 ;
5750 return 0;
5751 }
5752 _ACEOF
5753 if ac_fn_c_try_compile "$LINENO"
5754 then :
5755
5756 else $as_nop
5757 # This test program should compile successfully.
5758 # No library function is consistently available on
5759 # freestanding implementations, so test against a dummy
5760 # declaration. Include always-available headers on the
5761 # off chance that they somehow elicit warnings.
5762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5763 /* end confdefs.h. */
5764 #include <float.h>
5765 #include <limits.h>
5766 #include <stdarg.h>
5767 #include <stddef.h>
5768 extern void ac_decl (int, char *);
5769
5770 int
5771 main (void)
5772 {
5773 (void) ac_decl (0, (char *) 0);
5774 (void) ac_decl;
5775
5776 ;
5777 return 0;
5778 }
5779 _ACEOF
5780 if ac_fn_c_try_compile "$LINENO"
5781 then :
5782 if test x"$ac_arg" = x
5783 then :
5784 ac_cv_c_undeclared_builtin_options='none needed'
5785 else $as_nop
5786 ac_cv_c_undeclared_builtin_options=$ac_arg
5787 fi
5788 break
5789 fi
5790 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5791 fi
5792 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5793 done
5794 CFLAGS=$ac_save_CFLAGS
5795
5796 fi
5797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
5798 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
5799 case $ac_cv_c_undeclared_builtin_options in #(
5800 'cannot detect') :
5801 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5802 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5803 as_fn_error $? "cannot make $CC report undeclared builtins
5804 See \`config.log' for more details" "$LINENO" 5; } ;; #(
5805 'none needed') :
5806 ac_c_undeclared_builtin_options='' ;; #(
5807 *) :
5808 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
5809 esac
5810
5811 ac_fn_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5812 #include <strings.h>
5813
5814 " "$ac_c_undeclared_builtin_options" "CFLAGS"
5815 if test "x$ac_cv_have_decl_ffs" = xyes
5816 then :
5817
5818
5819 printf "%s\n" "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5820
5821
5822 fi
5823 fi
5824
5825 #
5826 # Do this before checking for ether_hostton(), as it's a
5827 # "getaddrinfo()-ish function".
5828 #
5829
5830 #
5831 # Most operating systems have getaddrinfo(), and the other routines
5832 # we may need, in the default searched libraries (e.g., libc).
5833 # Check there first.
5834 #
5835 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5836 if test "x$ac_cv_func_getaddrinfo" = xyes
5837 then :
5838
5839 else $as_nop
5840
5841 #
5842 # Not found in the standard system libraries.
5843 #
5844 # In some versions of Solaris, we need to link with libsocket
5845 # and libnsl, so check in libsocket and also link with liblnsl
5846 # when doing this test.
5847 #
5848 # Linking with libsocket and libnsl will find all the routines
5849 # we need.
5850 #
5851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5852 printf %s "checking for getaddrinfo in -lsocket... " >&6; }
5853 if test ${ac_cv_lib_socket_getaddrinfo+y}
5854 then :
5855 printf %s "(cached) " >&6
5856 else $as_nop
5857 ac_check_lib_save_LIBS=$LIBS
5858 LIBS="-lsocket -lnsl $LIBS"
5859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5860 /* end confdefs.h. */
5861
5862 /* Override any GCC internal prototype to avoid an error.
5863 Use char because int might match the return type of a GCC
5864 builtin and then its argument prototype would still apply. */
5865 char getaddrinfo ();
5866 int
5867 main (void)
5868 {
5869 return getaddrinfo ();
5870 ;
5871 return 0;
5872 }
5873 _ACEOF
5874 if ac_fn_c_try_link "$LINENO"
5875 then :
5876 ac_cv_lib_socket_getaddrinfo=yes
5877 else $as_nop
5878 ac_cv_lib_socket_getaddrinfo=no
5879 fi
5880 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5881 conftest$ac_exeext conftest.$ac_ext
5882 LIBS=$ac_check_lib_save_LIBS
5883 fi
5884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5885 printf "%s\n" "$ac_cv_lib_socket_getaddrinfo" >&6; }
5886 if test "x$ac_cv_lib_socket_getaddrinfo" = xyes
5887 then :
5888
5889 #
5890 # OK, we found it in libsocket.
5891 #
5892 LIBS="-lsocket -lnsl $LIBS"
5893
5894 else $as_nop
5895
5896 #
5897 # Not found in libsocket; test for it in libnetwork, which
5898 # is where it is in Haiku.
5899 #
5900 # Linking with libnetwork will find all the routines we
5901 # need.
5902 #
5903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
5904 printf %s "checking for getaddrinfo in -lnetwork... " >&6; }
5905 if test ${ac_cv_lib_network_getaddrinfo+y}
5906 then :
5907 printf %s "(cached) " >&6
5908 else $as_nop
5909 ac_check_lib_save_LIBS=$LIBS
5910 LIBS="-lnetwork $LIBS"
5911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5912 /* end confdefs.h. */
5913
5914 /* Override any GCC internal prototype to avoid an error.
5915 Use char because int might match the return type of a GCC
5916 builtin and then its argument prototype would still apply. */
5917 char getaddrinfo ();
5918 int
5919 main (void)
5920 {
5921 return getaddrinfo ();
5922 ;
5923 return 0;
5924 }
5925 _ACEOF
5926 if ac_fn_c_try_link "$LINENO"
5927 then :
5928 ac_cv_lib_network_getaddrinfo=yes
5929 else $as_nop
5930 ac_cv_lib_network_getaddrinfo=no
5931 fi
5932 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5933 conftest$ac_exeext conftest.$ac_ext
5934 LIBS=$ac_check_lib_save_LIBS
5935 fi
5936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
5937 printf "%s\n" "$ac_cv_lib_network_getaddrinfo" >&6; }
5938 if test "x$ac_cv_lib_network_getaddrinfo" = xyes
5939 then :
5940
5941 #
5942 # OK, we found it in libnetwork.
5943 #
5944 LIBS="-lnetwork $LIBS"
5945
5946 else $as_nop
5947
5948 #
5949 # We didn't find it.
5950 #
5951 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5952
5953 fi
5954
5955
5956 fi
5957
5958
5959 #
5960 # We require a version of recvmsg() that conforms to the Single
5961 # UNIX Specification, so that we can check whether a datagram
5962 # received with recvmsg() was truncated when received due to the
5963 # buffer being too small.
5964 #
5965 # On most systems, the version of recvmsg() in the libraries
5966 # found above conforms to the SUS.
5967 #
5968 # On at least some versions of Solaris, it does not conform to
5969 # the SUS, and we need the version in libxnet, which does
5970 # conform.
5971 #
5972 # Check whether libxnet exists and has a version of recvmsg();
5973 # if it does, link with libxnet before we link with libsocket,
5974 # to get that version.
5975 #
5976 # This test also links with libsocket and libnsl.
5977 #
5978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5979 printf %s "checking for recvmsg in -lxnet... " >&6; }
5980 if test ${ac_cv_lib_xnet_recvmsg+y}
5981 then :
5982 printf %s "(cached) " >&6
5983 else $as_nop
5984 ac_check_lib_save_LIBS=$LIBS
5985 LIBS="-lxnet -lsocket -lnsl $LIBS"
5986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5987 /* end confdefs.h. */
5988
5989 /* Override any GCC internal prototype to avoid an error.
5990 Use char because int might match the return type of a GCC
5991 builtin and then its argument prototype would still apply. */
5992 char recvmsg ();
5993 int
5994 main (void)
5995 {
5996 return recvmsg ();
5997 ;
5998 return 0;
5999 }
6000 _ACEOF
6001 if ac_fn_c_try_link "$LINENO"
6002 then :
6003 ac_cv_lib_xnet_recvmsg=yes
6004 else $as_nop
6005 ac_cv_lib_xnet_recvmsg=no
6006 fi
6007 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6008 conftest$ac_exeext conftest.$ac_ext
6009 LIBS=$ac_check_lib_save_LIBS
6010 fi
6011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
6012 printf "%s\n" "$ac_cv_lib_xnet_recvmsg" >&6; }
6013 if test "x$ac_cv_lib_xnet_recvmsg" = xyes
6014 then :
6015
6016 #
6017 # libxnet has recvmsg(); link with it as well.
6018 #
6019 LIBS="-lxnet $LIBS"
6020
6021 fi
6022
6023
6024 fi
6025
6026
6027 #
6028 # DLPI needs putmsg under HP-UX, so test for -lstr while we're at it.
6029 #
6030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
6031 printf %s "checking for library containing putmsg... " >&6; }
6032 if test ${ac_cv_search_putmsg+y}
6033 then :
6034 printf %s "(cached) " >&6
6035 else $as_nop
6036 ac_func_search_save_LIBS=$LIBS
6037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6038 /* end confdefs.h. */
6039
6040 /* Override any GCC internal prototype to avoid an error.
6041 Use char because int might match the return type of a GCC
6042 builtin and then its argument prototype would still apply. */
6043 char putmsg ();
6044 int
6045 main (void)
6046 {
6047 return putmsg ();
6048 ;
6049 return 0;
6050 }
6051 _ACEOF
6052 for ac_lib in '' str
6053 do
6054 if test -z "$ac_lib"; then
6055 ac_res="none required"
6056 else
6057 ac_res=-l$ac_lib
6058 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6059 fi
6060 if ac_fn_c_try_link "$LINENO"
6061 then :
6062 ac_cv_search_putmsg=$ac_res
6063 fi
6064 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6065 conftest$ac_exeext
6066 if test ${ac_cv_search_putmsg+y}
6067 then :
6068 break
6069 fi
6070 done
6071 if test ${ac_cv_search_putmsg+y}
6072 then :
6073
6074 else $as_nop
6075 ac_cv_search_putmsg=no
6076 fi
6077 rm conftest.$ac_ext
6078 LIBS=$ac_func_search_save_LIBS
6079 fi
6080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
6081 printf "%s\n" "$ac_cv_search_putmsg" >&6; }
6082 ac_res=$ac_cv_search_putmsg
6083 if test "$ac_res" != no
6084 then :
6085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6086
6087 fi
6088
6089
6090
6091 #
6092 # Check for reentrant versions of getnetbyname_r(), as provided by
6093 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6094 # If we don't find one, we just use getnetbyname(), which uses
6095 # thread-specific data on many platforms, but doesn't use it on
6096 # NetBSD or OpenBSD, and may not use it on older versions of other
6097 # platforms.
6098 #
6099 # Only do the check if we have a declaration of getnetbyname_r();
6100 # without it, we can't check which API it has. (We assume that
6101 # if there's a declaration, it has a prototype, so that the API
6102 # can be checked.)
6103 #
6104 ac_fn_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
6105 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6106 if test "x$ac_cv_have_decl_getnetbyname_r" = xyes
6107 then :
6108
6109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
6110 printf %s "checking for the Linux getnetbyname_r()... " >&6; }
6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6112 /* end confdefs.h. */
6113 #include <netdb.h>
6114 int
6115 main (void)
6116 {
6117
6118 struct netent netent_buf;
6119 char buf[1024];
6120 struct netent *resultp;
6121 int h_errnoval;
6122
6123 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
6124
6125 ;
6126 return 0;
6127 }
6128 _ACEOF
6129 if ac_fn_c_try_link "$LINENO"
6130 then :
6131
6132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6133 printf "%s\n" "yes" >&6; }
6134
6135 printf "%s\n" "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
6136
6137
6138 else $as_nop
6139
6140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141 printf "%s\n" "no" >&6; }
6142
6143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
6144 printf %s "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
6145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6146 /* end confdefs.h. */
6147 #include <netdb.h>
6148 int
6149 main (void)
6150 {
6151
6152 struct netent netent_buf;
6153 char buf[1024];
6154
6155 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
6156
6157 ;
6158 return 0;
6159 }
6160 _ACEOF
6161 if ac_fn_c_try_link "$LINENO"
6162 then :
6163
6164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6165 printf "%s\n" "yes" >&6; }
6166
6167 printf "%s\n" "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
6168
6169
6170 else $as_nop
6171
6172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6173 printf "%s\n" "no" >&6; }
6174
6175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
6176 printf %s "checking for AIX getnetbyname_r()... " >&6; }
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6179 #include <netdb.h>
6180 int
6181 main (void)
6182 {
6183
6184 struct netent netent_buf;
6185 struct netent_data net_data;
6186
6187 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
6188
6189 ;
6190 return 0;
6191 }
6192 _ACEOF
6193 if ac_fn_c_try_link "$LINENO"
6194 then :
6195
6196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6197 printf "%s\n" "yes" >&6; }
6198
6199 printf "%s\n" "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
6200
6201
6202 else $as_nop
6203
6204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205 printf "%s\n" "no" >&6; }
6206
6207 fi
6208 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6209 conftest$ac_exeext conftest.$ac_ext
6210
6211 fi
6212 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6213 conftest$ac_exeext conftest.$ac_ext
6214
6215 fi
6216 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6217 conftest$ac_exeext conftest.$ac_ext
6218
6219 fi
6220
6221 #
6222 # Check for reentrant versions of getprotobyname_r(), as provided by
6223 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6224 # If we don't find one, we just use getprotobyname(), which uses
6225 # thread-specific data on many platforms, but doesn't use it on
6226 # NetBSD or OpenBSD, and may not use it on older versions of other
6227 # platforms.
6228 #
6229 # Only do the check if we have a declaration of getprotobyname_r();
6230 # without it, we can't check which API it has. (We assume that
6231 # if there's a declaration, it has a prototype, so that the API
6232 # can be checked.)
6233 #
6234 ac_fn_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
6235 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6236 if test "x$ac_cv_have_decl_getprotobyname_r" = xyes
6237 then :
6238
6239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
6240 printf %s "checking for the Linux getprotobyname_r()... " >&6; }
6241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6242 /* end confdefs.h. */
6243 #include <netdb.h>
6244 int
6245 main (void)
6246 {
6247
6248 struct protoent protoent_buf;
6249 char buf[1024];
6250 struct protoent *resultp;
6251
6252 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
6253
6254 ;
6255 return 0;
6256 }
6257 _ACEOF
6258 if ac_fn_c_try_link "$LINENO"
6259 then :
6260
6261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6262 printf "%s\n" "yes" >&6; }
6263
6264 printf "%s\n" "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
6265
6266
6267 else $as_nop
6268
6269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270 printf "%s\n" "no" >&6; }
6271
6272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
6273 printf %s "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
6274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6275 /* end confdefs.h. */
6276 #include <netdb.h>
6277 int
6278 main (void)
6279 {
6280
6281 struct protoent protoent_buf;
6282 char buf[1024];
6283
6284 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
6285
6286 ;
6287 return 0;
6288 }
6289 _ACEOF
6290 if ac_fn_c_try_link "$LINENO"
6291 then :
6292
6293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6294 printf "%s\n" "yes" >&6; }
6295
6296 printf "%s\n" "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
6297
6298
6299 else $as_nop
6300
6301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302 printf "%s\n" "no" >&6; }
6303
6304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
6305 printf %s "checking for AIX getprotobyname_r()... " >&6; }
6306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307 /* end confdefs.h. */
6308 #include <netdb.h>
6309 int
6310 main (void)
6311 {
6312
6313 struct protoent protoent_buf;
6314 struct protoent_data proto_data;
6315
6316 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
6317
6318 ;
6319 return 0;
6320 }
6321 _ACEOF
6322 if ac_fn_c_try_link "$LINENO"
6323 then :
6324
6325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6326 printf "%s\n" "yes" >&6; }
6327
6328 printf "%s\n" "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6329
6330
6331 else $as_nop
6332
6333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334 printf "%s\n" "no" >&6; }
6335
6336 fi
6337 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6338 conftest$ac_exeext conftest.$ac_ext
6339
6340 fi
6341 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6342 conftest$ac_exeext conftest.$ac_ext
6343
6344 fi
6345 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6346 conftest$ac_exeext conftest.$ac_ext
6347
6348 fi
6349
6350 #
6351 # You are in a twisty little maze of UN*Xes, all different.
6352 # Some might not have ether_hostton().
6353 # Some might have it and declare it in <net/ethernet.h>.
6354 # Some might have it and declare it in <netinet/ether.h>
6355 # Some might have it and declare it in <sys/ethernet.h>.
6356 # Some might have it and declare it in <arpa/inet.h>.
6357 # Some might have it and declare it in <netinet/if_ether.h>.
6358 # Some might have it and not declare it in any header file.
6359 #
6360 # Before you is a C compiler.
6361 #
6362 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6363 if test "x$ac_cv_func_ether_hostton" = xyes
6364 then :
6365 printf "%s\n" "#define HAVE_ETHER_HOSTTON 1" >>confdefs.h
6366
6367 fi
6368
6369 if test "$ac_cv_func_ether_hostton" = yes; then
6370 #
6371 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
6372 #
6373 # This test fails if we don't have <net/ethernet.h> or if we do
6374 # but it doesn't declare ether_hostton().
6375 #
6376 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6377 #include <net/ethernet.h>
6378
6379 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6380 if test "x$ac_cv_have_decl_ether_hostton" = xyes
6381 then :
6382
6383
6384 printf "%s\n" "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6385
6386
6387 fi
6388 #
6389 # Did that succeed?
6390 #
6391 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6392 #
6393 # No, how about <netinet/ether.h>, as on Linux?
6394 #
6395 # This test fails if we don't have <netinet/ether.h>
6396 # or if we do but it doesn't declare ether_hostton().
6397 #
6398 # Unset ac_cv_have_decl_ether_hostton so we don't
6399 # treat the previous failure as a cached value and
6400 # suppress the next test.
6401 #
6402 unset ac_cv_have_decl_ether_hostton
6403 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6404 #include <netinet/ether.h>
6405
6406 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6407 if test "x$ac_cv_have_decl_ether_hostton" = xyes
6408 then :
6409
6410
6411 printf "%s\n" "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6412
6413
6414 fi
6415 fi
6416 #
6417 # Did that succeed?
6418 #
6419 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6420 #
6421 # No, how about <sys/ethernet.h>, as on Solaris 10
6422 # and later?
6423 #
6424 # This test fails if we don't have <sys/ethernet.h>
6425 # or if we do but it doesn't declare ether_hostton().
6426 #
6427 # Unset ac_cv_have_decl_ether_hostton so we don't
6428 # treat the previous failure as a cached value and
6429 # suppress the next test.
6430 #
6431 unset ac_cv_have_decl_ether_hostton
6432 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6433 #include <sys/ethernet.h>
6434
6435 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6436 if test "x$ac_cv_have_decl_ether_hostton" = xyes
6437 then :
6438
6439
6440 printf "%s\n" "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6441
6442
6443 fi
6444 fi
6445 #
6446 # Did that succeed?
6447 #
6448 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6449 #
6450 # No, how about <arpa/inet.h>, as in AIX?
6451 #
6452 # This test fails if we don't have <arpa/inet.h>
6453 # (if we have ether_hostton(), we should have
6454 # networking, and if we have networking, we should
6455 # have <arpa/inet.h>) or if we do but it doesn't
6456 # declare ether_hostton().
6457 #
6458 # Unset ac_cv_have_decl_ether_hostton so we don't
6459 # treat the previous failure as a cached value and
6460 # suppress the next test.
6461 #
6462 unset ac_cv_have_decl_ether_hostton
6463 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6464 #include <arpa/inet.h>
6465
6466 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6467 if test "x$ac_cv_have_decl_ether_hostton" = xyes
6468 then :
6469
6470
6471 printf "%s\n" "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6472
6473
6474 fi
6475 fi
6476 #
6477 # Did that succeed?
6478 #
6479 if test "$ac_cv_have_decl_ether_hostton" != yes; then
6480 #
6481 # No, how about <netinet/if_ether.h>?
6482 # On some platforms, it requires <net/if.h> and
6483 # <netinet/in.h>, and we always include it with
6484 # both of them, so test it with both of them.
6485 #
6486 # This test fails if we don't have <netinet/if_ether.h>
6487 # and the headers we include before it, or if we do but
6488 # <netinet/if_ether.h> doesn't declare ether_hostton().
6489 #
6490 # Unset ac_cv_have_decl_ether_hostton so we don't
6491 # treat the previous failure as a cached value and
6492 # suppress the next test.
6493 #
6494 unset ac_cv_have_decl_ether_hostton
6495 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6496 #include <sys/types.h>
6497 #include <sys/socket.h>
6498 #include <net/if.h>
6499 #include <netinet/in.h>
6500 #include <netinet/if_ether.h>
6501
6502 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6503 if test "x$ac_cv_have_decl_ether_hostton" = xyes
6504 then :
6505
6506
6507 printf "%s\n" "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6508
6509
6510 fi
6511 fi
6512 #
6513 # After all that, is ether_hostton() declared?
6514 #
6515 if test "$ac_cv_have_decl_ether_hostton" = yes; then
6516 #
6517 # Yes.
6518 #
6519
6520 printf "%s\n" "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6521
6522 else
6523 #
6524 # No, we'll have to declare it ourselves.
6525 # Do we have "struct ether_addr" if we include
6526 # <netinet/if_ether.h>?
6527 #
6528 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6529 #include <sys/types.h>
6530 #include <sys/socket.h>
6531 #include <net/if.h>
6532 #include <netinet/in.h>
6533 #include <netinet/if_ether.h>
6534
6535 "
6536 if test "x$ac_cv_type_struct_ether_addr" = xyes
6537 then :
6538
6539 printf "%s\n" "#define HAVE_STRUCT_ETHER_ADDR 1" >>confdefs.h
6540
6541
6542 fi
6543
6544 fi
6545 fi
6546
6547 #
6548 # For various things that might use pthreads.
6549 #
6550 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6551 if test "x$ac_cv_header_pthread_h" = xyes
6552 then :
6553
6554 #
6555 # OK, we have pthread.h. Do we have pthread_create in the
6556 # system libraries?
6557 #
6558 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
6559 if test "x$ac_cv_func_pthread_create" = xyes
6560 then :
6561
6562 #
6563 # Yes.
6564 #
6565 ac_lbl_have_pthreads="found"
6566
6567 else $as_nop
6568
6569 #
6570 # No - do we have it in -lpthreads?
6571 #
6572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
6573 printf %s "checking for pthread_create in -lpthreads... " >&6; }
6574 if test ${ac_cv_lib_pthreads_pthread_create+y}
6575 then :
6576 printf %s "(cached) " >&6
6577 else $as_nop
6578 ac_check_lib_save_LIBS=$LIBS
6579 LIBS="-lpthreads $LIBS"
6580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6581 /* end confdefs.h. */
6582
6583 /* Override any GCC internal prototype to avoid an error.
6584 Use char because int might match the return type of a GCC
6585 builtin and then its argument prototype would still apply. */
6586 char pthread_create ();
6587 int
6588 main (void)
6589 {
6590 return pthread_create ();
6591 ;
6592 return 0;
6593 }
6594 _ACEOF
6595 if ac_fn_c_try_link "$LINENO"
6596 then :
6597 ac_cv_lib_pthreads_pthread_create=yes
6598 else $as_nop
6599 ac_cv_lib_pthreads_pthread_create=no
6600 fi
6601 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6602 conftest$ac_exeext conftest.$ac_ext
6603 LIBS=$ac_check_lib_save_LIBS
6604 fi
6605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
6606 printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; }
6607 if test "x$ac_cv_lib_pthreads_pthread_create" = xyes
6608 then :
6609
6610 #
6611 # Yes - add -lpthreads.
6612 #
6613 ac_lbl_have_pthreads="found"
6614 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
6615
6616 else $as_nop
6617
6618 #
6619 # No - do we have it in -lpthread?
6620 #
6621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6622 printf %s "checking for pthread_create in -lpthread... " >&6; }
6623 if test ${ac_cv_lib_pthread_pthread_create+y}
6624 then :
6625 printf %s "(cached) " >&6
6626 else $as_nop
6627 ac_check_lib_save_LIBS=$LIBS
6628 LIBS="-lpthread $LIBS"
6629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630 /* end confdefs.h. */
6631
6632 /* Override any GCC internal prototype to avoid an error.
6633 Use char because int might match the return type of a GCC
6634 builtin and then its argument prototype would still apply. */
6635 char pthread_create ();
6636 int
6637 main (void)
6638 {
6639 return pthread_create ();
6640 ;
6641 return 0;
6642 }
6643 _ACEOF
6644 if ac_fn_c_try_link "$LINENO"
6645 then :
6646 ac_cv_lib_pthread_pthread_create=yes
6647 else $as_nop
6648 ac_cv_lib_pthread_pthread_create=no
6649 fi
6650 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6651 conftest$ac_exeext conftest.$ac_ext
6652 LIBS=$ac_check_lib_save_LIBS
6653 fi
6654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6655 printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; }
6656 if test "x$ac_cv_lib_pthread_pthread_create" = xyes
6657 then :
6658
6659 #
6660 # Yes - add -lpthread.
6661 #
6662 ac_lbl_have_pthreads="found"
6663 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
6664
6665 else $as_nop
6666
6667 #
6668 # No.
6669 #
6670 ac_lbl_have_pthreads="not found"
6671
6672 fi
6673
6674
6675 fi
6676
6677
6678 fi
6679
6680
6681 else $as_nop
6682
6683 #
6684 # We didn't find pthread.h.
6685 #
6686 ac_lbl_have_pthreads="not found"
6687
6688
6689 fi
6690
6691
6692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the instrument functions code" >&5
6693 printf %s "checking whether to enable the instrument functions code... " >&6; }
6694 # Check whether --enable-instrument-functions was given.
6695 if test ${enable_instrument_functions+y}
6696 then :
6697 enableval=$enable_instrument_functions;
6698 else $as_nop
6699 enableval=no
6700 fi
6701
6702 case "$enableval" in
6703 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6704 printf "%s\n" "yes" >&6; }
6705
6706 printf "%s\n" "#define ENABLE_INSTRUMENT_FUNCTIONS 1" >>confdefs.h
6707
6708 # Add '-finstrument-functions' instrumentation option to generate
6709 # instrumentation calls for entry and exit to functions.
6710 # Use '--enable-instrument-functions' also with tcpdump (or tcpslice)
6711 # to see the output. See also https://www.tcpdump.org/faq.html#q17.
6712 CFLAGS="$CFLAGS -O0 -ggdb -finstrument-functions"
6713 ;;
6714 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715 printf "%s\n" "no" >&6; }
6716 ;;
6717 esac
6718
6719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
6720 printf %s "checking if --disable-protochain option is specified... " >&6; }
6721 # Check whether --enable-protochain was given.
6722 if test ${enable_protochain+y}
6723 then :
6724 enableval=$enable_protochain;
6725 fi
6726
6727 case "x$enable_protochain" in
6728 xyes) enable_protochain=enabled ;;
6729 xno) enable_protochain=disabled ;;
6730 x) enable_protochain=enabled ;;
6731 esac
6732
6733 if test "$enable_protochain" = "disabled"; then
6734
6735 printf "%s\n" "#define NO_PROTOCHAIN 1" >>confdefs.h
6736
6737 fi
6738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
6739 printf "%s\n" "${enable_protochain}" >&6; }
6740
6741 #
6742 # valgrindtest directly uses the native capture mechanism, but
6743 # only tests with BPF and PF_PACKET sockets; only enable it if
6744 # we have BPF or PF_PACKET sockets.
6745 #
6746 VALGRINDTEST_SRC=
6747
6748
6749 # Check whether --with-pcap was given.
6750 if test ${with_pcap+y}
6751 then :
6752 withval=$with_pcap;
6753 fi
6754
6755 if test ! -z "$with_pcap" ; then
6756 V_PCAP="$withval"
6757 else
6758 #
6759 # Check for a bunch of headers for various packet
6760 # capture mechanisms.
6761 #
6762 ac_fn_c_check_header_compile "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
6763 if test "x$ac_cv_header_net_bpf_h" = xyes
6764 then :
6765 printf "%s\n" "#define HAVE_NET_BPF_H 1" >>confdefs.h
6766
6767 fi
6768
6769 if test "$ac_cv_header_net_bpf_h" = yes; then
6770 #
6771 # Does it define BIOCSETIF?
6772 # I.e., is it a header for an LBL/BSD-style capture
6773 # mechanism, or is it just a header for a BPF filter
6774 # engine? Some versions of Arch Linux, for example,
6775 # have a net/bpf.h that doesn't define BIOCSETIF;
6776 # as it's a Linux, it should use packet sockets,
6777 # instead.
6778 #
6779 # We need:
6780 #
6781 # sys/types.h, because FreeBSD 10's net/bpf.h
6782 # requires that various BSD-style integer types
6783 # be defined;
6784 #
6785 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
6786 # doesn't include it but does use struct timeval
6787 # in ioctl definitions;
6788 #
6789 # sys/ioctl.h and, if we have it, sys/ioccom.h,
6790 # because net/bpf.h defines ioctls;
6791 #
6792 # net/if.h, because it defines some structures
6793 # used in ioctls defined by net/bpf.h;
6794 #
6795 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
6796 # defines some structure fields as being
6797 # struct sockaddrs;
6798 #
6799 # and net/bpf.h doesn't necessarily include all
6800 # of those headers itself.
6801 #
6802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
6803 printf %s "checking if net/bpf.h defines BIOCSETIF... " >&6; }
6804 if test ${ac_cv_lbl_bpf_h_defines_biocsetif+y}
6805 then :
6806 printf %s "(cached) " >&6
6807 else $as_nop
6808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6809 /* end confdefs.h. */
6810
6811 #include <sys/types.h>
6812 #include <sys/time.h>
6813 #include <sys/ioctl.h>
6814 #include <sys/socket.h>
6815 #ifdef HAVE_SYS_IOCCOM_H
6816 #include <sys/ioccom.h>
6817 #endif
6818 #include <net/bpf.h>
6819 #include <net/if.h>
6820
6821 int
6822 main (void)
6823 {
6824 u_int i = BIOCSETIF;
6825 ;
6826 return 0;
6827 }
6828 _ACEOF
6829 if ac_fn_c_try_compile "$LINENO"
6830 then :
6831 ac_cv_lbl_bpf_h_defines_biocsetif=yes
6832 else $as_nop
6833 ac_cv_lbl_bpf_h_defines_biocsetif=no
6834 fi
6835 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6836 fi
6837
6838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6839 printf "%s\n" "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6840 fi
6841 ac_fn_c_check_header_compile "$LINENO" "net/pfilt.h" "ac_cv_header_net_pfilt_h" "$ac_includes_default"
6842 if test "x$ac_cv_header_net_pfilt_h" = xyes
6843 then :
6844 printf "%s\n" "#define HAVE_NET_PFILT_H 1" >>confdefs.h
6845
6846 fi
6847 ac_fn_c_check_header_compile "$LINENO" "net/enet.h" "ac_cv_header_net_enet_h" "$ac_includes_default"
6848 if test "x$ac_cv_header_net_enet_h" = xyes
6849 then :
6850 printf "%s\n" "#define HAVE_NET_ENET_H 1" >>confdefs.h
6851
6852 fi
6853
6854 ac_fn_c_check_header_compile "$LINENO" "net/nit.h" "ac_cv_header_net_nit_h" "$ac_includes_default"
6855 if test "x$ac_cv_header_net_nit_h" = xyes
6856 then :
6857 printf "%s\n" "#define HAVE_NET_NIT_H 1" >>confdefs.h
6858
6859 fi
6860 ac_fn_c_check_header_compile "$LINENO" "sys/net/nit.h" "ac_cv_header_sys_net_nit_h" "$ac_includes_default"
6861 if test "x$ac_cv_header_sys_net_nit_h" = xyes
6862 then :
6863 printf "%s\n" "#define HAVE_SYS_NET_NIT_H 1" >>confdefs.h
6864
6865 fi
6866
6867 ac_fn_c_check_header_compile "$LINENO" "linux/socket.h" "ac_cv_header_linux_socket_h" "$ac_includes_default"
6868 if test "x$ac_cv_header_linux_socket_h" = xyes
6869 then :
6870 printf "%s\n" "#define HAVE_LINUX_SOCKET_H 1" >>confdefs.h
6871
6872 fi
6873 ac_fn_c_check_header_compile "$LINENO" "net/raw.h" "ac_cv_header_net_raw_h" "$ac_includes_default"
6874 if test "x$ac_cv_header_net_raw_h" = xyes
6875 then :
6876 printf "%s\n" "#define HAVE_NET_RAW_H 1" >>confdefs.h
6877
6878 fi
6879 ac_fn_c_check_header_compile "$LINENO" "sys/dlpi.h" "ac_cv_header_sys_dlpi_h" "$ac_includes_default"
6880 if test "x$ac_cv_header_sys_dlpi_h" = xyes
6881 then :
6882 printf "%s\n" "#define HAVE_SYS_DLPI_H 1" >>confdefs.h
6883
6884 fi
6885
6886 ac_fn_c_check_header_compile "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
6887 if test "x$ac_cv_header_config_HaikuConfig_h" = xyes
6888 then :
6889 printf "%s\n" "#define HAVE_CONFIG_HAIKUCONFIG_H 1" >>confdefs.h
6890
6891 fi
6892
6893
6894 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6895 #
6896 # BPF.
6897 # Check this before DLPI, so that we pick BPF on
6898 # Solaris 11 and later.
6899 #
6900 V_PCAP=bpf
6901
6902 #
6903 # We have BPF, so build valgrindtest with "make test"
6904 # on macOS and FreeBSD (add your OS once there's a
6905 # valgrind for it).
6906 #
6907 case "$host_os" in
6908
6909 freebsd*|darwin*|linux*)
6910 VALGRINDTEST_SRC=valgrindtest.c
6911 ;;
6912 esac
6913 elif test "$ac_cv_header_linux_socket_h" = yes; then
6914 #
6915 # No prizes for guessing this one.
6916 #
6917 V_PCAP=linux
6918 VALGRINDTEST_SRC=valgrindtest.c
6919 elif test "$ac_cv_header_net_pfilt_h" = yes; then
6920 #
6921 # DEC OSF/1, Digital UNIX, Tru64 UNIX
6922 #
6923 V_PCAP=pf
6924 elif test "$ac_cv_header_net_enet_h" = yes; then
6925 #
6926 # Stanford Enetfilter.
6927 #
6928 V_PCAP=enet
6929 elif test "$ac_cv_header_net_nit_h" = yes; then
6930 #
6931 # SunOS 4.x STREAMS NIT.
6932 #
6933 V_PCAP=snit
6934 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6935 #
6936 # Pre-SunOS 4.x non-STREAMS NIT.
6937 #
6938 V_PCAP=nit
6939 elif test "$ac_cv_header_net_raw_h" = yes; then
6940 #
6941 # IRIX snoop.
6942 #
6943 V_PCAP=snoop
6944 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6945 #
6946 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6947 #
6948 V_PCAP=dlpi
6949 elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
6950 #
6951 # Haiku.
6952 #
6953 V_PCAP=haiku
6954 else
6955 #
6956 # We don't have any capture type we know about.
6957 # Report an error, and tell the user to configure with
6958 # --with-pcap=null if they want a libpcap that can't
6959 # capture but that can read capture files. That way,
6960 # nobody gets surprised by getting a no-capture
6961 # libpcap without asking for that.
6962 #
6963 as_fn_error $? "No supported packet capture interface was found.
6964 See the INSTALL.md file for information on packet capture support in
6965 various operating systems.
6966 If you want a libpcap that cannot capture packets but that can read
6967 pcap and pcapng files, run configure with --with-pcap=null." "$LINENO" 5
6968 fi
6969 fi
6970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6971 printf %s "checking packet capture type... " >&6; }
6972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6973 printf "%s\n" "$V_PCAP" >&6; }
6974
6975
6976 #
6977 # Do we have pkg-config?
6978 #
6979
6980
6981
6982
6983
6984
6985
6986 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6987 if test -n "$ac_tool_prefix"; then
6988 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6989 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6991 printf %s "checking for $ac_word... " >&6; }
6992 if test ${ac_cv_path_PKG_CONFIG+y}
6993 then :
6994 printf %s "(cached) " >&6
6995 else $as_nop
6996 case $PKG_CONFIG in
6997 [\\/]* | ?:[\\/]*)
6998 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6999 ;;
7000 *)
7001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002 for as_dir in $PATH
7003 do
7004 IFS=$as_save_IFS
7005 case $as_dir in #(((
7006 '') as_dir=./ ;;
7007 */) ;;
7008 *) as_dir=$as_dir/ ;;
7009 esac
7010 for ac_exec_ext in '' $ac_executable_extensions; do
7011 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7012 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7013 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7014 break 2
7015 fi
7016 done
7017 done
7018 IFS=$as_save_IFS
7019
7020 ;;
7021 esac
7022 fi
7023 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7024 if test -n "$PKG_CONFIG"; then
7025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7026 printf "%s\n" "$PKG_CONFIG" >&6; }
7027 else
7028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029 printf "%s\n" "no" >&6; }
7030 fi
7031
7032
7033 fi
7034 if test -z "$ac_cv_path_PKG_CONFIG"; then
7035 ac_pt_PKG_CONFIG=$PKG_CONFIG
7036 # Extract the first word of "pkg-config", so it can be a program name with args.
7037 set dummy pkg-config; ac_word=$2
7038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7039 printf %s "checking for $ac_word... " >&6; }
7040 if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
7041 then :
7042 printf %s "(cached) " >&6
7043 else $as_nop
7044 case $ac_pt_PKG_CONFIG in
7045 [\\/]* | ?:[\\/]*)
7046 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7047 ;;
7048 *)
7049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7050 for as_dir in $PATH
7051 do
7052 IFS=$as_save_IFS
7053 case $as_dir in #(((
7054 '') as_dir=./ ;;
7055 */) ;;
7056 *) as_dir=$as_dir/ ;;
7057 esac
7058 for ac_exec_ext in '' $ac_executable_extensions; do
7059 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7060 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7061 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7062 break 2
7063 fi
7064 done
7065 done
7066 IFS=$as_save_IFS
7067
7068 ;;
7069 esac
7070 fi
7071 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7072 if test -n "$ac_pt_PKG_CONFIG"; then
7073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7074 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
7075 else
7076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7077 printf "%s\n" "no" >&6; }
7078 fi
7079
7080 if test "x$ac_pt_PKG_CONFIG" = x; then
7081 PKG_CONFIG=""
7082 else
7083 case $cross_compiling:$ac_tool_warned in
7084 yes:)
7085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7086 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7087 ac_tool_warned=yes ;;
7088 esac
7089 PKG_CONFIG=$ac_pt_PKG_CONFIG
7090 fi
7091 else
7092 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7093 fi
7094
7095 fi
7096 if test -n "$PKG_CONFIG"; then
7097 _pkg_min_version=0.17.0
7098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7099 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7100 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7102 printf "%s\n" "yes" >&6; }
7103 else
7104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105 printf "%s\n" "no" >&6; }
7106 PKG_CONFIG=""
7107 fi
7108 fi
7109
7110 #
7111 # Do we have the brew command from Homebrew?
7112 #
7113 # Extract the first word of "brew", so it can be a program name with args.
7114 set dummy brew; ac_word=$2
7115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7116 printf %s "checking for $ac_word... " >&6; }
7117 if test ${ac_cv_path_BREW+y}
7118 then :
7119 printf %s "(cached) " >&6
7120 else $as_nop
7121 case $BREW in
7122 [\\/]* | ?:[\\/]*)
7123 ac_cv_path_BREW="$BREW" # Let the user override the test with a path.
7124 ;;
7125 *)
7126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127 for as_dir in $PATH
7128 do
7129 IFS=$as_save_IFS
7130 case $as_dir in #(((
7131 '') as_dir=./ ;;
7132 */) ;;
7133 *) as_dir=$as_dir/ ;;
7134 esac
7135 for ac_exec_ext in '' $ac_executable_extensions; do
7136 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7137 ac_cv_path_BREW="$as_dir$ac_word$ac_exec_ext"
7138 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7139 break 2
7140 fi
7141 done
7142 done
7143 IFS=$as_save_IFS
7144
7145 ;;
7146 esac
7147 fi
7148 BREW=$ac_cv_path_BREW
7149 if test -n "$BREW"; then
7150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
7151 printf "%s\n" "$BREW" >&6; }
7152 else
7153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 printf "%s\n" "no" >&6; }
7155 fi
7156
7157
7158
7159 #
7160 # Solaris pkg-config is annoying. For at least one package (D-Bus, I'm
7161 # looking at *you*!), there are separate include files for 32-bit and
7162 # 64-bit builds (I guess using "unsigned long long" as a 64-bit integer
7163 # type on a 64-bit build is like crossing the beams or something), and
7164 # there are two separate .pc files, so if we're doing a 32-bit build we
7165 # should make sure we look in /usr/lib/pkgconfig for .pc files and if
7166 # we're doing a 64-bit build we should make sure we look in
7167 # /usr/lib/amd64/pkgconfig for .pc files.
7168 #
7169 case "$host_os" in
7170
7171 solaris*)
7172 if test "$ac_cv_sizeof_void_p" -eq 8; then
7173 #
7174 # 64-bit build. If the path is empty, set it to
7175 # /usr/lib/amd64/pkgconfig; otherwise, if
7176 # /usr/lib/pkgconfig appears in the path, prepend
7177 # /usr/lib/amd64/pkgconfig to it; otherwise, put
7178 # /usr/lib/amd64/pkgconfig at the end.
7179 #
7180 if test -z "$PKG_CONFIG_PATH"; then
7181 #
7182 # Not set, or empty. Set it to
7183 # /usr/lib/amd64/pkgconfig.
7184 #
7185 PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
7186 elif test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/pkgconfig"`; then
7187 #
7188 # It contains /usr/lib/pkgconfig. Prepend
7189 # /usr/lib/amd64/pkgconfig to /usr/lib/pkgconfig.
7190 #
7191 PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/pkgconfig;/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig;"`
7192 else
7193 #
7194 # Not empty, but doesn't contain /usr/lib/pkgconfig.
7195 # Append /usr/lib/amd64/pkgconfig to it.
7196 #
7197 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/amd64/pkgconfig"
7198 fi
7199 export PKG_CONFIG_PATH
7200 elif test "$ac_cv_sizeof_void_p" -eq 4; then
7201 #
7202 # 32-bit build. If /usr/amd64/lib/pkgconfig appears
7203 # in the path, prepend /usr/lib/pkgconfig to it.
7204 #
7205 if test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/amd64/pkgconfig"`; then
7206 #
7207 # It contains /usr/lib/amd64/pkgconfig. Prepend
7208 # /usr/lib/pkgconfig to /usr/lib/amd64/pkgconfig.
7209 #
7210 PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/amd64/pkgconfig;/usr/lib/pkgconfig:/usr/lib/amd64/pkgconfig;"`
7211 export PKG_CONFIG_PATH
7212 fi
7213 fi
7214 esac
7215
7216 #
7217 # Handle each capture type.
7218 #
7219 case "$V_PCAP" in
7220 dlpi)
7221 #
7222 # Checks for some header files.
7223 #
7224 ac_fn_c_check_header_compile "$LINENO" "sys/bufmod.h" "ac_cv_header_sys_bufmod_h" "$ac_includes_default"
7225 if test "x$ac_cv_header_sys_bufmod_h" = xyes
7226 then :
7227 printf "%s\n" "#define HAVE_SYS_BUFMOD_H 1" >>confdefs.h
7228
7229 fi
7230 ac_fn_c_check_header_compile "$LINENO" "sys/dlpi_ext.h" "ac_cv_header_sys_dlpi_ext_h" "$ac_includes_default"
7231 if test "x$ac_cv_header_sys_dlpi_ext_h" = xyes
7232 then :
7233 printf "%s\n" "#define HAVE_SYS_DLPI_EXT_H 1" >>confdefs.h
7234
7235 fi
7236 ac_fn_c_check_header_compile "$LINENO" "zone.h" "ac_cv_header_zone_h" "$ac_includes_default"
7237 if test "x$ac_cv_header_zone_h" = xyes
7238 then :
7239 printf "%s\n" "#define HAVE_ZONE_H 1" >>confdefs.h
7240
7241 fi
7242
7243
7244 #
7245 # Checks to see if Solaris has the public libdlpi(3LIB) library.
7246 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
7247 # public libdlpi(3LIB) version. Before libdlpi was made public, a
7248 # private version also existed, which did not have the same APIs.
7249 # Due to a gcc bug, the default search path for 32-bit libraries does
7250 # not include /lib, we add it explicitly here.
7251 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
7252 # Also, due to the bug above applications that link to libpcap with
7253 # libdlpi will have to add "-L/lib" option to "configure".
7254 #
7255 save_LDFLAGS="$LDFLAGS"
7256 LDFLAGS="$LIBS -L/lib"
7257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
7258 printf %s "checking for dlpi_walk in -ldlpi... " >&6; }
7259 if test ${ac_cv_lib_dlpi_dlpi_walk+y}
7260 then :
7261 printf %s "(cached) " >&6
7262 else $as_nop
7263 ac_check_lib_save_LIBS=$LIBS
7264 LIBS="-ldlpi $LIBS"
7265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7266 /* end confdefs.h. */
7267
7268 /* Override any GCC internal prototype to avoid an error.
7269 Use char because int might match the return type of a GCC
7270 builtin and then its argument prototype would still apply. */
7271 char dlpi_walk ();
7272 int
7273 main (void)
7274 {
7275 return dlpi_walk ();
7276 ;
7277 return 0;
7278 }
7279 _ACEOF
7280 if ac_fn_c_try_link "$LINENO"
7281 then :
7282 ac_cv_lib_dlpi_dlpi_walk=yes
7283 else $as_nop
7284 ac_cv_lib_dlpi_dlpi_walk=no
7285 fi
7286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7287 conftest$ac_exeext conftest.$ac_ext
7288 LIBS=$ac_check_lib_save_LIBS
7289 fi
7290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
7291 printf "%s\n" "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
7292 if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes
7293 then :
7294
7295 LIBS="-ldlpi $LIBS"
7296 LIBS_STATIC="-ldlpi $LIBS_STATIC"
7297 LIBS_PRIVATE="-ldlpi $LIBS_PRIVATE"
7298 V_PCAP=libdlpi
7299
7300 #
7301 # Capture module plus common code needed for
7302 # common functions used by pcap-[dlpi,libdlpi].c
7303 #
7304 PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
7305
7306 printf "%s\n" "#define HAVE_LIBDLPI 1" >>confdefs.h
7307
7308
7309 else $as_nop
7310
7311 V_PCAP=dlpi
7312
7313 #
7314 # Capture module plus common code needed for
7315 # common functions used by pcap-[dlpi,libdlpi].c
7316 #
7317 PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
7318
7319 fi
7320
7321 LDFLAGS="$save_LDFLAGS"
7322
7323 #
7324 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
7325 # versions of DLPI.
7326 #
7327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
7328 printf %s "checking whether <sys/dlpi.h> is usable... " >&6; }
7329 if test ${ac_cv_sys_dlpi_usable+y}
7330 then :
7331 printf %s "(cached) " >&6
7332 else $as_nop
7333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7334 /* end confdefs.h. */
7335
7336 #include <sys/types.h>
7337 #include <sys/time.h>
7338 #include <sys/dlpi.h>
7339
7340 int
7341 main (void)
7342 {
7343 int i = DL_PROMISC_PHYS;
7344 ;
7345 return 0;
7346 }
7347 _ACEOF
7348 if ac_fn_c_try_compile "$LINENO"
7349 then :
7350 ac_cv_sys_dlpi_usable=yes
7351 else $as_nop
7352 ac_cv_sys_dlpi_usable=no
7353 fi
7354 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7355 fi
7356
7357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
7358 printf "%s\n" "$ac_cv_sys_dlpi_usable" >&6; }
7359 if test $ac_cv_sys_dlpi_usable = no ; then
7360 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
7361 fi
7362
7363 #
7364 # Check to see if Solaris has the dl_passive_req_t struct defined
7365 # in <sys/dlpi.h>.
7366 # This check is for DLPI support for passive modes.
7367 # See dlpi(7P) for more details.
7368 #
7369 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
7370 #include <sys/types.h>
7371 #include <sys/dlpi.h>
7372
7373 "
7374 if test "x$ac_cv_type_dl_passive_req_t" = xyes
7375 then :
7376
7377 printf "%s\n" "#define HAVE_DL_PASSIVE_REQ_T 1" >>confdefs.h
7378
7379
7380 fi
7381
7382 ;;
7383
7384 enet)
7385 #
7386 # Capture module
7387 #
7388 PLATFORM_C_SRC="pcap-enet.c"
7389 ;;
7390
7391 haiku)
7392 #
7393 # Capture module
7394 #
7395 PLATFORM_C_SRC="pcap-haiku.c"
7396
7397 #
7398 # Just for the sake of it.
7399 #
7400 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default"
7401 if test "x$ac_cv_header_net_if_h" = xyes
7402 then :
7403 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
7404
7405 fi
7406 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default"
7407 if test "x$ac_cv_header_net_if_dl_h" = xyes
7408 then :
7409 printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h
7410
7411 fi
7412 ac_fn_c_check_header_compile "$LINENO" "net/if_types.h" "ac_cv_header_net_if_types_h" "$ac_includes_default"
7413 if test "x$ac_cv_header_net_if_types_h" = xyes
7414 then :
7415 printf "%s\n" "#define HAVE_NET_IF_TYPES_H 1" >>confdefs.h
7416
7417 fi
7418
7419 ;;
7420
7421 linux)
7422 #
7423 # Capture module
7424 #
7425 PLATFORM_C_SRC="pcap-linux.c"
7426
7427 #
7428 # Do we have libnl?
7429 # We only want version 3. Version 2 was, apparently,
7430 # short-lived, and version 1 is source and binary
7431 # incompatible with version 3, and it appears that,
7432 # these days, everybody's using version 3. We're
7433 # not supporting older versions of the Linux kernel;
7434 # let's drop support for older versions of libnl, too.
7435 #
7436
7437 # Check whether --with-libnl was given.
7438 if test ${with_libnl+y}
7439 then :
7440 withval=$with_libnl; with_libnl=$withval
7441 else $as_nop
7442 with_libnl=if_available
7443 fi
7444
7445
7446 if test x$with_libnl != xno ; then
7447 #
7448 # Check for libnl-genl-3.0 with pkg-config.
7449 #
7450
7451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5
7452 printf %s "checking for libnl-genl-3.0 with pkg-config... " >&6; }
7453 if test -n "$PKG_CONFIG"; then
7454
7455 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7456 ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7457 ac_status=$?
7458 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7459 test $ac_status = 0; }; then
7460 #
7461 # The package was found, so try to get its C flags and
7462 # libraries.
7463 #
7464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
7465 printf "%s\n" "found" >&6; }
7466 if test ! -n "$LIBNL_CFLAGS"; then
7467 LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null`
7468 if test "x$?" != "x0"; then
7469 #
7470 # That failed - report an error.
7471 # Re-run the command, telling pkg-config to print an error
7472 # message, capture the error message, and report it.
7473 # This causes the configuration script to fail, as it means
7474 # the script is almost certainly doing something wrong.
7475 #
7476
7477 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7478 _pkg_short_errors_supported=yes
7479 else
7480 _pkg_short_errors_supported=no
7481 fi
7482 if test $_pkg_short_errors_supported = yes; then
7483 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libnl-genl-3.0" 2>&1`
7484 else
7485 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libnl-genl-3.0" 2>&1`
7486 fi
7487 as_fn_error $? "$PKG_CONFIG --cflags \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5
7488 fi
7489 fi
7490 if test ! -n "$LIBNL_LIBS"; then
7491 LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null`
7492 if test "x$?" != "x0"; then
7493 #
7494 # That failed - report an error.
7495 # Re-run the command, telling pkg-config to print an error
7496 # message, capture the error message, and report it.
7497 # This causes the configuration script to fail, as it means
7498 # the script is almost certainly doing something wrong.
7499 #
7500
7501 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7502 _pkg_short_errors_supported=yes
7503 else
7504 _pkg_short_errors_supported=no
7505 fi
7506 if test $_pkg_short_errors_supported = yes; then
7507 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libnl-genl-3.0" 2>&1`
7508 else
7509 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libnl-genl-3.0" 2>&1`
7510 fi
7511 as_fn_error $? "$PKG_CONFIG --libs \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5
7512 fi
7513 fi
7514 if test ! -n "$LIBNL_LIBS_STATIC"; then
7515 LIBNL_LIBS_STATIC=`$PKG_CONFIG --libs --static "libnl-genl-3.0" 2>/dev/null`
7516 if test "x$?" != "x0"; then
7517 #
7518 # That failed - report an error.
7519 # Re-run the command, telling pkg-config to print an error
7520 # message, capture the error message, and report it.
7521 # This causes the configuration script to fail, as it means
7522 # the script is almost certainly doing something wrong.
7523 #
7524
7525 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7526 _pkg_short_errors_supported=yes
7527 else
7528 _pkg_short_errors_supported=no
7529 fi
7530 if test $_pkg_short_errors_supported = yes; then
7531 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libnl-genl-3.0" 2>&1`
7532 else
7533 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libnl-genl-3.0" 2>&1`
7534 fi
7535 as_fn_error $? "$PKG_CONFIG --libs --static \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5
7536 fi
7537 fi
7538
7539 pkg_config_found_libnl=yes
7540 V_INCLS="$V_INCLS $LIBNL_CFLAGS"
7541 ADDITIONAL_LIBS="$LIBNL_LIBS $ADDITIONAL_LIBS"
7542 ADDITIONAL_LIBS_STATIC="$LIBNL_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
7543 REQUIRES_PRIVATE="libnl-genl-3.0 $REQUIRES_PRIVATE"
7544
7545 printf "%s\n" "#define HAVE_LIBNL 1" >>confdefs.h
7546
7547
7548 else
7549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7550 printf "%s\n" "not found" >&6; }
7551 :
7552 fi
7553 else
7554 # No pkg-config, so obviously not found with pkg-config.
7555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5
7556 printf "%s\n" "pkg-config not found" >&6; }
7557 :
7558 fi
7559
7560
7561 if test x$pkg_config_found_libnl != xyes; then
7562 #
7563 # OK, either we don't have pkg-config or there
7564 # wasn't a .pc file for it; Check for it directly.
7565 #
7566 case "$with_libnl" in
7567
7568 yes|if_available)
7569 incdir=-I/usr/include/libnl3
7570 libnldir=
7571 ;;
7572
7573 *)
7574 if test -d $withval; then
7575 libnldir=-L${withval}/lib
7576 incdir=-I${withval}/include
7577 fi
7578 ;;
7579 esac
7580
7581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
7582 printf %s "checking for nl_socket_alloc in -lnl-3... " >&6; }
7583 if test ${ac_cv_lib_nl_3_nl_socket_alloc+y}
7584 then :
7585 printf %s "(cached) " >&6
7586 else $as_nop
7587 ac_check_lib_save_LIBS=$LIBS
7588 LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
7589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590 /* end confdefs.h. */
7591
7592 /* Override any GCC internal prototype to avoid an error.
7593 Use char because int might match the return type of a GCC
7594 builtin and then its argument prototype would still apply. */
7595 char nl_socket_alloc ();
7596 int
7597 main (void)
7598 {
7599 return nl_socket_alloc ();
7600 ;
7601 return 0;
7602 }
7603 _ACEOF
7604 if ac_fn_c_try_link "$LINENO"
7605 then :
7606 ac_cv_lib_nl_3_nl_socket_alloc=yes
7607 else $as_nop
7608 ac_cv_lib_nl_3_nl_socket_alloc=no
7609 fi
7610 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7611 conftest$ac_exeext conftest.$ac_ext
7612 LIBS=$ac_check_lib_save_LIBS
7613 fi
7614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
7615 printf "%s\n" "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
7616 if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes
7617 then :
7618
7619 #
7620 # Yes, we have libnl 3.x.
7621 #
7622 ADDITIONAL_LIBS="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS"
7623 ADDITIONAL_LIBS_STATIC="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS_STATIC"
7624 LIBS_PRIVATE="${libnldir} -lnl-genl-3 -lnl-3 $LIBS_PRIVATE"
7625
7626 printf "%s\n" "#define HAVE_LIBNL 1" >>confdefs.h
7627
7628 V_INCLS="$V_INCLS ${incdir}"
7629
7630 else $as_nop
7631
7632 #
7633 # No, we don't have libnl at all.
7634 # Fail if the user explicitly requested
7635 # it.
7636 #
7637 if test x$with_libnl = xyes ; then
7638 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
7639 fi
7640
7641 fi
7642
7643 fi
7644 fi
7645
7646 #
7647 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
7648 #
7649 # NOTE: any failure means we conclude that it doesn't have that
7650 # member, so if we don't have tpacket_auxdata, we conclude it
7651 # doesn't have that member (which is OK, as either we won't be
7652 # using code that would use that member, or we wouldn't compile
7653 # in any case).
7654 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
7655 #include <sys/types.h>
7656 #include <linux/if_packet.h>
7657
7658 "
7659 if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes
7660 then :
7661
7662 printf "%s\n" "#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1" >>confdefs.h
7663
7664
7665 fi
7666
7667 ;;
7668
7669 bpf)
7670 #
7671 # Capture module
7672 #
7673 PLATFORM_C_SRC="pcap-bpf.c"
7674
7675 #
7676 # Check whether we have the *BSD-style ioctls.
7677 #
7678 ac_fn_c_check_header_compile "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
7679 if test "x$ac_cv_header_net_if_media_h" = xyes
7680 then :
7681 printf "%s\n" "#define HAVE_NET_IF_MEDIA_H 1" >>confdefs.h
7682
7683 fi
7684
7685
7686 #
7687 # Check whether we have struct BPF_TIMEVAL.
7688 #
7689 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
7690 #include <sys/types.h>
7691 #include <sys/ioctl.h>
7692 #ifdef HAVE_SYS_IOCCOM_H
7693 #include <sys/ioccom.h>
7694 #endif
7695 #include <net/bpf.h>
7696
7697 "
7698 if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes
7699 then :
7700
7701 printf "%s\n" "#define HAVE_STRUCT_BPF_TIMEVAL 1" >>confdefs.h
7702
7703
7704 fi
7705
7706
7707 #
7708 # Check whether there's a net/ipnet.h header and,
7709 # if so, whether it defines IPNET_ANY_LINK - if so,
7710 # we assume we have the "any" device (that's a
7711 # Solaris header, and later versions of Solaris
7712 # have an "any" device).
7713 #
7714 # Attempting to include it at compile time could
7715 # be a pain, as it's a kernel header.
7716 #
7717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Solaris \"any\" device is supported" >&5
7718 printf %s "checking whether the Solaris \"any\" device is supported... " >&6; }
7719 if test -e /usr/include/inet/ipnet.h &&
7720 grep -q IPNET_ANY_LINK /usr/include/inet/ipnet.h; then
7721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7722 printf "%s\n" "yes" >&6; }
7723
7724 printf "%s\n" "#define HAVE_SOLARIS_ANY_DEVICE 1" >>confdefs.h
7725
7726 else
7727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7728 printf "%s\n" "no" >&6; }
7729 fi
7730 ;;
7731
7732 pf)
7733 #
7734 # Capture module
7735 #
7736 PLATFORM_C_SRC="pcap-pf.c"
7737 ;;
7738
7739 snit)
7740 #
7741 # Capture module
7742 #
7743 PLATFORM_C_SRC="pcap-snit.c"
7744 ;;
7745
7746 snoop)
7747 #
7748 # Capture module
7749 #
7750 PLATFORM_C_SRC="pcap-snoop.c"
7751 ;;
7752
7753 dag)
7754 #
7755 # --with-pcap=dag is the only way to get here, and it means
7756 # "DAG support but nothing else"
7757 #
7758 V_DEFS="$V_DEFS -DDAG_ONLY"
7759 PLATFORM_C_SRC="pcap-dag.c"
7760 xxx_only=yes
7761 ;;
7762
7763 dpdk)
7764 #
7765 # --with-pcap=dpdk is the only way to get here, and it means
7766 # "DPDK support but nothing else"
7767 #
7768 V_DEFS="$V_DEFS -DDPDK_ONLY"
7769 PLATFORM_C_SRC="pcap-dpdk.c"
7770 xxx_only=yes
7771 ;;
7772
7773 septel)
7774 #
7775 # --with-pcap=septel is the only way to get here, and it means
7776 # "Septel support but nothing else"
7777 #
7778 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
7779 PLATFORM_C_SRC="pcap-septel.c"
7780 xxx_only=yes
7781 ;;
7782
7783 snf)
7784 #
7785 # --with-pcap=snf is the only way to get here, and it means
7786 # "SNF support but nothing else"
7787 #
7788 V_DEFS="$V_DEFS -DSNF_ONLY"
7789 PLATFORM_C_SRC="pcap-snf.c"
7790 xxx_only=yes
7791 ;;
7792
7793 null)
7794 #
7795 # Capture module
7796 #
7797 PLATFORM_C_SRC="pcap-null.c"
7798 ;;
7799
7800 *)
7801 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
7802 ;;
7803 esac
7804
7805 if test "$V_PCAP" != null
7806 then
7807 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
7808 if test "x$ac_cv_func_getifaddrs" = xyes
7809 then :
7810
7811 #
7812 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
7813 # as well, just in case some platform is really weird.
7814 #
7815 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
7816 if test "x$ac_cv_header_ifaddrs_h" = xyes
7817 then :
7818
7819 #
7820 # We have the header, so we use "getifaddrs()" to
7821 # get the list of interfaces.
7822 #
7823 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
7824
7825 else $as_nop
7826
7827 #
7828 # We don't have the header - give up.
7829 # XXX - we could also fall back on some other
7830 # mechanism, but, for now, this'll catch this
7831 # problem so that we can at least try to figure
7832 # out something to do on systems with "getifaddrs()"
7833 # but without "ifaddrs.h", if there is something
7834 # we can do on those systems.
7835 #
7836 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
7837
7838 fi
7839
7840
7841 else $as_nop
7842
7843 #
7844 # Well, we don't have "getifaddrs()", at least not with the
7845 # libraries with which we've decided we need to link
7846 # libpcap with, so we have to use some other mechanism.
7847 #
7848 # Note that this may happen on Solaris, which has
7849 # getifaddrs(), but in -lsocket, not in -lxnet, so we
7850 # won't find it if we link with -lxnet, which we want
7851 # to do for other reasons.
7852 #
7853 # For now, we use either the SIOCGIFCONF ioctl or the
7854 # SIOCGLIFCONF ioctl, preferring the latter if we have
7855 # it; the latter is a Solarisism that first appeared
7856 # in Solaris 8. (Solaris's getifaddrs() appears to
7857 # be built atop SIOCGLIFCONF; using it directly
7858 # avoids a not-all-that-useful middleman.)
7859 #
7860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
7861 printf %s "checking whether we have SIOCGLIFCONF... " >&6; }
7862 if test ${ac_cv_lbl_have_siocglifconf+y}
7863 then :
7864 printf %s "(cached) " >&6
7865 else $as_nop
7866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7867 /* end confdefs.h. */
7868 #include <sys/param.h>
7869 #include <sys/file.h>
7870 #include <sys/ioctl.h>
7871 #include <sys/socket.h>
7872 #include <sys/sockio.h>
7873 int
7874 main (void)
7875 {
7876 ioctl(0, SIOCGLIFCONF, (char *)0);
7877 ;
7878 return 0;
7879 }
7880 _ACEOF
7881 if ac_fn_c_try_compile "$LINENO"
7882 then :
7883 ac_cv_lbl_have_siocglifconf=yes
7884 else $as_nop
7885 ac_cv_lbl_have_siocglifconf=no
7886 fi
7887 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7888 fi
7889
7890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
7891 printf "%s\n" "$ac_cv_lbl_have_siocglifconf" >&6; }
7892 if test $ac_cv_lbl_have_siocglifconf = yes ; then
7893 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
7894 else
7895 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
7896 fi
7897
7898 fi
7899
7900 fi
7901
7902 case "$host_os" in
7903 linux*)
7904 ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
7905 if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
7906 then :
7907 printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
7908
7909 fi
7910
7911 ;;
7912 *)
7913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
7914 printf "%s\n" "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
7915 ;;
7916 esac
7917
7918 #
7919 # Check for socklen_t.
7920 #
7921 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
7922 #include <sys/types.h>
7923 #include <sys/socket.h>
7924
7925 "
7926 if test "x$ac_cv_type_socklen_t" = xyes
7927 then :
7928
7929 printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h
7930
7931
7932 fi
7933
7934
7935 # Check whether --enable-ipv6 was given.
7936 if test ${enable_ipv6+y}
7937 then :
7938 enableval=$enable_ipv6;
7939 else $as_nop
7940 enable_ipv6=yes
7941 fi
7942
7943 if test "$enable_ipv6" != "no"; then
7944 #
7945 # We've already made sure we have getaddrinfo above in
7946 # AC_LBL_LIBRARY_NET.
7947 #
7948
7949 printf "%s\n" "#define INET6 1" >>confdefs.h
7950
7951 fi
7952
7953 # Check for Endace DAG card support.
7954
7955 # Check whether --with-dag was given.
7956 if test ${with_dag+y}
7957 then :
7958 withval=$with_dag;
7959 if test "$withval" = no
7960 then
7961 # User doesn't want DAG support.
7962 want_dag=no
7963 elif test "$withval" = yes
7964 then
7965 # User wants DAG support but hasn't specified a directory.
7966 want_dag=yes
7967 else
7968 # User wants DAG support and has specified a directory, so use the provided value.
7969 want_dag=yes
7970 dag_root=$withval
7971 fi
7972
7973 else $as_nop
7974
7975 if test "$V_PCAP" = dag; then
7976 # User requested DAG-only libpcap, so we'd better have
7977 # the DAG API.
7978 want_dag=yes
7979 elif test "xxx_only" = yes; then
7980 # User requested something-else-only pcap, so they don't
7981 # want DAG support.
7982 want_dag=no
7983 else
7984 #
7985 # Use DAG API if present, otherwise don't
7986 #
7987 want_dag=ifpresent
7988 fi
7989
7990 fi
7991
7992
7993
7994 # Check whether --with-dag-includes was given.
7995 if test ${with_dag_includes+y}
7996 then :
7997 withval=$with_dag_includes;
7998 # User wants DAG support and has specified a header directory, so use the provided value.
7999 want_dag=yes
8000 dag_include_dir=$withval
8001
8002 fi
8003
8004
8005
8006 # Check whether --with-dag-libraries was given.
8007 if test ${with_dag_libraries+y}
8008 then :
8009 withval=$with_dag_libraries;
8010 # User wants DAG support and has specified a library directory, so use the provided value.
8011 want_dag=yes
8012 dag_lib_dir=$withval
8013
8014 fi
8015
8016
8017 if test "$want_dag" != no; then
8018
8019 # If necessary, set default paths for DAG API headers and libraries.
8020 if test -z "$dag_root"; then
8021 dag_root=/usr/local
8022 fi
8023
8024 if test -z "$dag_include_dir"; then
8025 dag_include_dir="$dag_root/include"
8026 fi
8027
8028 if test -z "$dag_lib_dir"; then
8029 dag_lib_dir="$dag_root/lib"
8030 #
8031 # Handle multiarch systems.
8032 #
8033 if test -d "$dag_lib_dir/$host"
8034 then
8035 dag_lib_dir="$dag_lib_dir/$host"
8036 fi
8037 fi
8038
8039
8040 save_CFLAGS="$CFLAGS"
8041 save_LIBS="$LIBS"
8042 save_LDFLAGS="$LDFLAGS"
8043
8044 CFLAGS="$CFLAGS -I$dag_include_dir"
8045 ac_fn_c_check_header_compile "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
8046 if test "x$ac_cv_header_dagapi_h" = xyes
8047 then :
8048 printf "%s\n" "#define HAVE_DAGAPI_H 1" >>confdefs.h
8049
8050 fi
8051
8052
8053 CFLAGS="$save_CFLAGS"
8054 LIBS="$save_LIBS"
8055 LDFLAGS="$save_LDFLAGS"
8056
8057
8058 if test "$ac_cv_header_dagapi_h" = yes; then
8059
8060 V_INCLS="$V_INCLS -I$dag_include_dir"
8061
8062 if test $V_PCAP != dag ; then
8063 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
8064 fi
8065
8066 # Check for various DAG API functions.
8067 # Don't need to save and restore LIBS to prevent -ldag being
8068 # included if there's a found-action (arg 3).
8069
8070 save_CFLAGS="$CFLAGS"
8071 save_LIBS="$LIBS"
8072 save_LDFLAGS="$LDFLAGS"
8073
8074 LDFLAGS="-L$dag_lib_dir"
8075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
8076 printf %s "checking for dag_attach_stream in -ldag... " >&6; }
8077 if test ${ac_cv_lib_dag_dag_attach_stream+y}
8078 then :
8079 printf %s "(cached) " >&6
8080 else $as_nop
8081 ac_check_lib_save_LIBS=$LIBS
8082 LIBS="-ldag $LIBS"
8083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084 /* end confdefs.h. */
8085
8086 /* Override any GCC internal prototype to avoid an error.
8087 Use char because int might match the return type of a GCC
8088 builtin and then its argument prototype would still apply. */
8089 char dag_attach_stream ();
8090 int
8091 main (void)
8092 {
8093 return dag_attach_stream ();
8094 ;
8095 return 0;
8096 }
8097 _ACEOF
8098 if ac_fn_c_try_link "$LINENO"
8099 then :
8100 ac_cv_lib_dag_dag_attach_stream=yes
8101 else $as_nop
8102 ac_cv_lib_dag_dag_attach_stream=no
8103 fi
8104 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8105 conftest$ac_exeext conftest.$ac_ext
8106 LIBS=$ac_check_lib_save_LIBS
8107 fi
8108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
8109 printf "%s\n" "$ac_cv_lib_dag_dag_attach_stream" >&6; }
8110 if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes
8111 then :
8112
8113 #
8114 # We assume that if we have libdag we have
8115 # libdagconf, as they're installed at the
8116 # same time from the same package.
8117 #
8118 ADDITIONAL_LIBS="-L$dag_lib_dir $ADDITIONAL_LIBS -ldag -ldagconf"
8119 ADDITIONAL_LIBS_STATIC="-L$dag_lib_dir $ADDITIONAL_LIBS_STATIC -ldag -ldagconf"
8120 LIBS_PRIVATE="-L$dag_lib_dir $LIBS_PRIVATE -ldag -ldagconf"
8121
8122 else $as_nop
8123 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
8124 fi
8125
8126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
8127 printf %s "checking for dag_attach_stream64 in -ldag... " >&6; }
8128 if test ${ac_cv_lib_dag_dag_attach_stream64+y}
8129 then :
8130 printf %s "(cached) " >&6
8131 else $as_nop
8132 ac_check_lib_save_LIBS=$LIBS
8133 LIBS="-ldag $LIBS"
8134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8135 /* end confdefs.h. */
8136
8137 /* Override any GCC internal prototype to avoid an error.
8138 Use char because int might match the return type of a GCC
8139 builtin and then its argument prototype would still apply. */
8140 char dag_attach_stream64 ();
8141 int
8142 main (void)
8143 {
8144 return dag_attach_stream64 ();
8145 ;
8146 return 0;
8147 }
8148 _ACEOF
8149 if ac_fn_c_try_link "$LINENO"
8150 then :
8151 ac_cv_lib_dag_dag_attach_stream64=yes
8152 else $as_nop
8153 ac_cv_lib_dag_dag_attach_stream64=no
8154 fi
8155 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8156 conftest$ac_exeext conftest.$ac_ext
8157 LIBS=$ac_check_lib_save_LIBS
8158 fi
8159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
8160 printf "%s\n" "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
8161 if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes
8162 then :
8163 dag_large_streams="1"
8164 else $as_nop
8165 dag_large_streams="0"
8166 fi
8167
8168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
8169 printf %s "checking for dag_get_erf_types in -ldag... " >&6; }
8170 if test ${ac_cv_lib_dag_dag_get_erf_types+y}
8171 then :
8172 printf %s "(cached) " >&6
8173 else $as_nop
8174 ac_check_lib_save_LIBS=$LIBS
8175 LIBS="-ldag $LIBS"
8176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8177 /* end confdefs.h. */
8178
8179 /* Override any GCC internal prototype to avoid an error.
8180 Use char because int might match the return type of a GCC
8181 builtin and then its argument prototype would still apply. */
8182 char dag_get_erf_types ();
8183 int
8184 main (void)
8185 {
8186 return dag_get_erf_types ();
8187 ;
8188 return 0;
8189 }
8190 _ACEOF
8191 if ac_fn_c_try_link "$LINENO"
8192 then :
8193 ac_cv_lib_dag_dag_get_erf_types=yes
8194 else $as_nop
8195 ac_cv_lib_dag_dag_get_erf_types=no
8196 fi
8197 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8198 conftest$ac_exeext conftest.$ac_ext
8199 LIBS=$ac_check_lib_save_LIBS
8200 fi
8201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
8202 printf "%s\n" "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
8203 if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes
8204 then :
8205
8206
8207 printf "%s\n" "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
8208
8209 fi
8210
8211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
8212 printf %s "checking for dag_get_stream_erf_types in -ldag... " >&6; }
8213 if test ${ac_cv_lib_dag_dag_get_stream_erf_types+y}
8214 then :
8215 printf %s "(cached) " >&6
8216 else $as_nop
8217 ac_check_lib_save_LIBS=$LIBS
8218 LIBS="-ldag $LIBS"
8219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8220 /* end confdefs.h. */
8221
8222 /* Override any GCC internal prototype to avoid an error.
8223 Use char because int might match the return type of a GCC
8224 builtin and then its argument prototype would still apply. */
8225 char dag_get_stream_erf_types ();
8226 int
8227 main (void)
8228 {
8229 return dag_get_stream_erf_types ();
8230 ;
8231 return 0;
8232 }
8233 _ACEOF
8234 if ac_fn_c_try_link "$LINENO"
8235 then :
8236 ac_cv_lib_dag_dag_get_stream_erf_types=yes
8237 else $as_nop
8238 ac_cv_lib_dag_dag_get_stream_erf_types=no
8239 fi
8240 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8241 conftest$ac_exeext conftest.$ac_ext
8242 LIBS=$ac_check_lib_save_LIBS
8243 fi
8244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
8245 printf "%s\n" "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
8246 if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes
8247 then :
8248
8249
8250 printf "%s\n" "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
8251
8252 fi
8253
8254
8255 CFLAGS="$save_CFLAGS"
8256 LIBS="$save_LIBS"
8257 LDFLAGS="$save_LDFLAGS"
8258
8259
8260 #
8261 # We assume that if we have libdag we have libdagconf,
8262 # as they're installed at the same time from the same
8263 # package.
8264 #
8265 if test "$dag_large_streams" = 1; then
8266
8267 printf "%s\n" "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
8268
8269
8270 save_CFLAGS="$CFLAGS"
8271 save_LIBS="$LIBS"
8272 save_LDFLAGS="$LDFLAGS"
8273
8274 LIBS="$LIBS -ldag -ldagconf"
8275 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
8276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
8277 printf %s "checking for vdag_set_device_info in -lvdag... " >&6; }
8278 if test ${ac_cv_lib_vdag_vdag_set_device_info+y}
8279 then :
8280 printf %s "(cached) " >&6
8281 else $as_nop
8282 ac_check_lib_save_LIBS=$LIBS
8283 LIBS="-lvdag $LIBS"
8284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8285 /* end confdefs.h. */
8286
8287 /* Override any GCC internal prototype to avoid an error.
8288 Use char because int might match the return type of a GCC
8289 builtin and then its argument prototype would still apply. */
8290 char vdag_set_device_info ();
8291 int
8292 main (void)
8293 {
8294 return vdag_set_device_info ();
8295 ;
8296 return 0;
8297 }
8298 _ACEOF
8299 if ac_fn_c_try_link "$LINENO"
8300 then :
8301 ac_cv_lib_vdag_vdag_set_device_info=yes
8302 else $as_nop
8303 ac_cv_lib_vdag_vdag_set_device_info=no
8304 fi
8305 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8306 conftest$ac_exeext conftest.$ac_ext
8307 LIBS=$ac_check_lib_save_LIBS
8308 fi
8309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
8310 printf "%s\n" "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
8311 if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes
8312 then :
8313 ac_dag_have_vdag="1"
8314 else $as_nop
8315 ac_dag_have_vdag="0"
8316 fi
8317
8318
8319 CFLAGS="$save_CFLAGS"
8320 LIBS="$save_LIBS"
8321 LDFLAGS="$save_LDFLAGS"
8322
8323 if test "$ac_dag_have_vdag" = 1; then
8324
8325 printf "%s\n" "#define HAVE_DAG_VDAG 1" >>confdefs.h
8326
8327 if test "$ac_lbl_have_pthreads" != "found"; then
8328 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
8329 fi
8330 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $PTHREAD_LIBS"
8331 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $PTHREAD_LIBS"
8332 LIBS_PRIVATE="$LIBS_PRIVATE $PTHREAD_LIBS"
8333 fi
8334 fi
8335
8336
8337 printf "%s\n" "#define HAVE_DAG_API 1" >>confdefs.h
8338
8339 else
8340 if test "$V_PCAP" = dag; then
8341 # User requested "dag" capture type but we couldn't
8342 # find the DAG API support.
8343 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
8344 fi
8345
8346 if test "$want_dag" = yes; then
8347 # User wanted DAG support but we couldn't find it.
8348 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
8349 fi
8350 fi
8351 CFLAGS="$save_CFLAGS"
8352 fi
8353
8354
8355 # Check whether --with-septel was given.
8356 if test ${with_septel+y}
8357 then :
8358 withval=$with_septel;
8359 if test "$withval" = no
8360 then
8361 want_septel=no
8362 elif test "$withval" = yes
8363 then
8364 want_septel=yes
8365 septel_root=
8366 else
8367 want_septel=yes
8368 septel_root=$withval
8369 fi
8370
8371 else $as_nop
8372
8373 if test "$V_PCAP" = septel; then
8374 # User requested Septel-only libpcap, so we'd better have
8375 # the Septel API.
8376 want_septel=yes
8377 elif test "xxx_only" = yes; then
8378 # User requested something-else-only pcap, so they don't
8379 # want Septel support.
8380 want_septel=no
8381 else
8382 #
8383 # Use Septel API if present, otherwise don't
8384 #
8385 want_septel=ifpresent
8386 fi
8387
8388 fi
8389
8390
8391 ac_cv_lbl_septel_api=no
8392 if test "$with_septel" != no; then
8393
8394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
8395 printf %s "checking whether we have Septel API headers... " >&6; }
8396
8397 # If necessary, set default paths for Septel API headers and libraries.
8398 if test -z "$septel_root"; then
8399 septel_root=$srcdir/../septel
8400 fi
8401
8402 septel_tools_dir="$septel_root"
8403 septel_include_dir="$septel_root/INC"
8404
8405 if test -r "$septel_include_dir/msg.h"; then
8406 ac_cv_lbl_septel_api=yes
8407 fi
8408
8409 if test "$ac_cv_lbl_septel_api" = yes; then
8410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
8411 printf "%s\n" "yes ($septel_include_dir)" >&6; }
8412
8413 V_INCLS="$V_INCLS -I$septel_include_dir"
8414 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"
8415 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"
8416
8417 if test "$V_PCAP" != septel ; then
8418 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
8419 fi
8420
8421
8422 printf "%s\n" "#define HAVE_SEPTEL_API 1" >>confdefs.h
8423
8424 else
8425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8426 printf "%s\n" "no" >&6; }
8427
8428 if test "$V_PCAP" = septel; then
8429 # User requested "septel" capture type but
8430 # we couldn't find the Septel API support.
8431 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
8432 fi
8433
8434 if test "$want_septel" = yes; then
8435 # User wanted Septel support but we couldn't find it.
8436 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
8437 fi
8438 fi
8439 fi
8440
8441 # Check for Myricom SNF support.
8442
8443 # Check whether --with-snf was given.
8444 if test ${with_snf+y}
8445 then :
8446 withval=$with_snf;
8447 if test "$withval" = no
8448 then
8449 # User explicitly doesn't want SNF
8450 want_snf=no
8451 elif test "$withval" = yes
8452 then
8453 # User wants SNF support but hasn't specified a directory.
8454 want_snf=yes
8455 else
8456 # User wants SNF support with a specified directory.
8457 want_snf=yes
8458 snf_root=$withval
8459 fi
8460
8461 else $as_nop
8462
8463 if test "$V_PCAP" = snf; then
8464 # User requested Sniffer-only libpcap, so we'd better have
8465 # the Sniffer API.
8466 want_snf=yes
8467 elif test "xxx_only" = yes; then
8468 # User requested something-else-only pcap, so they don't
8469 # want SNF support.
8470 want_snf=no
8471 else
8472 #
8473 # Use Sniffer API if present, otherwise don't
8474 #
8475 want_snf=ifpresent
8476 fi
8477
8478 fi
8479
8480
8481
8482 # Check whether --with-snf-includes was given.
8483 if test ${with_snf_includes+y}
8484 then :
8485 withval=$with_snf_includes;
8486 # User wants SNF with specific header directory
8487 want_snf=yes
8488 snf_include_dir=$withval
8489
8490 fi
8491
8492
8493
8494 # Check whether --with-snf-libraries was given.
8495 if test ${with_snf_libraries+y}
8496 then :
8497 withval=$with_snf_libraries;
8498 # User wants SNF with specific lib directory
8499 want_snf=yes
8500 snf_lib_dir=$withval
8501
8502 fi
8503
8504
8505 ac_cv_lbl_snf_api=no
8506 if test "$with_snf" != no; then
8507
8508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
8509 printf %s "checking whether we have Myricom Sniffer API... " >&6; }
8510
8511 # If necessary, set default paths for Sniffer headers and libraries.
8512 if test -z "$snf_root"; then
8513 snf_root=/opt/snf
8514 fi
8515
8516 if test -z "$snf_include_dir"; then
8517 snf_include_dir="$snf_root/include"
8518 fi
8519
8520 if test -z "$snf_lib_dir"; then
8521 snf_lib_dir="$snf_root/lib"
8522 #
8523 # Handle multiarch systems.
8524 #
8525 if test -d "$snf_lib_dir/$host"
8526 then
8527 snf_lib_dir="$snf_lib_dir/$host"
8528 fi
8529 fi
8530
8531 if test -f "$snf_include_dir/snf.h"; then
8532 # We found a header; make sure we can link with the library
8533
8534 save_CFLAGS="$CFLAGS"
8535 save_LIBS="$LIBS"
8536 save_LDFLAGS="$LDFLAGS"
8537
8538 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
8539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
8540 printf %s "checking for snf_init in -lsnf... " >&6; }
8541 if test ${ac_cv_lib_snf_snf_init+y}
8542 then :
8543 printf %s "(cached) " >&6
8544 else $as_nop
8545 ac_check_lib_save_LIBS=$LIBS
8546 LIBS="-lsnf $LIBS"
8547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8548 /* end confdefs.h. */
8549
8550 /* Override any GCC internal prototype to avoid an error.
8551 Use char because int might match the return type of a GCC
8552 builtin and then its argument prototype would still apply. */
8553 char snf_init ();
8554 int
8555 main (void)
8556 {
8557 return snf_init ();
8558 ;
8559 return 0;
8560 }
8561 _ACEOF
8562 if ac_fn_c_try_link "$LINENO"
8563 then :
8564 ac_cv_lib_snf_snf_init=yes
8565 else $as_nop
8566 ac_cv_lib_snf_snf_init=no
8567 fi
8568 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8569 conftest$ac_exeext conftest.$ac_ext
8570 LIBS=$ac_check_lib_save_LIBS
8571 fi
8572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
8573 printf "%s\n" "$ac_cv_lib_snf_snf_init" >&6; }
8574 if test "x$ac_cv_lib_snf_snf_init" = xyes
8575 then :
8576 ac_cv_lbl_snf_api="yes"
8577 fi
8578
8579
8580 CFLAGS="$save_CFLAGS"
8581 LIBS="$save_LIBS"
8582 LDFLAGS="$save_LDFLAGS"
8583
8584 if test "$ac_cv_lbl_snf_api" = no; then
8585 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
8586 fi
8587 fi
8588
8589 if test "$ac_cv_lbl_snf_api" = yes; then
8590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
8591 printf "%s\n" "yes ($snf_root)" >&6; }
8592
8593 V_INCLS="$V_INCLS -I$snf_include_dir"
8594 ADDITIONAL_LIBS="$ADDITIONAL_LIBS -L$snf_lib_dir -lsnf"
8595 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC -L$snf_lib_dir -lsnf"
8596 LIBS_PRIVATE="$LIBS_PRIVATE -L$snf_lib_dir -lsnf"
8597
8598 if test "$V_PCAP" != snf ; then
8599 MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
8600 fi
8601
8602
8603 printf "%s\n" "#define HAVE_SNF_API 1" >>confdefs.h
8604
8605 else
8606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8607 printf "%s\n" "no" >&6; }
8608
8609 if test "$want_snf" = yes; then
8610 # User requested "snf" capture type but
8611 # we couldn't find the Sniffer API support.
8612 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
8613 fi
8614
8615 if test "$want_snf" = yes; then
8616 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
8617 fi
8618 fi
8619 fi
8620
8621 # Check for Riverbed TurboCap support.
8622
8623 # Check whether --with-turbocap was given.
8624 if test ${with_turbocap+y}
8625 then :
8626 withval=$with_turbocap;
8627 if test "$withval" = no
8628 then
8629 # User explicitly doesn't want TurboCap
8630 want_turbocap=no
8631 elif test "$withval" = yes
8632 then
8633 # User wants TurboCap support but hasn't specified a directory.
8634 want_turbocap=yes
8635 else
8636 # User wants TurboCap support with a specified directory.
8637 want_turbocap=yes
8638 turbocap_root=$withval
8639 fi
8640
8641 else $as_nop
8642
8643 if test "xxx_only" = yes; then
8644 # User requested something-else-only pcap, so they don't
8645 # want TurboCap support.
8646 want_turbocap=no
8647 else
8648 #
8649 # Use TurboCap API if present, otherwise don't
8650 #
8651 want_turbocap=ifpresent
8652 fi
8653
8654 fi
8655
8656
8657 ac_cv_lbl_turbocap_api=no
8658 if test "$want_turbocap" != no; then
8659
8660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
8661 printf %s "checking whether TurboCap is supported... " >&6; }
8662
8663
8664 save_CFLAGS="$CFLAGS"
8665 save_LIBS="$LIBS"
8666 save_LDFLAGS="$LDFLAGS"
8667
8668 if test ! -z "$turbocap_root"; then
8669 TURBOCAP_CFLAGS="-I$turbocap_root/include"
8670 TURBOCAP_LDFLAGS="-L$turbocap_root/lib"
8671 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
8672 LDFLAGS="$LDFLAGS $TURBOCAP_LDFLAGS"
8673 fi
8674
8675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8676 /* end confdefs.h. */
8677
8678 #include <TcApi.h>
8679
8680 int
8681 main (void)
8682 {
8683
8684 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
8685 TC_INSTANCE i;
8686 (void)TcInstanceCreateByName("foo", &i);
8687
8688 ;
8689 return 0;
8690 }
8691 _ACEOF
8692 if ac_fn_c_try_compile "$LINENO"
8693 then :
8694 ac_cv_lbl_turbocap_api=yes
8695 fi
8696 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8697
8698
8699 CFLAGS="$save_CFLAGS"
8700 LIBS="$save_LIBS"
8701 LDFLAGS="$save_LDFLAGS"
8702
8703 if test $ac_cv_lbl_turbocap_api = yes; then
8704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8705 printf "%s\n" "yes" >&6; }
8706
8707 MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
8708 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
8709 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
8710 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
8711 LIBS_PRIVATE="$LIBS_PRIVATE $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
8712
8713
8714 printf "%s\n" "#define HAVE_TC_API 1" >>confdefs.h
8715
8716 else
8717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718 printf "%s\n" "no" >&6; }
8719
8720 if test "$want_turbocap" = yes; then
8721 # User wanted Turbo support but we couldn't find it.
8722 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
8723 fi
8724 fi
8725 fi
8726
8727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
8728 printf %s "checking whether to enable remote packet capture... " >&6; }
8729 # Check whether --enable-remote was given.
8730 if test ${enable_remote+y}
8731 then :
8732 enableval=$enable_remote;
8733 else $as_nop
8734 enableval=no
8735 fi
8736
8737 case "$enableval" in
8738 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8739 printf "%s\n" "yes" >&6; }
8740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
8741 printf "%s\n" "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
8742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
8743 printf "%s\n" "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
8744 #
8745 # rpcapd requires pthreads on UN*X.
8746 #
8747 if test "$ac_lbl_have_pthreads" != "found"; then
8748 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
8749 fi
8750 #
8751 # It also requires crypt().
8752 # Do we have it in the system libraries?
8753 #
8754 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
8755 if test "x$ac_cv_func_crypt" = xyes
8756 then :
8757
8758 else $as_nop
8759
8760 #
8761 # No. Do we have it in -lcrypt?
8762 #
8763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
8764 printf %s "checking for crypt in -lcrypt... " >&6; }
8765 if test ${ac_cv_lib_crypt_crypt+y}
8766 then :
8767 printf %s "(cached) " >&6
8768 else $as_nop
8769 ac_check_lib_save_LIBS=$LIBS
8770 LIBS="-lcrypt $LIBS"
8771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8772 /* end confdefs.h. */
8773
8774 /* Override any GCC internal prototype to avoid an error.
8775 Use char because int might match the return type of a GCC
8776 builtin and then its argument prototype would still apply. */
8777 char crypt ();
8778 int
8779 main (void)
8780 {
8781 return crypt ();
8782 ;
8783 return 0;
8784 }
8785 _ACEOF
8786 if ac_fn_c_try_link "$LINENO"
8787 then :
8788 ac_cv_lib_crypt_crypt=yes
8789 else $as_nop
8790 ac_cv_lib_crypt_crypt=no
8791 fi
8792 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8793 conftest$ac_exeext conftest.$ac_ext
8794 LIBS=$ac_check_lib_save_LIBS
8795 fi
8796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
8797 printf "%s\n" "$ac_cv_lib_crypt_crypt" >&6; }
8798 if test "x$ac_cv_lib_crypt_crypt" = xyes
8799 then :
8800
8801 #
8802 # Yes; add -lcrypt to the libraries for rpcapd.
8803 #
8804 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
8805
8806 else $as_nop
8807
8808 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
8809
8810 fi
8811
8812
8813 fi
8814
8815
8816 #
8817 # OK, we have crypt(). Do we have getspnam()?
8818 #
8819 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8820 if test "x$ac_cv_func_getspnam" = xyes
8821 then :
8822 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h
8823
8824 fi
8825
8826
8827 #
8828 # Check for various members of struct msghdr.
8829 #
8830 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
8831 #include \"ftmacros.h\"
8832 #include <sys/socket.h>
8833
8834 "
8835 if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
8836 then :
8837
8838 printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1" >>confdefs.h
8839
8840
8841 fi
8842
8843 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
8844 #include \"ftmacros.h\"
8845 #include <sys/socket.h>
8846
8847 "
8848 if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes
8849 then :
8850
8851 printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1" >>confdefs.h
8852
8853
8854 fi
8855
8856
8857 #
8858 # Optionally, we may want to support SSL.
8859 # Check for OpenSSL/libressl.
8860 #
8861 # First, try looking for it with pkg-config, if we have it.
8862 #
8863 # Homebrew's pkg-config does not, by default, look for
8864 # pkg-config files for packages it has installed.
8865 # Furthermore, at least for OpenSSL, they appear to be
8866 # dumped in package-specific directories whose paths are
8867 # not only package-specific but package-version-specific.
8868 #
8869 # So the only way to find openssl is to get the value of
8870 # PKG_CONFIG_PATH from "brew --env openssl" and add that
8871 # to PKG_CONFIG_PATH. (No, we can't just assume it's under
8872 # /usr/local; Homebrew have conveniently chosen to put it
8873 # under /opt/homebrew on ARM.)
8874 #
8875 # That's the nice thing about Homebrew - it makes things easier!
8876 # Thanks!
8877 #
8878 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
8879 if test -n "$BREW"; then
8880 openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'`
8881 PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH"
8882 fi
8883
8884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl with pkg-config" >&5
8885 printf %s "checking for openssl with pkg-config... " >&6; }
8886 if test -n "$PKG_CONFIG"; then
8887
8888 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
8889 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
8890 ac_status=$?
8891 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8892 test $ac_status = 0; }; then
8893 #
8894 # The package was found, so try to get its C flags and
8895 # libraries.
8896 #
8897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
8898 printf "%s\n" "found" >&6; }
8899 if test ! -n "$OPENSSL_CFLAGS"; then
8900 OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
8901 if test "x$?" != "x0"; then
8902 #
8903 # That failed - report an error.
8904 # Re-run the command, telling pkg-config to print an error
8905 # message, capture the error message, and report it.
8906 # This causes the configuration script to fail, as it means
8907 # the script is almost certainly doing something wrong.
8908 #
8909
8910 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8911 _pkg_short_errors_supported=yes
8912 else
8913 _pkg_short_errors_supported=no
8914 fi
8915 if test $_pkg_short_errors_supported = yes; then
8916 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "openssl" 2>&1`
8917 else
8918 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "openssl" 2>&1`
8919 fi
8920 as_fn_error $? "$PKG_CONFIG --cflags \"openssl\" failed: $_pkg_error_string" "$LINENO" 5
8921 fi
8922 fi
8923 if test ! -n "$OPENSSL_LIBS"; then
8924 OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
8925 if test "x$?" != "x0"; then
8926 #
8927 # That failed - report an error.
8928 # Re-run the command, telling pkg-config to print an error
8929 # message, capture the error message, and report it.
8930 # This causes the configuration script to fail, as it means
8931 # the script is almost certainly doing something wrong.
8932 #
8933
8934 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8935 _pkg_short_errors_supported=yes
8936 else
8937 _pkg_short_errors_supported=no
8938 fi
8939 if test $_pkg_short_errors_supported = yes; then
8940 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "openssl" 2>&1`
8941 else
8942 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "openssl" 2>&1`
8943 fi
8944 as_fn_error $? "$PKG_CONFIG --libs \"openssl\" failed: $_pkg_error_string" "$LINENO" 5
8945 fi
8946 fi
8947 if test ! -n "$OPENSSL_LIBS_STATIC"; then
8948 OPENSSL_LIBS_STATIC=`$PKG_CONFIG --libs --static "openssl" 2>/dev/null`
8949 if test "x$?" != "x0"; then
8950 #
8951 # That failed - report an error.
8952 # Re-run the command, telling pkg-config to print an error
8953 # message, capture the error message, and report it.
8954 # This causes the configuration script to fail, as it means
8955 # the script is almost certainly doing something wrong.
8956 #
8957
8958 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8959 _pkg_short_errors_supported=yes
8960 else
8961 _pkg_short_errors_supported=no
8962 fi
8963 if test $_pkg_short_errors_supported = yes; then
8964 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "openssl" 2>&1`
8965 else
8966 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "openssl" 2>&1`
8967 fi
8968 as_fn_error $? "$PKG_CONFIG --libs --static \"openssl\" failed: $_pkg_error_string" "$LINENO" 5
8969 fi
8970 fi
8971
8972 #
8973 # We found OpenSSL/libressl.
8974 #
8975 HAVE_OPENSSL=yes
8976 REQUIRES_PRIVATE="$REQUIRES_PRIVATE openssl"
8977
8978 else
8979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8980 printf "%s\n" "not found" >&6; }
8981 :
8982 fi
8983 else
8984 # No pkg-config, so obviously not found with pkg-config.
8985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5
8986 printf "%s\n" "pkg-config not found" >&6; }
8987 :
8988 fi
8989
8990 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
8991
8992 #
8993 # If it wasn't found, and we have Homebrew installed, see
8994 # if it's in Homebrew.
8995 #
8996 if test "x$HAVE_OPENSSL" != "xyes" -a -n "$BREW"; then
8997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5
8998 printf %s "checking for openssl in Homebrew... " >&6; }
8999 #
9000 # The brew man page lies when it speaks of
9001 # $BREW --prefix --installed <formula>
9002 # outputting nothing. In Homebrew 3.3.16,
9003 # it produces output regardless of whether
9004 # the formula is installed or not, so we
9005 # send the standard output and error to
9006 # the bit bucket.
9007 #
9008 if $BREW --prefix --installed openssl >/dev/null 2>&1; then
9009 #
9010 # Yes. Get the include directory and library
9011 # directory. (No, we can't just assume it's
9012 # under /usr/local; Homebrew have conveniently
9013 # chosen to put it under /opt/homebrew on ARM.)
9014 #
9015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9016 printf "%s\n" "yes" >&6; }
9017 HAVE_OPENSSL=yes
9018 openssl_path=`$BREW --prefix openssl`
9019 OPENSSL_CFLAGS="-I$openssl_path/include"
9020 OPENSSL_LIBS="-L$openssl_path/lib -lssl -lcrypto"
9021 OPENSSL_LIBS_STATIC="-L$openssl_path/lib -lssl -lcrypto"
9022 OPENSSL_LIBS_PRIVATE="-L$openssl_path/lib -lssl -lcrypto"
9023 else
9024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9025 printf "%s\n" "no" >&6; }
9026 fi
9027 fi
9028
9029 #
9030 # If it wasn't found, and /usr/local/include and /usr/local/lib
9031 # exist, check if it's in /usr/local. (We check whether they
9032 # exist because, if they don't exist, the compiler will warn
9033 # about that and then ignore the argument, so they test
9034 # using just the system header files and libraries.)
9035 #
9036 # We include the standard include file to 1) make sure that
9037 # it's installed (if it's just a shared library for the
9038 # benefit of existing programs, that's not useful) and 2)
9039 # because SSL_library_init() is a library routine in some
9040 # versions and a #defined wrapper around OPENSSL_init_ssl()
9041 # in others.
9042 #
9043 if test "x$HAVE_OPENSSL" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then
9044
9045 save_CFLAGS="$CFLAGS"
9046 save_LIBS="$LIBS"
9047 save_LDFLAGS="$LDFLAGS"
9048
9049 CFLAGS="$CFLAGS -I/usr/local/include"
9050 LIBS="$LIBS -L/usr/local/lib -lssl -lcrypto"
9051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local that we can use" >&5
9052 printf %s "checking whether we have OpenSSL/libressl in /usr/local that we can use... " >&6; }
9053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9054 /* end confdefs.h. */
9055
9056 #include <openssl/ssl.h>
9057
9058 int
9059 main (void)
9060 {
9061
9062 SSL_library_init();
9063 return 0;
9064
9065 ;
9066 return 0;
9067 }
9068 _ACEOF
9069 if ac_fn_c_try_link "$LINENO"
9070 then :
9071
9072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9073 printf "%s\n" "yes" >&6; }
9074 HAVE_OPENSSL=yes
9075 OPENSSL_CFLAGS="-I/usr/local/include"
9076 OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto"
9077 OPENSSL_LIBS_STATIC="-L/usr/local/lib -lssl -lcrypto"
9078 OPENSSL_LIBS_PRIVATE="-L/usr/local/lib -lssl -lcrypto"
9079
9080 else $as_nop
9081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082 printf "%s\n" "no" >&6; }
9083 fi
9084 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9085 conftest$ac_exeext conftest.$ac_ext
9086
9087 CFLAGS="$save_CFLAGS"
9088 LIBS="$save_LIBS"
9089 LDFLAGS="$save_LDFLAGS"
9090
9091 fi
9092
9093 #
9094 # If it wasn't found, check if it's a system library.
9095 #
9096 # We include the standard include file to 1) make sure that
9097 # it's installed (if it's just a shared library for the
9098 # benefit of existing programs, that's not useful) and 2)
9099 # because SSL_library_init() is a library routine in some
9100 # versions and a #defined wrapper around OPENSSL_init_ssl()
9101 # in others.
9102 #
9103 if test "x$HAVE_OPENSSL" != "xyes"; then
9104
9105 save_CFLAGS="$CFLAGS"
9106 save_LIBS="$LIBS"
9107 save_LDFLAGS="$LDFLAGS"
9108
9109 LIBS="$LIBS -lssl -lcrypto"
9110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
9111 printf %s "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
9112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113 /* end confdefs.h. */
9114
9115 #include <openssl/ssl.h>
9116
9117 int
9118 main (void)
9119 {
9120
9121 SSL_library_init();
9122 return 0;
9123
9124 ;
9125 return 0;
9126 }
9127 _ACEOF
9128 if ac_fn_c_try_link "$LINENO"
9129 then :
9130
9131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9132 printf "%s\n" "yes" >&6; }
9133 HAVE_OPENSSL=yes
9134 OPENSSL_LIBS="-lssl -lcrypto"
9135 OPENSSL_LIBS_STATIC="-lssl -lcrypto"
9136 OPENSSL_LIBS_PRIVATE="-lssl -lcrypto"
9137
9138 else $as_nop
9139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140 printf "%s\n" "no" >&6; }
9141 fi
9142 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9143 conftest$ac_exeext conftest.$ac_ext
9144
9145 CFLAGS="$save_CFLAGS"
9146 LIBS="$save_LIBS"
9147 LDFLAGS="$save_LDFLAGS"
9148
9149 fi
9150
9151 #
9152 # OK, did we find it?
9153 #
9154 if test "x$HAVE_OPENSSL" = "xyes"; then
9155
9156 printf "%s\n" "#define HAVE_OPENSSL 1" >>confdefs.h
9157
9158 V_INCLS="$V_INCLS $OPENSSL_CFLAGS"
9159 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $OPENSSL_LIBS"
9160 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $OPENSSL_LIBS_STATIC"
9161 LIBS_PRIVATE="$LIBS_PRIVATE $OPENSSL_LIBS_PRIVATE"
9162 REQUIRES_PRIVATE="$REQUIRES_PRIVATE $OPENSSL_REQUIRES_PRIVATE"
9163 REMOTE_C_SRC="$REMOTE_C_SRC sslutils.c"
9164 else
9165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
9166 printf "%s\n" "$as_me: OpenSSL not found" >&6;}
9167 fi
9168
9169
9170 printf "%s\n" "#define ENABLE_REMOTE /**/" >>confdefs.h
9171
9172 REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c"
9173 BUILD_RPCAPD=build-rpcapd
9174 INSTALL_RPCAPD=install-rpcapd
9175 ;;
9176 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177 printf "%s\n" "no" >&6; }
9178 ;;
9179 esac
9180
9181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
9182 printf %s "checking whether to build optimizer debugging code... " >&6; }
9183 # Check whether --enable-optimizer-dbg was given.
9184 if test ${enable_optimizer_dbg+y}
9185 then :
9186 enableval=$enable_optimizer_dbg;
9187 fi
9188
9189 if test "$enable_optimizer_dbg" = "yes"; then
9190
9191 printf "%s\n" "#define BDEBUG 1" >>confdefs.h
9192
9193 fi
9194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
9195 printf "%s\n" "${enable_optimizer_dbg-no}" >&6; }
9196
9197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
9198 printf %s "checking whether to build parser debugging code... " >&6; }
9199 # Check whether --enable-yydebug was given.
9200 if test ${enable_yydebug+y}
9201 then :
9202 enableval=$enable_yydebug;
9203 fi
9204
9205 if test "$enable_yydebug" = "yes"; then
9206
9207 printf "%s\n" "#define YYDEBUG 1" >>confdefs.h
9208
9209 fi
9210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
9211 printf "%s\n" "${enable_yydebug-no}" >&6; }
9212
9213 #
9214 # Look for {f}lex.
9215 #
9216 for ac_prog in flex lex
9217 do
9218 # Extract the first word of "$ac_prog", so it can be a program name with args.
9219 set dummy $ac_prog; ac_word=$2
9220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9221 printf %s "checking for $ac_word... " >&6; }
9222 if test ${ac_cv_prog_LEX+y}
9223 then :
9224 printf %s "(cached) " >&6
9225 else $as_nop
9226 if test -n "$LEX"; then
9227 ac_cv_prog_LEX="$LEX" # Let the user override the test.
9228 else
9229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9230 for as_dir in $PATH
9231 do
9232 IFS=$as_save_IFS
9233 case $as_dir in #(((
9234 '') as_dir=./ ;;
9235 */) ;;
9236 *) as_dir=$as_dir/ ;;
9237 esac
9238 for ac_exec_ext in '' $ac_executable_extensions; do
9239 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9240 ac_cv_prog_LEX="$ac_prog"
9241 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9242 break 2
9243 fi
9244 done
9245 done
9246 IFS=$as_save_IFS
9247
9248 fi
9249 fi
9250 LEX=$ac_cv_prog_LEX
9251 if test -n "$LEX"; then
9252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
9253 printf "%s\n" "$LEX" >&6; }
9254 else
9255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256 printf "%s\n" "no" >&6; }
9257 fi
9258
9259
9260 test -n "$LEX" && break
9261 done
9262 test -n "$LEX" || LEX=":"
9263
9264 if test "x$LEX" != "x:"; then
9265 cat >conftest.l <<_ACEOF
9266 %{
9267 #ifdef __cplusplus
9268 extern "C"
9269 #endif
9270 int yywrap(void);
9271 %}
9272 %%
9273 a { ECHO; }
9274 b { REJECT; }
9275 c { yymore (); }
9276 d { yyless (1); }
9277 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
9278 #ifdef __cplusplus
9279 yyless ((yyinput () != 0));
9280 #else
9281 yyless ((input () != 0));
9282 #endif
9283 }
9284 f { unput (yytext[0]); }
9285 . { BEGIN INITIAL; }
9286 %%
9287 #ifdef YYTEXT_POINTER
9288 extern char *yytext;
9289 #endif
9290 int
9291 yywrap (void)
9292 {
9293 return 1;
9294 }
9295 int
9296 main (void)
9297 {
9298 return ! yylex ();
9299 }
9300 _ACEOF
9301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
9302 printf %s "checking for lex output file root... " >&6; }
9303 if test ${ac_cv_prog_lex_root+y}
9304 then :
9305 printf %s "(cached) " >&6
9306 else $as_nop
9307
9308 ac_cv_prog_lex_root=unknown
9309 { { ac_try="$LEX conftest.l"
9310 case "(($ac_try" in
9311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9312 *) ac_try_echo=$ac_try;;
9313 esac
9314 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9315 printf "%s\n" "$ac_try_echo"; } >&5
9316 (eval "$LEX conftest.l") 2>&5
9317 ac_status=$?
9318 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9319 test $ac_status = 0; } &&
9320 if test -f lex.yy.c; then
9321 ac_cv_prog_lex_root=lex.yy
9322 elif test -f lexyy.c; then
9323 ac_cv_prog_lex_root=lexyy
9324 fi
9325 fi
9326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
9327 printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
9328 if test "$ac_cv_prog_lex_root" = unknown
9329 then :
9330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
9331 printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
9332 LEX=: LEXLIB=
9333 fi
9334 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
9335
9336 if test ${LEXLIB+y}
9337 then :
9338
9339 else $as_nop
9340
9341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
9342 printf %s "checking for lex library... " >&6; }
9343 if test ${ac_cv_lib_lex+y}
9344 then :
9345 printf %s "(cached) " >&6
9346 else $as_nop
9347
9348 ac_save_LIBS="$LIBS"
9349 ac_found=false
9350 for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
9351 case $ac_cv_lib_lex in #(
9352 'none needed') :
9353 ;; #(
9354 'not found') :
9355 break ;; #(
9356 *) :
9357 LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
9358 *) :
9359 ;;
9360 esac
9361
9362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9363 /* end confdefs.h. */
9364 `cat $LEX_OUTPUT_ROOT.c`
9365 _ACEOF
9366 if ac_fn_c_try_link "$LINENO"
9367 then :
9368 ac_found=:
9369 fi
9370 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9371 conftest$ac_exeext conftest.$ac_ext
9372 if $ac_found; then
9373 break
9374 fi
9375 done
9376 LIBS="$ac_save_LIBS"
9377
9378 fi
9379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
9380 printf "%s\n" "$ac_cv_lib_lex" >&6; }
9381 if test "$ac_cv_lib_lex" = 'not found'
9382 then :
9383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
9384 printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
9385 LEX=: LEXLIB=
9386 elif test "$ac_cv_lib_lex" = 'none needed'
9387 then :
9388 LEXLIB=''
9389 else $as_nop
9390 LEXLIB=$ac_cv_lib_lex
9391 fi
9392 ac_save_LIBS="$LIBS"
9393 LIBS=
9394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5
9395 printf %s "checking for library containing yywrap... " >&6; }
9396 if test ${ac_cv_search_yywrap+y}
9397 then :
9398 printf %s "(cached) " >&6
9399 else $as_nop
9400 ac_func_search_save_LIBS=$LIBS
9401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9402 /* end confdefs.h. */
9403
9404 /* Override any GCC internal prototype to avoid an error.
9405 Use char because int might match the return type of a GCC
9406 builtin and then its argument prototype would still apply. */
9407 char yywrap ();
9408 int
9409 main (void)
9410 {
9411 return yywrap ();
9412 ;
9413 return 0;
9414 }
9415 _ACEOF
9416 for ac_lib in '' fl l
9417 do
9418 if test -z "$ac_lib"; then
9419 ac_res="none required"
9420 else
9421 ac_res=-l$ac_lib
9422 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9423 fi
9424 if ac_fn_c_try_link "$LINENO"
9425 then :
9426 ac_cv_search_yywrap=$ac_res
9427 fi
9428 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9429 conftest$ac_exeext
9430 if test ${ac_cv_search_yywrap+y}
9431 then :
9432 break
9433 fi
9434 done
9435 if test ${ac_cv_search_yywrap+y}
9436 then :
9437
9438 else $as_nop
9439 ac_cv_search_yywrap=no
9440 fi
9441 rm conftest.$ac_ext
9442 LIBS=$ac_func_search_save_LIBS
9443 fi
9444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5
9445 printf "%s\n" "$ac_cv_search_yywrap" >&6; }
9446 ac_res=$ac_cv_search_yywrap
9447 if test "$ac_res" != no
9448 then :
9449 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9450 LEXLIB="$LIBS"
9451 fi
9452
9453 LIBS="$ac_save_LIBS"
9454 fi
9455
9456
9457 if test "$LEX" != :
9458 then :
9459
9460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
9461 printf %s "checking whether yytext is a pointer... " >&6; }
9462 if test ${ac_cv_prog_lex_yytext_pointer+y}
9463 then :
9464 printf %s "(cached) " >&6
9465 else $as_nop
9466 # POSIX says lex can declare yytext either as a pointer or an array; the
9467 # default is implementation-dependent. Figure out which it is, since
9468 # not all implementations provide the %pointer and %array declarations.
9469 ac_cv_prog_lex_yytext_pointer=no
9470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9471 /* end confdefs.h. */
9472
9473 #define YYTEXT_POINTER 1
9474 `cat $LEX_OUTPUT_ROOT.c`
9475 _ACEOF
9476 if ac_fn_c_try_compile "$LINENO"
9477 then :
9478 ac_cv_prog_lex_yytext_pointer=yes
9479 fi
9480 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9481
9482 fi
9483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
9484 printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
9485 if test $ac_cv_prog_lex_yytext_pointer = yes; then
9486
9487 printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
9488
9489 fi
9490
9491 fi
9492 rm -f conftest.l $LEX_OUTPUT_ROOT.c
9493
9494 fi
9495 if test "$LEX" = ":"; then
9496 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
9497 fi
9498
9499 #
9500 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
9501 # and supports processing our scanner.l.
9502 #
9503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
9504 printf %s "checking for capable lex... " >&6; }
9505 if test ${tcpdump_cv_capable_lex+y}
9506 then :
9507 printf %s "(cached) " >&6
9508 else $as_nop
9509 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
9510 tcpdump_cv_capable_lex=yes
9511 else
9512 tcpdump_cv_capable_lex=insufficient
9513 fi
9514 fi
9515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
9516 printf "%s\n" "$tcpdump_cv_capable_lex" >&6; }
9517 if test $tcpdump_cv_capable_lex = insufficient ; then
9518 as_fn_error $? "$LEX is insufficient to compile libpcap.
9519 libpcap requires Flex 2.5.31 or later, or a compatible version of lex.
9520 If a suitable version of Lex/Flex is available as a non-standard command
9521 and/or not in the PATH, you can specify it using the LEX environment
9522 variable. That said, on some systems the error can mean that Flex/Lex is
9523 actually acceptable, but m4 is not. Likewise, if a suitable version of
9524 m4 (such as GNU M4) is available but has not been detected, you can
9525 specify it using the M4 environment variable." "$LINENO" 5
9526 fi
9527
9528 #
9529 # Look for yacc/bison/byacc.
9530 # If it's Bison, we do not want -y, as 1) we will be using -o to cause
9531 # the output for XXX.y to be written to XXX.c and 2) we don't want
9532 # it to issue warnings about stuff not supported by POSIX YACC - we
9533 # want to use that stuff, and don't care whether plain YACC supports
9534 # it or not, we require either Bison or Berkeley YACC.
9535 #
9536 BISON_BYACC=""
9537 #
9538 # Look for Bison.
9539 #
9540 for ac_prog in bison
9541 do
9542 # Extract the first word of "$ac_prog", so it can be a program name with args.
9543 set dummy $ac_prog; ac_word=$2
9544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9545 printf %s "checking for $ac_word... " >&6; }
9546 if test ${ac_cv_prog_BISON_BYACC+y}
9547 then :
9548 printf %s "(cached) " >&6
9549 else $as_nop
9550 if test -n "$BISON_BYACC"; then
9551 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
9552 else
9553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9554 for as_dir in $PATH
9555 do
9556 IFS=$as_save_IFS
9557 case $as_dir in #(((
9558 '') as_dir=./ ;;
9559 */) ;;
9560 *) as_dir=$as_dir/ ;;
9561 esac
9562 for ac_exec_ext in '' $ac_executable_extensions; do
9563 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9564 ac_cv_prog_BISON_BYACC="$ac_prog"
9565 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9566 break 2
9567 fi
9568 done
9569 done
9570 IFS=$as_save_IFS
9571
9572 fi
9573 fi
9574 BISON_BYACC=$ac_cv_prog_BISON_BYACC
9575 if test -n "$BISON_BYACC"; then
9576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
9577 printf "%s\n" "$BISON_BYACC" >&6; }
9578 else
9579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580 printf "%s\n" "no" >&6; }
9581 fi
9582
9583
9584 test -n "$BISON_BYACC" && break
9585 done
9586
9587 if test x"$BISON_BYACC" != x; then
9588 #
9589 # We found Bison.
9590 #
9591 # Bison prior to 2.4(.1) doesn't support "%define api.pure", so use
9592 # "%pure-parser".
9593 #
9594 bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'`
9595 bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'`
9596 if test "$bison_major_version" -lt 2 -o \
9597 \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \)
9598 then
9599 REENTRANT_PARSER="%pure-parser"
9600 else
9601 REENTRANT_PARSER="%define api.pure"
9602 fi
9603 else
9604 #
9605 # We didn't find Bison; check for Berkeley YACC, under the
9606 # names byacc and yacc.
9607 #
9608 for ac_prog in byacc yacc
9609 do
9610 # Extract the first word of "$ac_prog", so it can be a program name with args.
9611 set dummy $ac_prog; ac_word=$2
9612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9613 printf %s "checking for $ac_word... " >&6; }
9614 if test ${ac_cv_prog_BISON_BYACC+y}
9615 then :
9616 printf %s "(cached) " >&6
9617 else $as_nop
9618 if test -n "$BISON_BYACC"; then
9619 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
9620 else
9621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622 for as_dir in $PATH
9623 do
9624 IFS=$as_save_IFS
9625 case $as_dir in #(((
9626 '') as_dir=./ ;;
9627 */) ;;
9628 *) as_dir=$as_dir/ ;;
9629 esac
9630 for ac_exec_ext in '' $ac_executable_extensions; do
9631 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9632 ac_cv_prog_BISON_BYACC="$ac_prog"
9633 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9634 break 2
9635 fi
9636 done
9637 done
9638 IFS=$as_save_IFS
9639
9640 fi
9641 fi
9642 BISON_BYACC=$ac_cv_prog_BISON_BYACC
9643 if test -n "$BISON_BYACC"; then
9644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
9645 printf "%s\n" "$BISON_BYACC" >&6; }
9646 else
9647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9648 printf "%s\n" "no" >&6; }
9649 fi
9650
9651
9652 test -n "$BISON_BYACC" && break
9653 done
9654
9655 if test x"$BISON_BYACC" != x; then
9656 #
9657 # Make sure this is Berkeley YACC, not AT&T YACC;
9658 # the latter doesn't support reentrant parsers.
9659 # Run it with "-V"; that succeeds and reports the
9660 # version number with Berkeley YACC, but will
9661 # (probably) fail with various vendor flavors
9662 # of AT&T YACC.
9663 #
9664 # Hopefully this also eliminates any versions
9665 # of Berkeley YACC that don't support reentrant
9666 # parsers, if there are any.
9667 #
9668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5
9669 printf %s "checking for capable yacc... " >&6; }
9670 if test ${tcpdump_cv_capable_yacc+y}
9671 then :
9672 printf %s "(cached) " >&6
9673 else $as_nop
9674 if $BISON_BYACC -V >/dev/null 2>&1; then
9675 tcpdump_cv_capable_yacc=yes
9676 else
9677 tcpdump_cv_capable_yacc=insufficient
9678 fi
9679 fi
9680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
9681 printf "%s\n" "$tcpdump_cv_capable_yacc" >&6; }
9682 if test $tcpdump_cv_capable_yacc = insufficient ; then
9683 as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap.
9684 libpcap requires Bison, a newer version of Berkeley YACC with support
9685 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
9686 fi
9687 else
9688 #
9689 # OK, we found neither byacc nor yacc.
9690 #
9691 as_fn_error $? "Neither bison, byacc, nor yacc was found.
9692 libpcap requires Bison, a newer version of Berkeley YACC with support
9693 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
9694 fi
9695
9696 #
9697 # Berkeley YACC doesn't support "%define api.pure", so use
9698 # "%pure-parser".
9699 #
9700 REENTRANT_PARSER="%pure-parser"
9701 fi
9702
9703
9704
9705 #
9706 # Do various checks for various OSes and versions of those OSes.
9707 #
9708 # Assume, by default, no support for shared libraries and V7/BSD
9709 # convention for man pages (devices in section 4, file formats in
9710 # section 5, miscellaneous info in section 7, administrative commands
9711 # and daemons in section 8). Individual cases can override this.
9712 #
9713 DYEXT="none"
9714 MAN_DEVICES=4
9715 MAN_FILE_FORMATS=5
9716 MAN_MISC_INFO=7
9717 MAN_ADMIN_COMMANDS=8
9718 case "$host_os" in
9719
9720 aix*)
9721
9722 printf "%s\n" "#define _SUN 1" >>confdefs.h
9723
9724
9725 #
9726 # AIX makes it fun to build shared and static libraries,
9727 # because they're *both* ".a" archive libraries. We
9728 # build the static library for the benefit of the traditional
9729 # scheme of building libpcap and tcpdump in subdirectories of
9730 # the same directory, with tcpdump statically linked with the
9731 # libpcap in question, but we also build a shared library as
9732 # "libpcap.shareda" and install *it*, rather than the static
9733 # library, as "libpcap.a".
9734 #
9735 DYEXT="shareda"
9736
9737 case "$V_PCAP" in
9738
9739 dlpi)
9740 #
9741 # If we're using DLPI, applications will need to
9742 # use /lib/pse.exp if present, as we use the
9743 # STREAMS routines.
9744 #
9745 pseexe="/lib/pse.exp"
9746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
9747 printf %s "checking for $pseexe... " >&6; }
9748 if test -f $pseexe ; then
9749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9750 printf "%s\n" "yes" >&6; }
9751 LIBS="-I:$pseexe"
9752 fi
9753 ;;
9754
9755 bpf)
9756 #
9757 # If we're using BPF, we need "-lodm" and "-lcfg", as
9758 # we use them to load the BPF module.
9759 #
9760 LIBS="-lodm -lcfg"
9761 ;;
9762 esac
9763 ;;
9764
9765 darwin*)
9766 DYEXT="dylib"
9767 V_CCOPT="$V_CCOPT -fno-common"
9768 # Check whether --enable-universal was given.
9769 if test ${enable_universal+y}
9770 then :
9771 enableval=$enable_universal;
9772 fi
9773
9774 if test "$enable_universal" != "no"; then
9775 case "$host_os" in
9776
9777 darwin[0-7].*)
9778 #
9779 # Pre-Tiger. Build only for 32-bit PowerPC; no
9780 # need for any special compiler or linker flags.
9781 #
9782 ;;
9783
9784 darwin8.[0123]|darwin8.[0123].*)
9785 #
9786 # Tiger, prior to Intel support. Build
9787 # libraries and executables for 32-bit PowerPC
9788 # and 64-bit PowerPC, with 32-bit PowerPC first.
9789 # (I'm guessing that's what Apple does.)
9790 #
9791 # (The double brackets are needed because
9792 # autotools/m4 use brackets as a quoting
9793 # character; the double brackets turn into
9794 # single brackets in the generated configure
9795 # file.)
9796 #
9797 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
9798 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
9799 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
9800 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
9801 ;;
9802
9803 darwin8.[456]|darwin8.[456].*)
9804 #
9805 # Tiger, subsequent to Intel support but prior
9806 # to x86-64 support. Build libraries and
9807 # executables for 32-bit PowerPC, 64-bit
9808 # PowerPC, and 32-bit x86, with 32-bit PowerPC
9809 # first. (I'm guessing that's what Apple does.)
9810 #
9811 # (The double brackets are needed because
9812 # autotools/m4 use brackets as a quoting
9813 # character; the double brackets turn into
9814 # single brackets in the generated configure
9815 # file.)
9816 #
9817 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
9818 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
9819 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
9820 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
9821 ;;
9822
9823 darwin8.*)
9824 #
9825 # All other Tiger, so subsequent to x86-64
9826 # support. Build libraries and executables for
9827 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
9828 # and x86-64, with 32-bit PowerPC first. (I'm
9829 # guessing that's what Apple does.)
9830 #
9831 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
9832 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
9833 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
9834 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
9835 ;;
9836
9837 darwin9.*)
9838 #
9839 # Leopard. Build libraries for 32-bit PowerPC,
9840 # 64-bit PowerPC, 32-bit x86, and x86-64, with
9841 # 32-bit PowerPC first, and build executables
9842 # for 32-bit x86 and 32-bit PowerPC, with 32-bit
9843 # x86 first. (That's what Apple does.)
9844 #
9845 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
9846 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
9847 V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
9848 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
9849 ;;
9850
9851 darwin10.*)
9852 #
9853 # Snow Leopard. Build libraries for x86-64,
9854 # 32-bit x86, and 32-bit PowerPC, with x86-64
9855 # first, and build executables for x86-64 and
9856 # 32-bit x86, with x86-64 first. (That's what
9857 # Apple does, even though Snow Leopard doesn't
9858 # run on PPC, so PPC libpcap runs under Rosetta,
9859 # and Rosetta doesn't support BPF ioctls, so PPC
9860 # programs can't do live captures.)
9861 #
9862 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
9863 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
9864 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
9865 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
9866 ;;
9867
9868 darwin1[1-8]*)
9869 #
9870 # Post-Snow Leopard, pre-Catalina. Build
9871 # libraries for x86-64 and 32-bit x86, with
9872 # x86-64 first, and build executables only for
9873 # x86-64. (That's what Apple does.) This
9874 # requires no special flags for programs.
9875 #
9876 # We check whether we *can* build for i386 and,
9877 # if not, suggest that the user install the
9878 # /usr/include headers if they want to build
9879 # fat.
9880 #
9881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
9882 printf %s "checking whether building for 32-bit x86 is supported... " >&6; }
9883
9884 save_CFLAGS="$CFLAGS"
9885 save_LIBS="$LIBS"
9886 save_LDFLAGS="$LDFLAGS"
9887
9888 CFLAGS="$CFLAGS -arch i386"
9889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9890 /* end confdefs.h. */
9891
9892 int
9893 main (void)
9894 {
9895 return 0;
9896 ;
9897 return 0;
9898 }
9899 _ACEOF
9900 if ac_fn_c_try_link "$LINENO"
9901 then :
9902
9903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9904 printf "%s\n" "yes" >&6; }
9905 V_LIB_CCOPT_FAT="-arch x86_64"
9906 V_LIB_LDFLAGS_FAT="-arch x86_64"
9907
9908 #
9909 # OpenSSL installation on macOS seems
9910 # to install only the libs for 64-bit
9911 # x86 - at least that's what Brew does:
9912 # only configure 32-bit builds if we
9913 # don't have OpenSSL.
9914 #
9915 if test "$HAVE_OPENSSL" != yes; then
9916 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
9917 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
9918 fi
9919
9920 else $as_nop
9921
9922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923 printf "%s\n" "no" >&6; }
9924 V_LIB_CCOPT_FAT="-arch x86_64"
9925 V_LIB_LDFLAGS_FAT="-arch x86_64"
9926 case "$host_os" in
9927
9928 darwin18.*)
9929 #
9930 # Mojave; you need to install the
9931 # /usr/include headers to get
9932 # 32-bit x86 builds to work.
9933 #
9934 { printf "%s\n" "$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
9935 printf "%s\n" "$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;}
9936 ;;
9937
9938 *)
9939 #
9940 # Pre-Mojave; the command-line
9941 # tools should be sufficient to
9942 # enable 32-bit x86 builds.
9943 #
9944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
9945 printf "%s\n" "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
9946 ;;
9947 esac
9948
9949 fi
9950 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9951 conftest$ac_exeext conftest.$ac_ext
9952
9953 CFLAGS="$save_CFLAGS"
9954 LIBS="$save_LIBS"
9955 LDFLAGS="$save_LDFLAGS"
9956
9957 ;;
9958
9959 darwin19*)
9960 #
9961 # Catalina. Build libraries and executables
9962 # only for x86-64. (That's what Apple does;
9963 # 32-bit x86 binaries are not supported on
9964 # Catalina.)
9965 #
9966 V_LIB_CCOPT_FAT="-arch x86_64"
9967 V_LIB_LDFLAGS_FAT="-arch x86_64"
9968 V_PROG_CCOPT_FAT="-arch x86_64"
9969 V_PROG_LDFLAGS_FAT="-arch x86_64"
9970 ;;
9971
9972 darwin*)
9973 #
9974 # Post-Catalina. Build libraries and
9975 # executables for x86-64 and ARM64.
9976 # (That's what Apple does, except they
9977 # build for arm64e, which may include
9978 # some of the pointer-checking extensions.)
9979 #
9980 # If we're building with libssl, make sure
9981 # we can build fat with it (i.e., that it
9982 # was built fat); if we can't, don't set
9983 # the target architectures, and just
9984 # build for the host we're on.
9985 #
9986 # Otherwise, just add both of them.
9987 #
9988 if test "$HAVE_OPENSSL" = yes; then
9989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether building fat with libssl is supported" >&5
9990 printf %s "checking whether building fat with libssl is supported... " >&6; }
9991
9992 save_CFLAGS="$CFLAGS"
9993 save_LIBS="$LIBS"
9994 save_LDFLAGS="$LDFLAGS"
9995
9996 CFLAGS="$CFLAGS -arch x86_64 -arch arm64"
9997 LDFLAGS="$LDFLAGS $OPENSSL_LIBS"
9998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9999 /* end confdefs.h. */
10000
10001 #include <openssl/ssl.h>
10002
10003 int
10004 main (void)
10005 {
10006
10007 SSL_library_init();
10008 return 0;
10009
10010 ;
10011 return 0;
10012 }
10013 _ACEOF
10014 if ac_fn_c_try_link "$LINENO"
10015 then :
10016
10017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10018 printf "%s\n" "yes" >&6; }
10019 V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
10020 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10021 V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
10022 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10023
10024 else $as_nop
10025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10026 printf "%s\n" "no" >&6; }
10027
10028 fi
10029 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10030 conftest$ac_exeext conftest.$ac_ext
10031
10032 CFLAGS="$save_CFLAGS"
10033 LIBS="$save_LIBS"
10034 LDFLAGS="$save_LDFLAGS"
10035
10036 else
10037 V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
10038 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10039 V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
10040 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10041 fi
10042 ;;
10043 esac
10044 fi
10045 ;;
10046
10047 hpux9*)
10048
10049 printf "%s\n" "#define HAVE_HPUX9 1" >>confdefs.h
10050
10051
10052 #
10053 # Use System V conventions for man pages.
10054 #
10055 MAN_ADMIN_COMMANDS=1m
10056 MAN_FILE_FORMATS=4
10057 MAN_MISC_INFO=5
10058 ;;
10059
10060 hpux10.0*)
10061
10062 #
10063 # Use System V conventions for man pages.
10064 #
10065 MAN_ADMIN_COMMANDS=1m
10066 MAN_FILE_FORMATS=4
10067 MAN_MISC_INFO=5
10068 ;;
10069
10070 hpux10.1*)
10071
10072 #
10073 # Use System V conventions for man pages.
10074 #
10075 MAN_ADMIN_COMMANDS=1m
10076 MAN_FILE_FORMATS=4
10077 MAN_MISC_INFO=5
10078 ;;
10079
10080 hpux*)
10081
10082 printf "%s\n" "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
10083
10084 if test "`uname -m`" = "ia64"; then
10085 DYEXT="so"
10086 else
10087 DYEXT="sl"
10088 fi
10089
10090 #
10091 # "-b" builds a shared library; "+h" sets the soname.
10092 #
10093 SHLIB_OPT="-b"
10094 SONAME_OPT="+h"
10095
10096 #
10097 # Use System V conventions for man pages.
10098 #
10099 MAN_FILE_FORMATS=4
10100 MAN_MISC_INFO=5
10101 ;;
10102
10103 irix*)
10104 #
10105 # Use IRIX conventions for man pages; they're the same as the
10106 # System V conventions, except that they use section 8 for
10107 # administrative commands and daemons.
10108 #
10109 MAN_FILE_FORMATS=4
10110 MAN_MISC_INFO=5
10111 ;;
10112
10113 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
10114 DYEXT="so"
10115 ;;
10116
10117 osf*)
10118 DYEXT="so"
10119
10120 #
10121 # DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX.
10122 # Use Tru64 UNIX conventions for man pages; they're the same as
10123 # the System V conventions except that they use section 8 for
10124 # administrative commands and daemons.
10125 #
10126 MAN_FILE_FORMATS=4
10127 MAN_MISC_INFO=5
10128 MAN_DEVICES=7
10129 ;;
10130
10131 sinix*)
10132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
10133 printf %s "checking if SINIX compiler defines sinix... " >&6; }
10134 if test ${ac_cv_cc_sinix_defined+y}
10135 then :
10136 printf %s "(cached) " >&6
10137 else $as_nop
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139 /* end confdefs.h. */
10140
10141 int
10142 main (void)
10143 {
10144 int i = sinix;
10145 ;
10146 return 0;
10147 }
10148 _ACEOF
10149 if ac_fn_c_try_compile "$LINENO"
10150 then :
10151 ac_cv_cc_sinix_defined=yes
10152 else $as_nop
10153 ac_cv_cc_sinix_defined=no
10154 fi
10155 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10156 fi
10157
10158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
10159 printf "%s\n" "$ac_cv_cc_sinix_defined" >&6; }
10160 if test $ac_cv_cc_sinix_defined = no ; then
10161
10162 printf "%s\n" "#define sinix 1" >>confdefs.h
10163
10164 fi
10165 ;;
10166
10167 solaris*)
10168
10169 printf "%s\n" "#define HAVE_SOLARIS 1" >>confdefs.h
10170
10171
10172 DYEXT="so"
10173
10174 #
10175 # Make sure errno is thread-safe, in case we're called in
10176 # a multithreaded program. We don't guarantee that two
10177 # threads can use the *same* pcap_t safely, but the
10178 # current version does guarantee that you can use different
10179 # pcap_t's in different threads, and even that pcap_compile()
10180 # is thread-safe (it wasn't thread-safe in some older versions).
10181 #
10182 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
10183
10184 case "`uname -r`" in
10185
10186 5.12)
10187 ;;
10188
10189 *)
10190 #
10191 # Use System V conventions for man pages.
10192 #
10193 MAN_ADMIN_COMMANDS=1m
10194 MAN_FILE_FORMATS=4
10195 MAN_MISC_INFO=5
10196 MAN_DEVICES=7D
10197 esac
10198 ;;
10199 esac
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210 # Check whether --enable-shared was given.
10211 if test ${enable_shared+y}
10212 then :
10213 enableval=$enable_shared;
10214 fi
10215
10216 test "x$enable_shared" = "xno" && DYEXT="none"
10217
10218 if test -n "$ac_tool_prefix"; then
10219 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
10220 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
10221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10222 printf %s "checking for $ac_word... " >&6; }
10223 if test ${ac_cv_prog_RANLIB+y}
10224 then :
10225 printf %s "(cached) " >&6
10226 else $as_nop
10227 if test -n "$RANLIB"; then
10228 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
10229 else
10230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10231 for as_dir in $PATH
10232 do
10233 IFS=$as_save_IFS
10234 case $as_dir in #(((
10235 '') as_dir=./ ;;
10236 */) ;;
10237 *) as_dir=$as_dir/ ;;
10238 esac
10239 for ac_exec_ext in '' $ac_executable_extensions; do
10240 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10241 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
10242 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10243 break 2
10244 fi
10245 done
10246 done
10247 IFS=$as_save_IFS
10248
10249 fi
10250 fi
10251 RANLIB=$ac_cv_prog_RANLIB
10252 if test -n "$RANLIB"; then
10253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
10254 printf "%s\n" "$RANLIB" >&6; }
10255 else
10256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257 printf "%s\n" "no" >&6; }
10258 fi
10259
10260
10261 fi
10262 if test -z "$ac_cv_prog_RANLIB"; then
10263 ac_ct_RANLIB=$RANLIB
10264 # Extract the first word of "ranlib", so it can be a program name with args.
10265 set dummy ranlib; ac_word=$2
10266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267 printf %s "checking for $ac_word... " >&6; }
10268 if test ${ac_cv_prog_ac_ct_RANLIB+y}
10269 then :
10270 printf %s "(cached) " >&6
10271 else $as_nop
10272 if test -n "$ac_ct_RANLIB"; then
10273 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
10274 else
10275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10276 for as_dir in $PATH
10277 do
10278 IFS=$as_save_IFS
10279 case $as_dir in #(((
10280 '') as_dir=./ ;;
10281 */) ;;
10282 *) as_dir=$as_dir/ ;;
10283 esac
10284 for ac_exec_ext in '' $ac_executable_extensions; do
10285 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10286 ac_cv_prog_ac_ct_RANLIB="ranlib"
10287 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10288 break 2
10289 fi
10290 done
10291 done
10292 IFS=$as_save_IFS
10293
10294 fi
10295 fi
10296 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
10297 if test -n "$ac_ct_RANLIB"; then
10298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
10299 printf "%s\n" "$ac_ct_RANLIB" >&6; }
10300 else
10301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302 printf "%s\n" "no" >&6; }
10303 fi
10304
10305 if test "x$ac_ct_RANLIB" = x; then
10306 RANLIB=":"
10307 else
10308 case $cross_compiling:$ac_tool_warned in
10309 yes:)
10310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10311 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10312 ac_tool_warned=yes ;;
10313 esac
10314 RANLIB=$ac_ct_RANLIB
10315 fi
10316 else
10317 RANLIB="$ac_cv_prog_RANLIB"
10318 fi
10319
10320 if test -n "$ac_tool_prefix"; then
10321 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
10322 set dummy ${ac_tool_prefix}ar; ac_word=$2
10323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10324 printf %s "checking for $ac_word... " >&6; }
10325 if test ${ac_cv_prog_AR+y}
10326 then :
10327 printf %s "(cached) " >&6
10328 else $as_nop
10329 if test -n "$AR"; then
10330 ac_cv_prog_AR="$AR" # Let the user override the test.
10331 else
10332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10333 for as_dir in $PATH
10334 do
10335 IFS=$as_save_IFS
10336 case $as_dir in #(((
10337 '') as_dir=./ ;;
10338 */) ;;
10339 *) as_dir=$as_dir/ ;;
10340 esac
10341 for ac_exec_ext in '' $ac_executable_extensions; do
10342 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10343 ac_cv_prog_AR="${ac_tool_prefix}ar"
10344 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10345 break 2
10346 fi
10347 done
10348 done
10349 IFS=$as_save_IFS
10350
10351 fi
10352 fi
10353 AR=$ac_cv_prog_AR
10354 if test -n "$AR"; then
10355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10356 printf "%s\n" "$AR" >&6; }
10357 else
10358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359 printf "%s\n" "no" >&6; }
10360 fi
10361
10362
10363 fi
10364 if test -z "$ac_cv_prog_AR"; then
10365 ac_ct_AR=$AR
10366 # Extract the first word of "ar", so it can be a program name with args.
10367 set dummy ar; ac_word=$2
10368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10369 printf %s "checking for $ac_word... " >&6; }
10370 if test ${ac_cv_prog_ac_ct_AR+y}
10371 then :
10372 printf %s "(cached) " >&6
10373 else $as_nop
10374 if test -n "$ac_ct_AR"; then
10375 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10376 else
10377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378 for as_dir in $PATH
10379 do
10380 IFS=$as_save_IFS
10381 case $as_dir in #(((
10382 '') as_dir=./ ;;
10383 */) ;;
10384 *) as_dir=$as_dir/ ;;
10385 esac
10386 for ac_exec_ext in '' $ac_executable_extensions; do
10387 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10388 ac_cv_prog_ac_ct_AR="ar"
10389 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10390 break 2
10391 fi
10392 done
10393 done
10394 IFS=$as_save_IFS
10395
10396 fi
10397 fi
10398 ac_ct_AR=$ac_cv_prog_ac_ct_AR
10399 if test -n "$ac_ct_AR"; then
10400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10401 printf "%s\n" "$ac_ct_AR" >&6; }
10402 else
10403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404 printf "%s\n" "no" >&6; }
10405 fi
10406
10407 if test "x$ac_ct_AR" = x; then
10408 AR=""
10409 else
10410 case $cross_compiling:$ac_tool_warned in
10411 yes:)
10412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10413 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10414 ac_tool_warned=yes ;;
10415 esac
10416 AR=$ac_ct_AR
10417 fi
10418 else
10419 AR="$ac_cv_prog_AR"
10420 fi
10421
10422
10423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10424 printf %s "checking whether ln -s works... " >&6; }
10425 LN_S=$as_ln_s
10426 if test "$LN_S" = "ln -s"; then
10427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10428 printf "%s\n" "yes" >&6; }
10429 else
10430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10431 printf "%s\n" "no, using $LN_S" >&6; }
10432 fi
10433
10434
10435
10436 rm -f os-proto.h
10437 #
10438 # MKDEP defaults to no-op (":") if we don't test whether the compiler
10439 # supports generating dependencies
10440 #
10441 MKDEP=:
10442 if test "${LBL_CFLAGS+set}" = set; then
10443 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
10444 fi
10445 if test -f .devel ; then
10446 #
10447 # Skip all the warning option stuff on some compilers.
10448 #
10449 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
10450
10451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
10452 printf %s "checking whether the compiler supports the -W option... " >&6; }
10453 save_CFLAGS="$CFLAGS"
10454 CFLAGS="$CFLAGS -W"
10455 #
10456 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10457 # but no mechanism is provided to turn AC_LANG_WERROR on
10458 # *and then turn it back off*, so that we *only* do it when
10459 # testing compiler options - 15 years after somebody asked
10460 # for it:
10461 #
10462 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10463 #
10464 save_ac_c_werror_flag="$ac_c_werror_flag"
10465 ac_c_werror_flag=yes
10466 #
10467 # We use AC_LANG_SOURCE() so that we can control the complete
10468 # content of the program being compiled. We do not, for example,
10469 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10470 # as it will generate a warning with -Wold-style-definition, meaning
10471 # that we would treat it as not working, as the test will fail if
10472 # *any* error output, including a warning due to the flag we're
10473 # testing, is generated; see
10474 #
10475 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10476 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10477 #
10478 # This may, as per those two messages, be fixed in autoconf 2.70,
10479 # but we only require 2.69 or newer for now.
10480 #
10481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10482 /* end confdefs.h. */
10483 int main(void) { return 0; }
10484 _ACEOF
10485 if ac_fn_c_try_compile "$LINENO"
10486 then :
10487
10488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10489 printf "%s\n" "yes" >&6; }
10490 can_add_to_cflags=yes
10491 #
10492 # The compile supports this; do we have some C code for
10493 # which the warning should *not* appear?
10494 # We test the fourth argument because the third argument
10495 # could contain quotes, breaking the test.
10496 #
10497 if test "x" != "x"
10498 then
10499 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
10501 printf %s "checking whether -W ... " >&6; }
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10503 /* end confdefs.h. */
10504
10505 _ACEOF
10506 if ac_fn_c_try_compile "$LINENO"
10507 then :
10508
10509 #
10510 # Not a problem.
10511 #
10512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10513 printf "%s\n" "no" >&6; }
10514
10515 else $as_nop
10516
10517 #
10518 # A problem.
10519 #
10520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10521 printf "%s\n" "yes" >&6; }
10522 can_add_to_cflags=no
10523
10524 fi
10525 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10526 fi
10527 CFLAGS="$save_CFLAGS"
10528 if test x"$can_add_to_cflags" = "xyes"
10529 then
10530 V_CCOPT="$V_CCOPT -W"
10531 fi
10532
10533 else $as_nop
10534
10535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536 printf "%s\n" "no" >&6; }
10537 CFLAGS="$save_CFLAGS"
10538
10539 fi
10540 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10541 ac_c_werror_flag="$save_ac_c_werror_flag"
10542
10543
10544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
10545 printf %s "checking whether the compiler supports the -Wall option... " >&6; }
10546 save_CFLAGS="$CFLAGS"
10547 CFLAGS="$CFLAGS -Wall"
10548 #
10549 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10550 # but no mechanism is provided to turn AC_LANG_WERROR on
10551 # *and then turn it back off*, so that we *only* do it when
10552 # testing compiler options - 15 years after somebody asked
10553 # for it:
10554 #
10555 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10556 #
10557 save_ac_c_werror_flag="$ac_c_werror_flag"
10558 ac_c_werror_flag=yes
10559 #
10560 # We use AC_LANG_SOURCE() so that we can control the complete
10561 # content of the program being compiled. We do not, for example,
10562 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10563 # as it will generate a warning with -Wold-style-definition, meaning
10564 # that we would treat it as not working, as the test will fail if
10565 # *any* error output, including a warning due to the flag we're
10566 # testing, is generated; see
10567 #
10568 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10569 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10570 #
10571 # This may, as per those two messages, be fixed in autoconf 2.70,
10572 # but we only require 2.69 or newer for now.
10573 #
10574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575 /* end confdefs.h. */
10576 int main(void) { return 0; }
10577 _ACEOF
10578 if ac_fn_c_try_compile "$LINENO"
10579 then :
10580
10581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10582 printf "%s\n" "yes" >&6; }
10583 can_add_to_cflags=yes
10584 #
10585 # The compile supports this; do we have some C code for
10586 # which the warning should *not* appear?
10587 # We test the fourth argument because the third argument
10588 # could contain quotes, breaking the test.
10589 #
10590 if test "x" != "x"
10591 then
10592 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
10594 printf %s "checking whether -Wall ... " >&6; }
10595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10596 /* end confdefs.h. */
10597
10598 _ACEOF
10599 if ac_fn_c_try_compile "$LINENO"
10600 then :
10601
10602 #
10603 # Not a problem.
10604 #
10605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606 printf "%s\n" "no" >&6; }
10607
10608 else $as_nop
10609
10610 #
10611 # A problem.
10612 #
10613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10614 printf "%s\n" "yes" >&6; }
10615 can_add_to_cflags=no
10616
10617 fi
10618 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10619 fi
10620 CFLAGS="$save_CFLAGS"
10621 if test x"$can_add_to_cflags" = "xyes"
10622 then
10623 V_CCOPT="$V_CCOPT -Wall"
10624 fi
10625
10626 else $as_nop
10627
10628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629 printf "%s\n" "no" >&6; }
10630 CFLAGS="$save_CFLAGS"
10631
10632 fi
10633 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10634 ac_c_werror_flag="$save_ac_c_werror_flag"
10635
10636
10637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
10638 printf %s "checking whether the compiler supports the -Wcomma option... " >&6; }
10639 save_CFLAGS="$CFLAGS"
10640 CFLAGS="$CFLAGS -Wcomma"
10641 #
10642 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10643 # but no mechanism is provided to turn AC_LANG_WERROR on
10644 # *and then turn it back off*, so that we *only* do it when
10645 # testing compiler options - 15 years after somebody asked
10646 # for it:
10647 #
10648 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10649 #
10650 save_ac_c_werror_flag="$ac_c_werror_flag"
10651 ac_c_werror_flag=yes
10652 #
10653 # We use AC_LANG_SOURCE() so that we can control the complete
10654 # content of the program being compiled. We do not, for example,
10655 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10656 # as it will generate a warning with -Wold-style-definition, meaning
10657 # that we would treat it as not working, as the test will fail if
10658 # *any* error output, including a warning due to the flag we're
10659 # testing, is generated; see
10660 #
10661 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10662 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10663 #
10664 # This may, as per those two messages, be fixed in autoconf 2.70,
10665 # but we only require 2.69 or newer for now.
10666 #
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668 /* end confdefs.h. */
10669 int main(void) { return 0; }
10670 _ACEOF
10671 if ac_fn_c_try_compile "$LINENO"
10672 then :
10673
10674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10675 printf "%s\n" "yes" >&6; }
10676 can_add_to_cflags=yes
10677 #
10678 # The compile supports this; do we have some C code for
10679 # which the warning should *not* appear?
10680 # We test the fourth argument because the third argument
10681 # could contain quotes, breaking the test.
10682 #
10683 if test "x" != "x"
10684 then
10685 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
10687 printf %s "checking whether -Wcomma ... " >&6; }
10688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10689 /* end confdefs.h. */
10690
10691 _ACEOF
10692 if ac_fn_c_try_compile "$LINENO"
10693 then :
10694
10695 #
10696 # Not a problem.
10697 #
10698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699 printf "%s\n" "no" >&6; }
10700
10701 else $as_nop
10702
10703 #
10704 # A problem.
10705 #
10706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10707 printf "%s\n" "yes" >&6; }
10708 can_add_to_cflags=no
10709
10710 fi
10711 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10712 fi
10713 CFLAGS="$save_CFLAGS"
10714 if test x"$can_add_to_cflags" = "xyes"
10715 then
10716 V_CCOPT="$V_CCOPT -Wcomma"
10717 fi
10718
10719 else $as_nop
10720
10721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722 printf "%s\n" "no" >&6; }
10723 CFLAGS="$save_CFLAGS"
10724
10725 fi
10726 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10727 ac_c_werror_flag="$save_ac_c_werror_flag"
10728
10729 # Warns about safeguards added in case the enums are
10730 # extended
10731 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
10732
10733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
10734 printf %s "checking whether the compiler supports the -Wdocumentation option... " >&6; }
10735 save_CFLAGS="$CFLAGS"
10736 CFLAGS="$CFLAGS -Wdocumentation"
10737 #
10738 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10739 # but no mechanism is provided to turn AC_LANG_WERROR on
10740 # *and then turn it back off*, so that we *only* do it when
10741 # testing compiler options - 15 years after somebody asked
10742 # for it:
10743 #
10744 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10745 #
10746 save_ac_c_werror_flag="$ac_c_werror_flag"
10747 ac_c_werror_flag=yes
10748 #
10749 # We use AC_LANG_SOURCE() so that we can control the complete
10750 # content of the program being compiled. We do not, for example,
10751 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10752 # as it will generate a warning with -Wold-style-definition, meaning
10753 # that we would treat it as not working, as the test will fail if
10754 # *any* error output, including a warning due to the flag we're
10755 # testing, is generated; see
10756 #
10757 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10758 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10759 #
10760 # This may, as per those two messages, be fixed in autoconf 2.70,
10761 # but we only require 2.69 or newer for now.
10762 #
10763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10764 /* end confdefs.h. */
10765 int main(void) { return 0; }
10766 _ACEOF
10767 if ac_fn_c_try_compile "$LINENO"
10768 then :
10769
10770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10771 printf "%s\n" "yes" >&6; }
10772 can_add_to_cflags=yes
10773 #
10774 # The compile supports this; do we have some C code for
10775 # which the warning should *not* appear?
10776 # We test the fourth argument because the third argument
10777 # could contain quotes, breaking the test.
10778 #
10779 if test "x" != "x"
10780 then
10781 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
10783 printf %s "checking whether -Wdocumentation ... " >&6; }
10784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10785 /* end confdefs.h. */
10786
10787 _ACEOF
10788 if ac_fn_c_try_compile "$LINENO"
10789 then :
10790
10791 #
10792 # Not a problem.
10793 #
10794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795 printf "%s\n" "no" >&6; }
10796
10797 else $as_nop
10798
10799 #
10800 # A problem.
10801 #
10802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10803 printf "%s\n" "yes" >&6; }
10804 can_add_to_cflags=no
10805
10806 fi
10807 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10808 fi
10809 CFLAGS="$save_CFLAGS"
10810 if test x"$can_add_to_cflags" = "xyes"
10811 then
10812 V_CCOPT="$V_CCOPT -Wdocumentation"
10813 fi
10814
10815 else $as_nop
10816
10817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818 printf "%s\n" "no" >&6; }
10819 CFLAGS="$save_CFLAGS"
10820
10821 fi
10822 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10823 ac_c_werror_flag="$save_ac_c_werror_flag"
10824
10825
10826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
10827 printf %s "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
10828 save_CFLAGS="$CFLAGS"
10829 CFLAGS="$CFLAGS -Wformat-nonliteral"
10830 #
10831 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10832 # but no mechanism is provided to turn AC_LANG_WERROR on
10833 # *and then turn it back off*, so that we *only* do it when
10834 # testing compiler options - 15 years after somebody asked
10835 # for it:
10836 #
10837 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10838 #
10839 save_ac_c_werror_flag="$ac_c_werror_flag"
10840 ac_c_werror_flag=yes
10841 #
10842 # We use AC_LANG_SOURCE() so that we can control the complete
10843 # content of the program being compiled. We do not, for example,
10844 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10845 # as it will generate a warning with -Wold-style-definition, meaning
10846 # that we would treat it as not working, as the test will fail if
10847 # *any* error output, including a warning due to the flag we're
10848 # testing, is generated; see
10849 #
10850 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10851 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10852 #
10853 # This may, as per those two messages, be fixed in autoconf 2.70,
10854 # but we only require 2.69 or newer for now.
10855 #
10856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10857 /* end confdefs.h. */
10858 int main(void) { return 0; }
10859 _ACEOF
10860 if ac_fn_c_try_compile "$LINENO"
10861 then :
10862
10863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10864 printf "%s\n" "yes" >&6; }
10865 can_add_to_cflags=yes
10866 #
10867 # The compile supports this; do we have some C code for
10868 # which the warning should *not* appear?
10869 # We test the fourth argument because the third argument
10870 # could contain quotes, breaking the test.
10871 #
10872 if test "x" != "x"
10873 then
10874 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
10876 printf %s "checking whether -Wformat-nonliteral ... " >&6; }
10877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10878 /* end confdefs.h. */
10879
10880 _ACEOF
10881 if ac_fn_c_try_compile "$LINENO"
10882 then :
10883
10884 #
10885 # Not a problem.
10886 #
10887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888 printf "%s\n" "no" >&6; }
10889
10890 else $as_nop
10891
10892 #
10893 # A problem.
10894 #
10895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10896 printf "%s\n" "yes" >&6; }
10897 can_add_to_cflags=no
10898
10899 fi
10900 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10901 fi
10902 CFLAGS="$save_CFLAGS"
10903 if test x"$can_add_to_cflags" = "xyes"
10904 then
10905 V_CCOPT="$V_CCOPT -Wformat-nonliteral"
10906 fi
10907
10908 else $as_nop
10909
10910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911 printf "%s\n" "no" >&6; }
10912 CFLAGS="$save_CFLAGS"
10913
10914 fi
10915 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10916 ac_c_werror_flag="$save_ac_c_werror_flag"
10917
10918
10919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
10920 printf %s "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
10921 save_CFLAGS="$CFLAGS"
10922 CFLAGS="$CFLAGS -Wmissing-noreturn"
10923 #
10924 # XXX - yes, this depends on the way AC_LANG_WERROR works,
10925 # but no mechanism is provided to turn AC_LANG_WERROR on
10926 # *and then turn it back off*, so that we *only* do it when
10927 # testing compiler options - 15 years after somebody asked
10928 # for it:
10929 #
10930 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10931 #
10932 save_ac_c_werror_flag="$ac_c_werror_flag"
10933 ac_c_werror_flag=yes
10934 #
10935 # We use AC_LANG_SOURCE() so that we can control the complete
10936 # content of the program being compiled. We do not, for example,
10937 # want the default "int main()" that AC_LANG_PROGRAM() generates,
10938 # as it will generate a warning with -Wold-style-definition, meaning
10939 # that we would treat it as not working, as the test will fail if
10940 # *any* error output, including a warning due to the flag we're
10941 # testing, is generated; see
10942 #
10943 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10944 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10945 #
10946 # This may, as per those two messages, be fixed in autoconf 2.70,
10947 # but we only require 2.69 or newer for now.
10948 #
10949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10950 /* end confdefs.h. */
10951 int main(void) { return 0; }
10952 _ACEOF
10953 if ac_fn_c_try_compile "$LINENO"
10954 then :
10955
10956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10957 printf "%s\n" "yes" >&6; }
10958 can_add_to_cflags=yes
10959 #
10960 # The compile supports this; do we have some C code for
10961 # which the warning should *not* appear?
10962 # We test the fourth argument because the third argument
10963 # could contain quotes, breaking the test.
10964 #
10965 if test "x" != "x"
10966 then
10967 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
10969 printf %s "checking whether -Wmissing-noreturn ... " >&6; }
10970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10971 /* end confdefs.h. */
10972
10973 _ACEOF
10974 if ac_fn_c_try_compile "$LINENO"
10975 then :
10976
10977 #
10978 # Not a problem.
10979 #
10980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981 printf "%s\n" "no" >&6; }
10982
10983 else $as_nop
10984
10985 #
10986 # A problem.
10987 #
10988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10989 printf "%s\n" "yes" >&6; }
10990 can_add_to_cflags=no
10991
10992 fi
10993 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10994 fi
10995 CFLAGS="$save_CFLAGS"
10996 if test x"$can_add_to_cflags" = "xyes"
10997 then
10998 V_CCOPT="$V_CCOPT -Wmissing-noreturn"
10999 fi
11000
11001 else $as_nop
11002
11003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004 printf "%s\n" "no" >&6; }
11005 CFLAGS="$save_CFLAGS"
11006
11007 fi
11008 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11009 ac_c_werror_flag="$save_ac_c_werror_flag"
11010
11011
11012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
11013 printf %s "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
11014 save_CFLAGS="$CFLAGS"
11015 CFLAGS="$CFLAGS -Wmissing-prototypes"
11016 #
11017 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11018 # but no mechanism is provided to turn AC_LANG_WERROR on
11019 # *and then turn it back off*, so that we *only* do it when
11020 # testing compiler options - 15 years after somebody asked
11021 # for it:
11022 #
11023 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11024 #
11025 save_ac_c_werror_flag="$ac_c_werror_flag"
11026 ac_c_werror_flag=yes
11027 #
11028 # We use AC_LANG_SOURCE() so that we can control the complete
11029 # content of the program being compiled. We do not, for example,
11030 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11031 # as it will generate a warning with -Wold-style-definition, meaning
11032 # that we would treat it as not working, as the test will fail if
11033 # *any* error output, including a warning due to the flag we're
11034 # testing, is generated; see
11035 #
11036 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11037 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11038 #
11039 # This may, as per those two messages, be fixed in autoconf 2.70,
11040 # but we only require 2.69 or newer for now.
11041 #
11042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11043 /* end confdefs.h. */
11044 int main(void) { return 0; }
11045 _ACEOF
11046 if ac_fn_c_try_compile "$LINENO"
11047 then :
11048
11049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11050 printf "%s\n" "yes" >&6; }
11051 can_add_to_cflags=yes
11052 #
11053 # The compile supports this; do we have some C code for
11054 # which the warning should *not* appear?
11055 # We test the fourth argument because the third argument
11056 # could contain quotes, breaking the test.
11057 #
11058 if test "x" != "x"
11059 then
11060 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
11062 printf %s "checking whether -Wmissing-prototypes ... " >&6; }
11063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11064 /* end confdefs.h. */
11065
11066 _ACEOF
11067 if ac_fn_c_try_compile "$LINENO"
11068 then :
11069
11070 #
11071 # Not a problem.
11072 #
11073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11074 printf "%s\n" "no" >&6; }
11075
11076 else $as_nop
11077
11078 #
11079 # A problem.
11080 #
11081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11082 printf "%s\n" "yes" >&6; }
11083 can_add_to_cflags=no
11084
11085 fi
11086 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11087 fi
11088 CFLAGS="$save_CFLAGS"
11089 if test x"$can_add_to_cflags" = "xyes"
11090 then
11091 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
11092 fi
11093
11094 else $as_nop
11095
11096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11097 printf "%s\n" "no" >&6; }
11098 CFLAGS="$save_CFLAGS"
11099
11100 fi
11101 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11102 ac_c_werror_flag="$save_ac_c_werror_flag"
11103
11104
11105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
11106 printf %s "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
11107 save_CFLAGS="$CFLAGS"
11108 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
11109 #
11110 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11111 # but no mechanism is provided to turn AC_LANG_WERROR on
11112 # *and then turn it back off*, so that we *only* do it when
11113 # testing compiler options - 15 years after somebody asked
11114 # for it:
11115 #
11116 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11117 #
11118 save_ac_c_werror_flag="$ac_c_werror_flag"
11119 ac_c_werror_flag=yes
11120 #
11121 # We use AC_LANG_SOURCE() so that we can control the complete
11122 # content of the program being compiled. We do not, for example,
11123 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11124 # as it will generate a warning with -Wold-style-definition, meaning
11125 # that we would treat it as not working, as the test will fail if
11126 # *any* error output, including a warning due to the flag we're
11127 # testing, is generated; see
11128 #
11129 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11130 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11131 #
11132 # This may, as per those two messages, be fixed in autoconf 2.70,
11133 # but we only require 2.69 or newer for now.
11134 #
11135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11136 /* end confdefs.h. */
11137 int main(void) { return 0; }
11138 _ACEOF
11139 if ac_fn_c_try_compile "$LINENO"
11140 then :
11141
11142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11143 printf "%s\n" "yes" >&6; }
11144 can_add_to_cflags=yes
11145 #
11146 # The compile supports this; do we have some C code for
11147 # which the warning should *not* appear?
11148 # We test the fourth argument because the third argument
11149 # could contain quotes, breaking the test.
11150 #
11151 if test "x" != "x"
11152 then
11153 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
11155 printf %s "checking whether -Wmissing-variable-declarations ... " >&6; }
11156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11157 /* end confdefs.h. */
11158
11159 _ACEOF
11160 if ac_fn_c_try_compile "$LINENO"
11161 then :
11162
11163 #
11164 # Not a problem.
11165 #
11166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167 printf "%s\n" "no" >&6; }
11168
11169 else $as_nop
11170
11171 #
11172 # A problem.
11173 #
11174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11175 printf "%s\n" "yes" >&6; }
11176 can_add_to_cflags=no
11177
11178 fi
11179 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11180 fi
11181 CFLAGS="$save_CFLAGS"
11182 if test x"$can_add_to_cflags" = "xyes"
11183 then
11184 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
11185 fi
11186
11187 else $as_nop
11188
11189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190 printf "%s\n" "no" >&6; }
11191 CFLAGS="$save_CFLAGS"
11192
11193 fi
11194 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11195 ac_c_werror_flag="$save_ac_c_werror_flag"
11196
11197
11198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wnull-pointer-subtraction option" >&5
11199 printf %s "checking whether the compiler supports the -Wnull-pointer-subtraction option... " >&6; }
11200 save_CFLAGS="$CFLAGS"
11201 CFLAGS="$CFLAGS -Wnull-pointer-subtraction"
11202 #
11203 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11204 # but no mechanism is provided to turn AC_LANG_WERROR on
11205 # *and then turn it back off*, so that we *only* do it when
11206 # testing compiler options - 15 years after somebody asked
11207 # for it:
11208 #
11209 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11210 #
11211 save_ac_c_werror_flag="$ac_c_werror_flag"
11212 ac_c_werror_flag=yes
11213 #
11214 # We use AC_LANG_SOURCE() so that we can control the complete
11215 # content of the program being compiled. We do not, for example,
11216 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11217 # as it will generate a warning with -Wold-style-definition, meaning
11218 # that we would treat it as not working, as the test will fail if
11219 # *any* error output, including a warning due to the flag we're
11220 # testing, is generated; see
11221 #
11222 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11223 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11224 #
11225 # This may, as per those two messages, be fixed in autoconf 2.70,
11226 # but we only require 2.69 or newer for now.
11227 #
11228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11229 /* end confdefs.h. */
11230 int main(void) { return 0; }
11231 _ACEOF
11232 if ac_fn_c_try_compile "$LINENO"
11233 then :
11234
11235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11236 printf "%s\n" "yes" >&6; }
11237 can_add_to_cflags=yes
11238 #
11239 # The compile supports this; do we have some C code for
11240 # which the warning should *not* appear?
11241 # We test the fourth argument because the third argument
11242 # could contain quotes, breaking the test.
11243 #
11244 if test "x" != "x"
11245 then
11246 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wnull-pointer-subtraction " >&5
11248 printf %s "checking whether -Wnull-pointer-subtraction ... " >&6; }
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11250 /* end confdefs.h. */
11251
11252 _ACEOF
11253 if ac_fn_c_try_compile "$LINENO"
11254 then :
11255
11256 #
11257 # Not a problem.
11258 #
11259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11260 printf "%s\n" "no" >&6; }
11261
11262 else $as_nop
11263
11264 #
11265 # A problem.
11266 #
11267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11268 printf "%s\n" "yes" >&6; }
11269 can_add_to_cflags=no
11270
11271 fi
11272 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11273 fi
11274 CFLAGS="$save_CFLAGS"
11275 if test x"$can_add_to_cflags" = "xyes"
11276 then
11277 V_CCOPT="$V_CCOPT -Wnull-pointer-subtraction"
11278 fi
11279
11280 else $as_nop
11281
11282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283 printf "%s\n" "no" >&6; }
11284 CFLAGS="$save_CFLAGS"
11285
11286 fi
11287 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11288 ac_c_werror_flag="$save_ac_c_werror_flag"
11289
11290
11291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
11292 printf %s "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
11293 save_CFLAGS="$CFLAGS"
11294 CFLAGS="$CFLAGS -Wpointer-arith"
11295 #
11296 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11297 # but no mechanism is provided to turn AC_LANG_WERROR on
11298 # *and then turn it back off*, so that we *only* do it when
11299 # testing compiler options - 15 years after somebody asked
11300 # for it:
11301 #
11302 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11303 #
11304 save_ac_c_werror_flag="$ac_c_werror_flag"
11305 ac_c_werror_flag=yes
11306 #
11307 # We use AC_LANG_SOURCE() so that we can control the complete
11308 # content of the program being compiled. We do not, for example,
11309 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11310 # as it will generate a warning with -Wold-style-definition, meaning
11311 # that we would treat it as not working, as the test will fail if
11312 # *any* error output, including a warning due to the flag we're
11313 # testing, is generated; see
11314 #
11315 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11316 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11317 #
11318 # This may, as per those two messages, be fixed in autoconf 2.70,
11319 # but we only require 2.69 or newer for now.
11320 #
11321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11322 /* end confdefs.h. */
11323 int main(void) { return 0; }
11324 _ACEOF
11325 if ac_fn_c_try_compile "$LINENO"
11326 then :
11327
11328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11329 printf "%s\n" "yes" >&6; }
11330 can_add_to_cflags=yes
11331 #
11332 # The compile supports this; do we have some C code for
11333 # which the warning should *not* appear?
11334 # We test the fourth argument because the third argument
11335 # could contain quotes, breaking the test.
11336 #
11337 if test "x" != "x"
11338 then
11339 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
11341 printf %s "checking whether -Wpointer-arith ... " >&6; }
11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343 /* end confdefs.h. */
11344
11345 _ACEOF
11346 if ac_fn_c_try_compile "$LINENO"
11347 then :
11348
11349 #
11350 # Not a problem.
11351 #
11352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353 printf "%s\n" "no" >&6; }
11354
11355 else $as_nop
11356
11357 #
11358 # A problem.
11359 #
11360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11361 printf "%s\n" "yes" >&6; }
11362 can_add_to_cflags=no
11363
11364 fi
11365 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11366 fi
11367 CFLAGS="$save_CFLAGS"
11368 if test x"$can_add_to_cflags" = "xyes"
11369 then
11370 V_CCOPT="$V_CCOPT -Wpointer-arith"
11371 fi
11372
11373 else $as_nop
11374
11375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376 printf "%s\n" "no" >&6; }
11377 CFLAGS="$save_CFLAGS"
11378
11379 fi
11380 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11381 ac_c_werror_flag="$save_ac_c_werror_flag"
11382
11383
11384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
11385 printf %s "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
11386 save_CFLAGS="$CFLAGS"
11387 CFLAGS="$CFLAGS -Wpointer-sign"
11388 #
11389 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11390 # but no mechanism is provided to turn AC_LANG_WERROR on
11391 # *and then turn it back off*, so that we *only* do it when
11392 # testing compiler options - 15 years after somebody asked
11393 # for it:
11394 #
11395 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11396 #
11397 save_ac_c_werror_flag="$ac_c_werror_flag"
11398 ac_c_werror_flag=yes
11399 #
11400 # We use AC_LANG_SOURCE() so that we can control the complete
11401 # content of the program being compiled. We do not, for example,
11402 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11403 # as it will generate a warning with -Wold-style-definition, meaning
11404 # that we would treat it as not working, as the test will fail if
11405 # *any* error output, including a warning due to the flag we're
11406 # testing, is generated; see
11407 #
11408 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11409 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11410 #
11411 # This may, as per those two messages, be fixed in autoconf 2.70,
11412 # but we only require 2.69 or newer for now.
11413 #
11414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11415 /* end confdefs.h. */
11416 int main(void) { return 0; }
11417 _ACEOF
11418 if ac_fn_c_try_compile "$LINENO"
11419 then :
11420
11421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11422 printf "%s\n" "yes" >&6; }
11423 can_add_to_cflags=yes
11424 #
11425 # The compile supports this; do we have some C code for
11426 # which the warning should *not* appear?
11427 # We test the fourth argument because the third argument
11428 # could contain quotes, breaking the test.
11429 #
11430 if test "x" != "x"
11431 then
11432 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
11434 printf %s "checking whether -Wpointer-sign ... " >&6; }
11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11436 /* end confdefs.h. */
11437
11438 _ACEOF
11439 if ac_fn_c_try_compile "$LINENO"
11440 then :
11441
11442 #
11443 # Not a problem.
11444 #
11445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446 printf "%s\n" "no" >&6; }
11447
11448 else $as_nop
11449
11450 #
11451 # A problem.
11452 #
11453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11454 printf "%s\n" "yes" >&6; }
11455 can_add_to_cflags=no
11456
11457 fi
11458 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11459 fi
11460 CFLAGS="$save_CFLAGS"
11461 if test x"$can_add_to_cflags" = "xyes"
11462 then
11463 V_CCOPT="$V_CCOPT -Wpointer-sign"
11464 fi
11465
11466 else $as_nop
11467
11468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 printf "%s\n" "no" >&6; }
11470 CFLAGS="$save_CFLAGS"
11471
11472 fi
11473 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11474 ac_c_werror_flag="$save_ac_c_werror_flag"
11475
11476
11477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
11478 printf %s "checking whether the compiler supports the -Wshadow option... " >&6; }
11479 save_CFLAGS="$CFLAGS"
11480 CFLAGS="$CFLAGS -Wshadow"
11481 #
11482 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11483 # but no mechanism is provided to turn AC_LANG_WERROR on
11484 # *and then turn it back off*, so that we *only* do it when
11485 # testing compiler options - 15 years after somebody asked
11486 # for it:
11487 #
11488 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11489 #
11490 save_ac_c_werror_flag="$ac_c_werror_flag"
11491 ac_c_werror_flag=yes
11492 #
11493 # We use AC_LANG_SOURCE() so that we can control the complete
11494 # content of the program being compiled. We do not, for example,
11495 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11496 # as it will generate a warning with -Wold-style-definition, meaning
11497 # that we would treat it as not working, as the test will fail if
11498 # *any* error output, including a warning due to the flag we're
11499 # testing, is generated; see
11500 #
11501 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11502 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11503 #
11504 # This may, as per those two messages, be fixed in autoconf 2.70,
11505 # but we only require 2.69 or newer for now.
11506 #
11507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11508 /* end confdefs.h. */
11509 int main(void) { return 0; }
11510 _ACEOF
11511 if ac_fn_c_try_compile "$LINENO"
11512 then :
11513
11514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11515 printf "%s\n" "yes" >&6; }
11516 can_add_to_cflags=yes
11517 #
11518 # The compile supports this; do we have some C code for
11519 # which the warning should *not* appear?
11520 # We test the fourth argument because the third argument
11521 # could contain quotes, breaking the test.
11522 #
11523 if test "x" != "x"
11524 then
11525 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
11527 printf %s "checking whether -Wshadow ... " >&6; }
11528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11529 /* end confdefs.h. */
11530
11531 _ACEOF
11532 if ac_fn_c_try_compile "$LINENO"
11533 then :
11534
11535 #
11536 # Not a problem.
11537 #
11538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539 printf "%s\n" "no" >&6; }
11540
11541 else $as_nop
11542
11543 #
11544 # A problem.
11545 #
11546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11547 printf "%s\n" "yes" >&6; }
11548 can_add_to_cflags=no
11549
11550 fi
11551 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11552 fi
11553 CFLAGS="$save_CFLAGS"
11554 if test x"$can_add_to_cflags" = "xyes"
11555 then
11556 V_CCOPT="$V_CCOPT -Wshadow"
11557 fi
11558
11559 else $as_nop
11560
11561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11562 printf "%s\n" "no" >&6; }
11563 CFLAGS="$save_CFLAGS"
11564
11565 fi
11566 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11567 ac_c_werror_flag="$save_ac_c_werror_flag"
11568
11569
11570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
11571 printf %s "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
11572 save_CFLAGS="$CFLAGS"
11573 CFLAGS="$CFLAGS -Wshorten-64-to-32"
11574 #
11575 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11576 # but no mechanism is provided to turn AC_LANG_WERROR on
11577 # *and then turn it back off*, so that we *only* do it when
11578 # testing compiler options - 15 years after somebody asked
11579 # for it:
11580 #
11581 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11582 #
11583 save_ac_c_werror_flag="$ac_c_werror_flag"
11584 ac_c_werror_flag=yes
11585 #
11586 # We use AC_LANG_SOURCE() so that we can control the complete
11587 # content of the program being compiled. We do not, for example,
11588 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11589 # as it will generate a warning with -Wold-style-definition, meaning
11590 # that we would treat it as not working, as the test will fail if
11591 # *any* error output, including a warning due to the flag we're
11592 # testing, is generated; see
11593 #
11594 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11595 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11596 #
11597 # This may, as per those two messages, be fixed in autoconf 2.70,
11598 # but we only require 2.69 or newer for now.
11599 #
11600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11601 /* end confdefs.h. */
11602 int main(void) { return 0; }
11603 _ACEOF
11604 if ac_fn_c_try_compile "$LINENO"
11605 then :
11606
11607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11608 printf "%s\n" "yes" >&6; }
11609 can_add_to_cflags=yes
11610 #
11611 # The compile supports this; do we have some C code for
11612 # which the warning should *not* appear?
11613 # We test the fourth argument because the third argument
11614 # could contain quotes, breaking the test.
11615 #
11616 if test "x" != "x"
11617 then
11618 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
11620 printf %s "checking whether -Wshorten-64-to-32 ... " >&6; }
11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622 /* end confdefs.h. */
11623
11624 _ACEOF
11625 if ac_fn_c_try_compile "$LINENO"
11626 then :
11627
11628 #
11629 # Not a problem.
11630 #
11631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632 printf "%s\n" "no" >&6; }
11633
11634 else $as_nop
11635
11636 #
11637 # A problem.
11638 #
11639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11640 printf "%s\n" "yes" >&6; }
11641 can_add_to_cflags=no
11642
11643 fi
11644 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11645 fi
11646 CFLAGS="$save_CFLAGS"
11647 if test x"$can_add_to_cflags" = "xyes"
11648 then
11649 V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
11650 fi
11651
11652 else $as_nop
11653
11654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655 printf "%s\n" "no" >&6; }
11656 CFLAGS="$save_CFLAGS"
11657
11658 fi
11659 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11660 ac_c_werror_flag="$save_ac_c_werror_flag"
11661
11662
11663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
11664 printf %s "checking whether the compiler supports the -Wsign-compare option... " >&6; }
11665 save_CFLAGS="$CFLAGS"
11666 CFLAGS="$CFLAGS -Wsign-compare"
11667 #
11668 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11669 # but no mechanism is provided to turn AC_LANG_WERROR on
11670 # *and then turn it back off*, so that we *only* do it when
11671 # testing compiler options - 15 years after somebody asked
11672 # for it:
11673 #
11674 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11675 #
11676 save_ac_c_werror_flag="$ac_c_werror_flag"
11677 ac_c_werror_flag=yes
11678 #
11679 # We use AC_LANG_SOURCE() so that we can control the complete
11680 # content of the program being compiled. We do not, for example,
11681 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11682 # as it will generate a warning with -Wold-style-definition, meaning
11683 # that we would treat it as not working, as the test will fail if
11684 # *any* error output, including a warning due to the flag we're
11685 # testing, is generated; see
11686 #
11687 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11688 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11689 #
11690 # This may, as per those two messages, be fixed in autoconf 2.70,
11691 # but we only require 2.69 or newer for now.
11692 #
11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11694 /* end confdefs.h. */
11695 int main(void) { return 0; }
11696 _ACEOF
11697 if ac_fn_c_try_compile "$LINENO"
11698 then :
11699
11700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11701 printf "%s\n" "yes" >&6; }
11702 can_add_to_cflags=yes
11703 #
11704 # The compile supports this; do we have some C code for
11705 # which the warning should *not* appear?
11706 # We test the fourth argument because the third argument
11707 # could contain quotes, breaking the test.
11708 #
11709 if test "x" != "x"
11710 then
11711 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
11713 printf %s "checking whether -Wsign-compare ... " >&6; }
11714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11715 /* end confdefs.h. */
11716
11717 _ACEOF
11718 if ac_fn_c_try_compile "$LINENO"
11719 then :
11720
11721 #
11722 # Not a problem.
11723 #
11724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725 printf "%s\n" "no" >&6; }
11726
11727 else $as_nop
11728
11729 #
11730 # A problem.
11731 #
11732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11733 printf "%s\n" "yes" >&6; }
11734 can_add_to_cflags=no
11735
11736 fi
11737 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11738 fi
11739 CFLAGS="$save_CFLAGS"
11740 if test x"$can_add_to_cflags" = "xyes"
11741 then
11742 V_CCOPT="$V_CCOPT -Wsign-compare"
11743 fi
11744
11745 else $as_nop
11746
11747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748 printf "%s\n" "no" >&6; }
11749 CFLAGS="$save_CFLAGS"
11750
11751 fi
11752 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11753 ac_c_werror_flag="$save_ac_c_werror_flag"
11754
11755
11756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
11757 printf %s "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
11758 save_CFLAGS="$CFLAGS"
11759 CFLAGS="$CFLAGS -Wstrict-prototypes"
11760 #
11761 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11762 # but no mechanism is provided to turn AC_LANG_WERROR on
11763 # *and then turn it back off*, so that we *only* do it when
11764 # testing compiler options - 15 years after somebody asked
11765 # for it:
11766 #
11767 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11768 #
11769 save_ac_c_werror_flag="$ac_c_werror_flag"
11770 ac_c_werror_flag=yes
11771 #
11772 # We use AC_LANG_SOURCE() so that we can control the complete
11773 # content of the program being compiled. We do not, for example,
11774 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11775 # as it will generate a warning with -Wold-style-definition, meaning
11776 # that we would treat it as not working, as the test will fail if
11777 # *any* error output, including a warning due to the flag we're
11778 # testing, is generated; see
11779 #
11780 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11781 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11782 #
11783 # This may, as per those two messages, be fixed in autoconf 2.70,
11784 # but we only require 2.69 or newer for now.
11785 #
11786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11787 /* end confdefs.h. */
11788 int main(void) { return 0; }
11789 _ACEOF
11790 if ac_fn_c_try_compile "$LINENO"
11791 then :
11792
11793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11794 printf "%s\n" "yes" >&6; }
11795 can_add_to_cflags=yes
11796 #
11797 # The compile supports this; do we have some C code for
11798 # which the warning should *not* appear?
11799 # We test the fourth argument because the third argument
11800 # could contain quotes, breaking the test.
11801 #
11802 if test "x" != "x"
11803 then
11804 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
11806 printf %s "checking whether -Wstrict-prototypes ... " >&6; }
11807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11808 /* end confdefs.h. */
11809
11810 _ACEOF
11811 if ac_fn_c_try_compile "$LINENO"
11812 then :
11813
11814 #
11815 # Not a problem.
11816 #
11817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818 printf "%s\n" "no" >&6; }
11819
11820 else $as_nop
11821
11822 #
11823 # A problem.
11824 #
11825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11826 printf "%s\n" "yes" >&6; }
11827 can_add_to_cflags=no
11828
11829 fi
11830 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11831 fi
11832 CFLAGS="$save_CFLAGS"
11833 if test x"$can_add_to_cflags" = "xyes"
11834 then
11835 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
11836 fi
11837
11838 else $as_nop
11839
11840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11841 printf "%s\n" "no" >&6; }
11842 CFLAGS="$save_CFLAGS"
11843
11844 fi
11845 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11846 ac_c_werror_flag="$save_ac_c_werror_flag"
11847
11848
11849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wundef option" >&5
11850 printf %s "checking whether the compiler supports the -Wundef option... " >&6; }
11851 save_CFLAGS="$CFLAGS"
11852 CFLAGS="$CFLAGS -Wundef"
11853 #
11854 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11855 # but no mechanism is provided to turn AC_LANG_WERROR on
11856 # *and then turn it back off*, so that we *only* do it when
11857 # testing compiler options - 15 years after somebody asked
11858 # for it:
11859 #
11860 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11861 #
11862 save_ac_c_werror_flag="$ac_c_werror_flag"
11863 ac_c_werror_flag=yes
11864 #
11865 # We use AC_LANG_SOURCE() so that we can control the complete
11866 # content of the program being compiled. We do not, for example,
11867 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11868 # as it will generate a warning with -Wold-style-definition, meaning
11869 # that we would treat it as not working, as the test will fail if
11870 # *any* error output, including a warning due to the flag we're
11871 # testing, is generated; see
11872 #
11873 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11874 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11875 #
11876 # This may, as per those two messages, be fixed in autoconf 2.70,
11877 # but we only require 2.69 or newer for now.
11878 #
11879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880 /* end confdefs.h. */
11881 int main(void) { return 0; }
11882 _ACEOF
11883 if ac_fn_c_try_compile "$LINENO"
11884 then :
11885
11886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11887 printf "%s\n" "yes" >&6; }
11888 can_add_to_cflags=yes
11889 #
11890 # The compile supports this; do we have some C code for
11891 # which the warning should *not* appear?
11892 # We test the fourth argument because the third argument
11893 # could contain quotes, breaking the test.
11894 #
11895 if test "x" != "x"
11896 then
11897 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wundef " >&5
11899 printf %s "checking whether -Wundef ... " >&6; }
11900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11901 /* end confdefs.h. */
11902
11903 _ACEOF
11904 if ac_fn_c_try_compile "$LINENO"
11905 then :
11906
11907 #
11908 # Not a problem.
11909 #
11910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911 printf "%s\n" "no" >&6; }
11912
11913 else $as_nop
11914
11915 #
11916 # A problem.
11917 #
11918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11919 printf "%s\n" "yes" >&6; }
11920 can_add_to_cflags=no
11921
11922 fi
11923 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11924 fi
11925 CFLAGS="$save_CFLAGS"
11926 if test x"$can_add_to_cflags" = "xyes"
11927 then
11928 V_CCOPT="$V_CCOPT -Wundef"
11929 fi
11930
11931 else $as_nop
11932
11933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934 printf "%s\n" "no" >&6; }
11935 CFLAGS="$save_CFLAGS"
11936
11937 fi
11938 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11939 ac_c_werror_flag="$save_ac_c_werror_flag"
11940
11941 #
11942 # This can cause problems with ntohs(), ntohl(),
11943 # htons(), and htonl() on some platforms, such
11944 # as OpenBSD 6.3 with Clang 5.0.1. I guess the
11945 # problem is that the macro that ultimately does
11946 # the byte-swapping involves a conditional
11947 # expression that tests whether the value being
11948 # swapped is a compile-time constant or not,
11949 # using __builtin_constant_p(), and, depending
11950 # on whether it is, does a compile-time swap or
11951 # a run-time swap; perhaps the compiler always
11952 # considers one of the two results of the
11953 # conditional expression is never evaluated,
11954 # because the conditional check is done at
11955 # compile time, and thus always says "that
11956 # expression is never executed".
11957 #
11958 # (Perhaps there should be a way of flagging
11959 # an expression that you *want* evaluated at
11960 # compile time, so that the compiler 1) warns
11961 # if it *can't* be evaluated at compile time
11962 # and 2) *doesn't* warn that the true or false
11963 # branch will never be reached.)
11964 #
11965
11966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
11967 printf %s "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
11968 save_CFLAGS="$CFLAGS"
11969 CFLAGS="$CFLAGS -Wunreachable-code"
11970 #
11971 # XXX - yes, this depends on the way AC_LANG_WERROR works,
11972 # but no mechanism is provided to turn AC_LANG_WERROR on
11973 # *and then turn it back off*, so that we *only* do it when
11974 # testing compiler options - 15 years after somebody asked
11975 # for it:
11976 #
11977 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11978 #
11979 save_ac_c_werror_flag="$ac_c_werror_flag"
11980 ac_c_werror_flag=yes
11981 #
11982 # We use AC_LANG_SOURCE() so that we can control the complete
11983 # content of the program being compiled. We do not, for example,
11984 # want the default "int main()" that AC_LANG_PROGRAM() generates,
11985 # as it will generate a warning with -Wold-style-definition, meaning
11986 # that we would treat it as not working, as the test will fail if
11987 # *any* error output, including a warning due to the flag we're
11988 # testing, is generated; see
11989 #
11990 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11991 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11992 #
11993 # This may, as per those two messages, be fixed in autoconf 2.70,
11994 # but we only require 2.69 or newer for now.
11995 #
11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11997 /* end confdefs.h. */
11998 int main(void) { return 0; }
11999 _ACEOF
12000 if ac_fn_c_try_compile "$LINENO"
12001 then :
12002
12003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12004 printf "%s\n" "yes" >&6; }
12005 can_add_to_cflags=yes
12006 #
12007 # The compile supports this; do we have some C code for
12008 # which the warning should *not* appear?
12009 # We test the fourth argument because the third argument
12010 # could contain quotes, breaking the test.
12011 #
12012 if test "xgenerates warnings from ntohs()" != "x"
12013 then
12014 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
12016 printf %s "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
12017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12018 /* end confdefs.h. */
12019 #include <arpa/inet.h>
12020
12021 unsigned short
12022 testme(unsigned short a)
12023 {
12024 return ntohs(a);
12025 }
12026
12027 _ACEOF
12028 if ac_fn_c_try_compile "$LINENO"
12029 then :
12030
12031 #
12032 # Not a problem.
12033 #
12034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12035 printf "%s\n" "no" >&6; }
12036
12037 else $as_nop
12038
12039 #
12040 # A problem.
12041 #
12042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12043 printf "%s\n" "yes" >&6; }
12044 can_add_to_cflags=no
12045
12046 fi
12047 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12048 fi
12049 CFLAGS="$save_CFLAGS"
12050 if test x"$can_add_to_cflags" = "xyes"
12051 then
12052 V_CCOPT="$V_CCOPT -Wunreachable-code"
12053 fi
12054
12055 else $as_nop
12056
12057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058 printf "%s\n" "no" >&6; }
12059 CFLAGS="$save_CFLAGS"
12060
12061 fi
12062 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12063 ac_c_werror_flag="$save_ac_c_werror_flag"
12064
12065
12066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-parameter option" >&5
12067 printf %s "checking whether the compiler supports the -Wunused-but-set-parameter option... " >&6; }
12068 save_CFLAGS="$CFLAGS"
12069 CFLAGS="$CFLAGS -Wunused-but-set-parameter"
12070 #
12071 # XXX - yes, this depends on the way AC_LANG_WERROR works,
12072 # but no mechanism is provided to turn AC_LANG_WERROR on
12073 # *and then turn it back off*, so that we *only* do it when
12074 # testing compiler options - 15 years after somebody asked
12075 # for it:
12076 #
12077 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12078 #
12079 save_ac_c_werror_flag="$ac_c_werror_flag"
12080 ac_c_werror_flag=yes
12081 #
12082 # We use AC_LANG_SOURCE() so that we can control the complete
12083 # content of the program being compiled. We do not, for example,
12084 # want the default "int main()" that AC_LANG_PROGRAM() generates,
12085 # as it will generate a warning with -Wold-style-definition, meaning
12086 # that we would treat it as not working, as the test will fail if
12087 # *any* error output, including a warning due to the flag we're
12088 # testing, is generated; see
12089 #
12090 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12091 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12092 #
12093 # This may, as per those two messages, be fixed in autoconf 2.70,
12094 # but we only require 2.69 or newer for now.
12095 #
12096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12097 /* end confdefs.h. */
12098 int main(void) { return 0; }
12099 _ACEOF
12100 if ac_fn_c_try_compile "$LINENO"
12101 then :
12102
12103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12104 printf "%s\n" "yes" >&6; }
12105 can_add_to_cflags=yes
12106 #
12107 # The compile supports this; do we have some C code for
12108 # which the warning should *not* appear?
12109 # We test the fourth argument because the third argument
12110 # could contain quotes, breaking the test.
12111 #
12112 if test "x" != "x"
12113 then
12114 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-but-set-parameter " >&5
12116 printf %s "checking whether -Wunused-but-set-parameter ... " >&6; }
12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12118 /* end confdefs.h. */
12119
12120 _ACEOF
12121 if ac_fn_c_try_compile "$LINENO"
12122 then :
12123
12124 #
12125 # Not a problem.
12126 #
12127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12128 printf "%s\n" "no" >&6; }
12129
12130 else $as_nop
12131
12132 #
12133 # A problem.
12134 #
12135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12136 printf "%s\n" "yes" >&6; }
12137 can_add_to_cflags=no
12138
12139 fi
12140 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12141 fi
12142 CFLAGS="$save_CFLAGS"
12143 if test x"$can_add_to_cflags" = "xyes"
12144 then
12145 V_CCOPT="$V_CCOPT -Wunused-but-set-parameter"
12146 fi
12147
12148 else $as_nop
12149
12150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151 printf "%s\n" "no" >&6; }
12152 CFLAGS="$save_CFLAGS"
12153
12154 fi
12155 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12156 ac_c_werror_flag="$save_ac_c_werror_flag"
12157
12158
12159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-variable option" >&5
12160 printf %s "checking whether the compiler supports the -Wunused-but-set-variable option... " >&6; }
12161 save_CFLAGS="$CFLAGS"
12162 CFLAGS="$CFLAGS -Wunused-but-set-variable"
12163 #
12164 # XXX - yes, this depends on the way AC_LANG_WERROR works,
12165 # but no mechanism is provided to turn AC_LANG_WERROR on
12166 # *and then turn it back off*, so that we *only* do it when
12167 # testing compiler options - 15 years after somebody asked
12168 # for it:
12169 #
12170 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12171 #
12172 save_ac_c_werror_flag="$ac_c_werror_flag"
12173 ac_c_werror_flag=yes
12174 #
12175 # We use AC_LANG_SOURCE() so that we can control the complete
12176 # content of the program being compiled. We do not, for example,
12177 # want the default "int main()" that AC_LANG_PROGRAM() generates,
12178 # as it will generate a warning with -Wold-style-definition, meaning
12179 # that we would treat it as not working, as the test will fail if
12180 # *any* error output, including a warning due to the flag we're
12181 # testing, is generated; see
12182 #
12183 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12184 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12185 #
12186 # This may, as per those two messages, be fixed in autoconf 2.70,
12187 # but we only require 2.69 or newer for now.
12188 #
12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190 /* end confdefs.h. */
12191 int main(void) { return 0; }
12192 _ACEOF
12193 if ac_fn_c_try_compile "$LINENO"
12194 then :
12195
12196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12197 printf "%s\n" "yes" >&6; }
12198 can_add_to_cflags=yes
12199 #
12200 # The compile supports this; do we have some C code for
12201 # which the warning should *not* appear?
12202 # We test the fourth argument because the third argument
12203 # could contain quotes, breaking the test.
12204 #
12205 if test "x" != "x"
12206 then
12207 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-but-set-variable " >&5
12209 printf %s "checking whether -Wunused-but-set-variable ... " >&6; }
12210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12211 /* end confdefs.h. */
12212
12213 _ACEOF
12214 if ac_fn_c_try_compile "$LINENO"
12215 then :
12216
12217 #
12218 # Not a problem.
12219 #
12220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12221 printf "%s\n" "no" >&6; }
12222
12223 else $as_nop
12224
12225 #
12226 # A problem.
12227 #
12228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12229 printf "%s\n" "yes" >&6; }
12230 can_add_to_cflags=no
12231
12232 fi
12233 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12234 fi
12235 CFLAGS="$save_CFLAGS"
12236 if test x"$can_add_to_cflags" = "xyes"
12237 then
12238 V_CCOPT="$V_CCOPT -Wunused-but-set-variable"
12239 fi
12240
12241 else $as_nop
12242
12243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12244 printf "%s\n" "no" >&6; }
12245 CFLAGS="$save_CFLAGS"
12246
12247 fi
12248 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12249 ac_c_werror_flag="$save_ac_c_werror_flag"
12250
12251
12252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
12253 printf %s "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
12254 save_CFLAGS="$CFLAGS"
12255 CFLAGS="$CFLAGS -Wunused-parameter"
12256 #
12257 # XXX - yes, this depends on the way AC_LANG_WERROR works,
12258 # but no mechanism is provided to turn AC_LANG_WERROR on
12259 # *and then turn it back off*, so that we *only* do it when
12260 # testing compiler options - 15 years after somebody asked
12261 # for it:
12262 #
12263 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12264 #
12265 save_ac_c_werror_flag="$ac_c_werror_flag"
12266 ac_c_werror_flag=yes
12267 #
12268 # We use AC_LANG_SOURCE() so that we can control the complete
12269 # content of the program being compiled. We do not, for example,
12270 # want the default "int main()" that AC_LANG_PROGRAM() generates,
12271 # as it will generate a warning with -Wold-style-definition, meaning
12272 # that we would treat it as not working, as the test will fail if
12273 # *any* error output, including a warning due to the flag we're
12274 # testing, is generated; see
12275 #
12276 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12277 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12278 #
12279 # This may, as per those two messages, be fixed in autoconf 2.70,
12280 # but we only require 2.69 or newer for now.
12281 #
12282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12283 /* end confdefs.h. */
12284 int main(void) { return 0; }
12285 _ACEOF
12286 if ac_fn_c_try_compile "$LINENO"
12287 then :
12288
12289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12290 printf "%s\n" "yes" >&6; }
12291 can_add_to_cflags=yes
12292 #
12293 # The compile supports this; do we have some C code for
12294 # which the warning should *not* appear?
12295 # We test the fourth argument because the third argument
12296 # could contain quotes, breaking the test.
12297 #
12298 if test "x" != "x"
12299 then
12300 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
12302 printf %s "checking whether -Wunused-parameter ... " >&6; }
12303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304 /* end confdefs.h. */
12305
12306 _ACEOF
12307 if ac_fn_c_try_compile "$LINENO"
12308 then :
12309
12310 #
12311 # Not a problem.
12312 #
12313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12314 printf "%s\n" "no" >&6; }
12315
12316 else $as_nop
12317
12318 #
12319 # A problem.
12320 #
12321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12322 printf "%s\n" "yes" >&6; }
12323 can_add_to_cflags=no
12324
12325 fi
12326 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12327 fi
12328 CFLAGS="$save_CFLAGS"
12329 if test x"$can_add_to_cflags" = "xyes"
12330 then
12331 V_CCOPT="$V_CCOPT -Wunused-parameter"
12332 fi
12333
12334 else $as_nop
12335
12336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337 printf "%s\n" "no" >&6; }
12338 CFLAGS="$save_CFLAGS"
12339
12340 fi
12341 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12342 ac_c_werror_flag="$save_ac_c_werror_flag"
12343
12344
12345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
12346 printf %s "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
12347 save_CFLAGS="$CFLAGS"
12348 CFLAGS="$CFLAGS -Wused-but-marked-unused"
12349 #
12350 # XXX - yes, this depends on the way AC_LANG_WERROR works,
12351 # but no mechanism is provided to turn AC_LANG_WERROR on
12352 # *and then turn it back off*, so that we *only* do it when
12353 # testing compiler options - 15 years after somebody asked
12354 # for it:
12355 #
12356 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12357 #
12358 save_ac_c_werror_flag="$ac_c_werror_flag"
12359 ac_c_werror_flag=yes
12360 #
12361 # We use AC_LANG_SOURCE() so that we can control the complete
12362 # content of the program being compiled. We do not, for example,
12363 # want the default "int main()" that AC_LANG_PROGRAM() generates,
12364 # as it will generate a warning with -Wold-style-definition, meaning
12365 # that we would treat it as not working, as the test will fail if
12366 # *any* error output, including a warning due to the flag we're
12367 # testing, is generated; see
12368 #
12369 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12370 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12371 #
12372 # This may, as per those two messages, be fixed in autoconf 2.70,
12373 # but we only require 2.69 or newer for now.
12374 #
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376 /* end confdefs.h. */
12377 int main(void) { return 0; }
12378 _ACEOF
12379 if ac_fn_c_try_compile "$LINENO"
12380 then :
12381
12382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12383 printf "%s\n" "yes" >&6; }
12384 can_add_to_cflags=yes
12385 #
12386 # The compile supports this; do we have some C code for
12387 # which the warning should *not* appear?
12388 # We test the fourth argument because the third argument
12389 # could contain quotes, breaking the test.
12390 #
12391 if test "x" != "x"
12392 then
12393 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
12395 printf %s "checking whether -Wused-but-marked-unused ... " >&6; }
12396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397 /* end confdefs.h. */
12398
12399 _ACEOF
12400 if ac_fn_c_try_compile "$LINENO"
12401 then :
12402
12403 #
12404 # Not a problem.
12405 #
12406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12407 printf "%s\n" "no" >&6; }
12408
12409 else $as_nop
12410
12411 #
12412 # A problem.
12413 #
12414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12415 printf "%s\n" "yes" >&6; }
12416 can_add_to_cflags=no
12417
12418 fi
12419 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12420 fi
12421 CFLAGS="$save_CFLAGS"
12422 if test x"$can_add_to_cflags" = "xyes"
12423 then
12424 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
12425 fi
12426
12427 else $as_nop
12428
12429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12430 printf "%s\n" "no" >&6; }
12431 CFLAGS="$save_CFLAGS"
12432
12433 fi
12434 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12435 ac_c_werror_flag="$save_ac_c_werror_flag"
12436
12437 fi
12438
12439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
12440 printf %s "checking whether the compiler supports generating dependencies... " >&6; }
12441 if test "$GCC" = yes ; then
12442 #
12443 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
12444 # though it's not); we assume that, in this case, the flag
12445 # would be -M.
12446 #
12447 ac_lbl_dependency_flag="-M"
12448 else
12449 #
12450 # Not GCC or a compiler deemed to be GCC; what platform is
12451 # this? (We're assuming that if the compiler isn't GCC
12452 # it's the compiler from the vendor of the OS; that won't
12453 # necessarily be true for x86 platforms, where it might be
12454 # the Intel C compiler.)
12455 #
12456 case "$host_os" in
12457
12458 irix*|osf*|darwin*)
12459 #
12460 # MIPS C for IRIX, DEC C, and clang all use -M.
12461 #
12462 ac_lbl_dependency_flag="-M"
12463 ;;
12464
12465 solaris*)
12466 #
12467 # Sun C uses -xM.
12468 #
12469 ac_lbl_dependency_flag="-xM"
12470 ;;
12471
12472 hpux*)
12473 #
12474 # HP's older C compilers don't support this.
12475 # HP's newer C compilers support this with
12476 # either +M or +Make; the older compilers
12477 # interpret +M as something completely
12478 # different, so we use +Make so we don't
12479 # think it works with the older compilers.
12480 #
12481 ac_lbl_dependency_flag="+Make"
12482 ;;
12483
12484 *)
12485 #
12486 # Not one of the above; assume no support for
12487 # generating dependencies.
12488 #
12489 ac_lbl_dependency_flag=""
12490 ;;
12491 esac
12492 fi
12493
12494 #
12495 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
12496 # complain about it?
12497 #
12498 # Note: clang doesn't seem to exit with an error status when handed
12499 # an unknown non-warning error, even if you pass it
12500 # -Werror=unknown-warning-option. However, it always supports
12501 # -M, so the fact that this test always succeeds with clang
12502 # isn't an issue.
12503 #
12504 if test ! -z "$ac_lbl_dependency_flag"; then
12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12506 /* end confdefs.h. */
12507 int main(void) { return 0; }
12508 _ACEOF
12509 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
12510 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
12511 ac_status=$?
12512 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12513 test $ac_status = 0; }; then
12514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
12515 printf "%s\n" "yes, with $ac_lbl_dependency_flag" >&6; }
12516 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
12517 MKDEP='${top_srcdir}/mkdep'
12518 else
12519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520 printf "%s\n" "no" >&6; }
12521 #
12522 # We can't run mkdep, so have "make depend" do
12523 # nothing.
12524 #
12525 MKDEP='${top_srcdir}/nomkdep'
12526 fi
12527 rm -rf conftest*
12528 else
12529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12530 printf "%s\n" "no" >&6; }
12531 #
12532 # We can't run mkdep, so have "make depend" do
12533 # nothing.
12534 #
12535 MKDEP='${top_srcdir}/nomkdep'
12536 fi
12537
12538
12539
12540 #
12541 # We used to set -n32 for IRIX 6 when not using GCC (presumed
12542 # to mean that we're using MIPS C or MIPSpro C); it specified
12543 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
12544 # not sure why that would be something to do *only* with a
12545 # .devel file; why should the ABI for which we produce code
12546 # depend on .devel?
12547 #
12548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use an os-proto.h header" >&5
12549 printf %s "checking whether to use an os-proto.h header... " >&6; }
12550 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
12551 name="lbl/os-$os.h"
12552 if test -f $name ; then
12553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, at \"$name\"" >&5
12554 printf "%s\n" "yes, at \"$name\"" >&6; }
12555 ln -s $name os-proto.h
12556
12557 printf "%s\n" "#define HAVE_OS_PROTO_H 1" >>confdefs.h
12558
12559 else
12560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12561 printf "%s\n" "no" >&6; }
12562 fi
12563 fi
12564
12565 #
12566 # Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
12567 #
12568 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
12569 #include <sys/types.h>
12570 #include <sys/socket.h>
12571
12572 "
12573 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes
12574 then :
12575
12576 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h
12577
12578
12579 fi
12580
12581
12582 #
12583 # Check to see if there's a sockaddr_storage structure.
12584 #
12585 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12586 #include <sys/types.h>
12587 #include <sys/socket.h>
12588
12589 "
12590 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
12591 then :
12592
12593 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
12594
12595
12596 fi
12597
12598
12599 #
12600 # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
12601 # dl_module_id_1 member.
12602 #
12603 # NOTE: any failure means we conclude that it doesn't have that member,
12604 # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
12605 # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
12606 # it doesn't have that member (which is OK, as either we won't be
12607 # using code that would use that member, or we wouldn't compile in
12608 # any case).
12609 #
12610 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" "
12611 #include <sys/types.h>
12612 #include <sys/dlpi.h>
12613 #include <sys/dlpi_ext.h>
12614
12615 "
12616 if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes
12617 then :
12618
12619 printf "%s\n" "#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1" >>confdefs.h
12620
12621
12622 fi
12623
12624
12625 #
12626 # Various Linux-specific mechanisms.
12627 #
12628 # Check whether --enable-usb was given.
12629 if test ${enable_usb+y}
12630 then :
12631 enableval=$enable_usb;
12632 else $as_nop
12633 enable_usb=yes
12634 fi
12635
12636
12637 #
12638 # If somebody requested an XXX-only pcap, that doesn't include
12639 # additional mechanisms.
12640 #
12641 if test "xxx_only" != yes; then
12642 case "$host_os" in
12643 linux*)
12644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
12645 printf %s "checking for Linux usbmon USB sniffing support... " >&6; }
12646 if test "x$enable_usb" != "xno" ; then
12647
12648 printf "%s\n" "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
12649
12650 MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
12651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12652 printf "%s\n" "yes" >&6; }
12653 #
12654 # Note: if the directory for special files is *EVER* somewhere
12655 # other than the UN*X standard of /dev (which will break any
12656 # software that looks for /dev/null or /dev/tty, for example,
12657 # so doing that is *REALLY* not a good idea), please provide
12658 # some mechanism to determine that directory at *run time*,
12659 # rather than *configure time*, so that it works when doing
12660 # a cross-build, and that works with *multiple* distributions,
12661 # with our without udev, and with multiple versions of udev,
12662 # with udevinfo or udevadm or any other mechanism to get the
12663 # special files directory.
12664 #
12665 # Do we have a version of <linux/compiler.h> available?
12666 # If so, we might need it for <linux/usbdevice_fs.h>.
12667 #
12668 ac_fn_c_check_header_compile "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
12669 if test "x$ac_cv_header_linux_compiler_h" = xyes
12670 then :
12671 printf "%s\n" "#define HAVE_LINUX_COMPILER_H 1" >>confdefs.h
12672
12673 fi
12674
12675 if test "$ac_cv_header_linux_compiler_h" = yes; then
12676 #
12677 # Yes - include it when testing for <linux/usbdevice_fs.h>.
12678 #
12679 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
12680 "
12681 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes
12682 then :
12683 printf "%s\n" "#define HAVE_LINUX_USBDEVICE_FS_H 1" >>confdefs.h
12684
12685 fi
12686
12687 else
12688 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
12689 if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes
12690 then :
12691 printf "%s\n" "#define HAVE_LINUX_USBDEVICE_FS_H 1" >>confdefs.h
12692
12693 fi
12694
12695 fi
12696 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
12697 #
12698 # OK, does it define bRequestType? Older versions of the kernel
12699 # define fields with names like "requesttype, "request", and
12700 # "value", rather than "bRequestType", "bRequest", and
12701 # "wValue".
12702 #
12703 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
12704 $ac_includes_default
12705 #ifdef HAVE_LINUX_COMPILER_H
12706 #include <linux/compiler.h>
12707 #endif
12708 #include <linux/usbdevice_fs.h>
12709
12710 "
12711 if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes
12712 then :
12713
12714 printf "%s\n" "#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1" >>confdefs.h
12715
12716
12717 fi
12718
12719 fi
12720 else
12721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12722 printf "%s\n" "no" >&6; }
12723 fi
12724
12725 #
12726 # Life's too short to deal with trying to get this to compile
12727 # if you don't get the right types defined with
12728 # __KERNEL_STRICT_NAMES getting defined by some other include.
12729 #
12730 # Check whether the includes Just Work. If not, don't turn on
12731 # netfilter support.
12732 #
12733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
12734 printf %s "checking whether we can compile the netfilter support... " >&6; }
12735 if test ${ac_cv_netfilter_can_compile+y}
12736 then :
12737 printf %s "(cached) " >&6
12738 else $as_nop
12739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12740 /* end confdefs.h. */
12741
12742 $ac_includes_default
12743 #include <sys/socket.h>
12744 #include <netinet/in.h>
12745 #include <linux/types.h>
12746
12747 #include <linux/netlink.h>
12748 #include <linux/netfilter.h>
12749 #include <linux/netfilter/nfnetlink.h>
12750 #include <linux/netfilter/nfnetlink_log.h>
12751 #include <linux/netfilter/nfnetlink_queue.h>
12752 int
12753 main (void)
12754 {
12755
12756 ;
12757 return 0;
12758 }
12759 _ACEOF
12760 if ac_fn_c_try_compile "$LINENO"
12761 then :
12762 ac_cv_netfilter_can_compile=yes
12763 else $as_nop
12764 ac_cv_netfilter_can_compile=no
12765 fi
12766 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12767 fi
12768
12769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
12770 printf "%s\n" "$ac_cv_netfilter_can_compile" >&6; }
12771 if test $ac_cv_netfilter_can_compile = yes ; then
12772
12773 printf "%s\n" "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
12774
12775 MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
12776 fi
12777 ;;
12778 esac
12779 fi
12780
12781
12782
12783 # Check whether --enable-netmap was given.
12784 if test ${enable_netmap+y}
12785 then :
12786 enableval=$enable_netmap;
12787 else $as_nop
12788 enable_netmap=yes
12789 fi
12790
12791
12792 if test "x$enable_netmap" != "xno" ; then
12793 #
12794 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
12795 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
12796 # is defined, for example, as it includes a nonexistent malloc.h
12797 # header.
12798 #
12799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
12800 printf %s "checking whether we can compile the netmap support... " >&6; }
12801 if test ${ac_cv_net_netmap_user_can_compile+y}
12802 then :
12803 printf %s "(cached) " >&6
12804 else $as_nop
12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12806 /* end confdefs.h. */
12807
12808 $ac_includes_default
12809 #define NETMAP_WITH_LIBS
12810 #include <net/netmap_user.h>
12811 int
12812 main (void)
12813 {
12814
12815 ;
12816 return 0;
12817 }
12818 _ACEOF
12819 if ac_fn_c_try_compile "$LINENO"
12820 then :
12821 ac_cv_net_netmap_user_can_compile=yes
12822 else $as_nop
12823 ac_cv_net_netmap_user_can_compile=no
12824 fi
12825 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12826 fi
12827
12828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
12829 printf "%s\n" "$ac_cv_net_netmap_user_can_compile" >&6; }
12830 if test $ac_cv_net_netmap_user_can_compile = yes ; then
12831
12832 printf "%s\n" "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
12833
12834 MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
12835 fi
12836
12837 fi
12838
12839 # Check for DPDK support.
12840
12841 # Check whether --with-dpdk was given.
12842 if test ${with_dpdk+y}
12843 then :
12844 withval=$with_dpdk;
12845 if test "$withval" = no
12846 then
12847 # User doesn't want DPDK support.
12848 want_dpdk=no
12849 elif test "$withval" = yes
12850 then
12851 # User wants DPDK support but hasn't specified a directory.
12852 want_dpdk=yes
12853 else
12854 # User wants DPDK support and has specified a directory,
12855 # so use the provided value.
12856 want_dpdk=yes
12857 dpdk_dir=$withval
12858 fi
12859
12860 else $as_nop
12861
12862 if test "$V_PCAP" = dpdk; then
12863 # User requested DPDK-only libpcap, so we'd better have
12864 # the DPDK API.
12865 want_dpdk=yes
12866 elif test "xxx_only" = yes; then
12867 # User requested something-else-only pcap, so they don't
12868 # want DPDK support.
12869 want_dpdk=no
12870 else
12871 #
12872 # User didn't explicitly request DPDK; don't give it
12873 # to them without their consent, as the code is
12874 # immensely hard to keep compiling for every random
12875 # API change the DPDK folks make.
12876 #
12877 want_dpdk=no
12878 fi
12879
12880 fi
12881
12882
12883 if test "$want_dpdk" != no; then
12884 #
12885 # The user didn't explicitly say they don't want DPDK,
12886 # so see if we have it.
12887 #
12888 # We only try to find it using pkg-config; DPDK is *SO*
12889 # complicated - DPDK 19.02, for example, has about 117(!)
12890 # libraries, and the precise set of libraries required has
12891 # changed over time - so attempting to guess which libraries
12892 # you need, and hardcoding that in an attempt to find the
12893 # libraries without DPDK, rather than relying on DPDK to
12894 # tell you, with a .pc file, what libraries are needed,
12895 # is *EXTREMELY* fragile and has caused some bug reports,
12896 # so we're just not going to do it.
12897 #
12898 # If that causes a problem, the only thing we will do is
12899 # accept an alternative way of finding the appropriate
12900 # library set for the installed version of DPDK that is
12901 # as robust as pkg-config (i.e., it had better work as well
12902 # as pkg-config with *ALL* versions of DPDK that provide a
12903 # libdpdk.pc file).
12904 #
12905 # If --with-dpdk={path} was specified, add {path}/pkgconfig
12906 # to PKG_CONFIG_PATH, so we look for the .pc file there,
12907 # first.
12908 #
12909 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
12910 if test -n "$dpdk_dir"; then
12911 PKG_CONFIG_PATH="$dpdk_dir:$PKG_CONFIG_PATH"
12912 fi
12913
12914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libdpdk with pkg-config" >&5
12915 printf %s "checking for libdpdk with pkg-config... " >&6; }
12916 if test -n "$PKG_CONFIG"; then
12917
12918 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12919 ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12920 ac_status=$?
12921 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12922 test $ac_status = 0; }; then
12923 #
12924 # The package was found, so try to get its C flags and
12925 # libraries.
12926 #
12927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
12928 printf "%s\n" "found" >&6; }
12929 if test ! -n "$DPDK_CFLAGS"; then
12930 DPDK_CFLAGS=`$PKG_CONFIG --cflags "libdpdk" 2>/dev/null`
12931 if test "x$?" != "x0"; then
12932 #
12933 # That failed - report an error.
12934 # Re-run the command, telling pkg-config to print an error
12935 # message, capture the error message, and report it.
12936 # This causes the configuration script to fail, as it means
12937 # the script is almost certainly doing something wrong.
12938 #
12939
12940 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12941 _pkg_short_errors_supported=yes
12942 else
12943 _pkg_short_errors_supported=no
12944 fi
12945 if test $_pkg_short_errors_supported = yes; then
12946 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libdpdk" 2>&1`
12947 else
12948 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libdpdk" 2>&1`
12949 fi
12950 as_fn_error $? "$PKG_CONFIG --cflags \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5
12951 fi
12952 fi
12953 if test ! -n "$DPDK_LIBS"; then
12954 DPDK_LIBS=`$PKG_CONFIG --libs "libdpdk" 2>/dev/null`
12955 if test "x$?" != "x0"; then
12956 #
12957 # That failed - report an error.
12958 # Re-run the command, telling pkg-config to print an error
12959 # message, capture the error message, and report it.
12960 # This causes the configuration script to fail, as it means
12961 # the script is almost certainly doing something wrong.
12962 #
12963
12964 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12965 _pkg_short_errors_supported=yes
12966 else
12967 _pkg_short_errors_supported=no
12968 fi
12969 if test $_pkg_short_errors_supported = yes; then
12970 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libdpdk" 2>&1`
12971 else
12972 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libdpdk" 2>&1`
12973 fi
12974 as_fn_error $? "$PKG_CONFIG --libs \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5
12975 fi
12976 fi
12977 if test ! -n "$DPDK_LIBS_STATIC"; then
12978 DPDK_LIBS_STATIC=`$PKG_CONFIG --libs --static "libdpdk" 2>/dev/null`
12979 if test "x$?" != "x0"; then
12980 #
12981 # That failed - report an error.
12982 # Re-run the command, telling pkg-config to print an error
12983 # message, capture the error message, and report it.
12984 # This causes the configuration script to fail, as it means
12985 # the script is almost certainly doing something wrong.
12986 #
12987
12988 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12989 _pkg_short_errors_supported=yes
12990 else
12991 _pkg_short_errors_supported=no
12992 fi
12993 if test $_pkg_short_errors_supported = yes; then
12994 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libdpdk" 2>&1`
12995 else
12996 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libdpdk" 2>&1`
12997 fi
12998 as_fn_error $? "$PKG_CONFIG --libs --static \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5
12999 fi
13000 fi
13001
13002 found_dpdk=yes
13003
13004 else
13005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13006 printf "%s\n" "not found" >&6; }
13007 :
13008 fi
13009 else
13010 # No pkg-config, so obviously not found with pkg-config.
13011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5
13012 printf "%s\n" "pkg-config not found" >&6; }
13013 :
13014 fi
13015
13016 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
13017
13018 #
13019 # Did we find DPDK?
13020 #
13021 if test "$found_dpdk" = yes; then
13022 #
13023 # Found it.
13024 #
13025 # We call rte_eth_dev_count_avail(), and older versions
13026 # of DPDK didn't have it, so check for it.
13027 #
13028
13029 save_CFLAGS="$CFLAGS"
13030 save_LIBS="$LIBS"
13031 save_LDFLAGS="$LDFLAGS"
13032
13033 CFLAGS="$CFLAGS $DPDK_CFLAGS"
13034 LIBS="$LIBS $DPDK_LIBS"
13035 ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
13036 if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes
13037 then :
13038
13039 fi
13040
13041
13042 CFLAGS="$save_CFLAGS"
13043 LIBS="$save_LIBS"
13044 LDFLAGS="$save_LDFLAGS"
13045
13046 fi
13047
13048 if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
13049 #
13050 # We found a usable DPDK.
13051 #
13052 # Check whether the rte_ether.h file defines
13053 # struct ether_addr or struct rte_ether_addr.
13054 #
13055 # ("API compatibility? That's for losers!")
13056 #
13057
13058 save_CFLAGS="$CFLAGS"
13059 save_LIBS="$LIBS"
13060 save_LDFLAGS="$LDFLAGS"
13061
13062 CFLAGS="$CFLAGS $DPDK_CFLAGS"
13063 LIBS="$LIBS $DPDK_LIBS"
13064 ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
13065 #include <rte_ether.h>
13066
13067 "
13068 if test "x$ac_cv_type_struct_rte_ether_addr" = xyes
13069 then :
13070
13071 printf "%s\n" "#define HAVE_STRUCT_RTE_ETHER_ADDR 1" >>confdefs.h
13072
13073
13074 fi
13075
13076
13077 CFLAGS="$save_CFLAGS"
13078 LIBS="$save_LIBS"
13079 LDFLAGS="$save_LDFLAGS"
13080
13081
13082 #
13083 # We can build with DPDK.
13084 #
13085 V_INCLS="$V_INCLS $DPDK_CFLAGS"
13086 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DPDK_LIBS"
13087 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DPDK_LIBS_STATIC"
13088 REQUIRES_PRIVATE="$REQUIRES_PRIVATE libdpdk"
13089
13090 printf "%s\n" "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
13091
13092 if test $V_PCAP != dpdk ; then
13093 MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
13094 fi
13095 else
13096 #
13097 # We didn't find a usable DPDK.
13098 # If we required it (with --with-dpdk or --with-pcap=dpdk),
13099 # fail with an appropriate message telling the user what
13100 # the problem was, otherwise note the problem with a
13101 # warning.
13102 #
13103 if test "$found_dpdk" != yes; then
13104 #
13105 # Not found with pkg-config. Note that we
13106 # require that DPDK must be findable with
13107 # pkg-config.
13108 #
13109 if test "$V_PCAP" = dpdk; then
13110 #
13111 # User requested DPDK-only capture support.
13112 #
13113 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but
13114 we couldn't find DPDK with pkg-config. Make sure that pkg-config is
13115 installed, that DPDK 18.02.2 or later is installed, and that DPDK
13116 provides a .pc file." "$LINENO" 5
13117 fi
13118
13119 if test "$want_dpdk" = yes; then
13120 #
13121 # User requested that libpcap include
13122 # DPDK capture support.
13123 #
13124 as_fn_error $? "DPDK support requested with --with-dpdk, but we
13125 couldn't find DPDK with pkg-config. Make sure that pkg-config
13126 is installed, that DPDK 18.02.2 or later is installed, and that
13127 DPDK provides .pc file." "$LINENO" 5
13128 fi
13129
13130 #
13131 # User didn't indicate whether they wanted DPDK
13132 # or not; just warn why we didn't find it.
13133 #
13134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: We couldn't find DPDK with pkg-config. If
13135 you want DPDK support, make sure that pkg-config is installed,
13136 that DPDK 18.02.2 or later is installed, and that DPDK provides a
13137 .pc file." >&5
13138 printf "%s\n" "$as_me: WARNING: We couldn't find DPDK with pkg-config. If
13139 you want DPDK support, make sure that pkg-config is installed,
13140 that DPDK 18.02.2 or later is installed, and that DPDK provides a
13141 .pc file." >&2;}
13142 elif test "$ac_cv_func_rte_eth_dev_count_avail" != yes; then
13143 #
13144 # Found with pkg-config, but we couldn't compile
13145 # a program that calls rte_eth_dev_count(); we
13146 # probably have the developer package installed,
13147 # but don't have a sufficiently recent version
13148 # of DPDK. Note that we need a sufficiently
13149 # recent version of DPDK.
13150 #
13151 if test "$V_PCAP" = dpdk; then
13152 #
13153 # User requested DPDK-only capture support.
13154 #
13155 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we
13156 can't compile libpcap with DPDK. Make sure that DPDK 18.02.2 or later
13157 is installed." "$LINENO" 5
13158 fi
13159
13160 if test "$want_dpdk" = yes; then
13161 #
13162 # User requested that libpcap include
13163 # DPDK capture support.
13164 #
13165 as_fn_error $? "DPDK support requested with --with-dpdk, but
13166 we can't compile libpcap with DPDK. Make sure that DPDK 18.02.2
13167 or later is DPDK is installed." "$LINENO" 5
13168 fi
13169
13170 #
13171 # User didn't indicate whether they wanted DPDK
13172 # or not; just warn why we didn't find it.
13173 #
13174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: DPDK was found, but we can't compile libpcap with it.
13175 Make sure that DPDK 18.02.2 or later is installed." >&5
13176 printf "%s\n" "$as_me: WARNING: DPDK was found, but we can't compile libpcap with it.
13177 Make sure that DPDK 18.02.2 or later is installed." >&2;}
13178 fi
13179 fi
13180 fi
13181
13182
13183 # Check whether --enable-bluetooth was given.
13184 if test ${enable_bluetooth+y}
13185 then :
13186 enableval=$enable_bluetooth;
13187 else $as_nop
13188 enable_bluetooth=ifsupportavailable
13189 fi
13190
13191
13192 if test "xxx_only" = yes; then
13193 # User requested something-else-only pcap, so they don't
13194 # want Bluetooth support.
13195 enable_bluetooth=no
13196 fi
13197
13198 if test "x$enable_bluetooth" != "xno" ; then
13199 case "$host_os" in
13200 linux*)
13201 ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
13202 if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes
13203 then :
13204
13205 #
13206 # We have bluetooth.h, so we support Bluetooth
13207 # sniffing.
13208 #
13209
13210 printf "%s\n" "#define PCAP_SUPPORT_BT 1" >>confdefs.h
13211
13212 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
13213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
13214 printf "%s\n" "$as_me: Bluetooth sniffing is supported" >&6;}
13215 ac_lbl_bluetooth_available=yes
13216
13217 #
13218 # OK, does struct sockaddr_hci have an hci_channel
13219 # member?
13220 #
13221 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
13222 #include <bluetooth/bluetooth.h>
13223 #include <bluetooth/hci.h>
13224
13225 "
13226 if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes
13227 then :
13228
13229 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1" >>confdefs.h
13230
13231
13232 #
13233 # Yes; is HCI_CHANNEL_MONITOR defined?
13234 #
13235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
13236 printf %s "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
13237 if test ${ac_cv_lbl_hci_channel_monitor_is_defined+y}
13238 then :
13239 printf %s "(cached) " >&6
13240 else $as_nop
13241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13242 /* end confdefs.h. */
13243
13244 #include <bluetooth/bluetooth.h>
13245 #include <bluetooth/hci.h>
13246
13247 int
13248 main (void)
13249 {
13250
13251 int i = HCI_CHANNEL_MONITOR;
13252
13253 ;
13254 return 0;
13255 }
13256 _ACEOF
13257 if ac_fn_c_try_compile "$LINENO"
13258 then :
13259
13260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13261 printf "%s\n" "yes" >&6; }
13262
13263 printf "%s\n" "#define PCAP_SUPPORT_BT_MONITOR 1" >>confdefs.h
13264
13265 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
13266
13267 else $as_nop
13268
13269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13270 printf "%s\n" "no" >&6; }
13271
13272 fi
13273 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13274 fi
13275
13276
13277 fi
13278
13279
13280 else $as_nop
13281
13282 #
13283 # We don't have bluetooth.h, so we don't support
13284 # Bluetooth sniffing.
13285 #
13286 if test "x$enable_bluetooth" = "xyes" ; then
13287 as_fn_error $? "Bluetooth sniffing is not supported; install a Bluetooth devel library (libbluetooth-dev|bluez-libs-devel|bluez-dev|libbluetooth-devel|...) to enable it" "$LINENO" 5
13288 else
13289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install a Bluetooth devel library (libbluetooth-dev|bluez-libs-devel|bluez-dev|libbluetooth-devel|...) to enable it" >&5
13290 printf "%s\n" "$as_me: Bluetooth sniffing is not supported; install a Bluetooth devel library (libbluetooth-dev|bluez-libs-devel|bluez-dev|libbluetooth-devel|...) to enable it" >&6;}
13291 fi
13292
13293 fi
13294
13295 ;;
13296 *)
13297 if test "x$enable_bluetooth" = "xyes" ; then
13298 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
13299 else
13300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
13301 printf "%s\n" "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
13302 fi
13303 ;;
13304 esac
13305
13306 fi
13307
13308 # Check whether --enable-dbus was given.
13309 if test ${enable_dbus+y}
13310 then :
13311 enableval=$enable_dbus;
13312 else $as_nop
13313 enable_dbus=ifavailable
13314 fi
13315
13316
13317 if test "xxx_only" = yes; then
13318 # User requested something-else-only pcap, so they don't
13319 # want D-Bus support.
13320 enable_dbus=no
13321 fi
13322
13323 if test "x$enable_dbus" != "xno"; then
13324 if test "x$enable_dbus" = "xyes"; then
13325 case "$host_os" in
13326
13327 darwin*)
13328 #
13329 # We don't support D-Bus sniffing on macOS; see
13330 #
13331 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
13332 #
13333 # The user requested it, so fail.
13334 #
13335 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
13336 esac
13337 else
13338 case "$host_os" in
13339
13340 darwin*)
13341 #
13342 # We don't support D-Bus sniffing on macOS; see
13343 #
13344 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
13345 #
13346 # The user didn't explicitly request it, so just
13347 # silently refuse to enable it.
13348 #
13349 enable_dbus="no"
13350 ;;
13351 esac
13352 fi
13353 fi
13354
13355 if test "x$enable_dbus" != "xno"; then
13356
13357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbus-1 with pkg-config" >&5
13358 printf %s "checking for dbus-1 with pkg-config... " >&6; }
13359 if test -n "$PKG_CONFIG"; then
13360
13361 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13362 ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13363 ac_status=$?
13364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13365 test $ac_status = 0; }; then
13366 #
13367 # The package was found, so try to get its C flags and
13368 # libraries.
13369 #
13370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
13371 printf "%s\n" "found" >&6; }
13372 if test ! -n "$DBUS_CFLAGS"; then
13373 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
13374 if test "x$?" != "x0"; then
13375 #
13376 # That failed - report an error.
13377 # Re-run the command, telling pkg-config to print an error
13378 # message, capture the error message, and report it.
13379 # This causes the configuration script to fail, as it means
13380 # the script is almost certainly doing something wrong.
13381 #
13382
13383 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13384 _pkg_short_errors_supported=yes
13385 else
13386 _pkg_short_errors_supported=no
13387 fi
13388 if test $_pkg_short_errors_supported = yes; then
13389 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "dbus-1" 2>&1`
13390 else
13391 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "dbus-1" 2>&1`
13392 fi
13393 as_fn_error $? "$PKG_CONFIG --cflags \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5
13394 fi
13395 fi
13396 if test ! -n "$DBUS_LIBS"; then
13397 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
13398 if test "x$?" != "x0"; then
13399 #
13400 # That failed - report an error.
13401 # Re-run the command, telling pkg-config to print an error
13402 # message, capture the error message, and report it.
13403 # This causes the configuration script to fail, as it means
13404 # the script is almost certainly doing something wrong.
13405 #
13406
13407 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13408 _pkg_short_errors_supported=yes
13409 else
13410 _pkg_short_errors_supported=no
13411 fi
13412 if test $_pkg_short_errors_supported = yes; then
13413 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "dbus-1" 2>&1`
13414 else
13415 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "dbus-1" 2>&1`
13416 fi
13417 as_fn_error $? "$PKG_CONFIG --libs \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5
13418 fi
13419 fi
13420 if test ! -n "$DBUS_LIBS_STATIC"; then
13421 DBUS_LIBS_STATIC=`$PKG_CONFIG --libs --static "dbus-1" 2>/dev/null`
13422 if test "x$?" != "x0"; then
13423 #
13424 # That failed - report an error.
13425 # Re-run the command, telling pkg-config to print an error
13426 # message, capture the error message, and report it.
13427 # This causes the configuration script to fail, as it means
13428 # the script is almost certainly doing something wrong.
13429 #
13430
13431 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13432 _pkg_short_errors_supported=yes
13433 else
13434 _pkg_short_errors_supported=no
13435 fi
13436 if test $_pkg_short_errors_supported = yes; then
13437 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "dbus-1" 2>&1`
13438 else
13439 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "dbus-1" 2>&1`
13440 fi
13441 as_fn_error $? "$PKG_CONFIG --libs --static \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5
13442 fi
13443 fi
13444
13445
13446 save_CFLAGS="$CFLAGS"
13447 save_LIBS="$LIBS"
13448 save_LDFLAGS="$LDFLAGS"
13449
13450 CFLAGS="$CFLAGS $DBUS_CFLAGS"
13451 LIBS="$LIBS $DBUS_LIBS"
13452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
13453 printf %s "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
13454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13455 /* end confdefs.h. */
13456 #include <string.h>
13457
13458 #include <time.h>
13459 #include <sys/time.h>
13460
13461 #include <dbus/dbus.h>
13462 int
13463 main (void)
13464 {
13465 return dbus_connection_read_write(NULL, 0);
13466 ;
13467 return 0;
13468 }
13469 _ACEOF
13470 if ac_fn_c_try_link "$LINENO"
13471 then :
13472
13473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13474 printf "%s\n" "yes" >&6; }
13475
13476 printf "%s\n" "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
13477
13478 MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
13479 V_INCLS="$V_INCLS $DBUS_CFLAGS"
13480 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DBUS_LIBS"
13481 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DBUS_LIBS_STATIC"
13482 REQUIRES_PRIVATE="$REQUIRES_PRIVATE dbus-1"
13483
13484 else $as_nop
13485
13486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13487 printf "%s\n" "no" >&6; }
13488 if test "x$enable_dbus" = "xyes"; then
13489 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
13490 fi
13491
13492 fi
13493 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13494 conftest$ac_exeext conftest.$ac_ext
13495
13496 CFLAGS="$save_CFLAGS"
13497 LIBS="$save_LIBS"
13498 LDFLAGS="$save_LDFLAGS"
13499
13500
13501 else
13502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13503 printf "%s\n" "not found" >&6; }
13504
13505 if test "x$enable_dbus" = "xyes"; then
13506 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
13507 fi
13508
13509 fi
13510 else
13511 # No pkg-config, so obviously not found with pkg-config.
13512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5
13513 printf "%s\n" "pkg-config not found" >&6; }
13514
13515 if test "x$enable_dbus" = "xyes"; then
13516 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
13517 fi
13518
13519 fi
13520
13521
13522 fi
13523
13524 # Check whether --enable-rdma was given.
13525 if test ${enable_rdma+y}
13526 then :
13527 enableval=$enable_rdma;
13528 else $as_nop
13529 enable_rdma=ifavailable
13530 fi
13531
13532
13533 if test "xxx_only" = yes; then
13534 # User requested something-else-only pcap, so they don't
13535 # want RDMA support.
13536 enable_rdma=no
13537 fi
13538
13539 if test "x$enable_rdma" != "xno"; then
13540
13541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libibverbs with pkg-config" >&5
13542 printf %s "checking for libibverbs with pkg-config... " >&6; }
13543 if test -n "$PKG_CONFIG"; then
13544
13545 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13546 ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13547 ac_status=$?
13548 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13549 test $ac_status = 0; }; then
13550 #
13551 # The package was found, so try to get its C flags and
13552 # libraries.
13553 #
13554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
13555 printf "%s\n" "found" >&6; }
13556 if test ! -n "$LIBIBVERBS_CFLAGS"; then
13557 LIBIBVERBS_CFLAGS=`$PKG_CONFIG --cflags "libibverbs" 2>/dev/null`
13558 if test "x$?" != "x0"; then
13559 #
13560 # That failed - report an error.
13561 # Re-run the command, telling pkg-config to print an error
13562 # message, capture the error message, and report it.
13563 # This causes the configuration script to fail, as it means
13564 # the script is almost certainly doing something wrong.
13565 #
13566
13567 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13568 _pkg_short_errors_supported=yes
13569 else
13570 _pkg_short_errors_supported=no
13571 fi
13572 if test $_pkg_short_errors_supported = yes; then
13573 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libibverbs" 2>&1`
13574 else
13575 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libibverbs" 2>&1`
13576 fi
13577 as_fn_error $? "$PKG_CONFIG --cflags \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5
13578 fi
13579 fi
13580 if test ! -n "$LIBIBVERBS_LIBS"; then
13581 LIBIBVERBS_LIBS=`$PKG_CONFIG --libs "libibverbs" 2>/dev/null`
13582 if test "x$?" != "x0"; then
13583 #
13584 # That failed - report an error.
13585 # Re-run the command, telling pkg-config to print an error
13586 # message, capture the error message, and report it.
13587 # This causes the configuration script to fail, as it means
13588 # the script is almost certainly doing something wrong.
13589 #
13590
13591 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13592 _pkg_short_errors_supported=yes
13593 else
13594 _pkg_short_errors_supported=no
13595 fi
13596 if test $_pkg_short_errors_supported = yes; then
13597 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libibverbs" 2>&1`
13598 else
13599 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libibverbs" 2>&1`
13600 fi
13601 as_fn_error $? "$PKG_CONFIG --libs \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5
13602 fi
13603 fi
13604 if test ! -n "$LIBIBVERBS_LIBS_STATIC"; then
13605 LIBIBVERBS_LIBS_STATIC=`$PKG_CONFIG --libs --static "libibverbs" 2>/dev/null`
13606 if test "x$?" != "x0"; then
13607 #
13608 # That failed - report an error.
13609 # Re-run the command, telling pkg-config to print an error
13610 # message, capture the error message, and report it.
13611 # This causes the configuration script to fail, as it means
13612 # the script is almost certainly doing something wrong.
13613 #
13614
13615 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13616 _pkg_short_errors_supported=yes
13617 else
13618 _pkg_short_errors_supported=no
13619 fi
13620 if test $_pkg_short_errors_supported = yes; then
13621 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libibverbs" 2>&1`
13622 else
13623 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libibverbs" 2>&1`
13624 fi
13625 as_fn_error $? "$PKG_CONFIG --libs --static \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5
13626 fi
13627 fi
13628
13629 found_libibverbs=yes
13630 LIBIBVERBS_REQUIRES_PRIVATE="libibverbs"
13631
13632 else
13633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13634 printf "%s\n" "not found" >&6; }
13635 :
13636 fi
13637 else
13638 # No pkg-config, so obviously not found with pkg-config.
13639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5
13640 printf "%s\n" "pkg-config not found" >&6; }
13641 :
13642 fi
13643
13644
13645 if test "x$found_libibverbs" != "xyes"; then
13646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
13647 printf %s "checking for ibv_get_device_list in -libverbs... " >&6; }
13648 if test ${ac_cv_lib_ibverbs_ibv_get_device_list+y}
13649 then :
13650 printf %s "(cached) " >&6
13651 else $as_nop
13652 ac_check_lib_save_LIBS=$LIBS
13653 LIBS="-libverbs $LIBS"
13654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13655 /* end confdefs.h. */
13656
13657 /* Override any GCC internal prototype to avoid an error.
13658 Use char because int might match the return type of a GCC
13659 builtin and then its argument prototype would still apply. */
13660 char ibv_get_device_list ();
13661 int
13662 main (void)
13663 {
13664 return ibv_get_device_list ();
13665 ;
13666 return 0;
13667 }
13668 _ACEOF
13669 if ac_fn_c_try_link "$LINENO"
13670 then :
13671 ac_cv_lib_ibverbs_ibv_get_device_list=yes
13672 else $as_nop
13673 ac_cv_lib_ibverbs_ibv_get_device_list=no
13674 fi
13675 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13676 conftest$ac_exeext conftest.$ac_ext
13677 LIBS=$ac_check_lib_save_LIBS
13678 fi
13679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
13680 printf "%s\n" "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
13681 if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes
13682 then :
13683
13684 found_libibverbs=yes
13685 LIBIBVERBS_CFLAGS=""
13686 LIBIBVERBS_LIBS="-libverbs"
13687 # XXX - at least on Ubuntu 20.04, there are many more
13688 # libraries needed; is there any platform where
13689 # libibverbs is available but where pkg-config isn't
13690 # available or libibverbs doesn't use it? If not,
13691 # we should only use pkg-config for it.
13692 LIBIBVERBS_LIBS_STATIC="-libverbs"
13693 LIBIBVERBS_LIBS_PRIVATE="-libverbs"
13694
13695
13696 fi
13697
13698 fi
13699
13700 if test "x$found_libibverbs" = "xyes"; then
13701
13702 save_CFLAGS="$CFLAGS"
13703 save_LIBS="$LIBS"
13704 save_LDFLAGS="$LDFLAGS"
13705
13706 CFLAGS="$CFLAGS $LIBIBVERBS_CFLAGS"
13707 LIBS="$LIBS $LIBIBVERBS_LIBS"
13708 ac_fn_c_check_header_compile "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
13709 if test "x$ac_cv_header_infiniband_verbs_h" = xyes
13710 then :
13711
13712 #
13713 # ibv_create_flow may be defined as a static inline
13714 # function in infiniband/verbs.h, so we can't
13715 # use AC_CHECK_LIB.
13716 #
13717 # Too bad autoconf has no AC_SYMBOL_EXISTS()
13718 # macro that works like CMake's check_symbol_exists()
13719 # function, to check do a compile check like
13720 # this (they do a clever trick to avoid having
13721 # to know the function's signature).
13722 #
13723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
13724 printf %s "checking whether libibverbs defines ibv_create_flow... " >&6; }
13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13726 /* end confdefs.h. */
13727
13728 #include <infiniband/verbs.h>
13729
13730 int
13731 main (void)
13732 {
13733
13734 (void) ibv_create_flow((struct ibv_qp *) NULL,
13735 (struct ibv_flow_attr *) NULL);
13736
13737 ;
13738 return 0;
13739 }
13740 _ACEOF
13741 if ac_fn_c_try_link "$LINENO"
13742 then :
13743
13744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13745 printf "%s\n" "yes" >&6; }
13746 found_usable_libibverbs=yes
13747
13748 else $as_nop
13749
13750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13751 printf "%s\n" "no" >&6; }
13752
13753
13754 fi
13755 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13756 conftest$ac_exeext conftest.$ac_ext
13757
13758 fi
13759
13760
13761 CFLAGS="$save_CFLAGS"
13762 LIBS="$save_LIBS"
13763 LDFLAGS="$save_LDFLAGS"
13764
13765 fi
13766
13767 if test "x$found_usable_libibverbs" = "xyes"
13768 then
13769
13770 printf "%s\n" "#define PCAP_SUPPORT_RDMASNIFF 1" >>confdefs.h
13771
13772 MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
13773 CFLAGS="$LIBIBVERBS_CFLAGS $CFLAGS"
13774 ADDITIONAL_LIBS="$LIBIBVERBS_LIBS $ADDITIONAL_LIBS"
13775 ADDITIONAL_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
13776 LIBS_PRIVATE="$LIBIBVERBS_LIBS_PRIVATE $LIBS_PRIVATE"
13777 REQUIRES_PRIVATE="$REQUIRES_PRIVATE $LIBIBVERBS_REQUIRES_PRIVATE"
13778 fi
13779
13780 fi
13781
13782 #
13783 # If this is a platform where we need to have the .pc file and
13784 # pcap-config script supply an rpath option to specify the directory
13785 # in which the libpcap shared library is installed, and the install
13786 # prefix /usr (meaning we're not installing a system library), provide
13787 # the rpath option.
13788 #
13789 # (We must check $prefix, as $libdir isn't necessarily /usr/lib in this
13790 # case - for example, Linux distributions for 64-bit platforms that
13791 # also provide support for binaries for a 32-bit version of the
13792 # platform may put the 64-bit libraries, the 32-bit libraries, or both
13793 # in directories other than /usr/lib.)
13794 #
13795 # In AIX, do we have to do this?
13796 #
13797 # In Darwin-based OSes, the full paths of the shared libraries with
13798 # which the program was linked are stored in the executable, so we don't
13799 # need to provide an rpath option.
13800 #
13801 # With the HP-UX linker, directories specified with -L are, by default,
13802 # added to the run-time search path, so we don't need to supply them.
13803 #
13804 # For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C compiler
13805 # for Alpha, but isn't documented as working with GCC, and no GCC-
13806 # compatible option is documented as working with the DEC compiler.
13807 # If anybody needs this on Tru64/Alpha, they're welcome to figure out a
13808 # way to make it work.
13809 #
13810 # This must *not* depend on the compiler, as, on platforms where there's
13811 # a GCC-compatible compiler and a vendor compiler, we need to work with
13812 # both.
13813 #
13814 if test "$prefix" != "/usr"; then
13815 case "$host_os" in
13816
13817 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|haiku*|midipix*|gnu*)
13818 #
13819 # Platforms where the "native" C compiler is GCC or
13820 # accepts compatible command-line arguments, and the
13821 # "native" linker is the GNU linker or accepts
13822 # compatible command-line arguments.
13823 #
13824 RPATH="-Wl,-rpath,\${libdir}"
13825 ;;
13826
13827 solaris*)
13828 #
13829 # Sun/Oracle's linker, the GNU linker, and
13830 # GNU-compatible linkers all support -R.
13831 #
13832 RPATH="-Wl,-R,\${libdir}"
13833 ;;
13834 esac
13835 fi
13836
13837
13838 # Find a good install program. We prefer a C program (faster),
13839 # so one script is as good as another. But avoid the broken or
13840 # incompatible versions:
13841 # SysV /etc/install, /usr/sbin/install
13842 # SunOS /usr/etc/install
13843 # IRIX /sbin/install
13844 # AIX /bin/install
13845 # AmigaOS /C/install, which installs bootblocks on floppy discs
13846 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
13847 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
13848 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
13849 # OS/2's system install, which has a completely different semantic
13850 # ./install, which can be erroneously created by make from ./install.sh.
13851 # Reject install programs that cannot install multiple files.
13852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
13853 printf %s "checking for a BSD-compatible install... " >&6; }
13854 if test -z "$INSTALL"; then
13855 if test ${ac_cv_path_install+y}
13856 then :
13857 printf %s "(cached) " >&6
13858 else $as_nop
13859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13860 for as_dir in $PATH
13861 do
13862 IFS=$as_save_IFS
13863 case $as_dir in #(((
13864 '') as_dir=./ ;;
13865 */) ;;
13866 *) as_dir=$as_dir/ ;;
13867 esac
13868 # Account for fact that we put trailing slashes in our PATH walk.
13869 case $as_dir in #((
13870 ./ | /[cC]/* | \
13871 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
13872 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
13873 /usr/ucb/* ) ;;
13874 *)
13875 # OSF1 and SCO ODT 3.0 have their own names for install.
13876 # Don't use installbsd from OSF since it installs stuff as root
13877 # by default.
13878 for ac_prog in ginstall scoinst install; do
13879 for ac_exec_ext in '' $ac_executable_extensions; do
13880 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
13881 if test $ac_prog = install &&
13882 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
13883 # AIX install. It has an incompatible calling convention.
13884 :
13885 elif test $ac_prog = install &&
13886 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
13887 # program-specific install script used by HP pwplus--don't use.
13888 :
13889 else
13890 rm -rf conftest.one conftest.two conftest.dir
13891 echo one > conftest.one
13892 echo two > conftest.two
13893 mkdir conftest.dir
13894 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
13895 test -s conftest.one && test -s conftest.two &&
13896 test -s conftest.dir/conftest.one &&
13897 test -s conftest.dir/conftest.two
13898 then
13899 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
13900 break 3
13901 fi
13902 fi
13903 fi
13904 done
13905 done
13906 ;;
13907 esac
13908
13909 done
13910 IFS=$as_save_IFS
13911
13912 rm -rf conftest.one conftest.two conftest.dir
13913
13914 fi
13915 if test ${ac_cv_path_install+y}; then
13916 INSTALL=$ac_cv_path_install
13917 else
13918 # As a last resort, use the slow shell script. Don't cache a
13919 # value for INSTALL within a source directory, because that will
13920 # break other packages using the cache if that directory is
13921 # removed, or if the value is a relative name.
13922 INSTALL=$ac_install_sh
13923 fi
13924 fi
13925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
13926 printf "%s\n" "$INSTALL" >&6; }
13927
13928 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
13929 # It thinks the first close brace ends the variable substitution.
13930 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
13931
13932 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
13933
13934 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
13935
13936
13937 ac_config_headers="$ac_config_headers config.h"
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955 #
13956 # We're done with configuration operations; add ADDITIONAL_LIBS and
13957 # ADDITIONAL_LIBS_STATIC to LIBS and LIBS_STATIC, respectively.
13958 #
13959 LIBS="$ADDITIONAL_LIBS $LIBS"
13960 LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $LIBS_STATIC"
13961
13962 ac_config_commands="$ac_config_commands default-1"
13963
13964 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"
13965
13966 cat >confcache <<\_ACEOF
13967 # This file is a shell script that caches the results of configure
13968 # tests run on this system so they can be shared between configure
13969 # scripts and configure runs, see configure's option --config-cache.
13970 # It is not useful on other systems. If it contains results you don't
13971 # want to keep, you may remove or edit it.
13972 #
13973 # config.status only pays attention to the cache file if you give it
13974 # the --recheck option to rerun configure.
13975 #
13976 # `ac_cv_env_foo' variables (set or unset) will be overridden when
13977 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13978 # following values.
13979
13980 _ACEOF
13981
13982 # The following way of writing the cache mishandles newlines in values,
13983 # but we know of no workaround that is simple, portable, and efficient.
13984 # So, we kill variables containing newlines.
13985 # Ultrix sh set writes to stderr and can't be redirected directly,
13986 # and sets the high bit in the cache file unless we assign to the vars.
13987 (
13988 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13989 eval ac_val=\$$ac_var
13990 case $ac_val in #(
13991 *${as_nl}*)
13992 case $ac_var in #(
13993 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13994 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13995 esac
13996 case $ac_var in #(
13997 _ | IFS | as_nl) ;; #(
13998 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13999 *) { eval $ac_var=; unset $ac_var;} ;;
14000 esac ;;
14001 esac
14002 done
14003
14004 (set) 2>&1 |
14005 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14006 *${as_nl}ac_space=\ *)
14007 # `set' does not quote correctly, so add quotes: double-quote
14008 # substitution turns \\\\ into \\, and sed turns \\ into \.
14009 sed -n \
14010 "s/'/'\\\\''/g;
14011 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14012 ;; #(
14013 *)
14014 # `set' quotes correctly as required by POSIX, so do not add quotes.
14015 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14016 ;;
14017 esac |
14018 sort
14019 ) |
14020 sed '
14021 /^ac_cv_env_/b end
14022 t clear
14023 :clear
14024 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
14025 t end
14026 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14027 :end' >>confcache
14028 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14029 if test -w "$cache_file"; then
14030 if test "x$cache_file" != "x/dev/null"; then
14031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14032 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
14033 if test ! -f "$cache_file" || test -h "$cache_file"; then
14034 cat confcache >"$cache_file"
14035 else
14036 case $cache_file in #(
14037 */* | ?:*)
14038 mv -f confcache "$cache_file"$$ &&
14039 mv -f "$cache_file"$$ "$cache_file" ;; #(
14040 *)
14041 mv -f confcache "$cache_file" ;;
14042 esac
14043 fi
14044 fi
14045 else
14046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14047 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
14048 fi
14049 fi
14050 rm -f confcache
14051
14052 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14053 # Let make expand exec_prefix.
14054 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14055
14056 DEFS=-DHAVE_CONFIG_H
14057
14058 ac_libobjs=
14059 ac_ltlibobjs=
14060 U=
14061 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14062 # 1. Remove the extension, and $U if already installed.
14063 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14064 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
14065 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14066 # will be set to the directory where LIBOBJS objects are built.
14067 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14068 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14069 done
14070 LIBOBJS=$ac_libobjs
14071
14072 LTLIBOBJS=$ac_ltlibobjs
14073
14074
14075
14076 : "${CONFIG_STATUS=./config.status}"
14077 ac_write_fail=0
14078 ac_clean_files_save=$ac_clean_files
14079 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14081 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
14082 as_write_fail=0
14083 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14084 #! $SHELL
14085 # Generated by $as_me.
14086 # Run this file to recreate the current configuration.
14087 # Compiler output produced by configure, useful for debugging
14088 # configure, is in config.log if it exists.
14089
14090 debug=false
14091 ac_cs_recheck=false
14092 ac_cs_silent=false
14093
14094 SHELL=\${CONFIG_SHELL-$SHELL}
14095 export SHELL
14096 _ASEOF
14097 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14098 ## -------------------- ##
14099 ## M4sh Initialization. ##
14100 ## -------------------- ##
14101
14102 # Be more Bourne compatible
14103 DUALCASE=1; export DUALCASE # for MKS sh
14104 as_nop=:
14105 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
14106 then :
14107 emulate sh
14108 NULLCMD=:
14109 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14110 # is contrary to our usage. Disable this feature.
14111 alias -g '${1+"$@"}'='"$@"'
14112 setopt NO_GLOB_SUBST
14113 else $as_nop
14114 case `(set -o) 2>/dev/null` in #(
14115 *posix*) :
14116 set -o posix ;; #(
14117 *) :
14118 ;;
14119 esac
14120 fi
14121
14122
14123
14124 # Reset variables that may have inherited troublesome values from
14125 # the environment.
14126
14127 # IFS needs to be set, to space, tab, and newline, in precisely that order.
14128 # (If _AS_PATH_WALK were called with IFS unset, it would have the
14129 # side effect of setting IFS to empty, thus disabling word splitting.)
14130 # Quoting is to prevent editors from complaining about space-tab.
14131 as_nl='
14132 '
14133 export as_nl
14134 IFS=" "" $as_nl"
14135
14136 PS1='$ '
14137 PS2='> '
14138 PS4='+ '
14139
14140 # Ensure predictable behavior from utilities with locale-dependent output.
14141 LC_ALL=C
14142 export LC_ALL
14143 LANGUAGE=C
14144 export LANGUAGE
14145
14146 # We cannot yet rely on "unset" to work, but we need these variables
14147 # to be unset--not just set to an empty or harmless value--now, to
14148 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
14149 # also avoids known problems related to "unset" and subshell syntax
14150 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
14151 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
14152 do eval test \${$as_var+y} \
14153 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14154 done
14155
14156 # Ensure that fds 0, 1, and 2 are open.
14157 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
14158 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
14159 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
14160
14161 # The user is always right.
14162 if ${PATH_SEPARATOR+false} :; then
14163 PATH_SEPARATOR=:
14164 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14165 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14166 PATH_SEPARATOR=';'
14167 }
14168 fi
14169
14170
14171 # Find who we are. Look in the path if we contain no directory separator.
14172 as_myself=
14173 case $0 in #((
14174 *[\\/]* ) as_myself=$0 ;;
14175 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14176 for as_dir in $PATH
14177 do
14178 IFS=$as_save_IFS
14179 case $as_dir in #(((
14180 '') as_dir=./ ;;
14181 */) ;;
14182 *) as_dir=$as_dir/ ;;
14183 esac
14184 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
14185 done
14186 IFS=$as_save_IFS
14187
14188 ;;
14189 esac
14190 # We did not find ourselves, most probably we were run as `sh COMMAND'
14191 # in which case we are not to be found in the path.
14192 if test "x$as_myself" = x; then
14193 as_myself=$0
14194 fi
14195 if test ! -f "$as_myself"; then
14196 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14197 exit 1
14198 fi
14199
14200
14201
14202 # as_fn_error STATUS ERROR [LINENO LOG_FD]
14203 # ----------------------------------------
14204 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14205 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14206 # script with STATUS, using 1 if that was 0.
14207 as_fn_error ()
14208 {
14209 as_status=$1; test $as_status -eq 0 && as_status=1
14210 if test "$4"; then
14211 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14212 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14213 fi
14214 printf "%s\n" "$as_me: error: $2" >&2
14215 as_fn_exit $as_status
14216 } # as_fn_error
14217
14218
14219
14220 # as_fn_set_status STATUS
14221 # -----------------------
14222 # Set $? to STATUS, without forking.
14223 as_fn_set_status ()
14224 {
14225 return $1
14226 } # as_fn_set_status
14227
14228 # as_fn_exit STATUS
14229 # -----------------
14230 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14231 as_fn_exit ()
14232 {
14233 set +e
14234 as_fn_set_status $1
14235 exit $1
14236 } # as_fn_exit
14237
14238 # as_fn_unset VAR
14239 # ---------------
14240 # Portably unset VAR.
14241 as_fn_unset ()
14242 {
14243 { eval $1=; unset $1;}
14244 }
14245 as_unset=as_fn_unset
14246
14247 # as_fn_append VAR VALUE
14248 # ----------------------
14249 # Append the text in VALUE to the end of the definition contained in VAR. Take
14250 # advantage of any shell optimizations that allow amortized linear growth over
14251 # repeated appends, instead of the typical quadratic growth present in naive
14252 # implementations.
14253 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
14254 then :
14255 eval 'as_fn_append ()
14256 {
14257 eval $1+=\$2
14258 }'
14259 else $as_nop
14260 as_fn_append ()
14261 {
14262 eval $1=\$$1\$2
14263 }
14264 fi # as_fn_append
14265
14266 # as_fn_arith ARG...
14267 # ------------------
14268 # Perform arithmetic evaluation on the ARGs, and store the result in the
14269 # global $as_val. Take advantage of shells that can avoid forks. The arguments
14270 # must be portable across $(()) and expr.
14271 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
14272 then :
14273 eval 'as_fn_arith ()
14274 {
14275 as_val=$(( $* ))
14276 }'
14277 else $as_nop
14278 as_fn_arith ()
14279 {
14280 as_val=`expr "$@" || test $? -eq 1`
14281 }
14282 fi # as_fn_arith
14283
14284
14285 if expr a : '\(a\)' >/dev/null 2>&1 &&
14286 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14287 as_expr=expr
14288 else
14289 as_expr=false
14290 fi
14291
14292 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14293 as_basename=basename
14294 else
14295 as_basename=false
14296 fi
14297
14298 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14299 as_dirname=dirname
14300 else
14301 as_dirname=false
14302 fi
14303
14304 as_me=`$as_basename -- "$0" ||
14305 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14306 X"$0" : 'X\(//\)$' \| \
14307 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14308 printf "%s\n" X/"$0" |
14309 sed '/^.*\/\([^/][^/]*\)\/*$/{
14310 s//\1/
14311 q
14312 }
14313 /^X\/\(\/\/\)$/{
14314 s//\1/
14315 q
14316 }
14317 /^X\/\(\/\).*/{
14318 s//\1/
14319 q
14320 }
14321 s/.*/./; q'`
14322
14323 # Avoid depending upon Character Ranges.
14324 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14325 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14326 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14327 as_cr_digits='0123456789'
14328 as_cr_alnum=$as_cr_Letters$as_cr_digits
14329
14330
14331 # Determine whether it's possible to make 'echo' print without a newline.
14332 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
14333 # for compatibility with existing Makefiles.
14334 ECHO_C= ECHO_N= ECHO_T=
14335 case `echo -n x` in #(((((
14336 -n*)
14337 case `echo 'xy\c'` in
14338 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14339 xy) ECHO_C='\c';;
14340 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14341 ECHO_T=' ';;
14342 esac;;
14343 *)
14344 ECHO_N='-n';;
14345 esac
14346
14347 # For backward compatibility with old third-party macros, we provide
14348 # the shell variables $as_echo and $as_echo_n. New code should use
14349 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
14350 as_echo='printf %s\n'
14351 as_echo_n='printf %s'
14352
14353 rm -f conf$$ conf$$.exe conf$$.file
14354 if test -d conf$$.dir; then
14355 rm -f conf$$.dir/conf$$.file
14356 else
14357 rm -f conf$$.dir
14358 mkdir conf$$.dir 2>/dev/null
14359 fi
14360 if (echo >conf$$.file) 2>/dev/null; then
14361 if ln -s conf$$.file conf$$ 2>/dev/null; then
14362 as_ln_s='ln -s'
14363 # ... but there are two gotchas:
14364 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14365 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14366 # In both cases, we have to default to `cp -pR'.
14367 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14368 as_ln_s='cp -pR'
14369 elif ln conf$$.file conf$$ 2>/dev/null; then
14370 as_ln_s=ln
14371 else
14372 as_ln_s='cp -pR'
14373 fi
14374 else
14375 as_ln_s='cp -pR'
14376 fi
14377 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14378 rmdir conf$$.dir 2>/dev/null
14379
14380
14381 # as_fn_mkdir_p
14382 # -------------
14383 # Create "$as_dir" as a directory, including parents if necessary.
14384 as_fn_mkdir_p ()
14385 {
14386
14387 case $as_dir in #(
14388 -*) as_dir=./$as_dir;;
14389 esac
14390 test -d "$as_dir" || eval $as_mkdir_p || {
14391 as_dirs=
14392 while :; do
14393 case $as_dir in #(
14394 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14395 *) as_qdir=$as_dir;;
14396 esac
14397 as_dirs="'$as_qdir' $as_dirs"
14398 as_dir=`$as_dirname -- "$as_dir" ||
14399 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14400 X"$as_dir" : 'X\(//\)[^/]' \| \
14401 X"$as_dir" : 'X\(//\)$' \| \
14402 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14403 printf "%s\n" X"$as_dir" |
14404 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14405 s//\1/
14406 q
14407 }
14408 /^X\(\/\/\)[^/].*/{
14409 s//\1/
14410 q
14411 }
14412 /^X\(\/\/\)$/{
14413 s//\1/
14414 q
14415 }
14416 /^X\(\/\).*/{
14417 s//\1/
14418 q
14419 }
14420 s/.*/./; q'`
14421 test -d "$as_dir" && break
14422 done
14423 test -z "$as_dirs" || eval "mkdir $as_dirs"
14424 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14425
14426
14427 } # as_fn_mkdir_p
14428 if mkdir -p . 2>/dev/null; then
14429 as_mkdir_p='mkdir -p "$as_dir"'
14430 else
14431 test -d ./-p && rmdir ./-p
14432 as_mkdir_p=false
14433 fi
14434
14435
14436 # as_fn_executable_p FILE
14437 # -----------------------
14438 # Test if FILE is an executable regular file.
14439 as_fn_executable_p ()
14440 {
14441 test -f "$1" && test -x "$1"
14442 } # as_fn_executable_p
14443 as_test_x='test -x'
14444 as_executable_p=as_fn_executable_p
14445
14446 # Sed expression to map a string onto a valid CPP name.
14447 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14448
14449 # Sed expression to map a string onto a valid variable name.
14450 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14451
14452
14453 exec 6>&1
14454 ## ----------------------------------- ##
14455 ## Main body of $CONFIG_STATUS script. ##
14456 ## ----------------------------------- ##
14457 _ASEOF
14458 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14459
14460 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14461 # Save the log message, to keep $0 and so on meaningful, and to
14462 # report actual input values of CONFIG_FILES etc. instead of their
14463 # values after options handling.
14464 ac_log="
14465 This file was extended by pcap $as_me 1.10.6, which was
14466 generated by GNU Autoconf 2.71. Invocation command line was
14467
14468 CONFIG_FILES = $CONFIG_FILES
14469 CONFIG_HEADERS = $CONFIG_HEADERS
14470 CONFIG_LINKS = $CONFIG_LINKS
14471 CONFIG_COMMANDS = $CONFIG_COMMANDS
14472 $ $0 $@
14473
14474 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14475 "
14476
14477 _ACEOF
14478
14479 case $ac_config_files in *"
14480 "*) set x $ac_config_files; shift; ac_config_files=$*;;
14481 esac
14482
14483 case $ac_config_headers in *"
14484 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14485 esac
14486
14487
14488 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14489 # Files that config.status was made for.
14490 config_files="$ac_config_files"
14491 config_headers="$ac_config_headers"
14492 config_commands="$ac_config_commands"
14493
14494 _ACEOF
14495
14496 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14497 ac_cs_usage="\
14498 \`$as_me' instantiates files and other configuration actions
14499 from templates according to the current configuration. Unless the files
14500 and actions are specified as TAGs, all are instantiated by default.
14501
14502 Usage: $0 [OPTION]... [TAG]...
14503
14504 -h, --help print this help, then exit
14505 -V, --version print version number and configuration settings, then exit
14506 --config print configuration, then exit
14507 -q, --quiet, --silent
14508 do not print progress messages
14509 -d, --debug don't remove temporary files
14510 --recheck update $as_me by reconfiguring in the same conditions
14511 --file=FILE[:TEMPLATE]
14512 instantiate the configuration file FILE
14513 --header=FILE[:TEMPLATE]
14514 instantiate the configuration header FILE
14515
14516 Configuration files:
14517 $config_files
14518
14519 Configuration headers:
14520 $config_headers
14521
14522 Configuration commands:
14523 $config_commands
14524
14525 Report bugs to the package provider."
14526
14527 _ACEOF
14528 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
14529 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
14530 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14531 ac_cs_config='$ac_cs_config_escaped'
14532 ac_cs_version="\\
14533 pcap config.status 1.10.6
14534 configured by $0, generated by GNU Autoconf 2.71,
14535 with options \\"\$ac_cs_config\\"
14536
14537 Copyright (C) 2021 Free Software Foundation, Inc.
14538 This config.status script is free software; the Free Software Foundation
14539 gives unlimited permission to copy, distribute and modify it."
14540
14541 ac_pwd='$ac_pwd'
14542 srcdir='$srcdir'
14543 INSTALL='$INSTALL'
14544 test -n "\$AWK" || AWK=awk
14545 _ACEOF
14546
14547 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14548 # The default lists apply if the user does not specify any file.
14549 ac_need_defaults=:
14550 while test $# != 0
14551 do
14552 case $1 in
14553 --*=?*)
14554 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14555 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14556 ac_shift=:
14557 ;;
14558 --*=)
14559 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14560 ac_optarg=
14561 ac_shift=:
14562 ;;
14563 *)
14564 ac_option=$1
14565 ac_optarg=$2
14566 ac_shift=shift
14567 ;;
14568 esac
14569
14570 case $ac_option in
14571 # Handling of the options.
14572 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14573 ac_cs_recheck=: ;;
14574 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14575 printf "%s\n" "$ac_cs_version"; exit ;;
14576 --config | --confi | --conf | --con | --co | --c )
14577 printf "%s\n" "$ac_cs_config"; exit ;;
14578 --debug | --debu | --deb | --de | --d | -d )
14579 debug=: ;;
14580 --file | --fil | --fi | --f )
14581 $ac_shift
14582 case $ac_optarg in
14583 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14584 '') as_fn_error $? "missing file argument" ;;
14585 esac
14586 as_fn_append CONFIG_FILES " '$ac_optarg'"
14587 ac_need_defaults=false;;
14588 --header | --heade | --head | --hea )
14589 $ac_shift
14590 case $ac_optarg in
14591 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14592 esac
14593 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14594 ac_need_defaults=false;;
14595 --he | --h)
14596 # Conflict between --help and --header
14597 as_fn_error $? "ambiguous option: \`$1'
14598 Try \`$0 --help' for more information.";;
14599 --help | --hel | -h )
14600 printf "%s\n" "$ac_cs_usage"; exit ;;
14601 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14602 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14603 ac_cs_silent=: ;;
14604
14605 # This is an error.
14606 -*) as_fn_error $? "unrecognized option: \`$1'
14607 Try \`$0 --help' for more information." ;;
14608
14609 *) as_fn_append ac_config_targets " $1"
14610 ac_need_defaults=false ;;
14611
14612 esac
14613 shift
14614 done
14615
14616 ac_configure_extra_args=
14617
14618 if $ac_cs_silent; then
14619 exec 6>/dev/null
14620 ac_configure_extra_args="$ac_configure_extra_args --silent"
14621 fi
14622
14623 _ACEOF
14624 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14625 if \$ac_cs_recheck; then
14626 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14627 shift
14628 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
14629 CONFIG_SHELL='$SHELL'
14630 export CONFIG_SHELL
14631 exec "\$@"
14632 fi
14633
14634 _ACEOF
14635 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14636 exec 5>>config.log
14637 {
14638 echo
14639 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14640 ## Running $as_me. ##
14641 _ASBOX
14642 printf "%s\n" "$ac_log"
14643 } >&5
14644
14645 _ACEOF
14646 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14647 #
14648 # INIT-COMMANDS
14649 #
14650
14651
14652 _ACEOF
14653
14654 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14655
14656 # Handling of arguments.
14657 for ac_config_target in $ac_config_targets
14658 do
14659 case $ac_config_target in
14660 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
14661 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
14662 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14663 "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;;
14664 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
14665 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
14666 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
14667 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
14668 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
14669 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
14670 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
14671 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
14672 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
14673 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
14674 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
14675 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
14676 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
14677 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
14678 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
14679 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
14680 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
14681 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
14682 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
14683 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
14684
14685 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
14686 esac
14687 done
14688
14689
14690 # If the user did not use the arguments to specify the items to instantiate,
14691 # then the envvar interface is used. Set only those that are not.
14692 # We use the long form for the default assignment because of an extremely
14693 # bizarre bug on SunOS 4.1.3.
14694 if $ac_need_defaults; then
14695 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
14696 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
14697 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
14698 fi
14699
14700 # Have a temporary directory for convenience. Make it in the build tree
14701 # simply because there is no reason against having it here, and in addition,
14702 # creating and moving files from /tmp can sometimes cause problems.
14703 # Hook for its removal unless debugging.
14704 # Note that there is a small window in which the directory will not be cleaned:
14705 # after its creation but before its name has been assigned to `$tmp'.
14706 $debug ||
14707 {
14708 tmp= ac_tmp=
14709 trap 'exit_status=$?
14710 : "${ac_tmp:=$tmp}"
14711 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
14712 ' 0
14713 trap 'as_fn_exit 1' 1 2 13 15
14714 }
14715 # Create a (secure) tmp directory for tmp files.
14716
14717 {
14718 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14719 test -d "$tmp"
14720 } ||
14721 {
14722 tmp=./conf$$-$RANDOM
14723 (umask 077 && mkdir "$tmp")
14724 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14725 ac_tmp=$tmp
14726
14727 # Set up the scripts for CONFIG_FILES section.
14728 # No need to generate them if there are no CONFIG_FILES.
14729 # This happens for instance with `./config.status config.h'.
14730 if test -n "$CONFIG_FILES"; then
14731
14732
14733 ac_cr=`echo X | tr X '\015'`
14734 # On cygwin, bash can eat \r inside `` if the user requested igncr.
14735 # But we know of no other shell where ac_cr would be empty at this
14736 # point, so we can use a bashism as a fallback.
14737 if test "x$ac_cr" = x; then
14738 eval ac_cr=\$\'\\r\'
14739 fi
14740 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14741 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14742 ac_cs_awk_cr='\\r'
14743 else
14744 ac_cs_awk_cr=$ac_cr
14745 fi
14746
14747 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
14748 _ACEOF
14749
14750
14751 {
14752 echo "cat >conf$$subs.awk <<_ACEOF" &&
14753 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14754 echo "_ACEOF"
14755 } >conf$$subs.sh ||
14756 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14757 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
14758 ac_delim='%!_!# '
14759 for ac_last_try in false false false false false :; do
14760 . ./conf$$subs.sh ||
14761 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14762
14763 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14764 if test $ac_delim_n = $ac_delim_num; then
14765 break
14766 elif $ac_last_try; then
14767 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14768 else
14769 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14770 fi
14771 done
14772 rm -f conf$$subs.sh
14773
14774 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14775 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
14776 _ACEOF
14777 sed -n '
14778 h
14779 s/^/S["/; s/!.*/"]=/
14780 p
14781 g
14782 s/^[^!]*!//
14783 :repl
14784 t repl
14785 s/'"$ac_delim"'$//
14786 t delim
14787 :nl
14788 h
14789 s/\(.\{148\}\)..*/\1/
14790 t more1
14791 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14792 p
14793 n
14794 b repl
14795 :more1
14796 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14797 p
14798 g
14799 s/.\{148\}//
14800 t nl
14801 :delim
14802 h
14803 s/\(.\{148\}\)..*/\1/
14804 t more2
14805 s/["\\]/\\&/g; s/^/"/; s/$/"/
14806 p
14807 b
14808 :more2
14809 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14810 p
14811 g
14812 s/.\{148\}//
14813 t delim
14814 ' <conf$$subs.awk | sed '
14815 /^[^""]/{
14816 N
14817 s/\n//
14818 }
14819 ' >>$CONFIG_STATUS || ac_write_fail=1
14820 rm -f conf$$subs.awk
14821 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14822 _ACAWK
14823 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
14824 for (key in S) S_is_set[key] = 1
14825 FS = ""
14826
14827 }
14828 {
14829 line = $ 0
14830 nfields = split(line, field, "@")
14831 substed = 0
14832 len = length(field[1])
14833 for (i = 2; i < nfields; i++) {
14834 key = field[i]
14835 keylen = length(key)
14836 if (S_is_set[key]) {
14837 value = S[key]
14838 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14839 len += length(value) + length(field[++i])
14840 substed = 1
14841 } else
14842 len += 1 + keylen
14843 }
14844
14845 print line
14846 }
14847
14848 _ACAWK
14849 _ACEOF
14850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14851 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14852 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14853 else
14854 cat
14855 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14856 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14857 _ACEOF
14858
14859 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14860 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14861 # trailing colons and then remove the whole line if VPATH becomes empty
14862 # (actually we leave an empty line to preserve line numbers).
14863 if test "x$srcdir" = x.; then
14864 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14865 h
14866 s///
14867 s/^/:/
14868 s/[ ]*$/:/
14869 s/:\$(srcdir):/:/g
14870 s/:\${srcdir}:/:/g
14871 s/:@srcdir@:/:/g
14872 s/^:*//
14873 s/:*$//
14874 x
14875 s/\(=[ ]*\).*/\1/
14876 G
14877 s/\n//
14878 s/^[^=]*=[ ]*$//
14879 }'
14880 fi
14881
14882 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14883 fi # test -n "$CONFIG_FILES"
14884
14885 # Set up the scripts for CONFIG_HEADERS section.
14886 # No need to generate them if there are no CONFIG_HEADERS.
14887 # This happens for instance with `./config.status Makefile'.
14888 if test -n "$CONFIG_HEADERS"; then
14889 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
14890 BEGIN {
14891 _ACEOF
14892
14893 # Transform confdefs.h into an awk script `defines.awk', embedded as
14894 # here-document in config.status, that substitutes the proper values into
14895 # config.h.in to produce config.h.
14896
14897 # Create a delimiter string that does not exist in confdefs.h, to ease
14898 # handling of long lines.
14899 ac_delim='%!_!# '
14900 for ac_last_try in false false :; do
14901 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14902 if test -z "$ac_tt"; then
14903 break
14904 elif $ac_last_try; then
14905 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14906 else
14907 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14908 fi
14909 done
14910
14911 # For the awk script, D is an array of macro values keyed by name,
14912 # likewise P contains macro parameters if any. Preserve backslash
14913 # newline sequences.
14914
14915 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14916 sed -n '
14917 s/.\{148\}/&'"$ac_delim"'/g
14918 t rset
14919 :rset
14920 s/^[ ]*#[ ]*define[ ][ ]*/ /
14921 t def
14922 d
14923 :def
14924 s/\\$//
14925 t bsnl
14926 s/["\\]/\\&/g
14927 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14928 D["\1"]=" \3"/p
14929 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14930 d
14931 :bsnl
14932 s/["\\]/\\&/g
14933 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14934 D["\1"]=" \3\\\\\\n"\\/p
14935 t cont
14936 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14937 t cont
14938 d
14939 :cont
14940 n
14941 s/.\{148\}/&'"$ac_delim"'/g
14942 t clear
14943 :clear
14944 s/\\$//
14945 t bsnlc
14946 s/["\\]/\\&/g; s/^/"/; s/$/"/p
14947 d
14948 :bsnlc
14949 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14950 b cont
14951 ' <confdefs.h | sed '
14952 s/'"$ac_delim"'/"\\\
14953 "/g' >>$CONFIG_STATUS || ac_write_fail=1
14954
14955 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14956 for (key in D) D_is_set[key] = 1
14957 FS = ""
14958 }
14959 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14960 line = \$ 0
14961 split(line, arg, " ")
14962 if (arg[1] == "#") {
14963 defundef = arg[2]
14964 mac1 = arg[3]
14965 } else {
14966 defundef = substr(arg[1], 2)
14967 mac1 = arg[2]
14968 }
14969 split(mac1, mac2, "(") #)
14970 macro = mac2[1]
14971 prefix = substr(line, 1, index(line, defundef) - 1)
14972 if (D_is_set[macro]) {
14973 # Preserve the white space surrounding the "#".
14974 print prefix "define", macro P[macro] D[macro]
14975 next
14976 } else {
14977 # Replace #undef with comments. This is necessary, for example,
14978 # in the case of _POSIX_SOURCE, which is predefined and required
14979 # on some systems where configure will not decide to define it.
14980 if (defundef == "undef") {
14981 print "/*", prefix defundef, macro, "*/"
14982 next
14983 }
14984 }
14985 }
14986 { print }
14987 _ACAWK
14988 _ACEOF
14989 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14990 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14991 fi # test -n "$CONFIG_HEADERS"
14992
14993
14994 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
14995 shift
14996 for ac_tag
14997 do
14998 case $ac_tag in
14999 :[FHLC]) ac_mode=$ac_tag; continue;;
15000 esac
15001 case $ac_mode$ac_tag in
15002 :[FHL]*:*);;
15003 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15004 :[FH]-) ac_tag=-:-;;
15005 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15006 esac
15007 ac_save_IFS=$IFS
15008 IFS=:
15009 set x $ac_tag
15010 IFS=$ac_save_IFS
15011 shift
15012 ac_file=$1
15013 shift
15014
15015 case $ac_mode in
15016 :L) ac_source=$1;;
15017 :[FH])
15018 ac_file_inputs=
15019 for ac_f
15020 do
15021 case $ac_f in
15022 -) ac_f="$ac_tmp/stdin";;
15023 *) # Look for the file first in the build tree, then in the source tree
15024 # (if the path is not absolute). The absolute path cannot be DOS-style,
15025 # because $ac_f cannot contain `:'.
15026 test -f "$ac_f" ||
15027 case $ac_f in
15028 [\\/$]*) false;;
15029 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15030 esac ||
15031 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15032 esac
15033 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15034 as_fn_append ac_file_inputs " '$ac_f'"
15035 done
15036
15037 # Let's still pretend it is `configure' which instantiates (i.e., don't
15038 # use $as_me), people would be surprised to read:
15039 # /* config.h. Generated by config.status. */
15040 configure_input='Generated from '`
15041 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15042 `' by configure.'
15043 if test x"$ac_file" != x-; then
15044 configure_input="$ac_file. $configure_input"
15045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15046 printf "%s\n" "$as_me: creating $ac_file" >&6;}
15047 fi
15048 # Neutralize special characters interpreted by sed in replacement strings.
15049 case $configure_input in #(
15050 *\&* | *\|* | *\\* )
15051 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
15052 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15053 *) ac_sed_conf_input=$configure_input;;
15054 esac
15055
15056 case $ac_tag in
15057 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15058 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15059 esac
15060 ;;
15061 esac
15062
15063 ac_dir=`$as_dirname -- "$ac_file" ||
15064 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15065 X"$ac_file" : 'X\(//\)[^/]' \| \
15066 X"$ac_file" : 'X\(//\)$' \| \
15067 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15068 printf "%s\n" X"$ac_file" |
15069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15070 s//\1/
15071 q
15072 }
15073 /^X\(\/\/\)[^/].*/{
15074 s//\1/
15075 q
15076 }
15077 /^X\(\/\/\)$/{
15078 s//\1/
15079 q
15080 }
15081 /^X\(\/\).*/{
15082 s//\1/
15083 q
15084 }
15085 s/.*/./; q'`
15086 as_dir="$ac_dir"; as_fn_mkdir_p
15087 ac_builddir=.
15088
15089 case "$ac_dir" in
15090 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15091 *)
15092 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
15093 # A ".." for each directory in $ac_dir_suffix.
15094 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15095 case $ac_top_builddir_sub in
15096 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15097 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15098 esac ;;
15099 esac
15100 ac_abs_top_builddir=$ac_pwd
15101 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15102 # for backward compatibility:
15103 ac_top_builddir=$ac_top_build_prefix
15104
15105 case $srcdir in
15106 .) # We are building in place.
15107 ac_srcdir=.
15108 ac_top_srcdir=$ac_top_builddir_sub
15109 ac_abs_top_srcdir=$ac_pwd ;;
15110 [\\/]* | ?:[\\/]* ) # Absolute name.
15111 ac_srcdir=$srcdir$ac_dir_suffix;
15112 ac_top_srcdir=$srcdir
15113 ac_abs_top_srcdir=$srcdir ;;
15114 *) # Relative name.
15115 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15116 ac_top_srcdir=$ac_top_build_prefix$srcdir
15117 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15118 esac
15119 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15120
15121
15122 case $ac_mode in
15123 :F)
15124 #
15125 # CONFIG_FILE
15126 #
15127
15128 case $INSTALL in
15129 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15130 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15131 esac
15132 _ACEOF
15133
15134 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15135 # If the template does not know about datarootdir, expand it.
15136 # FIXME: This hack should be removed a few years after 2.60.
15137 ac_datarootdir_hack=; ac_datarootdir_seen=
15138 ac_sed_dataroot='
15139 /datarootdir/ {
15140 p
15141 q
15142 }
15143 /@datadir@/p
15144 /@docdir@/p
15145 /@infodir@/p
15146 /@localedir@/p
15147 /@mandir@/p'
15148 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15149 *datarootdir*) ac_datarootdir_seen=yes;;
15150 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15152 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15153 _ACEOF
15154 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15155 ac_datarootdir_hack='
15156 s&@datadir@&$datadir&g
15157 s&@docdir@&$docdir&g
15158 s&@infodir@&$infodir&g
15159 s&@localedir@&$localedir&g
15160 s&@mandir@&$mandir&g
15161 s&\\\${datarootdir}&$datarootdir&g' ;;
15162 esac
15163 _ACEOF
15164
15165 # Neutralize VPATH when `$srcdir' = `.'.
15166 # Shell code in configure.ac might set extrasub.
15167 # FIXME: do we really want to maintain this feature?
15168 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15169 ac_sed_extra="$ac_vpsub
15170 $extrasub
15171 _ACEOF
15172 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15173 :t
15174 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15175 s|@configure_input@|$ac_sed_conf_input|;t t
15176 s&@top_builddir@&$ac_top_builddir_sub&;t t
15177 s&@top_build_prefix@&$ac_top_build_prefix&;t t
15178 s&@srcdir@&$ac_srcdir&;t t
15179 s&@abs_srcdir@&$ac_abs_srcdir&;t t
15180 s&@top_srcdir@&$ac_top_srcdir&;t t
15181 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15182 s&@builddir@&$ac_builddir&;t t
15183 s&@abs_builddir@&$ac_abs_builddir&;t t
15184 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15185 s&@INSTALL@&$ac_INSTALL&;t t
15186 $ac_datarootdir_hack
15187 "
15188 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15189 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15190
15191 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15192 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15193 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15194 "$ac_tmp/out"`; test -z "$ac_out"; } &&
15195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15196 which seems to be undefined. Please make sure it is defined" >&5
15197 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15198 which seems to be undefined. Please make sure it is defined" >&2;}
15199
15200 rm -f "$ac_tmp/stdin"
15201 case $ac_file in
15202 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15203 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15204 esac \
15205 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15206 ;;
15207 :H)
15208 #
15209 # CONFIG_HEADER
15210 #
15211 if test x"$ac_file" != x-; then
15212 {
15213 printf "%s\n" "/* $configure_input */" >&1 \
15214 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15215 } >"$ac_tmp/config.h" \
15216 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15217 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15219 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
15220 else
15221 rm -f "$ac_file"
15222 mv "$ac_tmp/config.h" "$ac_file" \
15223 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15224 fi
15225 else
15226 printf "%s\n" "/* $configure_input */" >&1 \
15227 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15228 || as_fn_error $? "could not create -" "$LINENO" 5
15229 fi
15230 ;;
15231
15232 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15233 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
15234 ;;
15235 esac
15236
15237
15238 case $ac_file$ac_mode in
15239 "default-1":C) if test -f .devel; then
15240 echo timestamp > stamp-h
15241 cat $srcdir/Makefile-devel-adds >> Makefile
15242 make depend || exit 1
15243 fi ;;
15244
15245 esac
15246 done # for ac_tag
15247
15248
15249 as_fn_exit 0
15250 _ACEOF
15251 ac_clean_files=$ac_clean_files_save
15252
15253 test $ac_write_fail = 0 ||
15254 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15255
15256
15257 # configure is writing to config.log, and then calls config.status.
15258 # config.status does its own redirection, appending to config.log.
15259 # Unfortunately, on DOS this fails, as config.log is still kept open
15260 # by configure, so config.status won't be able to write to it; its
15261 # output is simply discarded. So we exec the FD to /dev/null,
15262 # effectively closing config.log, so it can be properly (re)opened and
15263 # appended to by config.status. When coming back to configure, we
15264 # need to make the FD available again.
15265 if test "$no_create" != yes; then
15266 ac_cs_success=:
15267 ac_config_status_args=
15268 test "$silent" = yes &&
15269 ac_config_status_args="$ac_config_status_args --quiet"
15270 exec 5>/dev/null
15271 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15272 exec 5>>config.log
15273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15274 # would make configure fail if this is the last instruction.
15275 $ac_cs_success || as_fn_exit 1
15276 fi
15277 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15279 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15280 fi
15281
15282 exit 0
15283