]> The Tcpdump Group git mirrors - tcpdump/blob - configure
CHANGES: Add a change backported to 4.99
[tcpdump] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for tcpdump 5.0.0-PRE-GIT.
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@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='tcpdump'
610 PACKAGE_TARNAME='tcpdump'
611 PACKAGE_VERSION='5.0.0-PRE-GIT'
612 PACKAGE_STRING='tcpdump 5.0.0-PRE-GIT'
613 PACKAGE_BUGREPORT=''
614 PACKAGE_URL=''
615
616 ac_unique_file="tcpdump.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 INSTALL_DATA
651 INSTALL_SCRIPT
652 INSTALL_PROGRAM
653 MAN_MISC_INFO
654 MAN_FILE_FORMATS
655 LOCALSRC
656 V_PCAPDEP
657 V_INCLS
658 V_GROUP
659 V_DEFS
660 V_CCOPT
661 MKDEP
662 DEPENDENCY_CFLAG
663 AR
664 RANLIB
665 PCAP_CONFIG
666 PKG_CONFIG
667 LIBOBJS
668 EGREP
669 GREP
670 CPP
671 OBJEXT
672 EXEEXT
673 ac_ct_CC
674 CPPFLAGS
675 LDFLAGS
676 CFLAGS
677 CC
678 SHLICC2
679 host_os
680 host_vendor
681 host_cpu
682 host
683 build_os
684 build_vendor
685 build_cpu
686 build
687 target_alias
688 host_alias
689 build_alias
690 LIBS
691 ECHO_T
692 ECHO_N
693 ECHO_C
694 DEFS
695 mandir
696 localedir
697 libdir
698 psdir
699 pdfdir
700 dvidir
701 htmldir
702 infodir
703 docdir
704 oldincludedir
705 includedir
706 runstatedir
707 localstatedir
708 sharedstatedir
709 sysconfdir
710 datadir
711 datarootdir
712 libexecdir
713 sbindir
714 bindir
715 program_transform_name
716 prefix
717 exec_prefix
718 PACKAGE_URL
719 PACKAGE_BUGREPORT
720 PACKAGE_STRING
721 PACKAGE_VERSION
722 PACKAGE_TARNAME
723 PACKAGE_NAME
724 PATH_SEPARATOR
725 SHELL'
726 ac_subst_files=''
727 ac_user_opts='
728 enable_option_checking
729 with_gcc
730 enable_universal
731 with_smi
732 enable_instrument_functions
733 enable_smb
734 with_user
735 with_chroot
736 with_sandbox_capsicum
737 enable_local_libpcap
738 with_crypto
739 with_cap_ng
740 '
741 ac_precious_vars='build_alias
742 host_alias
743 target_alias
744 CC
745 CFLAGS
746 LDFLAGS
747 LIBS
748 CPPFLAGS
749 CPP'
750
751
752 # Initialize some variables set by options.
753 ac_init_help=
754 ac_init_version=false
755 ac_unrecognized_opts=
756 ac_unrecognized_sep=
757 # The variables have the same names as the options, with
758 # dashes changed to underlines.
759 cache_file=/dev/null
760 exec_prefix=NONE
761 no_create=
762 no_recursion=
763 prefix=NONE
764 program_prefix=NONE
765 program_suffix=NONE
766 program_transform_name=s,x,x,
767 silent=
768 site=
769 srcdir=
770 verbose=
771 x_includes=NONE
772 x_libraries=NONE
773
774 # Installation directory options.
775 # These are left unexpanded so users can "make install exec_prefix=/foo"
776 # and all the variables that are supposed to be based on exec_prefix
777 # by default will actually change.
778 # Use braces instead of parens because sh, perl, etc. also accept them.
779 # (The list follows the same order as the GNU Coding Standards.)
780 bindir='${exec_prefix}/bin'
781 sbindir='${exec_prefix}/sbin'
782 libexecdir='${exec_prefix}/libexec'
783 datarootdir='${prefix}/share'
784 datadir='${datarootdir}'
785 sysconfdir='${prefix}/etc'
786 sharedstatedir='${prefix}/com'
787 localstatedir='${prefix}/var'
788 runstatedir='${localstatedir}/run'
789 includedir='${prefix}/include'
790 oldincludedir='/usr/include'
791 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
792 infodir='${datarootdir}/info'
793 htmldir='${docdir}'
794 dvidir='${docdir}'
795 pdfdir='${docdir}'
796 psdir='${docdir}'
797 libdir='${exec_prefix}/lib'
798 localedir='${datarootdir}/locale'
799 mandir='${datarootdir}/man'
800
801 ac_prev=
802 ac_dashdash=
803 for ac_option
804 do
805 # If the previous option needs an argument, assign it.
806 if test -n "$ac_prev"; then
807 eval $ac_prev=\$ac_option
808 ac_prev=
809 continue
810 fi
811
812 case $ac_option in
813 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
814 *=) ac_optarg= ;;
815 *) ac_optarg=yes ;;
816 esac
817
818 case $ac_dashdash$ac_option in
819 --)
820 ac_dashdash=yes ;;
821
822 -bindir | --bindir | --bindi | --bind | --bin | --bi)
823 ac_prev=bindir ;;
824 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
825 bindir=$ac_optarg ;;
826
827 -build | --build | --buil | --bui | --bu)
828 ac_prev=build_alias ;;
829 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
830 build_alias=$ac_optarg ;;
831
832 -cache-file | --cache-file | --cache-fil | --cache-fi \
833 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
834 ac_prev=cache_file ;;
835 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
836 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
837 cache_file=$ac_optarg ;;
838
839 --config-cache | -C)
840 cache_file=config.cache ;;
841
842 -datadir | --datadir | --datadi | --datad)
843 ac_prev=datadir ;;
844 -datadir=* | --datadir=* | --datadi=* | --datad=*)
845 datadir=$ac_optarg ;;
846
847 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
848 | --dataroo | --dataro | --datar)
849 ac_prev=datarootdir ;;
850 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
851 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
852 datarootdir=$ac_optarg ;;
853
854 -disable-* | --disable-*)
855 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
856 # Reject names that are not valid shell variable names.
857 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
858 as_fn_error $? "invalid feature name: \`$ac_useropt'"
859 ac_useropt_orig=$ac_useropt
860 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
861 case $ac_user_opts in
862 *"
863 "enable_$ac_useropt"
864 "*) ;;
865 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
866 ac_unrecognized_sep=', ';;
867 esac
868 eval enable_$ac_useropt=no ;;
869
870 -docdir | --docdir | --docdi | --doc | --do)
871 ac_prev=docdir ;;
872 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
873 docdir=$ac_optarg ;;
874
875 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
876 ac_prev=dvidir ;;
877 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
878 dvidir=$ac_optarg ;;
879
880 -enable-* | --enable-*)
881 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
882 # Reject names that are not valid shell variable names.
883 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
884 as_fn_error $? "invalid feature name: \`$ac_useropt'"
885 ac_useropt_orig=$ac_useropt
886 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
887 case $ac_user_opts in
888 *"
889 "enable_$ac_useropt"
890 "*) ;;
891 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
892 ac_unrecognized_sep=', ';;
893 esac
894 eval enable_$ac_useropt=\$ac_optarg ;;
895
896 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
897 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
898 | --exec | --exe | --ex)
899 ac_prev=exec_prefix ;;
900 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
901 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
902 | --exec=* | --exe=* | --ex=*)
903 exec_prefix=$ac_optarg ;;
904
905 -gas | --gas | --ga | --g)
906 # Obsolete; use --with-gas.
907 with_gas=yes ;;
908
909 -help | --help | --hel | --he | -h)
910 ac_init_help=long ;;
911 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
912 ac_init_help=recursive ;;
913 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
914 ac_init_help=short ;;
915
916 -host | --host | --hos | --ho)
917 ac_prev=host_alias ;;
918 -host=* | --host=* | --hos=* | --ho=*)
919 host_alias=$ac_optarg ;;
920
921 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
922 ac_prev=htmldir ;;
923 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
924 | --ht=*)
925 htmldir=$ac_optarg ;;
926
927 -includedir | --includedir | --includedi | --included | --include \
928 | --includ | --inclu | --incl | --inc)
929 ac_prev=includedir ;;
930 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
931 | --includ=* | --inclu=* | --incl=* | --inc=*)
932 includedir=$ac_optarg ;;
933
934 -infodir | --infodir | --infodi | --infod | --info | --inf)
935 ac_prev=infodir ;;
936 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
937 infodir=$ac_optarg ;;
938
939 -libdir | --libdir | --libdi | --libd)
940 ac_prev=libdir ;;
941 -libdir=* | --libdir=* | --libdi=* | --libd=*)
942 libdir=$ac_optarg ;;
943
944 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
945 | --libexe | --libex | --libe)
946 ac_prev=libexecdir ;;
947 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
948 | --libexe=* | --libex=* | --libe=*)
949 libexecdir=$ac_optarg ;;
950
951 -localedir | --localedir | --localedi | --localed | --locale)
952 ac_prev=localedir ;;
953 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
954 localedir=$ac_optarg ;;
955
956 -localstatedir | --localstatedir | --localstatedi | --localstated \
957 | --localstate | --localstat | --localsta | --localst | --locals)
958 ac_prev=localstatedir ;;
959 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
960 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
961 localstatedir=$ac_optarg ;;
962
963 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
964 ac_prev=mandir ;;
965 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
966 mandir=$ac_optarg ;;
967
968 -nfp | --nfp | --nf)
969 # Obsolete; use --without-fp.
970 with_fp=no ;;
971
972 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
973 | --no-cr | --no-c | -n)
974 no_create=yes ;;
975
976 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
977 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
978 no_recursion=yes ;;
979
980 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
981 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
982 | --oldin | --oldi | --old | --ol | --o)
983 ac_prev=oldincludedir ;;
984 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
985 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
986 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
987 oldincludedir=$ac_optarg ;;
988
989 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
990 ac_prev=prefix ;;
991 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
992 prefix=$ac_optarg ;;
993
994 -program-prefix | --program-prefix | --program-prefi | --program-pref \
995 | --program-pre | --program-pr | --program-p)
996 ac_prev=program_prefix ;;
997 -program-prefix=* | --program-prefix=* | --program-prefi=* \
998 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
999 program_prefix=$ac_optarg ;;
1000
1001 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1002 | --program-suf | --program-su | --program-s)
1003 ac_prev=program_suffix ;;
1004 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1005 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1006 program_suffix=$ac_optarg ;;
1007
1008 -program-transform-name | --program-transform-name \
1009 | --program-transform-nam | --program-transform-na \
1010 | --program-transform-n | --program-transform- \
1011 | --program-transform | --program-transfor \
1012 | --program-transfo | --program-transf \
1013 | --program-trans | --program-tran \
1014 | --progr-tra | --program-tr | --program-t)
1015 ac_prev=program_transform_name ;;
1016 -program-transform-name=* | --program-transform-name=* \
1017 | --program-transform-nam=* | --program-transform-na=* \
1018 | --program-transform-n=* | --program-transform-=* \
1019 | --program-transform=* | --program-transfor=* \
1020 | --program-transfo=* | --program-transf=* \
1021 | --program-trans=* | --program-tran=* \
1022 | --progr-tra=* | --program-tr=* | --program-t=*)
1023 program_transform_name=$ac_optarg ;;
1024
1025 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1026 ac_prev=pdfdir ;;
1027 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1028 pdfdir=$ac_optarg ;;
1029
1030 -psdir | --psdir | --psdi | --psd | --ps)
1031 ac_prev=psdir ;;
1032 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1033 psdir=$ac_optarg ;;
1034
1035 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1036 | -silent | --silent | --silen | --sile | --sil)
1037 silent=yes ;;
1038
1039 -runstatedir | --runstatedir | --runstatedi | --runstated \
1040 | --runstate | --runstat | --runsta | --runst | --runs \
1041 | --run | --ru | --r)
1042 ac_prev=runstatedir ;;
1043 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1044 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1045 | --run=* | --ru=* | --r=*)
1046 runstatedir=$ac_optarg ;;
1047
1048 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1049 ac_prev=sbindir ;;
1050 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1051 | --sbi=* | --sb=*)
1052 sbindir=$ac_optarg ;;
1053
1054 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1055 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1056 | --sharedst | --shareds | --shared | --share | --shar \
1057 | --sha | --sh)
1058 ac_prev=sharedstatedir ;;
1059 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1060 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1061 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1062 | --sha=* | --sh=*)
1063 sharedstatedir=$ac_optarg ;;
1064
1065 -site | --site | --sit)
1066 ac_prev=site ;;
1067 -site=* | --site=* | --sit=*)
1068 site=$ac_optarg ;;
1069
1070 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1071 ac_prev=srcdir ;;
1072 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1073 srcdir=$ac_optarg ;;
1074
1075 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1076 | --syscon | --sysco | --sysc | --sys | --sy)
1077 ac_prev=sysconfdir ;;
1078 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1079 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1080 sysconfdir=$ac_optarg ;;
1081
1082 -target | --target | --targe | --targ | --tar | --ta | --t)
1083 ac_prev=target_alias ;;
1084 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1085 target_alias=$ac_optarg ;;
1086
1087 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1088 verbose=yes ;;
1089
1090 -version | --version | --versio | --versi | --vers | -V)
1091 ac_init_version=: ;;
1092
1093 -with-* | --with-*)
1094 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1095 # Reject names that are not valid shell variable names.
1096 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1097 as_fn_error $? "invalid package name: \`$ac_useropt'"
1098 ac_useropt_orig=$ac_useropt
1099 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1100 case $ac_user_opts in
1101 *"
1102 "with_$ac_useropt"
1103 "*) ;;
1104 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1105 ac_unrecognized_sep=', ';;
1106 esac
1107 eval with_$ac_useropt=\$ac_optarg ;;
1108
1109 -without-* | --without-*)
1110 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1113 as_fn_error $? "invalid package name: \`$ac_useropt'"
1114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118 "with_$ac_useropt"
1119 "*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=no ;;
1124
1125 --x)
1126 # Obsolete; use --with-x.
1127 with_x=yes ;;
1128
1129 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1130 | --x-incl | --x-inc | --x-in | --x-i)
1131 ac_prev=x_includes ;;
1132 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1133 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1134 x_includes=$ac_optarg ;;
1135
1136 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1137 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1138 ac_prev=x_libraries ;;
1139 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1140 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1141 x_libraries=$ac_optarg ;;
1142
1143 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1144 Try \`$0 --help' for more information"
1145 ;;
1146
1147 *=*)
1148 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1149 # Reject names that are not valid shell variable names.
1150 case $ac_envvar in #(
1151 '' | [0-9]* | *[!_$as_cr_alnum]* )
1152 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1153 esac
1154 eval $ac_envvar=\$ac_optarg
1155 export $ac_envvar ;;
1156
1157 *)
1158 # FIXME: should be removed in autoconf 3.0.
1159 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1160 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1161 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1162 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1163 ;;
1164
1165 esac
1166 done
1167
1168 if test -n "$ac_prev"; then
1169 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1170 as_fn_error $? "missing argument to $ac_option"
1171 fi
1172
1173 if test -n "$ac_unrecognized_opts"; then
1174 case $enable_option_checking in
1175 no) ;;
1176 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1177 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1178 esac
1179 fi
1180
1181 # Check all directory arguments for consistency.
1182 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1183 datadir sysconfdir sharedstatedir localstatedir includedir \
1184 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1185 libdir localedir mandir runstatedir
1186 do
1187 eval ac_val=\$$ac_var
1188 # Remove trailing slashes.
1189 case $ac_val in
1190 */ )
1191 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1192 eval $ac_var=\$ac_val;;
1193 esac
1194 # Be sure to have absolute directory names.
1195 case $ac_val in
1196 [\\/$]* | ?:[\\/]* ) continue;;
1197 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1198 esac
1199 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1200 done
1201
1202 # There might be people who depend on the old broken behavior: `$host'
1203 # used to hold the argument of --host etc.
1204 # FIXME: To remove some day.
1205 build=$build_alias
1206 host=$host_alias
1207 target=$target_alias
1208
1209 # FIXME: To remove some day.
1210 if test "x$host_alias" != x; then
1211 if test "x$build_alias" = x; then
1212 cross_compiling=maybe
1213 elif test "x$build_alias" != "x$host_alias"; then
1214 cross_compiling=yes
1215 fi
1216 fi
1217
1218 ac_tool_prefix=
1219 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1220
1221 test "$silent" = yes && exec 6>/dev/null
1222
1223
1224 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1225 ac_ls_di=`ls -di .` &&
1226 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1227 as_fn_error $? "working directory cannot be determined"
1228 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1229 as_fn_error $? "pwd does not report name of working directory"
1230
1231
1232 # Find the source files, if location was not specified.
1233 if test -z "$srcdir"; then
1234 ac_srcdir_defaulted=yes
1235 # Try the directory containing this script, then the parent directory.
1236 ac_confdir=`$as_dirname -- "$as_myself" ||
1237 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1238 X"$as_myself" : 'X\(//\)[^/]' \| \
1239 X"$as_myself" : 'X\(//\)$' \| \
1240 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1241 printf "%s\n" X"$as_myself" |
1242 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1243 s//\1/
1244 q
1245 }
1246 /^X\(\/\/\)[^/].*/{
1247 s//\1/
1248 q
1249 }
1250 /^X\(\/\/\)$/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\).*/{
1255 s//\1/
1256 q
1257 }
1258 s/.*/./; q'`
1259 srcdir=$ac_confdir
1260 if test ! -r "$srcdir/$ac_unique_file"; then
1261 srcdir=..
1262 fi
1263 else
1264 ac_srcdir_defaulted=no
1265 fi
1266 if test ! -r "$srcdir/$ac_unique_file"; then
1267 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1268 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1269 fi
1270 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1271 ac_abs_confdir=`(
1272 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1273 pwd)`
1274 # When building in place, set srcdir=.
1275 if test "$ac_abs_confdir" = "$ac_pwd"; then
1276 srcdir=.
1277 fi
1278 # Remove unnecessary trailing slashes from srcdir.
1279 # Double slashes in file names in object file debugging info
1280 # mess up M-x gdb in Emacs.
1281 case $srcdir in
1282 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1283 esac
1284 for ac_var in $ac_precious_vars; do
1285 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1286 eval ac_env_${ac_var}_value=\$${ac_var}
1287 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1288 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1289 done
1290
1291 #
1292 # Report the --help message.
1293 #
1294 if test "$ac_init_help" = "long"; then
1295 # Omit some internal or obsolete options to make the list less imposing.
1296 # This message is too long to be a string in the A/UX 3.1 sh.
1297 cat <<_ACEOF
1298 \`configure' configures tcpdump 5.0.0-PRE-GIT to adapt to many kinds of systems.
1299
1300 Usage: $0 [OPTION]... [VAR=VALUE]...
1301
1302 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1303 VAR=VALUE. See below for descriptions of some of the useful variables.
1304
1305 Defaults for the options are specified in brackets.
1306
1307 Configuration:
1308 -h, --help display this help and exit
1309 --help=short display options specific to this package
1310 --help=recursive display the short help of all the included packages
1311 -V, --version display version information and exit
1312 -q, --quiet, --silent do not print \`checking ...' messages
1313 --cache-file=FILE cache test results in FILE [disabled]
1314 -C, --config-cache alias for \`--cache-file=config.cache'
1315 -n, --no-create do not create output files
1316 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1317
1318 Installation directories:
1319 --prefix=PREFIX install architecture-independent files in PREFIX
1320 [$ac_default_prefix]
1321 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1322 [PREFIX]
1323
1324 By default, \`make install' will install all the files in
1325 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1326 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1327 for instance \`--prefix=\$HOME'.
1328
1329 For better control, use the options below.
1330
1331 Fine tuning of the installation directories:
1332 --bindir=DIR user executables [EPREFIX/bin]
1333 --sbindir=DIR system admin executables [EPREFIX/sbin]
1334 --libexecdir=DIR program executables [EPREFIX/libexec]
1335 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1336 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1337 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1338 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1339 --libdir=DIR object code libraries [EPREFIX/lib]
1340 --includedir=DIR C header files [PREFIX/include]
1341 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1342 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1343 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1344 --infodir=DIR info documentation [DATAROOTDIR/info]
1345 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1346 --mandir=DIR man documentation [DATAROOTDIR/man]
1347 --docdir=DIR documentation root [DATAROOTDIR/doc/tcpdump]
1348 --htmldir=DIR html documentation [DOCDIR]
1349 --dvidir=DIR dvi documentation [DOCDIR]
1350 --pdfdir=DIR pdf documentation [DOCDIR]
1351 --psdir=DIR ps documentation [DOCDIR]
1352 _ACEOF
1353
1354 cat <<\_ACEOF
1355
1356 System types:
1357 --build=BUILD configure for building on BUILD [guessed]
1358 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1359 _ACEOF
1360 fi
1361
1362 if test -n "$ac_init_help"; then
1363 case $ac_init_help in
1364 short | recursive ) echo "Configuration of tcpdump 5.0.0-PRE-GIT:";;
1365 esac
1366 cat <<\_ACEOF
1367
1368 Optional Features:
1369 --disable-option-checking ignore unrecognized --enable/--with options
1370 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1371 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1372 --disable-universal don't build universal on macOS
1373 --enable-instrument-functions
1374 enable instrument functions code [default=no]
1375 --enable-smb enable possibly-buggy SMB printer [default=no]
1376 --disable-local-libpcap don't look for a local libpcap [default=check for a
1377 local libpcap]
1378
1379 Optional Packages:
1380 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1381 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1382 --without-gcc don't use gcc
1383 --with-smi link with libsmi (allows to load MIBs on the fly to
1384 decode SNMP packets) [default=yes, if available]
1385 --with-user=USERNAME drop privileges by default to USERNAME
1386 --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
1387 --with-sandbox-capsicum use Capsicum security functions [default=yes, if
1388 available]
1389 --with-crypto[=DIR] use OpenSSL/libressl libcrypto (located in directory
1390 DIR, if specified) [default=yes, if available]
1391 --with-cap-ng use libcap-ng [default=yes, if available]
1392
1393 Some influential environment variables:
1394 CC C compiler command
1395 CFLAGS C compiler flags
1396 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1397 nonstandard directory <lib dir>
1398 LIBS libraries to pass to the linker, e.g. -l<library>
1399 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1400 you have headers in a nonstandard directory <include dir>
1401 CPP C preprocessor
1402
1403 Use these variables to override the choices made by `configure' or to help
1404 it to find libraries and programs with nonstandard names/locations.
1405
1406 Report bugs to the package provider.
1407 _ACEOF
1408 ac_status=$?
1409 fi
1410
1411 if test "$ac_init_help" = "recursive"; then
1412 # If there are subdirs, report their specific --help.
1413 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1414 test -d "$ac_dir" ||
1415 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1416 continue
1417 ac_builddir=.
1418
1419 case "$ac_dir" in
1420 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1421 *)
1422 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1423 # A ".." for each directory in $ac_dir_suffix.
1424 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1425 case $ac_top_builddir_sub in
1426 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1427 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1428 esac ;;
1429 esac
1430 ac_abs_top_builddir=$ac_pwd
1431 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1432 # for backward compatibility:
1433 ac_top_builddir=$ac_top_build_prefix
1434
1435 case $srcdir in
1436 .) # We are building in place.
1437 ac_srcdir=.
1438 ac_top_srcdir=$ac_top_builddir_sub
1439 ac_abs_top_srcdir=$ac_pwd ;;
1440 [\\/]* | ?:[\\/]* ) # Absolute name.
1441 ac_srcdir=$srcdir$ac_dir_suffix;
1442 ac_top_srcdir=$srcdir
1443 ac_abs_top_srcdir=$srcdir ;;
1444 *) # Relative name.
1445 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1446 ac_top_srcdir=$ac_top_build_prefix$srcdir
1447 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1448 esac
1449 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1450
1451 cd "$ac_dir" || { ac_status=$?; continue; }
1452 # Check for configure.gnu first; this name is used for a wrapper for
1453 # Metaconfig's "Configure" on case-insensitive file systems.
1454 if test -f "$ac_srcdir/configure.gnu"; then
1455 echo &&
1456 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1457 elif test -f "$ac_srcdir/configure"; then
1458 echo &&
1459 $SHELL "$ac_srcdir/configure" --help=recursive
1460 else
1461 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1462 fi || ac_status=$?
1463 cd "$ac_pwd" || { ac_status=$?; break; }
1464 done
1465 fi
1466
1467 test -n "$ac_init_help" && exit $ac_status
1468 if $ac_init_version; then
1469 cat <<\_ACEOF
1470 tcpdump configure 5.0.0-PRE-GIT
1471 generated by GNU Autoconf 2.71
1472
1473 Copyright (C) 2021 Free Software Foundation, Inc.
1474 This configure script is free software; the Free Software Foundation
1475 gives unlimited permission to copy, distribute and modify it.
1476 _ACEOF
1477 exit
1478 fi
1479
1480 ## ------------------------ ##
1481 ## Autoconf initialization. ##
1482 ## ------------------------ ##
1483
1484 # ac_fn_c_try_compile LINENO
1485 # --------------------------
1486 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1487 ac_fn_c_try_compile ()
1488 {
1489 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1490 rm -f conftest.$ac_objext conftest.beam
1491 if { { ac_try="$ac_compile"
1492 case "(($ac_try" in
1493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1494 *) ac_try_echo=$ac_try;;
1495 esac
1496 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1497 printf "%s\n" "$ac_try_echo"; } >&5
1498 (eval "$ac_compile") 2>conftest.err
1499 ac_status=$?
1500 if test -s conftest.err; then
1501 grep -v '^ *+' conftest.err >conftest.er1
1502 cat conftest.er1 >&5
1503 mv -f conftest.er1 conftest.err
1504 fi
1505 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1506 test $ac_status = 0; } && {
1507 test -z "$ac_c_werror_flag" ||
1508 test ! -s conftest.err
1509 } && test -s conftest.$ac_objext
1510 then :
1511 ac_retval=0
1512 else $as_nop
1513 printf "%s\n" "$as_me: failed program was:" >&5
1514 sed 's/^/| /' conftest.$ac_ext >&5
1515
1516 ac_retval=1
1517 fi
1518 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1519 as_fn_set_status $ac_retval
1520
1521 } # ac_fn_c_try_compile
1522
1523 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1524 # -------------------------------------------------------
1525 # Tests whether HEADER exists and can be compiled using the include files in
1526 # INCLUDES, setting the cache variable VAR accordingly.
1527 ac_fn_c_check_header_compile ()
1528 {
1529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1531 printf %s "checking for $2... " >&6; }
1532 if eval test \${$3+y}
1533 then :
1534 printf %s "(cached) " >&6
1535 else $as_nop
1536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1537 /* end confdefs.h. */
1538 $4
1539 #include <$2>
1540 _ACEOF
1541 if ac_fn_c_try_compile "$LINENO"
1542 then :
1543 eval "$3=yes"
1544 else $as_nop
1545 eval "$3=no"
1546 fi
1547 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1548 fi
1549 eval ac_res=\$$3
1550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1551 printf "%s\n" "$ac_res" >&6; }
1552 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1553
1554 } # ac_fn_c_check_header_compile
1555
1556 # ac_fn_c_try_link LINENO
1557 # -----------------------
1558 # Try to link conftest.$ac_ext, and return whether this succeeded.
1559 ac_fn_c_try_link ()
1560 {
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1563 if { { ac_try="$ac_link"
1564 case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567 esac
1568 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569 printf "%s\n" "$ac_try_echo"; } >&5
1570 (eval "$ac_link") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } && {
1579 test -z "$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 } && test -s conftest$ac_exeext && {
1582 test "$cross_compiling" = yes ||
1583 test -x conftest$ac_exeext
1584 }
1585 then :
1586 ac_retval=0
1587 else $as_nop
1588 printf "%s\n" "$as_me: failed program was:" >&5
1589 sed 's/^/| /' conftest.$ac_ext >&5
1590
1591 ac_retval=1
1592 fi
1593 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1594 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1595 # interfere with the next link command; also delete a directory that is
1596 # left behind by Apple's compiler. We do this before executing the actions.
1597 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1598 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1599 as_fn_set_status $ac_retval
1600
1601 } # ac_fn_c_try_link
1602
1603 # ac_fn_c_try_run LINENO
1604 # ----------------------
1605 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1606 # executables *can* be run.
1607 ac_fn_c_try_run ()
1608 {
1609 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1610 if { { ac_try="$ac_link"
1611 case "(($ac_try" in
1612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1613 *) ac_try_echo=$ac_try;;
1614 esac
1615 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1616 printf "%s\n" "$ac_try_echo"; } >&5
1617 (eval "$ac_link") 2>&5
1618 ac_status=$?
1619 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1621 { { case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624 esac
1625 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626 printf "%s\n" "$ac_try_echo"; } >&5
1627 (eval "$ac_try") 2>&5
1628 ac_status=$?
1629 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1630 test $ac_status = 0; }; }
1631 then :
1632 ac_retval=0
1633 else $as_nop
1634 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1635 printf "%s\n" "$as_me: failed program was:" >&5
1636 sed 's/^/| /' conftest.$ac_ext >&5
1637
1638 ac_retval=$ac_status
1639 fi
1640 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1641 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1642 as_fn_set_status $ac_retval
1643
1644 } # ac_fn_c_try_run
1645
1646 # ac_fn_c_check_func LINENO FUNC VAR
1647 # ----------------------------------
1648 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1649 ac_fn_c_check_func ()
1650 {
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1653 printf %s "checking for $2... " >&6; }
1654 if eval test \${$3+y}
1655 then :
1656 printf %s "(cached) " >&6
1657 else $as_nop
1658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1659 /* end confdefs.h. */
1660 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1661 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1662 #define $2 innocuous_$2
1663
1664 /* System header to define __stub macros and hopefully few prototypes,
1665 which can conflict with char $2 (); below. */
1666
1667 #include <limits.h>
1668 #undef $2
1669
1670 /* Override any GCC internal prototype to avoid an error.
1671 Use char because int might match the return type of a GCC
1672 builtin and then its argument prototype would still apply. */
1673 #ifdef __cplusplus
1674 extern "C"
1675 #endif
1676 char $2 ();
1677 /* The GNU C library defines this for functions which it implements
1678 to always fail with ENOSYS. Some functions are actually named
1679 something starting with __ and the normal name is an alias. */
1680 #if defined __stub_$2 || defined __stub___$2
1681 choke me
1682 #endif
1683
1684 int
1685 main (void)
1686 {
1687 return $2 ();
1688 ;
1689 return 0;
1690 }
1691 _ACEOF
1692 if ac_fn_c_try_link "$LINENO"
1693 then :
1694 eval "$3=yes"
1695 else $as_nop
1696 eval "$3=no"
1697 fi
1698 rm -f core conftest.err conftest.$ac_objext conftest.beam \
1699 conftest$ac_exeext conftest.$ac_ext
1700 fi
1701 eval ac_res=\$$3
1702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1703 printf "%s\n" "$ac_res" >&6; }
1704 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1705
1706 } # ac_fn_c_check_func
1707
1708 # ac_fn_c_try_cpp LINENO
1709 # ----------------------
1710 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1711 ac_fn_c_try_cpp ()
1712 {
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 if { { ac_try="$ac_cpp conftest.$ac_ext"
1715 case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 printf "%s\n" "$ac_try_echo"; } >&5
1721 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1722 ac_status=$?
1723 if test -s conftest.err; then
1724 grep -v '^ *+' conftest.err >conftest.er1
1725 cat conftest.er1 >&5
1726 mv -f conftest.er1 conftest.err
1727 fi
1728 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; } > conftest.i && {
1730 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1731 test ! -s conftest.err
1732 }
1733 then :
1734 ac_retval=0
1735 else $as_nop
1736 printf "%s\n" "$as_me: failed program was:" >&5
1737 sed 's/^/| /' conftest.$ac_ext >&5
1738
1739 ac_retval=1
1740 fi
1741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742 as_fn_set_status $ac_retval
1743
1744 } # ac_fn_c_try_cpp
1745
1746 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1747 # --------------------------------------------
1748 # Tries to find the compile-time value of EXPR in a program that includes
1749 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1750 # computed
1751 ac_fn_c_compute_int ()
1752 {
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if test "$cross_compiling" = yes; then
1755 # Depending upon the size, compute the lo and hi bounds.
1756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757 /* end confdefs.h. */
1758 $4
1759 int
1760 main (void)
1761 {
1762 static int test_array [1 - 2 * !(($2) >= 0)];
1763 test_array [0] = 0;
1764 return test_array [0];
1765
1766 ;
1767 return 0;
1768 }
1769 _ACEOF
1770 if ac_fn_c_try_compile "$LINENO"
1771 then :
1772 ac_lo=0 ac_mid=0
1773 while :; do
1774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775 /* end confdefs.h. */
1776 $4
1777 int
1778 main (void)
1779 {
1780 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1781 test_array [0] = 0;
1782 return test_array [0];
1783
1784 ;
1785 return 0;
1786 }
1787 _ACEOF
1788 if ac_fn_c_try_compile "$LINENO"
1789 then :
1790 ac_hi=$ac_mid; break
1791 else $as_nop
1792 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1793 if test $ac_lo -le $ac_mid; then
1794 ac_lo= ac_hi=
1795 break
1796 fi
1797 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1798 fi
1799 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1800 done
1801 else $as_nop
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803 /* end confdefs.h. */
1804 $4
1805 int
1806 main (void)
1807 {
1808 static int test_array [1 - 2 * !(($2) < 0)];
1809 test_array [0] = 0;
1810 return test_array [0];
1811
1812 ;
1813 return 0;
1814 }
1815 _ACEOF
1816 if ac_fn_c_try_compile "$LINENO"
1817 then :
1818 ac_hi=-1 ac_mid=-1
1819 while :; do
1820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821 /* end confdefs.h. */
1822 $4
1823 int
1824 main (void)
1825 {
1826 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1827 test_array [0] = 0;
1828 return test_array [0];
1829
1830 ;
1831 return 0;
1832 }
1833 _ACEOF
1834 if ac_fn_c_try_compile "$LINENO"
1835 then :
1836 ac_lo=$ac_mid; break
1837 else $as_nop
1838 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1839 if test $ac_mid -le $ac_hi; then
1840 ac_lo= ac_hi=
1841 break
1842 fi
1843 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1844 fi
1845 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1846 done
1847 else $as_nop
1848 ac_lo= ac_hi=
1849 fi
1850 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1851 fi
1852 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1853 # Binary search between lo and hi bounds.
1854 while test "x$ac_lo" != "x$ac_hi"; do
1855 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1857 /* end confdefs.h. */
1858 $4
1859 int
1860 main (void)
1861 {
1862 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1863 test_array [0] = 0;
1864 return test_array [0];
1865
1866 ;
1867 return 0;
1868 }
1869 _ACEOF
1870 if ac_fn_c_try_compile "$LINENO"
1871 then :
1872 ac_hi=$ac_mid
1873 else $as_nop
1874 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1875 fi
1876 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1877 done
1878 case $ac_lo in #((
1879 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1880 '') ac_retval=1 ;;
1881 esac
1882 else
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884 /* end confdefs.h. */
1885 $4
1886 static long int longval (void) { return $2; }
1887 static unsigned long int ulongval (void) { return $2; }
1888 #include <stdio.h>
1889 #include <stdlib.h>
1890 int
1891 main (void)
1892 {
1893
1894 FILE *f = fopen ("conftest.val", "w");
1895 if (! f)
1896 return 1;
1897 if (($2) < 0)
1898 {
1899 long int i = longval ();
1900 if (i != ($2))
1901 return 1;
1902 fprintf (f, "%ld", i);
1903 }
1904 else
1905 {
1906 unsigned long int i = ulongval ();
1907 if (i != ($2))
1908 return 1;
1909 fprintf (f, "%lu", i);
1910 }
1911 /* Do not output a trailing newline, as this causes \r\n confusion
1912 on some platforms. */
1913 return ferror (f) || fclose (f) != 0;
1914
1915 ;
1916 return 0;
1917 }
1918 _ACEOF
1919 if ac_fn_c_try_run "$LINENO"
1920 then :
1921 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1922 else $as_nop
1923 ac_retval=1
1924 fi
1925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1926 conftest.$ac_objext conftest.beam conftest.$ac_ext
1927 rm -f conftest.val
1928
1929 fi
1930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1931 as_fn_set_status $ac_retval
1932
1933 } # ac_fn_c_compute_int
1934
1935 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
1936 # ------------------------------------------------------------------
1937 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1938 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
1939 ac_fn_check_decl ()
1940 {
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 as_decl_name=`echo $2|sed 's/ *(.*//'`
1943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1944 printf %s "checking whether $as_decl_name is declared... " >&6; }
1945 if eval test \${$3+y}
1946 then :
1947 printf %s "(cached) " >&6
1948 else $as_nop
1949 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1950 eval ac_save_FLAGS=\$$6
1951 as_fn_append $6 " $5"
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h. */
1954 $4
1955 int
1956 main (void)
1957 {
1958 #ifndef $as_decl_name
1959 #ifdef __cplusplus
1960 (void) $as_decl_use;
1961 #else
1962 (void) $as_decl_name;
1963 #endif
1964 #endif
1965
1966 ;
1967 return 0;
1968 }
1969 _ACEOF
1970 if ac_fn_c_try_compile "$LINENO"
1971 then :
1972 eval "$3=yes"
1973 else $as_nop
1974 eval "$3=no"
1975 fi
1976 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1977 eval $6=\$ac_save_FLAGS
1978
1979 fi
1980 eval ac_res=\$$3
1981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982 printf "%s\n" "$ac_res" >&6; }
1983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984
1985 } # ac_fn_check_decl
1986
1987 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1988 # -------------------------------------------
1989 # Tests whether TYPE exists after having included INCLUDES, setting cache
1990 # variable VAR accordingly.
1991 ac_fn_c_check_type ()
1992 {
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1995 printf %s "checking for $2... " >&6; }
1996 if eval test \${$3+y}
1997 then :
1998 printf %s "(cached) " >&6
1999 else $as_nop
2000 eval "$3=no"
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002 /* end confdefs.h. */
2003 $4
2004 int
2005 main (void)
2006 {
2007 if (sizeof ($2))
2008 return 0;
2009 ;
2010 return 0;
2011 }
2012 _ACEOF
2013 if ac_fn_c_try_compile "$LINENO"
2014 then :
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016 /* end confdefs.h. */
2017 $4
2018 int
2019 main (void)
2020 {
2021 if (sizeof (($2)))
2022 return 0;
2023 ;
2024 return 0;
2025 }
2026 _ACEOF
2027 if ac_fn_c_try_compile "$LINENO"
2028 then :
2029
2030 else $as_nop
2031 eval "$3=yes"
2032 fi
2033 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2034 fi
2035 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2036 fi
2037 eval ac_res=\$$3
2038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039 printf "%s\n" "$ac_res" >&6; }
2040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041
2042 } # ac_fn_c_check_type
2043 ac_configure_args_raw=
2044 for ac_arg
2045 do
2046 case $ac_arg in
2047 *\'*)
2048 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2049 esac
2050 as_fn_append ac_configure_args_raw " '$ac_arg'"
2051 done
2052
2053 case $ac_configure_args_raw in
2054 *$as_nl*)
2055 ac_safe_unquote= ;;
2056 *)
2057 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2058 ac_unsafe_a="$ac_unsafe_z#~"
2059 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2060 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2061 esac
2062
2063 cat >config.log <<_ACEOF
2064 This file contains any messages produced by compilers while
2065 running configure, to aid debugging if configure makes a mistake.
2066
2067 It was created by tcpdump $as_me 5.0.0-PRE-GIT, which was
2068 generated by GNU Autoconf 2.71. Invocation command line was
2069
2070 $ $0$ac_configure_args_raw
2071
2072 _ACEOF
2073 exec 5>>config.log
2074 {
2075 cat <<_ASUNAME
2076 ## --------- ##
2077 ## Platform. ##
2078 ## --------- ##
2079
2080 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2081 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2082 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2083 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2084 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2085
2086 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2087 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2088
2089 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2090 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2091 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2092 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2093 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2094 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2095 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2096
2097 _ASUNAME
2098
2099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2100 for as_dir in $PATH
2101 do
2102 IFS=$as_save_IFS
2103 case $as_dir in #(((
2104 '') as_dir=./ ;;
2105 */) ;;
2106 *) as_dir=$as_dir/ ;;
2107 esac
2108 printf "%s\n" "PATH: $as_dir"
2109 done
2110 IFS=$as_save_IFS
2111
2112 } >&5
2113
2114 cat >&5 <<_ACEOF
2115
2116
2117 ## ----------- ##
2118 ## Core tests. ##
2119 ## ----------- ##
2120
2121 _ACEOF
2122
2123
2124 # Keep a trace of the command line.
2125 # Strip out --no-create and --no-recursion so they do not pile up.
2126 # Strip out --silent because we don't want to record it for future runs.
2127 # Also quote any args containing shell meta-characters.
2128 # Make two passes to allow for proper duplicate-argument suppression.
2129 ac_configure_args=
2130 ac_configure_args0=
2131 ac_configure_args1=
2132 ac_must_keep_next=false
2133 for ac_pass in 1 2
2134 do
2135 for ac_arg
2136 do
2137 case $ac_arg in
2138 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2139 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2140 | -silent | --silent | --silen | --sile | --sil)
2141 continue ;;
2142 *\'*)
2143 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2144 esac
2145 case $ac_pass in
2146 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2147 2)
2148 as_fn_append ac_configure_args1 " '$ac_arg'"
2149 if test $ac_must_keep_next = true; then
2150 ac_must_keep_next=false # Got value, back to normal.
2151 else
2152 case $ac_arg in
2153 *=* | --config-cache | -C | -disable-* | --disable-* \
2154 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2155 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2156 | -with-* | --with-* | -without-* | --without-* | --x)
2157 case "$ac_configure_args0 " in
2158 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2159 esac
2160 ;;
2161 -* ) ac_must_keep_next=true ;;
2162 esac
2163 fi
2164 as_fn_append ac_configure_args " '$ac_arg'"
2165 ;;
2166 esac
2167 done
2168 done
2169 { ac_configure_args0=; unset ac_configure_args0;}
2170 { ac_configure_args1=; unset ac_configure_args1;}
2171
2172 # When interrupted or exit'd, cleanup temporary files, and complete
2173 # config.log. We remove comments because anyway the quotes in there
2174 # would cause problems or look ugly.
2175 # WARNING: Use '\'' to represent an apostrophe within the trap.
2176 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2177 trap 'exit_status=$?
2178 # Sanitize IFS.
2179 IFS=" "" $as_nl"
2180 # Save into config.log some information that might help in debugging.
2181 {
2182 echo
2183
2184 printf "%s\n" "## ---------------- ##
2185 ## Cache variables. ##
2186 ## ---------------- ##"
2187 echo
2188 # The following way of writing the cache mishandles newlines in values,
2189 (
2190 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2191 eval ac_val=\$$ac_var
2192 case $ac_val in #(
2193 *${as_nl}*)
2194 case $ac_var in #(
2195 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2196 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2197 esac
2198 case $ac_var in #(
2199 _ | IFS | as_nl) ;; #(
2200 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2201 *) { eval $ac_var=; unset $ac_var;} ;;
2202 esac ;;
2203 esac
2204 done
2205 (set) 2>&1 |
2206 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2207 *${as_nl}ac_space=\ *)
2208 sed -n \
2209 "s/'\''/'\''\\\\'\'''\''/g;
2210 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2211 ;; #(
2212 *)
2213 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2214 ;;
2215 esac |
2216 sort
2217 )
2218 echo
2219
2220 printf "%s\n" "## ----------------- ##
2221 ## Output variables. ##
2222 ## ----------------- ##"
2223 echo
2224 for ac_var in $ac_subst_vars
2225 do
2226 eval ac_val=\$$ac_var
2227 case $ac_val in
2228 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2229 esac
2230 printf "%s\n" "$ac_var='\''$ac_val'\''"
2231 done | sort
2232 echo
2233
2234 if test -n "$ac_subst_files"; then
2235 printf "%s\n" "## ------------------- ##
2236 ## File substitutions. ##
2237 ## ------------------- ##"
2238 echo
2239 for ac_var in $ac_subst_files
2240 do
2241 eval ac_val=\$$ac_var
2242 case $ac_val in
2243 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2244 esac
2245 printf "%s\n" "$ac_var='\''$ac_val'\''"
2246 done | sort
2247 echo
2248 fi
2249
2250 if test -s confdefs.h; then
2251 printf "%s\n" "## ----------- ##
2252 ## confdefs.h. ##
2253 ## ----------- ##"
2254 echo
2255 cat confdefs.h
2256 echo
2257 fi
2258 test "$ac_signal" != 0 &&
2259 printf "%s\n" "$as_me: caught signal $ac_signal"
2260 printf "%s\n" "$as_me: exit $exit_status"
2261 } >&5
2262 rm -f core *.core core.conftest.* &&
2263 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2264 exit $exit_status
2265 ' 0
2266 for ac_signal in 1 2 13 15; do
2267 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2268 done
2269 ac_signal=0
2270
2271 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2272 rm -f -r conftest* confdefs.h
2273
2274 printf "%s\n" "/* confdefs.h */" > confdefs.h
2275
2276 # Predefined preprocessor variables.
2277
2278 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2279
2280 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2281
2282 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2283
2284 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2285
2286 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2287
2288 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2289
2290
2291 # Let the site file select an alternate cache file if it wants to.
2292 # Prefer an explicitly selected file to automatically selected ones.
2293 if test -n "$CONFIG_SITE"; then
2294 ac_site_files="$CONFIG_SITE"
2295 elif test "x$prefix" != xNONE; then
2296 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2297 else
2298 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2299 fi
2300
2301 for ac_site_file in $ac_site_files
2302 do
2303 case $ac_site_file in #(
2304 */*) :
2305 ;; #(
2306 *) :
2307 ac_site_file=./$ac_site_file ;;
2308 esac
2309 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2311 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2312 sed 's/^/| /' "$ac_site_file" >&5
2313 . "$ac_site_file" \
2314 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2315 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2316 as_fn_error $? "failed to load site script $ac_site_file
2317 See \`config.log' for more details" "$LINENO" 5; }
2318 fi
2319 done
2320
2321 if test -r "$cache_file"; then
2322 # Some versions of bash will fail to source /dev/null (special files
2323 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2324 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2326 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2327 case $cache_file in
2328 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2329 *) . "./$cache_file";;
2330 esac
2331 fi
2332 else
2333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2334 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2335 >$cache_file
2336 fi
2337
2338 # Test code for whether the C compiler supports C89 (global declarations)
2339 ac_c_conftest_c89_globals='
2340 /* Does the compiler advertise C89 conformance?
2341 Do not test the value of __STDC__, because some compilers set it to 0
2342 while being otherwise adequately conformant. */
2343 #if !defined __STDC__
2344 # error "Compiler does not advertise C89 conformance"
2345 #endif
2346
2347 #include <stddef.h>
2348 #include <stdarg.h>
2349 struct stat;
2350 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2351 struct buf { int x; };
2352 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2353 static char *e (p, i)
2354 char **p;
2355 int i;
2356 {
2357 return p[i];
2358 }
2359 static char *f (char * (*g) (char **, int), char **p, ...)
2360 {
2361 char *s;
2362 va_list v;
2363 va_start (v,p);
2364 s = g (p, va_arg (v,int));
2365 va_end (v);
2366 return s;
2367 }
2368
2369 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2370 function prototypes and stuff, but not \xHH hex character constants.
2371 These do not provoke an error unfortunately, instead are silently treated
2372 as an "x". The following induces an error, until -std is added to get
2373 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2374 array size at least. It is necessary to write \x00 == 0 to get something
2375 that is true only with -std. */
2376 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2377
2378 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2379 inside strings and character constants. */
2380 #define FOO(x) '\''x'\''
2381 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2382
2383 int test (int i, double x);
2384 struct s1 {int (*f) (int a);};
2385 struct s2 {int (*f) (double a);};
2386 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2387 int, int);'
2388
2389 # Test code for whether the C compiler supports C89 (body of main).
2390 ac_c_conftest_c89_main='
2391 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2392 '
2393
2394 # Test code for whether the C compiler supports C99 (global declarations)
2395 ac_c_conftest_c99_globals='
2396 // Does the compiler advertise C99 conformance?
2397 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2398 # error "Compiler does not advertise C99 conformance"
2399 #endif
2400
2401 #include <stdbool.h>
2402 extern int puts (const char *);
2403 extern int printf (const char *, ...);
2404 extern int dprintf (int, const char *, ...);
2405 extern void *malloc (size_t);
2406
2407 // Check varargs macros. These examples are taken from C99 6.10.3.5.
2408 // dprintf is used instead of fprintf to avoid needing to declare
2409 // FILE and stderr.
2410 #define debug(...) dprintf (2, __VA_ARGS__)
2411 #define showlist(...) puts (#__VA_ARGS__)
2412 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2413 static void
2414 test_varargs_macros (void)
2415 {
2416 int x = 1234;
2417 int y = 5678;
2418 debug ("Flag");
2419 debug ("X = %d\n", x);
2420 showlist (The first, second, and third items.);
2421 report (x>y, "x is %d but y is %d", x, y);
2422 }
2423
2424 // Check long long types.
2425 #define BIG64 18446744073709551615ull
2426 #define BIG32 4294967295ul
2427 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2428 #if !BIG_OK
2429 #error "your preprocessor is broken"
2430 #endif
2431 #if BIG_OK
2432 #else
2433 #error "your preprocessor is broken"
2434 #endif
2435 static long long int bignum = -9223372036854775807LL;
2436 static unsigned long long int ubignum = BIG64;
2437
2438 struct incomplete_array
2439 {
2440 int datasize;
2441 double data[];
2442 };
2443
2444 struct named_init {
2445 int number;
2446 const wchar_t *name;
2447 double average;
2448 };
2449
2450 typedef const char *ccp;
2451
2452 static inline int
2453 test_restrict (ccp restrict text)
2454 {
2455 // See if C++-style comments work.
2456 // Iterate through items via the restricted pointer.
2457 // Also check for declarations in for loops.
2458 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2459 continue;
2460 return 0;
2461 }
2462
2463 // Check varargs and va_copy.
2464 static bool
2465 test_varargs (const char *format, ...)
2466 {
2467 va_list args;
2468 va_start (args, format);
2469 va_list args_copy;
2470 va_copy (args_copy, args);
2471
2472 const char *str = "";
2473 int number = 0;
2474 float fnumber = 0;
2475
2476 while (*format)
2477 {
2478 switch (*format++)
2479 {
2480 case '\''s'\'': // string
2481 str = va_arg (args_copy, const char *);
2482 break;
2483 case '\''d'\'': // int
2484 number = va_arg (args_copy, int);
2485 break;
2486 case '\''f'\'': // float
2487 fnumber = va_arg (args_copy, double);
2488 break;
2489 default:
2490 break;
2491 }
2492 }
2493 va_end (args_copy);
2494 va_end (args);
2495
2496 return *str && number && fnumber;
2497 }
2498 '
2499
2500 # Test code for whether the C compiler supports C99 (body of main).
2501 ac_c_conftest_c99_main='
2502 // Check bool.
2503 _Bool success = false;
2504 success |= (argc != 0);
2505
2506 // Check restrict.
2507 if (test_restrict ("String literal") == 0)
2508 success = true;
2509 char *restrict newvar = "Another string";
2510
2511 // Check varargs.
2512 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2513 test_varargs_macros ();
2514
2515 // Check flexible array members.
2516 struct incomplete_array *ia =
2517 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2518 ia->datasize = 10;
2519 for (int i = 0; i < ia->datasize; ++i)
2520 ia->data[i] = i * 1.234;
2521
2522 // Check named initializers.
2523 struct named_init ni = {
2524 .number = 34,
2525 .name = L"Test wide string",
2526 .average = 543.34343,
2527 };
2528
2529 ni.number = 58;
2530
2531 int dynamic_array[ni.number];
2532 dynamic_array[0] = argv[0][0];
2533 dynamic_array[ni.number - 1] = 543;
2534
2535 // work around unused variable warnings
2536 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2537 || dynamic_array[ni.number - 1] != 543);
2538 '
2539
2540 # Test code for whether the C compiler supports C11 (global declarations)
2541 ac_c_conftest_c11_globals='
2542 // Does the compiler advertise C11 conformance?
2543 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2544 # error "Compiler does not advertise C11 conformance"
2545 #endif
2546
2547 // Check _Alignas.
2548 char _Alignas (double) aligned_as_double;
2549 char _Alignas (0) no_special_alignment;
2550 extern char aligned_as_int;
2551 char _Alignas (0) _Alignas (int) aligned_as_int;
2552
2553 // Check _Alignof.
2554 enum
2555 {
2556 int_alignment = _Alignof (int),
2557 int_array_alignment = _Alignof (int[100]),
2558 char_alignment = _Alignof (char)
2559 };
2560 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2561
2562 // Check _Noreturn.
2563 int _Noreturn does_not_return (void) { for (;;) continue; }
2564
2565 // Check _Static_assert.
2566 struct test_static_assert
2567 {
2568 int x;
2569 _Static_assert (sizeof (int) <= sizeof (long int),
2570 "_Static_assert does not work in struct");
2571 long int y;
2572 };
2573
2574 // Check UTF-8 literals.
2575 #define u8 syntax error!
2576 char const utf8_literal[] = u8"happens to be ASCII" "another string";
2577
2578 // Check duplicate typedefs.
2579 typedef long *long_ptr;
2580 typedef long int *long_ptr;
2581 typedef long_ptr long_ptr;
2582
2583 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2584 struct anonymous
2585 {
2586 union {
2587 struct { int i; int j; };
2588 struct { int k; long int l; } w;
2589 };
2590 int m;
2591 } v1;
2592 '
2593
2594 # Test code for whether the C compiler supports C11 (body of main).
2595 ac_c_conftest_c11_main='
2596 _Static_assert ((offsetof (struct anonymous, i)
2597 == offsetof (struct anonymous, w.k)),
2598 "Anonymous union alignment botch");
2599 v1.i = 2;
2600 v1.w.k = 5;
2601 ok |= v1.i != 5;
2602 '
2603
2604 # Test code for whether the C compiler supports C11 (complete).
2605 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2606 ${ac_c_conftest_c99_globals}
2607 ${ac_c_conftest_c11_globals}
2608
2609 int
2610 main (int argc, char **argv)
2611 {
2612 int ok = 0;
2613 ${ac_c_conftest_c89_main}
2614 ${ac_c_conftest_c99_main}
2615 ${ac_c_conftest_c11_main}
2616 return ok;
2617 }
2618 "
2619
2620 # Test code for whether the C compiler supports C99 (complete).
2621 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2622 ${ac_c_conftest_c99_globals}
2623
2624 int
2625 main (int argc, char **argv)
2626 {
2627 int ok = 0;
2628 ${ac_c_conftest_c89_main}
2629 ${ac_c_conftest_c99_main}
2630 return ok;
2631 }
2632 "
2633
2634 # Test code for whether the C compiler supports C89 (complete).
2635 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2636
2637 int
2638 main (int argc, char **argv)
2639 {
2640 int ok = 0;
2641 ${ac_c_conftest_c89_main}
2642 return ok;
2643 }
2644 "
2645
2646 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2647 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2648 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2649 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2650 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2651 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2652 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2653 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2654 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2655
2656 # Auxiliary files required by this configure script.
2657 ac_aux_files="install-sh config.guess config.sub"
2658
2659 # Locations in which to look for auxiliary files.
2660 ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2661
2662 # Search for a directory containing all of the required auxiliary files,
2663 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2664 # If we don't find one directory that contains all the files we need,
2665 # we report the set of missing files from the *first* directory in
2666 # $ac_aux_dir_candidates and give up.
2667 ac_missing_aux_files=""
2668 ac_first_candidate=:
2669 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671 as_found=false
2672 for as_dir in $ac_aux_dir_candidates
2673 do
2674 IFS=$as_save_IFS
2675 case $as_dir in #(((
2676 '') as_dir=./ ;;
2677 */) ;;
2678 *) as_dir=$as_dir/ ;;
2679 esac
2680 as_found=:
2681
2682 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
2683 ac_aux_dir_found=yes
2684 ac_install_sh=
2685 for ac_aux in $ac_aux_files
2686 do
2687 # As a special case, if "install-sh" is required, that requirement
2688 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2689 # and $ac_install_sh is set appropriately for whichever one is found.
2690 if test x"$ac_aux" = x"install-sh"
2691 then
2692 if test -f "${as_dir}install-sh"; then
2693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
2694 ac_install_sh="${as_dir}install-sh -c"
2695 elif test -f "${as_dir}install.sh"; then
2696 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
2697 ac_install_sh="${as_dir}install.sh -c"
2698 elif test -f "${as_dir}shtool"; then
2699 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
2700 ac_install_sh="${as_dir}shtool install -c"
2701 else
2702 ac_aux_dir_found=no
2703 if $ac_first_candidate; then
2704 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
2705 else
2706 break
2707 fi
2708 fi
2709 else
2710 if test -f "${as_dir}${ac_aux}"; then
2711 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
2712 else
2713 ac_aux_dir_found=no
2714 if $ac_first_candidate; then
2715 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
2716 else
2717 break
2718 fi
2719 fi
2720 fi
2721 done
2722 if test "$ac_aux_dir_found" = yes; then
2723 ac_aux_dir="$as_dir"
2724 break
2725 fi
2726 ac_first_candidate=false
2727
2728 as_found=false
2729 done
2730 IFS=$as_save_IFS
2731 if $as_found
2732 then :
2733
2734 else $as_nop
2735 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
2736 fi
2737
2738
2739 # These three variables are undocumented and unsupported,
2740 # and are intended to be withdrawn in a future Autoconf release.
2741 # They can cause serious problems if a builder's source tree is in a directory
2742 # whose full name contains unusual characters.
2743 if test -f "${ac_aux_dir}config.guess"; then
2744 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
2745 fi
2746 if test -f "${ac_aux_dir}config.sub"; then
2747 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
2748 fi
2749 if test -f "$ac_aux_dir/configure"; then
2750 ac_configure="$SHELL ${ac_aux_dir}configure"
2751 fi
2752
2753 # Check that the precious variables saved in the cache have kept the same
2754 # value.
2755 ac_cache_corrupted=false
2756 for ac_var in $ac_precious_vars; do
2757 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2758 eval ac_new_set=\$ac_env_${ac_var}_set
2759 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2760 eval ac_new_val=\$ac_env_${ac_var}_value
2761 case $ac_old_set,$ac_new_set in
2762 set,)
2763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2764 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2765 ac_cache_corrupted=: ;;
2766 ,set)
2767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2768 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2769 ac_cache_corrupted=: ;;
2770 ,);;
2771 *)
2772 if test "x$ac_old_val" != "x$ac_new_val"; then
2773 # differences in whitespace do not lead to failure.
2774 ac_old_val_w=`echo x $ac_old_val`
2775 ac_new_val_w=`echo x $ac_new_val`
2776 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2778 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2779 ac_cache_corrupted=:
2780 else
2781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2782 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2783 eval $ac_var=\$ac_old_val
2784 fi
2785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2786 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2788 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2789 fi;;
2790 esac
2791 # Pass precious variables to config.status.
2792 if test "$ac_new_set" = set; then
2793 case $ac_new_val in
2794 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2795 *) ac_arg=$ac_var=$ac_new_val ;;
2796 esac
2797 case " $ac_configure_args " in
2798 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2799 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2800 esac
2801 fi
2802 done
2803 if $ac_cache_corrupted; then
2804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2805 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2807 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2808 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2809 and start over" "$LINENO" 5
2810 fi
2811 ## -------------------- ##
2812 ## Main body of script. ##
2813 ## -------------------- ##
2814
2815 ac_ext=c
2816 ac_cpp='$CPP $CPPFLAGS'
2817 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2818 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2819 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2820
2821
2822
2823
2824
2825
2826
2827 # Make sure we can run config.sub.
2828 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
2829 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
2830
2831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2832 printf %s "checking build system type... " >&6; }
2833 if test ${ac_cv_build+y}
2834 then :
2835 printf %s "(cached) " >&6
2836 else $as_nop
2837 ac_build_alias=$build_alias
2838 test "x$ac_build_alias" = x &&
2839 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
2840 test "x$ac_build_alias" = x &&
2841 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2842 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
2843 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
2844
2845 fi
2846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2847 printf "%s\n" "$ac_cv_build" >&6; }
2848 case $ac_cv_build in
2849 *-*-*) ;;
2850 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2851 esac
2852 build=$ac_cv_build
2853 ac_save_IFS=$IFS; IFS='-'
2854 set x $ac_cv_build
2855 shift
2856 build_cpu=$1
2857 build_vendor=$2
2858 shift; shift
2859 # Remember, the first character of IFS is used to create $*,
2860 # except with old shells:
2861 build_os=$*
2862 IFS=$ac_save_IFS
2863 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2864
2865
2866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2867 printf %s "checking host system type... " >&6; }
2868 if test ${ac_cv_host+y}
2869 then :
2870 printf %s "(cached) " >&6
2871 else $as_nop
2872 if test "x$host_alias" = x; then
2873 ac_cv_host=$ac_cv_build
2874 else
2875 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
2876 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
2877 fi
2878
2879 fi
2880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2881 printf "%s\n" "$ac_cv_host" >&6; }
2882 case $ac_cv_host in
2883 *-*-*) ;;
2884 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2885 esac
2886 host=$ac_cv_host
2887 ac_save_IFS=$IFS; IFS='-'
2888 set x $ac_cv_host
2889 shift
2890 host_cpu=$1
2891 host_vendor=$2
2892 shift; shift
2893 # Remember, the first character of IFS is used to create $*,
2894 # except with old shells:
2895 host_os=$*
2896 IFS=$ac_save_IFS
2897 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907 # Check whether --with-gcc was given.
2908 if test ${with_gcc+y}
2909 then :
2910 withval=$with_gcc;
2911 fi
2912
2913 V_INCLS=""
2914 if test "${srcdir}" != "." ; then
2915 V_INCLS="-I$srcdir"
2916 fi
2917 if test "${CFLAGS+set}" = set; then
2918 LBL_CFLAGS="$CFLAGS"
2919 fi
2920 if test -z "$CC" ; then
2921 case "$host_os" in
2922
2923 bsdi*)
2924 # Extract the first word of "shlicc2", so it can be a program name with args.
2925 set dummy shlicc2; ac_word=$2
2926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2927 printf %s "checking for $ac_word... " >&6; }
2928 if test ${ac_cv_prog_SHLICC2+y}
2929 then :
2930 printf %s "(cached) " >&6
2931 else $as_nop
2932 if test -n "$SHLICC2"; then
2933 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2934 else
2935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2936 for as_dir in $PATH
2937 do
2938 IFS=$as_save_IFS
2939 case $as_dir in #(((
2940 '') as_dir=./ ;;
2941 */) ;;
2942 *) as_dir=$as_dir/ ;;
2943 esac
2944 for ac_exec_ext in '' $ac_executable_extensions; do
2945 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2946 ac_cv_prog_SHLICC2="yes"
2947 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2948 break 2
2949 fi
2950 done
2951 done
2952 IFS=$as_save_IFS
2953
2954 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2955 fi
2956 fi
2957 SHLICC2=$ac_cv_prog_SHLICC2
2958 if test -n "$SHLICC2"; then
2959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2960 printf "%s\n" "$SHLICC2" >&6; }
2961 else
2962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2963 printf "%s\n" "no" >&6; }
2964 fi
2965
2966
2967 if test $SHLICC2 = yes ; then
2968 CC=shlicc2
2969 export CC
2970 fi
2971 ;;
2972 esac
2973 fi
2974 if test -z "$CC" -a "$with_gcc" = no ; then
2975 CC=cc
2976 export CC
2977 fi
2978
2979 #
2980 # Try to enable as many C99 features as we can.
2981 # At minimum, we want C++/C99-style // comments.
2982 #
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992 ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997 if test -n "$ac_tool_prefix"; then
2998 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2999 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3001 printf %s "checking for $ac_word... " >&6; }
3002 if test ${ac_cv_prog_CC+y}
3003 then :
3004 printf %s "(cached) " >&6
3005 else $as_nop
3006 if test -n "$CC"; then
3007 ac_cv_prog_CC="$CC" # Let the user override the test.
3008 else
3009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3010 for as_dir in $PATH
3011 do
3012 IFS=$as_save_IFS
3013 case $as_dir in #(((
3014 '') as_dir=./ ;;
3015 */) ;;
3016 *) as_dir=$as_dir/ ;;
3017 esac
3018 for ac_exec_ext in '' $ac_executable_extensions; do
3019 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3020 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3021 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3022 break 2
3023 fi
3024 done
3025 done
3026 IFS=$as_save_IFS
3027
3028 fi
3029 fi
3030 CC=$ac_cv_prog_CC
3031 if test -n "$CC"; then
3032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3033 printf "%s\n" "$CC" >&6; }
3034 else
3035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3036 printf "%s\n" "no" >&6; }
3037 fi
3038
3039
3040 fi
3041 if test -z "$ac_cv_prog_CC"; then
3042 ac_ct_CC=$CC
3043 # Extract the first word of "gcc", so it can be a program name with args.
3044 set dummy gcc; ac_word=$2
3045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3046 printf %s "checking for $ac_word... " >&6; }
3047 if test ${ac_cv_prog_ac_ct_CC+y}
3048 then :
3049 printf %s "(cached) " >&6
3050 else $as_nop
3051 if test -n "$ac_ct_CC"; then
3052 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3053 else
3054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3055 for as_dir in $PATH
3056 do
3057 IFS=$as_save_IFS
3058 case $as_dir in #(((
3059 '') as_dir=./ ;;
3060 */) ;;
3061 *) as_dir=$as_dir/ ;;
3062 esac
3063 for ac_exec_ext in '' $ac_executable_extensions; do
3064 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3065 ac_cv_prog_ac_ct_CC="gcc"
3066 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3067 break 2
3068 fi
3069 done
3070 done
3071 IFS=$as_save_IFS
3072
3073 fi
3074 fi
3075 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3076 if test -n "$ac_ct_CC"; then
3077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3078 printf "%s\n" "$ac_ct_CC" >&6; }
3079 else
3080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3081 printf "%s\n" "no" >&6; }
3082 fi
3083
3084 if test "x$ac_ct_CC" = x; then
3085 CC=""
3086 else
3087 case $cross_compiling:$ac_tool_warned in
3088 yes:)
3089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3090 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3091 ac_tool_warned=yes ;;
3092 esac
3093 CC=$ac_ct_CC
3094 fi
3095 else
3096 CC="$ac_cv_prog_CC"
3097 fi
3098
3099 if test -z "$CC"; then
3100 if test -n "$ac_tool_prefix"; then
3101 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3102 set dummy ${ac_tool_prefix}cc; ac_word=$2
3103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3104 printf %s "checking for $ac_word... " >&6; }
3105 if test ${ac_cv_prog_CC+y}
3106 then :
3107 printf %s "(cached) " >&6
3108 else $as_nop
3109 if test -n "$CC"; then
3110 ac_cv_prog_CC="$CC" # Let the user override the test.
3111 else
3112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3113 for as_dir in $PATH
3114 do
3115 IFS=$as_save_IFS
3116 case $as_dir in #(((
3117 '') as_dir=./ ;;
3118 */) ;;
3119 *) as_dir=$as_dir/ ;;
3120 esac
3121 for ac_exec_ext in '' $ac_executable_extensions; do
3122 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3123 ac_cv_prog_CC="${ac_tool_prefix}cc"
3124 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3125 break 2
3126 fi
3127 done
3128 done
3129 IFS=$as_save_IFS
3130
3131 fi
3132 fi
3133 CC=$ac_cv_prog_CC
3134 if test -n "$CC"; then
3135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3136 printf "%s\n" "$CC" >&6; }
3137 else
3138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3139 printf "%s\n" "no" >&6; }
3140 fi
3141
3142
3143 fi
3144 fi
3145 if test -z "$CC"; then
3146 # Extract the first word of "cc", so it can be a program name with args.
3147 set dummy cc; ac_word=$2
3148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3149 printf %s "checking for $ac_word... " >&6; }
3150 if test ${ac_cv_prog_CC+y}
3151 then :
3152 printf %s "(cached) " >&6
3153 else $as_nop
3154 if test -n "$CC"; then
3155 ac_cv_prog_CC="$CC" # Let the user override the test.
3156 else
3157 ac_prog_rejected=no
3158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3159 for as_dir in $PATH
3160 do
3161 IFS=$as_save_IFS
3162 case $as_dir in #(((
3163 '') as_dir=./ ;;
3164 */) ;;
3165 *) as_dir=$as_dir/ ;;
3166 esac
3167 for ac_exec_ext in '' $ac_executable_extensions; do
3168 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3169 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3170 ac_prog_rejected=yes
3171 continue
3172 fi
3173 ac_cv_prog_CC="cc"
3174 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3175 break 2
3176 fi
3177 done
3178 done
3179 IFS=$as_save_IFS
3180
3181 if test $ac_prog_rejected = yes; then
3182 # We found a bogon in the path, so make sure we never use it.
3183 set dummy $ac_cv_prog_CC
3184 shift
3185 if test $# != 0; then
3186 # We chose a different compiler from the bogus one.
3187 # However, it has the same basename, so the bogon will be chosen
3188 # first if we set CC to just the basename; use the full file name.
3189 shift
3190 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3191 fi
3192 fi
3193 fi
3194 fi
3195 CC=$ac_cv_prog_CC
3196 if test -n "$CC"; then
3197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3198 printf "%s\n" "$CC" >&6; }
3199 else
3200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3201 printf "%s\n" "no" >&6; }
3202 fi
3203
3204
3205 fi
3206 if test -z "$CC"; then
3207 if test -n "$ac_tool_prefix"; then
3208 for ac_prog in cl.exe
3209 do
3210 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3211 set dummy $ac_tool_prefix$ac_prog; 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_CC+y}
3215 then :
3216 printf %s "(cached) " >&6
3217 else $as_nop
3218 if test -n "$CC"; then
3219 ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$ac_prog"
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 fi
3241 fi
3242 CC=$ac_cv_prog_CC
3243 if test -n "$CC"; then
3244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3245 printf "%s\n" "$CC" >&6; }
3246 else
3247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248 printf "%s\n" "no" >&6; }
3249 fi
3250
3251
3252 test -n "$CC" && break
3253 done
3254 fi
3255 if test -z "$CC"; then
3256 ac_ct_CC=$CC
3257 for ac_prog in cl.exe
3258 do
3259 # Extract the first word of "$ac_prog", so it can be a program name with args.
3260 set dummy $ac_prog; ac_word=$2
3261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3262 printf %s "checking for $ac_word... " >&6; }
3263 if test ${ac_cv_prog_ac_ct_CC+y}
3264 then :
3265 printf %s "(cached) " >&6
3266 else $as_nop
3267 if test -n "$ac_ct_CC"; then
3268 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3269 else
3270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3271 for as_dir in $PATH
3272 do
3273 IFS=$as_save_IFS
3274 case $as_dir in #(((
3275 '') as_dir=./ ;;
3276 */) ;;
3277 *) as_dir=$as_dir/ ;;
3278 esac
3279 for ac_exec_ext in '' $ac_executable_extensions; do
3280 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3281 ac_cv_prog_ac_ct_CC="$ac_prog"
3282 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3283 break 2
3284 fi
3285 done
3286 done
3287 IFS=$as_save_IFS
3288
3289 fi
3290 fi
3291 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3292 if test -n "$ac_ct_CC"; then
3293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3294 printf "%s\n" "$ac_ct_CC" >&6; }
3295 else
3296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3297 printf "%s\n" "no" >&6; }
3298 fi
3299
3300
3301 test -n "$ac_ct_CC" && break
3302 done
3303
3304 if test "x$ac_ct_CC" = x; then
3305 CC=""
3306 else
3307 case $cross_compiling:$ac_tool_warned in
3308 yes:)
3309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3310 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3311 ac_tool_warned=yes ;;
3312 esac
3313 CC=$ac_ct_CC
3314 fi
3315 fi
3316
3317 fi
3318 if test -z "$CC"; then
3319 if test -n "$ac_tool_prefix"; then
3320 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3321 set dummy ${ac_tool_prefix}clang; ac_word=$2
3322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3323 printf %s "checking for $ac_word... " >&6; }
3324 if test ${ac_cv_prog_CC+y}
3325 then :
3326 printf %s "(cached) " >&6
3327 else $as_nop
3328 if test -n "$CC"; then
3329 ac_cv_prog_CC="$CC" # Let the user override the test.
3330 else
3331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332 for as_dir in $PATH
3333 do
3334 IFS=$as_save_IFS
3335 case $as_dir in #(((
3336 '') as_dir=./ ;;
3337 */) ;;
3338 *) as_dir=$as_dir/ ;;
3339 esac
3340 for ac_exec_ext in '' $ac_executable_extensions; do
3341 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3342 ac_cv_prog_CC="${ac_tool_prefix}clang"
3343 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3344 break 2
3345 fi
3346 done
3347 done
3348 IFS=$as_save_IFS
3349
3350 fi
3351 fi
3352 CC=$ac_cv_prog_CC
3353 if test -n "$CC"; then
3354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3355 printf "%s\n" "$CC" >&6; }
3356 else
3357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358 printf "%s\n" "no" >&6; }
3359 fi
3360
3361
3362 fi
3363 if test -z "$ac_cv_prog_CC"; then
3364 ac_ct_CC=$CC
3365 # Extract the first word of "clang", so it can be a program name with args.
3366 set dummy clang; ac_word=$2
3367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368 printf %s "checking for $ac_word... " >&6; }
3369 if test ${ac_cv_prog_ac_ct_CC+y}
3370 then :
3371 printf %s "(cached) " >&6
3372 else $as_nop
3373 if test -n "$ac_ct_CC"; then
3374 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3375 else
3376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3377 for as_dir in $PATH
3378 do
3379 IFS=$as_save_IFS
3380 case $as_dir in #(((
3381 '') as_dir=./ ;;
3382 */) ;;
3383 *) as_dir=$as_dir/ ;;
3384 esac
3385 for ac_exec_ext in '' $ac_executable_extensions; do
3386 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3387 ac_cv_prog_ac_ct_CC="clang"
3388 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3389 break 2
3390 fi
3391 done
3392 done
3393 IFS=$as_save_IFS
3394
3395 fi
3396 fi
3397 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3398 if test -n "$ac_ct_CC"; then
3399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3400 printf "%s\n" "$ac_ct_CC" >&6; }
3401 else
3402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3403 printf "%s\n" "no" >&6; }
3404 fi
3405
3406 if test "x$ac_ct_CC" = x; then
3407 CC=""
3408 else
3409 case $cross_compiling:$ac_tool_warned in
3410 yes:)
3411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3412 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3413 ac_tool_warned=yes ;;
3414 esac
3415 CC=$ac_ct_CC
3416 fi
3417 else
3418 CC="$ac_cv_prog_CC"
3419 fi
3420
3421 fi
3422
3423
3424 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3425 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3426 as_fn_error $? "no acceptable C compiler found in \$PATH
3427 See \`config.log' for more details" "$LINENO" 5; }
3428
3429 # Provide some information about the compiler.
3430 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3431 set X $ac_compile
3432 ac_compiler=$2
3433 for ac_option in --version -v -V -qversion -version; do
3434 { { ac_try="$ac_compiler $ac_option >&5"
3435 case "(($ac_try" in
3436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3437 *) ac_try_echo=$ac_try;;
3438 esac
3439 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3440 printf "%s\n" "$ac_try_echo"; } >&5
3441 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3442 ac_status=$?
3443 if test -s conftest.err; then
3444 sed '10a\
3445 ... rest of stderr output deleted ...
3446 10q' conftest.err >conftest.er1
3447 cat conftest.er1 >&5
3448 fi
3449 rm -f conftest.er1 conftest.err
3450 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3451 test $ac_status = 0; }
3452 done
3453
3454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3455 /* end confdefs.h. */
3456
3457 int
3458 main (void)
3459 {
3460
3461 ;
3462 return 0;
3463 }
3464 _ACEOF
3465 ac_clean_files_save=$ac_clean_files
3466 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3467 # Try to create an executable without -o first, disregard a.out.
3468 # It will help us diagnose broken compilers, and finding out an intuition
3469 # of exeext.
3470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3471 printf %s "checking whether the C compiler works... " >&6; }
3472 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3473
3474 # The possible output files:
3475 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3476
3477 ac_rmfiles=
3478 for ac_file in $ac_files
3479 do
3480 case $ac_file in
3481 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3482 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3483 esac
3484 done
3485 rm -f $ac_rmfiles
3486
3487 if { { ac_try="$ac_link_default"
3488 case "(($ac_try" in
3489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3490 *) ac_try_echo=$ac_try;;
3491 esac
3492 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3493 printf "%s\n" "$ac_try_echo"; } >&5
3494 (eval "$ac_link_default") 2>&5
3495 ac_status=$?
3496 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3497 test $ac_status = 0; }
3498 then :
3499 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3500 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3501 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3502 # so that the user can short-circuit this test for compilers unknown to
3503 # Autoconf.
3504 for ac_file in $ac_files ''
3505 do
3506 test -f "$ac_file" || continue
3507 case $ac_file in
3508 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3509 ;;
3510 [ab].out )
3511 # We found the default executable, but exeext='' is most
3512 # certainly right.
3513 break;;
3514 *.* )
3515 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3516 then :; else
3517 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3518 fi
3519 # We set ac_cv_exeext here because the later test for it is not
3520 # safe: cross compilers may not add the suffix if given an `-o'
3521 # argument, so we may need to know it at that point already.
3522 # Even if this section looks crufty: it has the advantage of
3523 # actually working.
3524 break;;
3525 * )
3526 break;;
3527 esac
3528 done
3529 test "$ac_cv_exeext" = no && ac_cv_exeext=
3530
3531 else $as_nop
3532 ac_file=''
3533 fi
3534 if test -z "$ac_file"
3535 then :
3536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3537 printf "%s\n" "no" >&6; }
3538 printf "%s\n" "$as_me: failed program was:" >&5
3539 sed 's/^/| /' conftest.$ac_ext >&5
3540
3541 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3542 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3543 as_fn_error 77 "C compiler cannot create executables
3544 See \`config.log' for more details" "$LINENO" 5; }
3545 else $as_nop
3546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3547 printf "%s\n" "yes" >&6; }
3548 fi
3549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3550 printf %s "checking for C compiler default output file name... " >&6; }
3551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3552 printf "%s\n" "$ac_file" >&6; }
3553 ac_exeext=$ac_cv_exeext
3554
3555 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3556 ac_clean_files=$ac_clean_files_save
3557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3558 printf %s "checking for suffix of executables... " >&6; }
3559 if { { ac_try="$ac_link"
3560 case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563 esac
3564 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565 printf "%s\n" "$ac_try_echo"; } >&5
3566 (eval "$ac_link") 2>&5
3567 ac_status=$?
3568 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }
3570 then :
3571 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3572 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3573 # work properly (i.e., refer to `conftest.exe'), while it won't with
3574 # `rm'.
3575 for ac_file in conftest.exe conftest conftest.*; do
3576 test -f "$ac_file" || continue
3577 case $ac_file in
3578 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3579 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3580 break;;
3581 * ) break;;
3582 esac
3583 done
3584 else $as_nop
3585 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3586 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3587 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3588 See \`config.log' for more details" "$LINENO" 5; }
3589 fi
3590 rm -f conftest conftest$ac_cv_exeext
3591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3592 printf "%s\n" "$ac_cv_exeext" >&6; }
3593
3594 rm -f conftest.$ac_ext
3595 EXEEXT=$ac_cv_exeext
3596 ac_exeext=$EXEEXT
3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598 /* end confdefs.h. */
3599 #include <stdio.h>
3600 int
3601 main (void)
3602 {
3603 FILE *f = fopen ("conftest.out", "w");
3604 return ferror (f) || fclose (f) != 0;
3605
3606 ;
3607 return 0;
3608 }
3609 _ACEOF
3610 ac_clean_files="$ac_clean_files conftest.out"
3611 # Check that the compiler produces executables we can run. If not, either
3612 # the compiler is broken, or we cross compile.
3613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3614 printf %s "checking whether we are cross compiling... " >&6; }
3615 if test "$cross_compiling" != yes; then
3616 { { ac_try="$ac_link"
3617 case "(($ac_try" in
3618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3619 *) ac_try_echo=$ac_try;;
3620 esac
3621 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3622 printf "%s\n" "$ac_try_echo"; } >&5
3623 (eval "$ac_link") 2>&5
3624 ac_status=$?
3625 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3626 test $ac_status = 0; }
3627 if { ac_try='./conftest$ac_cv_exeext'
3628 { { case "(($ac_try" in
3629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3630 *) ac_try_echo=$ac_try;;
3631 esac
3632 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3633 printf "%s\n" "$ac_try_echo"; } >&5
3634 (eval "$ac_try") 2>&5
3635 ac_status=$?
3636 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3637 test $ac_status = 0; }; }; then
3638 cross_compiling=no
3639 else
3640 if test "$cross_compiling" = maybe; then
3641 cross_compiling=yes
3642 else
3643 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3644 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3645 as_fn_error 77 "cannot run C compiled programs.
3646 If you meant to cross compile, use \`--host'.
3647 See \`config.log' for more details" "$LINENO" 5; }
3648 fi
3649 fi
3650 fi
3651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3652 printf "%s\n" "$cross_compiling" >&6; }
3653
3654 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3655 ac_clean_files=$ac_clean_files_save
3656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3657 printf %s "checking for suffix of object files... " >&6; }
3658 if test ${ac_cv_objext+y}
3659 then :
3660 printf %s "(cached) " >&6
3661 else $as_nop
3662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3663 /* end confdefs.h. */
3664
3665 int
3666 main (void)
3667 {
3668
3669 ;
3670 return 0;
3671 }
3672 _ACEOF
3673 rm -f conftest.o conftest.obj
3674 if { { ac_try="$ac_compile"
3675 case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678 esac
3679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680 printf "%s\n" "$ac_try_echo"; } >&5
3681 (eval "$ac_compile") 2>&5
3682 ac_status=$?
3683 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }
3685 then :
3686 for ac_file in conftest.o conftest.obj conftest.*; do
3687 test -f "$ac_file" || continue;
3688 case $ac_file in
3689 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3690 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3691 break;;
3692 esac
3693 done
3694 else $as_nop
3695 printf "%s\n" "$as_me: failed program was:" >&5
3696 sed 's/^/| /' conftest.$ac_ext >&5
3697
3698 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3699 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3700 as_fn_error $? "cannot compute suffix of object files: cannot compile
3701 See \`config.log' for more details" "$LINENO" 5; }
3702 fi
3703 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3704 fi
3705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3706 printf "%s\n" "$ac_cv_objext" >&6; }
3707 OBJEXT=$ac_cv_objext
3708 ac_objext=$OBJEXT
3709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3710 printf %s "checking whether the compiler supports GNU C... " >&6; }
3711 if test ${ac_cv_c_compiler_gnu+y}
3712 then :
3713 printf %s "(cached) " >&6
3714 else $as_nop
3715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3716 /* end confdefs.h. */
3717
3718 int
3719 main (void)
3720 {
3721 #ifndef __GNUC__
3722 choke me
3723 #endif
3724
3725 ;
3726 return 0;
3727 }
3728 _ACEOF
3729 if ac_fn_c_try_compile "$LINENO"
3730 then :
3731 ac_compiler_gnu=yes
3732 else $as_nop
3733 ac_compiler_gnu=no
3734 fi
3735 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3736 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3737
3738 fi
3739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3740 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3741 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3742
3743 if test $ac_compiler_gnu = yes; then
3744 GCC=yes
3745 else
3746 GCC=
3747 fi
3748 ac_test_CFLAGS=${CFLAGS+y}
3749 ac_save_CFLAGS=$CFLAGS
3750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3751 printf %s "checking whether $CC accepts -g... " >&6; }
3752 if test ${ac_cv_prog_cc_g+y}
3753 then :
3754 printf %s "(cached) " >&6
3755 else $as_nop
3756 ac_save_c_werror_flag=$ac_c_werror_flag
3757 ac_c_werror_flag=yes
3758 ac_cv_prog_cc_g=no
3759 CFLAGS="-g"
3760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761 /* end confdefs.h. */
3762
3763 int
3764 main (void)
3765 {
3766
3767 ;
3768 return 0;
3769 }
3770 _ACEOF
3771 if ac_fn_c_try_compile "$LINENO"
3772 then :
3773 ac_cv_prog_cc_g=yes
3774 else $as_nop
3775 CFLAGS=""
3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3777 /* end confdefs.h. */
3778
3779 int
3780 main (void)
3781 {
3782
3783 ;
3784 return 0;
3785 }
3786 _ACEOF
3787 if ac_fn_c_try_compile "$LINENO"
3788 then :
3789
3790 else $as_nop
3791 ac_c_werror_flag=$ac_save_c_werror_flag
3792 CFLAGS="-g"
3793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3794 /* end confdefs.h. */
3795
3796 int
3797 main (void)
3798 {
3799
3800 ;
3801 return 0;
3802 }
3803 _ACEOF
3804 if ac_fn_c_try_compile "$LINENO"
3805 then :
3806 ac_cv_prog_cc_g=yes
3807 fi
3808 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3809 fi
3810 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3811 fi
3812 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3813 ac_c_werror_flag=$ac_save_c_werror_flag
3814 fi
3815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3816 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3817 if test $ac_test_CFLAGS; then
3818 CFLAGS=$ac_save_CFLAGS
3819 elif test $ac_cv_prog_cc_g = yes; then
3820 if test "$GCC" = yes; then
3821 CFLAGS="-g -O2"
3822 else
3823 CFLAGS="-g"
3824 fi
3825 else
3826 if test "$GCC" = yes; then
3827 CFLAGS="-O2"
3828 else
3829 CFLAGS=
3830 fi
3831 fi
3832 ac_prog_cc_stdc=no
3833 if test x$ac_prog_cc_stdc = xno
3834 then :
3835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3836 printf %s "checking for $CC option to enable C11 features... " >&6; }
3837 if test ${ac_cv_prog_cc_c11+y}
3838 then :
3839 printf %s "(cached) " >&6
3840 else $as_nop
3841 ac_cv_prog_cc_c11=no
3842 ac_save_CC=$CC
3843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3844 /* end confdefs.h. */
3845 $ac_c_conftest_c11_program
3846 _ACEOF
3847 for ac_arg in '' -std=gnu11
3848 do
3849 CC="$ac_save_CC $ac_arg"
3850 if ac_fn_c_try_compile "$LINENO"
3851 then :
3852 ac_cv_prog_cc_c11=$ac_arg
3853 fi
3854 rm -f core conftest.err conftest.$ac_objext conftest.beam
3855 test "x$ac_cv_prog_cc_c11" != "xno" && break
3856 done
3857 rm -f conftest.$ac_ext
3858 CC=$ac_save_CC
3859 fi
3860
3861 if test "x$ac_cv_prog_cc_c11" = xno
3862 then :
3863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3864 printf "%s\n" "unsupported" >&6; }
3865 else $as_nop
3866 if test "x$ac_cv_prog_cc_c11" = x
3867 then :
3868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3869 printf "%s\n" "none needed" >&6; }
3870 else $as_nop
3871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3872 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3873 CC="$CC $ac_cv_prog_cc_c11"
3874 fi
3875 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3876 ac_prog_cc_stdc=c11
3877 fi
3878 fi
3879 if test x$ac_prog_cc_stdc = xno
3880 then :
3881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3882 printf %s "checking for $CC option to enable C99 features... " >&6; }
3883 if test ${ac_cv_prog_cc_c99+y}
3884 then :
3885 printf %s "(cached) " >&6
3886 else $as_nop
3887 ac_cv_prog_cc_c99=no
3888 ac_save_CC=$CC
3889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3890 /* end confdefs.h. */
3891 $ac_c_conftest_c99_program
3892 _ACEOF
3893 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3894 do
3895 CC="$ac_save_CC $ac_arg"
3896 if ac_fn_c_try_compile "$LINENO"
3897 then :
3898 ac_cv_prog_cc_c99=$ac_arg
3899 fi
3900 rm -f core conftest.err conftest.$ac_objext conftest.beam
3901 test "x$ac_cv_prog_cc_c99" != "xno" && break
3902 done
3903 rm -f conftest.$ac_ext
3904 CC=$ac_save_CC
3905 fi
3906
3907 if test "x$ac_cv_prog_cc_c99" = xno
3908 then :
3909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3910 printf "%s\n" "unsupported" >&6; }
3911 else $as_nop
3912 if test "x$ac_cv_prog_cc_c99" = x
3913 then :
3914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3915 printf "%s\n" "none needed" >&6; }
3916 else $as_nop
3917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3918 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3919 CC="$CC $ac_cv_prog_cc_c99"
3920 fi
3921 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3922 ac_prog_cc_stdc=c99
3923 fi
3924 fi
3925 if test x$ac_prog_cc_stdc = xno
3926 then :
3927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3928 printf %s "checking for $CC option to enable C89 features... " >&6; }
3929 if test ${ac_cv_prog_cc_c89+y}
3930 then :
3931 printf %s "(cached) " >&6
3932 else $as_nop
3933 ac_cv_prog_cc_c89=no
3934 ac_save_CC=$CC
3935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3936 /* end confdefs.h. */
3937 $ac_c_conftest_c89_program
3938 _ACEOF
3939 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3940 do
3941 CC="$ac_save_CC $ac_arg"
3942 if ac_fn_c_try_compile "$LINENO"
3943 then :
3944 ac_cv_prog_cc_c89=$ac_arg
3945 fi
3946 rm -f core conftest.err conftest.$ac_objext conftest.beam
3947 test "x$ac_cv_prog_cc_c89" != "xno" && break
3948 done
3949 rm -f conftest.$ac_ext
3950 CC=$ac_save_CC
3951 fi
3952
3953 if test "x$ac_cv_prog_cc_c89" = xno
3954 then :
3955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3956 printf "%s\n" "unsupported" >&6; }
3957 else $as_nop
3958 if test "x$ac_cv_prog_cc_c89" = x
3959 then :
3960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3961 printf "%s\n" "none needed" >&6; }
3962 else $as_nop
3963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3964 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3965 CC="$CC $ac_cv_prog_cc_c89"
3966 fi
3967 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3968 ac_prog_cc_stdc=c89
3969 fi
3970 fi
3971
3972 ac_ext=c
3973 ac_cpp='$CPP $CPPFLAGS'
3974 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3975 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3976 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3977
3978
3979 if test "$ac_cv_prog_cc_c99" = "no"; then
3980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
3981 printf "%s\n" "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
3982 fi
3983
3984
3985
3986
3987 if test "$GCC" = yes ; then
3988 #
3989 # -Werror forces warnings to be errors.
3990 #
3991 ac_lbl_cc_force_warning_errors=-Werror
3992 else
3993 V_INCLS="$V_INCLS -I/usr/local/include"
3994 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3995
3996 case "$host_os" in
3997
3998 darwin*)
3999 #
4000 # This is assumed either to be GCC or clang, both
4001 # of which use -Werror to force warnings to be errors.
4002 #
4003 ac_lbl_cc_force_warning_errors=-Werror
4004 ;;
4005
4006 hpux*)
4007 #
4008 # HP C, which is what we presume we're using, doesn't
4009 # exit with a non-zero exit status if we hand it an
4010 # invalid -W flag, can't be forced to do so even with
4011 # +We, and doesn't handle GCC-style -W flags, so we
4012 # don't want to try using GCC-style -W flags.
4013 #
4014 ac_lbl_cc_dont_try_gcc_dashW=yes
4015 ;;
4016
4017 irix*)
4018 #
4019 # MIPS C, which is what we presume we're using, doesn't
4020 # necessarily exit with a non-zero exit status if we
4021 # hand it an invalid -W flag, can't be forced to do
4022 # so, and doesn't handle GCC-style -W flags, so we
4023 # don't want to try using GCC-style -W flags.
4024 #
4025 ac_lbl_cc_dont_try_gcc_dashW=yes
4026 #
4027 # It also, apparently, defaults to "char" being
4028 # unsigned, unlike most other C implementations;
4029 # I suppose we could say "signed char" whenever
4030 # we want to guarantee a signed "char", but let's
4031 # just force signed chars.
4032 #
4033 # -xansi is normally the default, but the
4034 # configure script was setting it; perhaps -cckr
4035 # was the default in the Old Days. (Then again,
4036 # that would probably be for backwards compatibility
4037 # in the days when ANSI C was Shiny and New, i.e.
4038 # 1989 and the early '90's, so maybe we can just
4039 # drop support for those compilers.)
4040 #
4041 # -g is equivalent to -g2, which turns off
4042 # optimization; we choose -g3, which generates
4043 # debugging information but doesn't turn off
4044 # optimization (even if the optimization would
4045 # cause inaccuracies in debugging).
4046 #
4047 V_CCOPT="$V_CCOPT -xansi -signed -g3"
4048 ;;
4049
4050 osf*)
4051 #
4052 # Presumed to be DEC OSF/1, Digital UNIX, or
4053 # Tru64 UNIX.
4054 #
4055 # The DEC C compiler, which is what we presume we're
4056 # using, doesn't exit with a non-zero exit status if we
4057 # hand it an invalid -W flag, can't be forced to do
4058 # so, and doesn't handle GCC-style -W flags, so we
4059 # don't want to try using GCC-style -W flags.
4060 #
4061 ac_lbl_cc_dont_try_gcc_dashW=yes
4062 #
4063 # -g is equivalent to -g2, which turns off
4064 # optimization; we choose -g3, which generates
4065 # debugging information but doesn't turn off
4066 # optimization (even if the optimization would
4067 # cause inaccuracies in debugging).
4068 #
4069 V_CCOPT="$V_CCOPT -g3"
4070 ;;
4071
4072 solaris*)
4073 #
4074 # Assumed to be Sun C, which requires -errwarn to force
4075 # warnings to be treated as errors.
4076 #
4077 ac_lbl_cc_force_warning_errors=-errwarn
4078 ;;
4079
4080 ultrix*)
4081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
4082 printf %s "checking that Ultrix $CC hacks const in prototypes... " >&6; }
4083 if test ${ac_cv_lbl_cc_const_proto+y}
4084 then :
4085 printf %s "(cached) " >&6
4086 else $as_nop
4087
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4089 /* end confdefs.h. */
4090 #include <sys/types.h>
4091 int
4092 main (void)
4093 {
4094 struct a { int b; };
4095 void c(const struct a *)
4096 ;
4097 return 0;
4098 }
4099 _ACEOF
4100 if ac_fn_c_try_compile "$LINENO"
4101 then :
4102 ac_cv_lbl_cc_const_proto=yes
4103 else $as_nop
4104 ac_cv_lbl_cc_const_proto=no
4105 fi
4106 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4107 fi
4108
4109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
4110 printf "%s\n" "$ac_cv_lbl_cc_const_proto" >&6; }
4111 if test $ac_cv_lbl_cc_const_proto = no ; then
4112
4113 printf "%s\n" "#define const /**/" >>confdefs.h
4114
4115 fi
4116 ;;
4117 esac
4118 V_CCOPT="$V_CCOPT -O"
4119 fi
4120
4121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4122 printf %s "checking for inline... " >&6; }
4123 save_CFLAGS="$CFLAGS"
4124 CFLAGS="$V_CCOPT"
4125 if test ${ac_cv_lbl_inline+y}
4126 then :
4127 printf %s "(cached) " >&6
4128 else $as_nop
4129
4130 ac_cv_lbl_inline=""
4131 ac_lbl_cc_inline=no
4132 for ac_lbl_inline in inline __inline__ __inline
4133 do
4134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4135 /* end confdefs.h. */
4136 #define inline $ac_lbl_inline
4137 static inline struct iltest *foo(void);
4138 struct iltest {
4139 int iltest1;
4140 int iltest2;
4141 };
4142
4143 static inline struct iltest *
4144 foo()
4145 {
4146 static struct iltest xxx;
4147
4148 return &xxx;
4149 }
4150 int
4151 main (void)
4152 {
4153
4154 ;
4155 return 0;
4156 }
4157 _ACEOF
4158 if ac_fn_c_try_compile "$LINENO"
4159 then :
4160 ac_lbl_cc_inline=yes
4161 fi
4162 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4163 if test "$ac_lbl_cc_inline" = yes ; then
4164 break;
4165 fi
4166 done
4167 if test "$ac_lbl_cc_inline" = yes ; then
4168 ac_cv_lbl_inline=$ac_lbl_inline
4169 fi
4170 fi
4171
4172 CFLAGS="$save_CFLAGS"
4173 if test ! -z "$ac_cv_lbl_inline" ; then
4174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4175 printf "%s\n" "$ac_cv_lbl_inline" >&6; }
4176 else
4177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4178 printf "%s\n" "no" >&6; }
4179 fi
4180
4181 printf "%s\n" "#define inline $ac_cv_lbl_inline" >>confdefs.h
4182
4183
4184 ac_header= ac_cache=
4185 for ac_item in $ac_header_c_list
4186 do
4187 if test $ac_cache; then
4188 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4189 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4190 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4191 fi
4192 ac_header= ac_cache=
4193 elif test $ac_header; then
4194 ac_cache=$ac_item
4195 else
4196 ac_header=$ac_item
4197 fi
4198 done
4199
4200
4201
4202
4203
4204
4205
4206
4207 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4208 then :
4209
4210 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4211
4212 fi
4213 ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
4214 if test "x$ac_cv_header_fcntl_h" = xyes
4215 then :
4216 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
4217
4218 fi
4219 ac_fn_c_check_header_compile "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default"
4220 if test "x$ac_cv_header_rpc_rpc_h" = xyes
4221 then :
4222 printf "%s\n" "#define HAVE_RPC_RPC_H 1" >>confdefs.h
4223
4224 fi
4225 ac_fn_c_check_header_compile "$LINENO" "rpc/rpcent.h" "ac_cv_header_rpc_rpcent_h" "$ac_includes_default"
4226 if test "x$ac_cv_header_rpc_rpcent_h" = xyes
4227 then :
4228 printf "%s\n" "#define HAVE_RPC_RPCENT_H 1" >>confdefs.h
4229
4230 fi
4231 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default"
4232 if test "x$ac_cv_header_net_if_h" = xyes
4233 then :
4234 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
4235
4236 fi
4237
4238
4239 case "$host_os" in
4240
4241 darwin*)
4242 # Check whether --enable-universal was given.
4243 if test ${enable_universal+y}
4244 then :
4245 enableval=$enable_universal;
4246 fi
4247
4248 if test "$enable_universal" != "no"; then
4249 case "$host_os" in
4250
4251 darwin9.*)
4252 #
4253 # Leopard. Build for x86 and 32-bit PowerPC, with
4254 # x86 first. (That's what Apple does.)
4255 #
4256 V_CCOPT="$V_CCOPT -arch i386 -arch ppc"
4257 LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
4258 ;;
4259
4260 darwin10.*)
4261 #
4262 # Snow Leopard. Build for x86-64 and x86, with
4263 # x86-64 first. (That's what Apple does.)
4264 #
4265 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
4266 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
4267 ;;
4268 esac
4269 fi
4270 ;;
4271 esac
4272
4273
4274
4275 # Check whether --with-smi was given.
4276 if test ${with_smi+y}
4277 then :
4278 withval=$with_smi;
4279 else $as_nop
4280 with_smi=yes
4281 fi
4282
4283
4284 if test "x$with_smi" != "xno" ; then
4285 ac_fn_c_check_header_compile "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default"
4286 if test "x$ac_cv_header_smi_h" = xyes
4287 then :
4288
4289 #
4290 # OK, we found smi.h. Do we have libsmi with smiInit?
4291 #
4292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5
4293 printf %s "checking for smiInit in -lsmi... " >&6; }
4294 if test ${ac_cv_lib_smi_smiInit+y}
4295 then :
4296 printf %s "(cached) " >&6
4297 else $as_nop
4298 ac_check_lib_save_LIBS=$LIBS
4299 LIBS="-lsmi $LIBS"
4300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301 /* end confdefs.h. */
4302
4303 /* Override any GCC internal prototype to avoid an error.
4304 Use char because int might match the return type of a GCC
4305 builtin and then its argument prototype would still apply. */
4306 char smiInit ();
4307 int
4308 main (void)
4309 {
4310 return smiInit ();
4311 ;
4312 return 0;
4313 }
4314 _ACEOF
4315 if ac_fn_c_try_link "$LINENO"
4316 then :
4317 ac_cv_lib_smi_smiInit=yes
4318 else $as_nop
4319 ac_cv_lib_smi_smiInit=no
4320 fi
4321 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4322 conftest$ac_exeext conftest.$ac_ext
4323 LIBS=$ac_check_lib_save_LIBS
4324 fi
4325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5
4326 printf "%s\n" "$ac_cv_lib_smi_smiInit" >&6; }
4327 if test "x$ac_cv_lib_smi_smiInit" = xyes
4328 then :
4329
4330 #
4331 # OK, we have libsmi with smiInit. Can we use it?
4332 #
4333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5
4334 printf %s "checking whether to enable libsmi... " >&6; }
4335 savedlibs="$LIBS"
4336 LIBS="-lsmi $LIBS"
4337 if test "$cross_compiling" = yes
4338 then :
4339
4340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5
4341 printf "%s\n" "not when cross-compiling" >&6; }
4342 LIBS="$savedlibs"
4343
4344
4345 else $as_nop
4346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4347 /* end confdefs.h. */
4348
4349 /* libsmi available check */
4350 #include <stdio.h>
4351 #include <stdlib.h>
4352 #include <string.h>
4353 #include <smi.h>
4354 int main()
4355 {
4356 int current, revision, age, n;
4357 const int required = 2;
4358 if (smiInit(""))
4359 exit(1);
4360 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
4361 exit(2);
4362 n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
4363 if (n != 3)
4364 exit(3);
4365 if (required < current - age || required > current)
4366 exit(4);
4367 exit(0);
4368 }
4369
4370 _ACEOF
4371 if ac_fn_c_try_run "$LINENO"
4372 then :
4373
4374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4375 printf "%s\n" "yes" >&6; }
4376
4377 printf "%s\n" "#define USE_LIBSMI 1" >>confdefs.h
4378
4379
4380 else $as_nop
4381
4382 case $? in
4383 1) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5
4384 printf "%s\n" "no - smiInit failed" >&6; } ;;
4385 2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5
4386 printf "%s\n" "no - header/library version mismatch" >&6; } ;;
4387 3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5
4388 printf "%s\n" "no - can't determine library version" >&6; } ;;
4389 4) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5
4390 printf "%s\n" "no - too old" >&6; } ;;
4391 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392 printf "%s\n" "no" >&6; } ;;
4393 esac
4394 LIBS="$savedlibs"
4395
4396 fi
4397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4398 conftest.$ac_objext conftest.beam conftest.$ac_ext
4399 fi
4400
4401
4402 fi
4403
4404
4405 fi
4406
4407 fi
4408
4409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the instrument functions code" >&5
4410 printf %s "checking whether to enable the instrument functions code... " >&6; }
4411 # Check whether --enable-instrument-functions was given.
4412 if test ${enable_instrument_functions+y}
4413 then :
4414 enableval=$enable_instrument_functions;
4415 else $as_nop
4416 enableval=no
4417 fi
4418
4419 case "$enableval" in
4420 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4421 printf "%s\n" "yes" >&6; }
4422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bfd_init in -lbfd" >&5
4423 printf %s "checking for bfd_init in -lbfd... " >&6; }
4424 if test ${ac_cv_lib_bfd_bfd_init+y}
4425 then :
4426 printf %s "(cached) " >&6
4427 else $as_nop
4428 ac_check_lib_save_LIBS=$LIBS
4429 LIBS="-lbfd $LIBS"
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431 /* end confdefs.h. */
4432
4433 /* Override any GCC internal prototype to avoid an error.
4434 Use char because int might match the return type of a GCC
4435 builtin and then its argument prototype would still apply. */
4436 char bfd_init ();
4437 int
4438 main (void)
4439 {
4440 return bfd_init ();
4441 ;
4442 return 0;
4443 }
4444 _ACEOF
4445 if ac_fn_c_try_link "$LINENO"
4446 then :
4447 ac_cv_lib_bfd_bfd_init=yes
4448 else $as_nop
4449 ac_cv_lib_bfd_bfd_init=no
4450 fi
4451 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4452 conftest$ac_exeext conftest.$ac_ext
4453 LIBS=$ac_check_lib_save_LIBS
4454 fi
4455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_init" >&5
4456 printf "%s\n" "$ac_cv_lib_bfd_bfd_init" >&6; }
4457 if test "x$ac_cv_lib_bfd_bfd_init" = xyes
4458 then :
4459 true
4460 else $as_nop
4461 as_fn_error $? "--enable-instrument-functions was given, but test for library libbfd failed. Please install the 'binutils-dev' package." "$LINENO" 5
4462 fi
4463
4464
4465 printf "%s\n" "#define ENABLE_INSTRUMENT_FUNCTIONS 1" >>confdefs.h
4466
4467 LOCALSRC="$LOCALSRC instrument-functions.c"
4468 # Add '-finstrument-functions' instrumentation option to generate
4469 # instrumentation calls for entry and exit to functions.
4470 # Try to avoid Address Space Layout Randomization (ALSR).
4471 CFLAGS="$CFLAGS -O0 -ggdb -finstrument-functions -fno-stack-protector -fno-pic"
4472 LDFLAGS="$LDFLAGS -O0 -ggdb -fno-stack-protector -no-pie"
4473 LIBS="$LIBS -lbfd"
4474 ;;
4475 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476 printf "%s\n" "no" >&6; }
4477 ;;
4478 esac
4479
4480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5
4481 printf %s "checking whether to enable the possibly-buggy SMB printer... " >&6; }
4482 # Check whether --enable-smb was given.
4483 if test ${enable_smb+y}
4484 then :
4485 enableval=$enable_smb;
4486 else $as_nop
4487 enableval=no
4488 fi
4489
4490 case "$enableval" in
4491 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4492 printf "%s\n" "yes" >&6; }
4493
4494 printf "%s\n" "#define ENABLE_SMB 1" >>confdefs.h
4495
4496 LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
4497 ;;
4498 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4499 printf "%s\n" "no" >&6; }
4500 ;;
4501 esac
4502
4503
4504 # Check whether --with-user was given.
4505 if test ${with_user+y}
4506 then :
4507 withval=$with_user;
4508 fi
4509
4510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to drop root privileges by default" >&5
4511 printf %s "checking whether to drop root privileges by default... " >&6; }
4512 if test ! -z "$with_user" ; then
4513
4514 printf "%s\n" "#define WITH_USER \"$withval\"" >>confdefs.h
4515
4516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
4517 printf "%s\n" "to \"$withval\"" >&6; }
4518 else
4519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520 printf "%s\n" "no" >&6; }
4521 fi
4522
4523
4524 # Check whether --with-chroot was given.
4525 if test ${with_chroot+y}
4526 then :
4527 withval=$with_chroot;
4528 fi
4529
4530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to chroot" >&5
4531 printf %s "checking whether to chroot... " >&6; }
4532 if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
4533
4534 printf "%s\n" "#define WITH_CHROOT \"$withval\"" >>confdefs.h
4535
4536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
4537 printf "%s\n" "to \"$withval\"" >&6; }
4538 else
4539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540 printf "%s\n" "no" >&6; }
4541 fi
4542
4543
4544 # Check whether --with-sandbox-capsicum was given.
4545 if test ${with_sandbox_capsicum+y}
4546 then :
4547 withval=$with_sandbox_capsicum;
4548 fi
4549
4550 #
4551 # Check whether various functions are available. If any are, set
4552 # ac_lbl_capsicum_function_seen to yes; if any are not, set
4553 # ac_lbl_capsicum_function_not_seen to yes.
4554 #
4555 # We don't check cap_rights_init(), as it's a macro, wrapping another
4556 # function, in at least some versions of FreeBSD, and AC_CHECK_FUNCS()
4557 # doesn't handle that.
4558 #
4559 # All of the ones we check for must be available in order to enable
4560 # capsicum sandboxing.
4561 #
4562 # XXX - do we need to check for all of them, or are there some that, if
4563 # present, imply others are present?
4564 #
4565 if test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then
4566 #
4567 # First, make sure we have the required header.
4568 #
4569 ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default"
4570 if test "x$ac_cv_header_sys_capsicum_h" = xyes
4571 then :
4572
4573 #
4574 # We do; now make sure we have the required functions.
4575 #
4576
4577 for ac_func in cap_enter cap_rights_limit cap_ioctls_limit openat
4578 do :
4579 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
4580 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4581 if eval test \"x\$"$as_ac_var"\" = x"yes"
4582 then :
4583 cat >>confdefs.h <<_ACEOF
4584 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
4585 _ACEOF
4586 ac_lbl_capsicum_function_seen=yes
4587 else $as_nop
4588 ac_lbl_capsicum_function_not_seen=yes
4589 fi
4590
4591 done
4592
4593 fi
4594
4595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcasper" >&5
4596 printf %s "checking for cap_init in -lcasper... " >&6; }
4597 if test ${ac_cv_lib_casper_cap_init+y}
4598 then :
4599 printf %s "(cached) " >&6
4600 else $as_nop
4601 ac_check_lib_save_LIBS=$LIBS
4602 LIBS="-lcasper $LIBS"
4603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4604 /* end confdefs.h. */
4605
4606 /* Override any GCC internal prototype to avoid an error.
4607 Use char because int might match the return type of a GCC
4608 builtin and then its argument prototype would still apply. */
4609 char cap_init ();
4610 int
4611 main (void)
4612 {
4613 return cap_init ();
4614 ;
4615 return 0;
4616 }
4617 _ACEOF
4618 if ac_fn_c_try_link "$LINENO"
4619 then :
4620 ac_cv_lib_casper_cap_init=yes
4621 else $as_nop
4622 ac_cv_lib_casper_cap_init=no
4623 fi
4624 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4625 conftest$ac_exeext conftest.$ac_ext
4626 LIBS=$ac_check_lib_save_LIBS
4627 fi
4628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_casper_cap_init" >&5
4629 printf "%s\n" "$ac_cv_lib_casper_cap_init" >&6; }
4630 if test "x$ac_cv_lib_casper_cap_init" = xyes
4631 then :
4632 LIBS="$LIBS -lcasper"
4633 fi
4634
4635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_gethostbyaddr in -lcap_dns" >&5
4636 printf %s "checking for cap_gethostbyaddr in -lcap_dns... " >&6; }
4637 if test ${ac_cv_lib_cap_dns_cap_gethostbyaddr+y}
4638 then :
4639 printf %s "(cached) " >&6
4640 else $as_nop
4641 ac_check_lib_save_LIBS=$LIBS
4642 LIBS="-lcap_dns $LIBS"
4643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644 /* end confdefs.h. */
4645
4646 /* Override any GCC internal prototype to avoid an error.
4647 Use char because int might match the return type of a GCC
4648 builtin and then its argument prototype would still apply. */
4649 char cap_gethostbyaddr ();
4650 int
4651 main (void)
4652 {
4653 return cap_gethostbyaddr ();
4654 ;
4655 return 0;
4656 }
4657 _ACEOF
4658 if ac_fn_c_try_link "$LINENO"
4659 then :
4660 ac_cv_lib_cap_dns_cap_gethostbyaddr=yes
4661 else $as_nop
4662 ac_cv_lib_cap_dns_cap_gethostbyaddr=no
4663 fi
4664 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4665 conftest$ac_exeext conftest.$ac_ext
4666 LIBS=$ac_check_lib_save_LIBS
4667 fi
4668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_dns_cap_gethostbyaddr" >&5
4669 printf "%s\n" "$ac_cv_lib_cap_dns_cap_gethostbyaddr" >&6; }
4670 if test "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = xyes
4671 then :
4672 LIBS="$LIBS -lcap_dns"
4673 fi
4674
4675 fi
4676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using capsicum" >&5
4677 printf %s "checking whether to sandbox using capsicum... " >&6; }
4678 if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
4679
4680 printf "%s\n" "#define HAVE_CAPSICUM 1" >>confdefs.h
4681
4682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4683 printf "%s\n" "yes" >&6; }
4684 else
4685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 printf "%s\n" "no" >&6; }
4687 fi
4688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using Casper library" >&5
4689 printf %s "checking whether to sandbox using Casper library... " >&6; }
4690 if test "x$ac_cv_lib_casper_cap_init" = "xyes" -a "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = "xyes"; then
4691
4692 printf "%s\n" "#define HAVE_CASPER 1" >>confdefs.h
4693
4694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4695 printf "%s\n" "yes" >&6; }
4696 else
4697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4698 printf "%s\n" "no" >&6; }
4699 fi
4700
4701 #
4702 # We must check this before checking whether to check the OS's IPv6,
4703 # support because, on some platforms (such as SunOS 5.x), the test
4704 # program requires the extra networking libraries.
4705 #
4706
4707 # Most operating systems have gethostbyaddr() in the default searched
4708 # libraries (i.e. libc):
4709 # Some OSes (eg. Solaris) place it in libnsl
4710 # Some strange OSes (SINIX) have it in libsocket:
4711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5
4712 printf %s "checking for library containing gethostbyaddr... " >&6; }
4713 if test ${ac_cv_search_gethostbyaddr+y}
4714 then :
4715 printf %s "(cached) " >&6
4716 else $as_nop
4717 ac_func_search_save_LIBS=$LIBS
4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719 /* end confdefs.h. */
4720
4721 /* Override any GCC internal prototype to avoid an error.
4722 Use char because int might match the return type of a GCC
4723 builtin and then its argument prototype would still apply. */
4724 char gethostbyaddr ();
4725 int
4726 main (void)
4727 {
4728 return gethostbyaddr ();
4729 ;
4730 return 0;
4731 }
4732 _ACEOF
4733 for ac_lib in '' network nsl socket resolv
4734 do
4735 if test -z "$ac_lib"; then
4736 ac_res="none required"
4737 else
4738 ac_res=-l$ac_lib
4739 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4740 fi
4741 if ac_fn_c_try_link "$LINENO"
4742 then :
4743 ac_cv_search_gethostbyaddr=$ac_res
4744 fi
4745 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4746 conftest$ac_exeext
4747 if test ${ac_cv_search_gethostbyaddr+y}
4748 then :
4749 break
4750 fi
4751 done
4752 if test ${ac_cv_search_gethostbyaddr+y}
4753 then :
4754
4755 else $as_nop
4756 ac_cv_search_gethostbyaddr=no
4757 fi
4758 rm conftest.$ac_ext
4759 LIBS=$ac_func_search_save_LIBS
4760 fi
4761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5
4762 printf "%s\n" "$ac_cv_search_gethostbyaddr" >&6; }
4763 ac_res=$ac_cv_search_gethostbyaddr
4764 if test "$ac_res" != no
4765 then :
4766 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4767
4768 fi
4769
4770 # Unfortunately libsocket sometimes depends on libnsl and
4771 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
4772 if test "$ac_cv_search_gethostbyaddr" = "no"
4773 then
4774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lsocket" >&5
4775 printf %s "checking for gethostbyaddr in -lsocket... " >&6; }
4776 if test ${ac_cv_lib_socket_gethostbyaddr+y}
4777 then :
4778 printf %s "(cached) " >&6
4779 else $as_nop
4780 ac_check_lib_save_LIBS=$LIBS
4781 LIBS="-lsocket -lnsl $LIBS"
4782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4783 /* end confdefs.h. */
4784
4785 /* Override any GCC internal prototype to avoid an error.
4786 Use char because int might match the return type of a GCC
4787 builtin and then its argument prototype would still apply. */
4788 char gethostbyaddr ();
4789 int
4790 main (void)
4791 {
4792 return gethostbyaddr ();
4793 ;
4794 return 0;
4795 }
4796 _ACEOF
4797 if ac_fn_c_try_link "$LINENO"
4798 then :
4799 ac_cv_lib_socket_gethostbyaddr=yes
4800 else $as_nop
4801 ac_cv_lib_socket_gethostbyaddr=no
4802 fi
4803 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4804 conftest$ac_exeext conftest.$ac_ext
4805 LIBS=$ac_check_lib_save_LIBS
4806 fi
4807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyaddr" >&5
4808 printf "%s\n" "$ac_cv_lib_socket_gethostbyaddr" >&6; }
4809 if test "x$ac_cv_lib_socket_gethostbyaddr" = xyes
4810 then :
4811 LIBS="-lsocket -lnsl $LIBS"
4812 fi
4813
4814 fi
4815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
4816 printf %s "checking for library containing socket... " >&6; }
4817 if test ${ac_cv_search_socket+y}
4818 then :
4819 printf %s "(cached) " >&6
4820 else $as_nop
4821 ac_func_search_save_LIBS=$LIBS
4822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4823 /* end confdefs.h. */
4824
4825 /* Override any GCC internal prototype to avoid an error.
4826 Use char because int might match the return type of a GCC
4827 builtin and then its argument prototype would still apply. */
4828 char socket ();
4829 int
4830 main (void)
4831 {
4832 return socket ();
4833 ;
4834 return 0;
4835 }
4836 _ACEOF
4837 for ac_lib in '' socket
4838 do
4839 if test -z "$ac_lib"; then
4840 ac_res="none required"
4841 else
4842 ac_res=-l$ac_lib
4843 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4844 fi
4845 if ac_fn_c_try_link "$LINENO"
4846 then :
4847 ac_cv_search_socket=$ac_res
4848 fi
4849 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4850 conftest$ac_exeext
4851 if test ${ac_cv_search_socket+y}
4852 then :
4853 break
4854 fi
4855 done
4856 if test ${ac_cv_search_socket+y}
4857 then :
4858
4859 else $as_nop
4860 ac_cv_search_socket=no
4861 fi
4862 rm conftest.$ac_ext
4863 LIBS=$ac_func_search_save_LIBS
4864 fi
4865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
4866 printf "%s\n" "$ac_cv_search_socket" >&6; }
4867 ac_res=$ac_cv_search_socket
4868 if test "$ac_res" != no
4869 then :
4870 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4871
4872 else $as_nop
4873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
4874 printf %s "checking for socket in -lsocket... " >&6; }
4875 if test ${ac_cv_lib_socket_socket+y}
4876 then :
4877 printf %s "(cached) " >&6
4878 else $as_nop
4879 ac_check_lib_save_LIBS=$LIBS
4880 LIBS="-lsocket -lnsl $LIBS"
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882 /* end confdefs.h. */
4883
4884 /* Override any GCC internal prototype to avoid an error.
4885 Use char because int might match the return type of a GCC
4886 builtin and then its argument prototype would still apply. */
4887 char socket ();
4888 int
4889 main (void)
4890 {
4891 return socket ();
4892 ;
4893 return 0;
4894 }
4895 _ACEOF
4896 if ac_fn_c_try_link "$LINENO"
4897 then :
4898 ac_cv_lib_socket_socket=yes
4899 else $as_nop
4900 ac_cv_lib_socket_socket=no
4901 fi
4902 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4903 conftest$ac_exeext conftest.$ac_ext
4904 LIBS=$ac_check_lib_save_LIBS
4905 fi
4906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
4907 printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
4908 if test "x$ac_cv_lib_socket_socket" = xyes
4909 then :
4910 LIBS="-lsocket -lnsl $LIBS"
4911 fi
4912
4913 fi
4914
4915 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
4916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
4917 printf %s "checking for library containing putmsg... " >&6; }
4918 if test ${ac_cv_search_putmsg+y}
4919 then :
4920 printf %s "(cached) " >&6
4921 else $as_nop
4922 ac_func_search_save_LIBS=$LIBS
4923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924 /* end confdefs.h. */
4925
4926 /* Override any GCC internal prototype to avoid an error.
4927 Use char because int might match the return type of a GCC
4928 builtin and then its argument prototype would still apply. */
4929 char putmsg ();
4930 int
4931 main (void)
4932 {
4933 return putmsg ();
4934 ;
4935 return 0;
4936 }
4937 _ACEOF
4938 for ac_lib in '' str
4939 do
4940 if test -z "$ac_lib"; then
4941 ac_res="none required"
4942 else
4943 ac_res=-l$ac_lib
4944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4945 fi
4946 if ac_fn_c_try_link "$LINENO"
4947 then :
4948 ac_cv_search_putmsg=$ac_res
4949 fi
4950 rm -f core conftest.err conftest.$ac_objext conftest.beam \
4951 conftest$ac_exeext
4952 if test ${ac_cv_search_putmsg+y}
4953 then :
4954 break
4955 fi
4956 done
4957 if test ${ac_cv_search_putmsg+y}
4958 then :
4959
4960 else $as_nop
4961 ac_cv_search_putmsg=no
4962 fi
4963 rm conftest.$ac_ext
4964 LIBS=$ac_func_search_save_LIBS
4965 fi
4966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
4967 printf "%s\n" "$ac_cv_search_putmsg" >&6; }
4968 ac_res=$ac_cv_search_putmsg
4969 if test "$ac_res" != no
4970 then :
4971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4972
4973 fi
4974
4975
4976
4977 #
4978 # Check whether AF_INET6 and struct in6_addr are defined.
4979 # If they aren't both defined, we don't have sufficient OS
4980 # support for IPv6, so we don't look for IPv6 support libraries,
4981 # and we define AF_INET6 and struct in6_addr ourselves.
4982 #
4983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports IPv6" >&5
4984 printf %s "checking whether the operating system supports IPv6... " >&6; }
4985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4986 /* end confdefs.h. */
4987
4988
4989 #include <string.h>
4990 /* AF_INET6 available check */
4991 #include <sys/types.h>
4992 #ifdef _WIN32
4993 #include <ws2tcpip.h>
4994 #else
4995 #include <sys/socket.h>
4996 #include <netinet/in.h>
4997 #endif
4998 #ifdef AF_INET6
4999 void
5000 foo(struct in6_addr *addr)
5001 {
5002 memset(addr, 0, sizeof (struct in6_addr));
5003 }
5004 #else
5005 #error "AF_INET6 not defined"
5006 #endif
5007
5008
5009 _ACEOF
5010 if ac_fn_c_try_compile "$LINENO"
5011 then :
5012
5013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5014 printf "%s\n" "yes" >&6; }
5015
5016 printf "%s\n" "#define HAVE_OS_IPV6_SUPPORT 1" >>confdefs.h
5017
5018 ipv6=yes
5019
5020 else $as_nop
5021
5022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5023 printf "%s\n" "no" >&6; }
5024 ipv6=no
5025
5026
5027 fi
5028 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5029
5030 ipv6type=unknown
5031 ipv6lib=none
5032 ipv6trylibc=no
5033
5034 if test "$ipv6" = "yes"; then
5035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
5036 printf %s "checking ipv6 stack type... " >&6; }
5037 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
5038 case $i in
5039 inria)
5040 ac_ext=c
5041 ac_cpp='$CPP $CPPFLAGS'
5042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5046 printf %s "checking how to run the C preprocessor... " >&6; }
5047 # On Suns, sometimes $CPP names a directory.
5048 if test -n "$CPP" && test -d "$CPP"; then
5049 CPP=
5050 fi
5051 if test -z "$CPP"; then
5052 if test ${ac_cv_prog_CPP+y}
5053 then :
5054 printf %s "(cached) " >&6
5055 else $as_nop
5056 # Double quotes because $CC needs to be expanded
5057 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
5058 do
5059 ac_preproc_ok=false
5060 for ac_c_preproc_warn_flag in '' yes
5061 do
5062 # Use a header file that comes with gcc, so configuring glibc
5063 # with a fresh cross-compiler works.
5064 # On the NeXT, cc -E runs the code through the compiler's parser,
5065 # not just through cpp. "Syntax error" is here to catch this case.
5066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067 /* end confdefs.h. */
5068 #include <limits.h>
5069 Syntax error
5070 _ACEOF
5071 if ac_fn_c_try_cpp "$LINENO"
5072 then :
5073
5074 else $as_nop
5075 # Broken: fails on valid input.
5076 continue
5077 fi
5078 rm -f conftest.err conftest.i conftest.$ac_ext
5079
5080 # OK, works on sane cases. Now check whether nonexistent headers
5081 # can be detected and how.
5082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5083 /* end confdefs.h. */
5084 #include <ac_nonexistent.h>
5085 _ACEOF
5086 if ac_fn_c_try_cpp "$LINENO"
5087 then :
5088 # Broken: success on invalid input.
5089 continue
5090 else $as_nop
5091 # Passes both tests.
5092 ac_preproc_ok=:
5093 break
5094 fi
5095 rm -f conftest.err conftest.i conftest.$ac_ext
5096
5097 done
5098 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5099 rm -f conftest.i conftest.err conftest.$ac_ext
5100 if $ac_preproc_ok
5101 then :
5102 break
5103 fi
5104
5105 done
5106 ac_cv_prog_CPP=$CPP
5107
5108 fi
5109 CPP=$ac_cv_prog_CPP
5110 else
5111 ac_cv_prog_CPP=$CPP
5112 fi
5113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5114 printf "%s\n" "$CPP" >&6; }
5115 ac_preproc_ok=false
5116 for ac_c_preproc_warn_flag in '' yes
5117 do
5118 # Use a header file that comes with gcc, so configuring glibc
5119 # with a fresh cross-compiler works.
5120 # On the NeXT, cc -E runs the code through the compiler's parser,
5121 # not just through cpp. "Syntax error" is here to catch this case.
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123 /* end confdefs.h. */
5124 #include <limits.h>
5125 Syntax error
5126 _ACEOF
5127 if ac_fn_c_try_cpp "$LINENO"
5128 then :
5129
5130 else $as_nop
5131 # Broken: fails on valid input.
5132 continue
5133 fi
5134 rm -f conftest.err conftest.i conftest.$ac_ext
5135
5136 # OK, works on sane cases. Now check whether nonexistent headers
5137 # can be detected and how.
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139 /* end confdefs.h. */
5140 #include <ac_nonexistent.h>
5141 _ACEOF
5142 if ac_fn_c_try_cpp "$LINENO"
5143 then :
5144 # Broken: success on invalid input.
5145 continue
5146 else $as_nop
5147 # Passes both tests.
5148 ac_preproc_ok=:
5149 break
5150 fi
5151 rm -f conftest.err conftest.i conftest.$ac_ext
5152
5153 done
5154 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5155 rm -f conftest.i conftest.err conftest.$ac_ext
5156 if $ac_preproc_ok
5157 then :
5158
5159 else $as_nop
5160 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5161 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5162 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5163 See \`config.log' for more details" "$LINENO" 5; }
5164 fi
5165
5166 ac_ext=c
5167 ac_cpp='$CPP $CPPFLAGS'
5168 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5169 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5171
5172
5173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5174 printf %s "checking for grep that handles long lines and -e... " >&6; }
5175 if test ${ac_cv_path_GREP+y}
5176 then :
5177 printf %s "(cached) " >&6
5178 else $as_nop
5179 if test -z "$GREP"; then
5180 ac_path_GREP_found=false
5181 # Loop through the user's path and test for each of PROGNAME-LIST
5182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5184 do
5185 IFS=$as_save_IFS
5186 case $as_dir in #(((
5187 '') as_dir=./ ;;
5188 */) ;;
5189 *) as_dir=$as_dir/ ;;
5190 esac
5191 for ac_prog in grep ggrep
5192 do
5193 for ac_exec_ext in '' $ac_executable_extensions; do
5194 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5195 as_fn_executable_p "$ac_path_GREP" || continue
5196 # Check for GNU ac_path_GREP and select it if it is found.
5197 # Check for GNU $ac_path_GREP
5198 case `"$ac_path_GREP" --version 2>&1` in
5199 *GNU*)
5200 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5201 *)
5202 ac_count=0
5203 printf %s 0123456789 >"conftest.in"
5204 while :
5205 do
5206 cat "conftest.in" "conftest.in" >"conftest.tmp"
5207 mv "conftest.tmp" "conftest.in"
5208 cp "conftest.in" "conftest.nl"
5209 printf "%s\n" 'GREP' >> "conftest.nl"
5210 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5211 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5212 as_fn_arith $ac_count + 1 && ac_count=$as_val
5213 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5214 # Best one so far, save it but keep looking for a better one
5215 ac_cv_path_GREP="$ac_path_GREP"
5216 ac_path_GREP_max=$ac_count
5217 fi
5218 # 10*(2^10) chars as input seems more than enough
5219 test $ac_count -gt 10 && break
5220 done
5221 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5222 esac
5223
5224 $ac_path_GREP_found && break 3
5225 done
5226 done
5227 done
5228 IFS=$as_save_IFS
5229 if test -z "$ac_cv_path_GREP"; then
5230 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5231 fi
5232 else
5233 ac_cv_path_GREP=$GREP
5234 fi
5235
5236 fi
5237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5238 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5239 GREP="$ac_cv_path_GREP"
5240
5241
5242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5243 printf %s "checking for egrep... " >&6; }
5244 if test ${ac_cv_path_EGREP+y}
5245 then :
5246 printf %s "(cached) " >&6
5247 else $as_nop
5248 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5249 then ac_cv_path_EGREP="$GREP -E"
5250 else
5251 if test -z "$EGREP"; then
5252 ac_path_EGREP_found=false
5253 # Loop through the user's path and test for each of PROGNAME-LIST
5254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5255 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5256 do
5257 IFS=$as_save_IFS
5258 case $as_dir in #(((
5259 '') as_dir=./ ;;
5260 */) ;;
5261 *) as_dir=$as_dir/ ;;
5262 esac
5263 for ac_prog in egrep
5264 do
5265 for ac_exec_ext in '' $ac_executable_extensions; do
5266 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
5267 as_fn_executable_p "$ac_path_EGREP" || continue
5268 # Check for GNU ac_path_EGREP and select it if it is found.
5269 # Check for GNU $ac_path_EGREP
5270 case `"$ac_path_EGREP" --version 2>&1` in
5271 *GNU*)
5272 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5273 *)
5274 ac_count=0
5275 printf %s 0123456789 >"conftest.in"
5276 while :
5277 do
5278 cat "conftest.in" "conftest.in" >"conftest.tmp"
5279 mv "conftest.tmp" "conftest.in"
5280 cp "conftest.in" "conftest.nl"
5281 printf "%s\n" 'EGREP' >> "conftest.nl"
5282 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5283 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5284 as_fn_arith $ac_count + 1 && ac_count=$as_val
5285 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5286 # Best one so far, save it but keep looking for a better one
5287 ac_cv_path_EGREP="$ac_path_EGREP"
5288 ac_path_EGREP_max=$ac_count
5289 fi
5290 # 10*(2^10) chars as input seems more than enough
5291 test $ac_count -gt 10 && break
5292 done
5293 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5294 esac
5295
5296 $ac_path_EGREP_found && break 3
5297 done
5298 done
5299 done
5300 IFS=$as_save_IFS
5301 if test -z "$ac_cv_path_EGREP"; then
5302 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5303 fi
5304 else
5305 ac_cv_path_EGREP=$EGREP
5306 fi
5307
5308 fi
5309 fi
5310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5311 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
5312 EGREP="$ac_cv_path_EGREP"
5313
5314
5315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5316 /* end confdefs.h. */
5317 #include <netinet/in.h>
5318 #ifdef IPV6_INRIA_VERSION
5319 yes
5320 #endif
5321 _ACEOF
5322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5323 $EGREP "yes" >/dev/null 2>&1
5324 then :
5325 ipv6type=$i
5326 fi
5327 rm -rf conftest*
5328
5329 ;;
5330 kame)
5331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5332 /* end confdefs.h. */
5333 #include <netinet/in.h>
5334 #ifdef __KAME__
5335 yes
5336 #endif
5337 _ACEOF
5338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5339 $EGREP "yes" >/dev/null 2>&1
5340 then :
5341 ipv6type=$i;
5342 ipv6lib=inet6;
5343 ipv6libdir=/usr/local/v6/lib;
5344 ipv6trylibc=yes
5345 fi
5346 rm -rf conftest*
5347
5348 ;;
5349 linux-glibc)
5350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5351 /* end confdefs.h. */
5352 #include <features.h>
5353 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
5354 yes
5355 #endif
5356 _ACEOF
5357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5358 $EGREP "yes" >/dev/null 2>&1
5359 then :
5360 ipv6type=$i
5361 fi
5362 rm -rf conftest*
5363
5364 ;;
5365 linux-libinet6)
5366 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
5367 ipv6type=$i
5368 ipv6lib=inet6
5369 ipv6libdir=/usr/inet6/lib
5370 ipv6trylibc=yes;
5371 CFLAGS="-I/usr/inet6/include $CFLAGS"
5372 fi
5373 ;;
5374 toshiba)
5375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5376 /* end confdefs.h. */
5377 #include <sys/param.h>
5378 #ifdef _TOSHIBA_INET6
5379 yes
5380 #endif
5381 _ACEOF
5382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5383 $EGREP "yes" >/dev/null 2>&1
5384 then :
5385 ipv6type=$i;
5386 ipv6lib=inet6;
5387 ipv6libdir=/usr/local/v6/lib
5388 fi
5389 rm -rf conftest*
5390
5391 ;;
5392 v6d)
5393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5394 /* end confdefs.h. */
5395 #include </usr/local/v6/include/sys/v6config.h>
5396 #ifdef __V6D__
5397 yes
5398 #endif
5399 _ACEOF
5400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5401 $EGREP "yes" >/dev/null 2>&1
5402 then :
5403 ipv6type=$i;
5404 ipv6lib=v6;
5405 ipv6libdir=/usr/local/v6/lib;
5406 CFLAGS="-I/usr/local/v6/include $CFLAGS"
5407 fi
5408 rm -rf conftest*
5409
5410 ;;
5411 zeta)
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413 /* end confdefs.h. */
5414 #include <sys/param.h>
5415 #ifdef _ZETA_MINAMI_INET6
5416 yes
5417 #endif
5418 _ACEOF
5419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5420 $EGREP "yes" >/dev/null 2>&1
5421 then :
5422 ipv6type=$i;
5423 ipv6lib=inet6;
5424 ipv6libdir=/usr/local/v6/lib
5425 fi
5426 rm -rf conftest*
5427
5428 ;;
5429 esac
5430 if test "$ipv6type" != "unknown"; then
5431 break
5432 fi
5433 done
5434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
5435 printf "%s\n" "$ipv6type" >&6; }
5436 fi
5437
5438 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
5439 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
5440 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
5441 echo "You have $ipv6lib library, using it"
5442 else
5443 if test "$ipv6trylibc" = "yes"; then
5444 echo "You do not have $ipv6lib library, using libc"
5445 else
5446 echo 'Fatal: no $ipv6lib library found. cannot continue.'
5447 echo "You need to fetch lib$ipv6lib.a from appropriate"
5448 echo 'ipv6 kit and compile beforehand.'
5449 exit 1
5450 fi
5451 fi
5452 fi
5453
5454 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5455 if test "x$ac_cv_func_strlcat" = xyes
5456 then :
5457 printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
5458
5459 else $as_nop
5460 case " $LIBOBJS " in
5461 *" strlcat.$ac_objext "* ) ;;
5462 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5463 ;;
5464 esac
5465
5466 fi
5467 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5468 if test "x$ac_cv_func_strlcpy" = xyes
5469 then :
5470 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
5471
5472 else $as_nop
5473 case " $LIBOBJS " in
5474 *" strlcpy.$ac_objext "* ) ;;
5475 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5476 ;;
5477 esac
5478
5479 fi
5480 ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
5481 if test "x$ac_cv_func_strdup" = xyes
5482 then :
5483 printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
5484
5485 else $as_nop
5486 case " $LIBOBJS " in
5487 *" strdup.$ac_objext "* ) ;;
5488 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
5489 ;;
5490 esac
5491
5492 fi
5493 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
5494 if test "x$ac_cv_func_strsep" = xyes
5495 then :
5496 printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
5497
5498 else $as_nop
5499 case " $LIBOBJS " in
5500 *" strsep.$ac_objext "* ) ;;
5501 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
5502 ;;
5503 esac
5504
5505 fi
5506 ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent"
5507 if test "x$ac_cv_func_getservent" = xyes
5508 then :
5509 printf "%s\n" "#define HAVE_GETSERVENT 1" >>confdefs.h
5510
5511 else $as_nop
5512 case " $LIBOBJS " in
5513 *" getservent.$ac_objext "* ) ;;
5514 *) LIBOBJS="$LIBOBJS getservent.$ac_objext"
5515 ;;
5516 esac
5517
5518 fi
5519 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
5520 if test "x$ac_cv_func_getopt_long" = xyes
5521 then :
5522 printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h
5523
5524 else $as_nop
5525 case " $LIBOBJS " in
5526 *" getopt_long.$ac_objext "* ) ;;
5527 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
5528 ;;
5529 esac
5530
5531 fi
5532
5533 ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
5534 if test "x$ac_cv_func_fork" = xyes
5535 then :
5536 printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
5537
5538 fi
5539 ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
5540 if test "x$ac_cv_func_vfork" = xyes
5541 then :
5542 printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
5543
5544 fi
5545 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
5546 if test "x$ac_cv_func_strftime" = xyes
5547 then :
5548 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
5549
5550 fi
5551
5552 ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
5553 if test "x$ac_cv_func_setlinebuf" = xyes
5554 then :
5555 printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h
5556
5557 fi
5558
5559
5560 #
5561 # Make sure we have vsnprintf() and snprintf(); we require them.
5562 #
5563 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5564 if test "x$ac_cv_func_vsnprintf" = xyes
5565 then :
5566
5567 else $as_nop
5568 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5569 fi
5570
5571 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5572 if test "x$ac_cv_func_snprintf" = xyes
5573 then :
5574
5575 else $as_nop
5576 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5577 fi
5578
5579
5580 #
5581 # Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
5582 # depend on %zu.
5583 #
5584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf(3) supports the z length modifier" >&5
5585 printf %s "checking whether printf(3) supports the z length modifier... " >&6; }
5586 if test "$cross_compiling" = yes
5587 then :
5588
5589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not while cross-compiling" >&5
5590 printf "%s\n" "not while cross-compiling" >&6; }
5591
5592
5593 else $as_nop
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h. */
5596
5597
5598 #include <stdio.h>
5599 #include <string.h>
5600
5601 int main()
5602 {
5603 char buf[100];
5604 snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
5605 return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
5606 }
5607
5608
5609 _ACEOF
5610 if ac_fn_c_try_run "$LINENO"
5611 then :
5612
5613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5614 printf "%s\n" "yes" >&6; }
5615
5616 else $as_nop
5617
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619 printf "%s\n" "no" >&6; }
5620
5621 printf "%s\n" "#define HAVE_NO_PRINTF_Z 1" >>confdefs.h
5622
5623
5624 fi
5625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5626 conftest.$ac_objext conftest.beam conftest.$ac_ext
5627 fi
5628
5629
5630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
5631 printf %s "checking for main in -lrpc... " >&6; }
5632 if test ${ac_cv_lib_rpc_main+y}
5633 then :
5634 printf %s "(cached) " >&6
5635 else $as_nop
5636 ac_check_lib_save_LIBS=$LIBS
5637 LIBS="-lrpc $LIBS"
5638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5639 /* end confdefs.h. */
5640
5641
5642 int
5643 main (void)
5644 {
5645 return main ();
5646 ;
5647 return 0;
5648 }
5649 _ACEOF
5650 if ac_fn_c_try_link "$LINENO"
5651 then :
5652 ac_cv_lib_rpc_main=yes
5653 else $as_nop
5654 ac_cv_lib_rpc_main=no
5655 fi
5656 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5657 conftest$ac_exeext conftest.$ac_ext
5658 LIBS=$ac_check_lib_save_LIBS
5659 fi
5660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpc_main" >&5
5661 printf "%s\n" "$ac_cv_lib_rpc_main" >&6; }
5662 if test "x$ac_cv_lib_rpc_main" = xyes
5663 then :
5664 printf "%s\n" "#define HAVE_LIBRPC 1" >>confdefs.h
5665
5666 LIBS="-lrpc $LIBS"
5667
5668 fi
5669
5670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getrpcbynumber" >&5
5671 printf %s "checking for library containing getrpcbynumber... " >&6; }
5672 if test ${ac_cv_search_getrpcbynumber+y}
5673 then :
5674 printf %s "(cached) " >&6
5675 else $as_nop
5676 ac_func_search_save_LIBS=$LIBS
5677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5678 /* end confdefs.h. */
5679
5680 /* Override any GCC internal prototype to avoid an error.
5681 Use char because int might match the return type of a GCC
5682 builtin and then its argument prototype would still apply. */
5683 char getrpcbynumber ();
5684 int
5685 main (void)
5686 {
5687 return getrpcbynumber ();
5688 ;
5689 return 0;
5690 }
5691 _ACEOF
5692 for ac_lib in '' nsl
5693 do
5694 if test -z "$ac_lib"; then
5695 ac_res="none required"
5696 else
5697 ac_res=-l$ac_lib
5698 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5699 fi
5700 if ac_fn_c_try_link "$LINENO"
5701 then :
5702 ac_cv_search_getrpcbynumber=$ac_res
5703 fi
5704 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5705 conftest$ac_exeext
5706 if test ${ac_cv_search_getrpcbynumber+y}
5707 then :
5708 break
5709 fi
5710 done
5711 if test ${ac_cv_search_getrpcbynumber+y}
5712 then :
5713
5714 else $as_nop
5715 ac_cv_search_getrpcbynumber=no
5716 fi
5717 rm conftest.$ac_ext
5718 LIBS=$ac_func_search_save_LIBS
5719 fi
5720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrpcbynumber" >&5
5721 printf "%s\n" "$ac_cv_search_getrpcbynumber" >&6; }
5722 ac_res=$ac_cv_search_getrpcbynumber
5723 if test "$ac_res" != no
5724 then :
5725 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5726
5727 printf "%s\n" "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h
5728
5729 fi
5730
5731
5732
5733 LBL_LIBS="$LIBS"
5734 pfopen=/usr/examples/packetfilter/pfopen.c
5735 if test -f $pfopen ; then
5736 ac_fn_c_check_func "$LINENO" "pfopen" "ac_cv_func_pfopen"
5737 if test "x$ac_cv_func_pfopen" = xyes
5738 then :
5739 printf "%s\n" "#define HAVE_PFOPEN 1" >>confdefs.h
5740
5741 fi
5742
5743 if test $ac_cv_func_pfopen = "no" ; then
5744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5
5745 printf "%s\n" "Using $pfopen" >&6; }
5746 LIBS="$LIBS $pfopen"
5747 fi
5748 fi
5749 libpcap=FAIL
5750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to look for a local libpcap" >&5
5751 printf %s "checking whether to look for a local libpcap... " >&6; }
5752 # Check whether --enable-local-libpcap was given.
5753 if test ${enable_local_libpcap+y}
5754 then :
5755 enableval=$enable_local_libpcap;
5756 else $as_nop
5757 enableval=yes
5758 fi
5759
5760 case "$enableval" in
5761
5762 no)
5763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764 printf "%s\n" "no" >&6; }
5765 #
5766 # Don't look for a local libpcap.
5767 #
5768 using_local_libpcap=no
5769 ;;
5770
5771 *)
5772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5773 printf "%s\n" "yes" >&6; }
5774 #
5775 # Look for a local pcap library.
5776 #
5777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
5778 printf %s "checking for local pcap library... " >&6; }
5779 lastdir=FAIL
5780 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
5781 egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
5782 places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
5783 egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
5784 for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
5785 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
5786 sed -e 's/-PRE-GIT$//' `
5787 if test $lastdir = $basedir ; then
5788 continue;
5789 fi
5790 lastdir=$dir
5791 if test -r $dir/libpcap.a ; then
5792 libpcap=$dir/libpcap.a
5793 local_pcap_dir=$dir
5794 fi
5795 done
5796 if test $libpcap = FAIL ; then
5797 #
5798 # We didn't find a local libpcap.
5799 #
5800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5801 printf "%s\n" "not found" >&6; }
5802 using_local_libpcap=no;
5803 else
5804 #
5805 # We found a local libpcap.
5806 #
5807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
5808 printf "%s\n" "$libpcap" >&6; }
5809 using_local_libpcap=yes
5810 fi
5811 ;;
5812 esac
5813
5814 if test $using_local_libpcap = no ; then
5815 #
5816 # We didn't find a local libpcap.
5817 # Look for an installed pkg-config.
5818 #
5819 if test -n "$ac_tool_prefix"; then
5820 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5821 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5823 printf %s "checking for $ac_word... " >&6; }
5824 if test ${ac_cv_path_PKG_CONFIG+y}
5825 then :
5826 printf %s "(cached) " >&6
5827 else $as_nop
5828 case $PKG_CONFIG in
5829 [\\/]* | ?:[\\/]*)
5830 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5831 ;;
5832 *)
5833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5834 for as_dir in $PATH
5835 do
5836 IFS=$as_save_IFS
5837 case $as_dir in #(((
5838 '') as_dir=./ ;;
5839 */) ;;
5840 *) as_dir=$as_dir/ ;;
5841 esac
5842 for ac_exec_ext in '' $ac_executable_extensions; do
5843 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5844 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
5845 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5846 break 2
5847 fi
5848 done
5849 done
5850 IFS=$as_save_IFS
5851
5852 ;;
5853 esac
5854 fi
5855 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5856 if test -n "$PKG_CONFIG"; then
5857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5858 printf "%s\n" "$PKG_CONFIG" >&6; }
5859 else
5860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 printf "%s\n" "no" >&6; }
5862 fi
5863
5864
5865 fi
5866 if test -z "$ac_cv_path_PKG_CONFIG"; then
5867 ac_pt_PKG_CONFIG=$PKG_CONFIG
5868 # Extract the first word of "pkg-config", so it can be a program name with args.
5869 set dummy pkg-config; ac_word=$2
5870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5871 printf %s "checking for $ac_word... " >&6; }
5872 if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
5873 then :
5874 printf %s "(cached) " >&6
5875 else $as_nop
5876 case $ac_pt_PKG_CONFIG in
5877 [\\/]* | ?:[\\/]*)
5878 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5879 ;;
5880 *)
5881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882 for as_dir in $PATH
5883 do
5884 IFS=$as_save_IFS
5885 case $as_dir in #(((
5886 '') as_dir=./ ;;
5887 */) ;;
5888 *) as_dir=$as_dir/ ;;
5889 esac
5890 for ac_exec_ext in '' $ac_executable_extensions; do
5891 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5892 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
5893 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5894 break 2
5895 fi
5896 done
5897 done
5898 IFS=$as_save_IFS
5899
5900 ;;
5901 esac
5902 fi
5903 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5904 if test -n "$ac_pt_PKG_CONFIG"; then
5905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5906 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
5907 else
5908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5909 printf "%s\n" "no" >&6; }
5910 fi
5911
5912 if test "x$ac_pt_PKG_CONFIG" = x; then
5913 PKG_CONFIG=""
5914 else
5915 case $cross_compiling:$ac_tool_warned in
5916 yes:)
5917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5918 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5919 ac_tool_warned=yes ;;
5920 esac
5921 PKG_CONFIG=$ac_pt_PKG_CONFIG
5922 fi
5923 else
5924 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5925 fi
5926
5927 if test -n "$PKG_CONFIG" ; then
5928 #
5929 # We have it. Are there .pc files for libpcap?
5930 #
5931 # --exists was introduced in pkg-config 0.4.0; that
5932 # dates back to late 2000, so we won't worry about
5933 # earlier releases that lack it.
5934 #
5935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether there are .pc files for libpcap" >&5
5936 printf %s "checking whether there are .pc files for libpcap... " >&6; }
5937 if "$PKG_CONFIG" libpcap --exists ; then
5938 #
5939 # Yes, so we can use pkg-config to get configuration
5940 # information for libpcap.
5941 #
5942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943 printf "%s\n" "yes" >&6; }
5944 pkg_config_usable=yes
5945 else
5946 #
5947 # No, so we can't use pkg-config to get configuration
5948 # information for libpcap.
5949 #
5950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951 printf "%s\n" "no" >&6; }
5952 pkg_config_usable=no
5953 fi
5954 else
5955 #
5956 # We don't have it, so we obviously can't use it.
5957 #
5958 pkg_config_usable=no
5959 fi
5960 if test "$pkg_config_usable" = "yes" ; then
5961 #
5962 # Found both - use pkg-config to get the include flags for
5963 # libpcap and the flags to link with libpcap.
5964 #
5965 # Please read section 11.6 "Shell Substitutions"
5966 # in the autoconf manual before doing anything
5967 # to this that involves quoting. Especially note
5968 # the statement "There is just no portable way to use
5969 # double-quoted strings inside double-quoted back-quoted
5970 # expressions (pfew!)."
5971 #
5972 cflags=`"$PKG_CONFIG" libpcap --cflags`
5973 V_INCLS="$cflags $V_INCLS"
5974 libpcap=`"$PKG_CONFIG" libpcap --libs`
5975 else
5976 #
5977 # No pkg-config
5978 # Look for an installed pcap-config.
5979 #
5980 if test -n "$ac_tool_prefix"; then
5981 # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
5982 set dummy ${ac_tool_prefix}pcap-config; ac_word=$2
5983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984 printf %s "checking for $ac_word... " >&6; }
5985 if test ${ac_cv_path_PCAP_CONFIG+y}
5986 then :
5987 printf %s "(cached) " >&6
5988 else $as_nop
5989 case $PCAP_CONFIG in
5990 [\\/]* | ?:[\\/]*)
5991 ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
5992 ;;
5993 *)
5994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995 for as_dir in $PATH
5996 do
5997 IFS=$as_save_IFS
5998 case $as_dir in #(((
5999 '') as_dir=./ ;;
6000 */) ;;
6001 *) as_dir=$as_dir/ ;;
6002 esac
6003 for ac_exec_ext in '' $ac_executable_extensions; do
6004 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6005 ac_cv_path_PCAP_CONFIG="$as_dir$ac_word$ac_exec_ext"
6006 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6007 break 2
6008 fi
6009 done
6010 done
6011 IFS=$as_save_IFS
6012
6013 ;;
6014 esac
6015 fi
6016 PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
6017 if test -n "$PCAP_CONFIG"; then
6018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
6019 printf "%s\n" "$PCAP_CONFIG" >&6; }
6020 else
6021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6022 printf "%s\n" "no" >&6; }
6023 fi
6024
6025
6026 fi
6027 if test -z "$ac_cv_path_PCAP_CONFIG"; then
6028 ac_pt_PCAP_CONFIG=$PCAP_CONFIG
6029 # Extract the first word of "pcap-config", so it can be a program name with args.
6030 set dummy pcap-config; ac_word=$2
6031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032 printf %s "checking for $ac_word... " >&6; }
6033 if test ${ac_cv_path_ac_pt_PCAP_CONFIG+y}
6034 then :
6035 printf %s "(cached) " >&6
6036 else $as_nop
6037 case $ac_pt_PCAP_CONFIG in
6038 [\\/]* | ?:[\\/]*)
6039 ac_cv_path_ac_pt_PCAP_CONFIG="$ac_pt_PCAP_CONFIG" # Let the user override the test with a path.
6040 ;;
6041 *)
6042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043 for as_dir in $PATH
6044 do
6045 IFS=$as_save_IFS
6046 case $as_dir in #(((
6047 '') as_dir=./ ;;
6048 */) ;;
6049 *) as_dir=$as_dir/ ;;
6050 esac
6051 for ac_exec_ext in '' $ac_executable_extensions; do
6052 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6053 ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir$ac_word$ac_exec_ext"
6054 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6055 break 2
6056 fi
6057 done
6058 done
6059 IFS=$as_save_IFS
6060
6061 ;;
6062 esac
6063 fi
6064 ac_pt_PCAP_CONFIG=$ac_cv_path_ac_pt_PCAP_CONFIG
6065 if test -n "$ac_pt_PCAP_CONFIG"; then
6066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCAP_CONFIG" >&5
6067 printf "%s\n" "$ac_pt_PCAP_CONFIG" >&6; }
6068 else
6069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070 printf "%s\n" "no" >&6; }
6071 fi
6072
6073 if test "x$ac_pt_PCAP_CONFIG" = x; then
6074 PCAP_CONFIG=""
6075 else
6076 case $cross_compiling:$ac_tool_warned in
6077 yes:)
6078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6079 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6080 ac_tool_warned=yes ;;
6081 esac
6082 PCAP_CONFIG=$ac_pt_PCAP_CONFIG
6083 fi
6084 else
6085 PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG"
6086 fi
6087
6088 if test -n "$PCAP_CONFIG" ; then
6089 #
6090 # Found - use it to get the include flags for
6091 # libpcap and the flags to link with libpcap.
6092 #
6093 # If this is a vendor-supplied pcap-config, which
6094 # we define as being "a pcap-config in /usr/bin
6095 # or /usr/ccs/bin" (the latter is for Solaris and
6096 # Sun/Oracle Studio), there are some issues. Work
6097 # around them.
6098 #
6099 if test \( "$PCAP_CONFIG" = "/usr/bin/pcap-config" \) -o \
6100 \( "$PCAP_CONFIG" = "/usr/ccs/bin/pcap-config" \) ; then
6101 #
6102 # It's vendor-supplied.
6103 #
6104 case "$host_os" in
6105
6106 darwin*)
6107 #
6108 # This is macOS or another Darwin-based OS.
6109 #
6110 # That means that /usr/bin/pcap-config it
6111 # may provide -I/usr/local/include with --cflags
6112 # and -L/usr/local/lib with --libs, rather than
6113 # pointing to the OS-supplied library and
6114 # Xcode-supplied headers. Remember that, so we
6115 # ignore those values.
6116 #
6117 _broken_apple_pcap_config=yes
6118 ;;
6119
6120 solaris*)
6121 #
6122 # This is Solaris 2 or later, i.e. SunOS 5.x.
6123 #
6124 # At least on Solaris 11; there's /usr/bin/pcap-config,
6125 # which reports -L/usr/lib with --libs, causing
6126 # the 32-bit libraries to be found, and there's
6127 # /usr/bin/{64bitarch}/pcap-config, where {64bitarch}
6128 # is a name for the 64-bit version of the instruction
6129 # set, which reports -L /usr/lib/{64bitarch}, causing
6130 # the 64-bit libraries to be found.
6131 #
6132 # So if we're building 64-bit targets, we replace
6133 # PCAP_CONFIG with /usr/bin/{64bitarch}; we get
6134 # {64bitarch} as the output of "isainfo -n".
6135 #
6136 # Are we building 32-bit or 64-bit? Get the
6137 # size of void *, and check that.
6138 #
6139 # The cast to long int works around a bug in the HP C Compiler
6140 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6141 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6142 # This bug is HP SR number 8606223364.
6143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6144 printf %s "checking size of void *... " >&6; }
6145 if test ${ac_cv_sizeof_void_p+y}
6146 then :
6147 printf %s "(cached) " >&6
6148 else $as_nop
6149 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
6150 then :
6151
6152 else $as_nop
6153 if test "$ac_cv_type_void_p" = yes; then
6154 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6155 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6156 as_fn_error 77 "cannot compute sizeof (void *)
6157 See \`config.log' for more details" "$LINENO" 5; }
6158 else
6159 ac_cv_sizeof_void_p=0
6160 fi
6161 fi
6162
6163 fi
6164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6165 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
6166
6167
6168
6169 printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
6170
6171
6172 if test ac_cv_sizeof_void_p -eq 8 ; then
6173 isainfo_output=`isainfo -n`
6174 if test ! -z "$isainfo_output" ; then
6175 #
6176 # Success - change PCAP_CONFIG.
6177 #
6178 PCAP_CONFIG=`echo $PCAP_CONFIG | sed "s;/bin/;/bin/$isainfo_output/;"`
6179 fi
6180 fi
6181 ;;
6182 esac
6183 fi
6184 #
6185 # Please read section 11.6 "Shell Substitutions"
6186 # in the autoconf manual before doing anything
6187 # to this that involves quoting. Especially note
6188 # the statement "There is just no portable way to use
6189 # double-quoted strings inside double-quoted back-quoted
6190 # expressions (pfew!)."
6191 #
6192 cflags=`"$PCAP_CONFIG" --cflags`
6193 #
6194 # Work around macOS (and probably other Darwin) brokenness,
6195 # by not adding /usr/local/include if it's from the broken
6196 # Apple pcap-config.
6197 #
6198 if test "$_broken_apple_pcap_config" = "yes" ; then
6199 #
6200 # Strip -I/usr/local/include with sed.
6201 #
6202 cflags=`echo $cflags | sed 's;-I/usr/local/include;;'`
6203 fi
6204 V_INCLS="$cflags $V_INCLS"
6205 libpcap=`"$PCAP_CONFIG" --libs`
6206 #
6207 # Work around macOS (and probably other Darwin) brokenness,
6208 # by not adding /usr/local/lib if it's from the broken
6209 # Apple pcap-config.
6210 #
6211 if test "$_broken_apple_pcap_config" = "yes" ; then
6212 #
6213 # Strip -L/usr/local/lib with sed.
6214 #
6215 libpcap=`echo $libpcap | sed 's;-L/usr/local/lib;;'`
6216 fi
6217 else
6218 #
6219 # Not found; look for an installed pcap.
6220 #
6221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
6222 printf %s "checking for main in -lpcap... " >&6; }
6223 if test ${ac_cv_lib_pcap_main+y}
6224 then :
6225 printf %s "(cached) " >&6
6226 else $as_nop
6227 ac_check_lib_save_LIBS=$LIBS
6228 LIBS="-lpcap $LIBS"
6229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6230 /* end confdefs.h. */
6231
6232
6233 int
6234 main (void)
6235 {
6236 return main ();
6237 ;
6238 return 0;
6239 }
6240 _ACEOF
6241 if ac_fn_c_try_link "$LINENO"
6242 then :
6243 ac_cv_lib_pcap_main=yes
6244 else $as_nop
6245 ac_cv_lib_pcap_main=no
6246 fi
6247 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6248 conftest$ac_exeext conftest.$ac_ext
6249 LIBS=$ac_check_lib_save_LIBS
6250 fi
6251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5
6252 printf "%s\n" "$ac_cv_lib_pcap_main" >&6; }
6253 if test "x$ac_cv_lib_pcap_main" = xyes
6254 then :
6255 libpcap="-lpcap"
6256 fi
6257
6258 if test $libpcap = FAIL ; then
6259 as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
6260 fi
6261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
6262 printf %s "checking for extraneous pcap header directories... " >&6; }
6263 if test \( ! -r /usr/local/include/pcap.h \) -a \
6264 \( ! -r /usr/include/pcap.h \); then
6265 if test -r /usr/local/include/pcap/pcap.h; then
6266 d="/usr/local/include/pcap"
6267 elif test -r /usr/include/pcap/pcap.h; then
6268 d="/usr/include/pcap"
6269 fi
6270 fi
6271 if test -z "$d" ; then
6272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6273 printf "%s\n" "not found" >&6; }
6274 else
6275 V_INCLS="-I$d $V_INCLS"
6276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
6277 printf "%s\n" "found -- -I$d added" >&6; }
6278 fi
6279 fi
6280 fi
6281 else
6282 #
6283 # We found a local libpcap. Add it to the dependencies for
6284 # tcpdump.
6285 #
6286 V_PCAPDEP=$libpcap
6287
6288 #
6289 # Look for its pcap-config script.
6290 #
6291 # Extract the first word of "pcap-config", so it can be a program name with args.
6292 set dummy pcap-config; ac_word=$2
6293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6294 printf %s "checking for $ac_word... " >&6; }
6295 if test ${ac_cv_path_PCAP_CONFIG+y}
6296 then :
6297 printf %s "(cached) " >&6
6298 else $as_nop
6299 case $PCAP_CONFIG in
6300 [\\/]* | ?:[\\/]*)
6301 ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
6302 ;;
6303 *)
6304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305 for as_dir in $local_pcap_dir
6306 do
6307 IFS=$as_save_IFS
6308 case $as_dir in #(((
6309 '') as_dir=./ ;;
6310 */) ;;
6311 *) as_dir=$as_dir/ ;;
6312 esac
6313 for ac_exec_ext in '' $ac_executable_extensions; do
6314 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6315 ac_cv_path_PCAP_CONFIG="$as_dir$ac_word$ac_exec_ext"
6316 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6317 break 2
6318 fi
6319 done
6320 done
6321 IFS=$as_save_IFS
6322
6323 ;;
6324 esac
6325 fi
6326 PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
6327 if test -n "$PCAP_CONFIG"; then
6328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
6329 printf "%s\n" "$PCAP_CONFIG" >&6; }
6330 else
6331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332 printf "%s\n" "no" >&6; }
6333 fi
6334
6335
6336
6337 if test -n "$PCAP_CONFIG"; then
6338 #
6339 # We don't want its --cflags or --libs output, because
6340 # those presume it's installed. For the C compiler flags,
6341 # we add the source directory for the local libpcap, so
6342 # we pick up its header files.
6343 #
6344 # We do, however, want its additional libraries, as required
6345 # when linking statically, because it makes calls to
6346 # routines in those libraries, so we'll need to link with
6347 # them, because we'll be linking statically with it.
6348 #
6349 # If it supports --static-pcap-only. use that, as we will be
6350 # linking with a static libpcap but won't be linking
6351 # statically with any of the libraries on which it depends;
6352 # those libraries might not even have static versions
6353 # installed.
6354 #
6355 # That means we need to find out the libraries on which
6356 # libpcap directly depends, so we can link with them, but we
6357 # don't need to link with the libraries on which those
6358 # libraries depend as, on all UN*Xes with which I'm
6359 # familiar, the libraries on which a shared library depends
6360 # are stored in the library and are automatically loaded by
6361 # the run-time linker, without the executable having to be
6362 # linked with those libraries. (This allows a library to be
6363 # changed to depend on more libraries without breaking that
6364 # library's ABI.)
6365 #
6366 # The only way to test for that support is to see if the
6367 # script contains the string "static-pcap-only"; we can't
6368 # try using that flag and checking for errors, as the
6369 # versions of the script that didn't have that flag wouldn't
6370 # report or return an error for an unsupported command-line
6371 # flag. Those older versions provided, with --static, only
6372 # the libraries on which libpcap depends, not the
6373 # dependencies of those libraries; the versions with
6374 # --static-pcap-only provide all the dependencies with
6375 # --static, for the benefit of programs that are completely
6376 # statically linked, and provide only the direct
6377 # dependencies with --static-pcap-only.
6378 #
6379 if grep -s -q "static-pcap-only" "$PCAP_CONFIG"
6380 then
6381 static_opt="--static-pcap-only"
6382 else
6383 static_opt="--static"
6384 fi
6385 V_INCLS="-I$local_pcap_dir $V_INCLS"
6386 additional_libs=`"$PCAP_CONFIG" $static_opt --additional-libs`
6387 libpcap="$libpcap $additional_libs"
6388 else
6389 #
6390 # It doesn't have a pcap-config script.
6391 # Make sure it has a pcap.h file.
6392 #
6393 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
6394 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
6395 places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
6396 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
6397 pcapH=FAIL
6398 if test -r $local_pcap_dir/pcap.h; then
6399 pcapH=$local_pcap_dir
6400 else
6401 for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
6402 if test -r $dir/pcap.h ; then
6403 pcapH=$dir
6404 fi
6405 done
6406 fi
6407
6408 if test $pcapH = FAIL ; then
6409 as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
6410 fi
6411
6412 #
6413 # Force the compiler to look for header files in the
6414 # directory containing pcap.h.
6415 #
6416 V_INCLS="-I$pcapH $V_INCLS"
6417 fi
6418 fi
6419
6420 if test -z "$PKG_CONFIG" -a -z "$PCAP_CONFIG"; then
6421 #
6422 # We don't have pkg-config or pcap-config; find out any additional
6423 # link flags we need. (If we have pkg-config or pcap-config, we
6424 # assume it tells us what we need.)
6425 #
6426 case "$host_os" in
6427
6428 aix*)
6429 #
6430 # If libpcap is DLPI-based, we have to use /lib/pse.exp if
6431 # present, as we use the STREAMS routines.
6432 #
6433 # (XXX - true only if we're linking with a static libpcap?)
6434 #
6435 pseexe="/lib/pse.exp"
6436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
6437 printf %s "checking for $pseexe... " >&6; }
6438 if test -f $pseexe ; then
6439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6440 printf "%s\n" "yes" >&6; }
6441 LIBS="$LIBS -I:$pseexe"
6442 fi
6443
6444 #
6445 # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
6446 # we use them to load the BPF module.
6447 #
6448 # (XXX - true only if we're linking with a static libpcap?)
6449 #
6450 LIBS="$LIBS -lodm -lcfg"
6451 ;;
6452
6453 solaris*)
6454 # libdlpi is needed for Solaris 11 and later.
6455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6456 printf %s "checking for dlpi_walk in -ldlpi... " >&6; }
6457 if test ${ac_cv_lib_dlpi_dlpi_walk+y}
6458 then :
6459 printf %s "(cached) " >&6
6460 else $as_nop
6461 ac_check_lib_save_LIBS=$LIBS
6462 LIBS="-ldlpi -L/lib $LIBS"
6463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6464 /* end confdefs.h. */
6465
6466 /* Override any GCC internal prototype to avoid an error.
6467 Use char because int might match the return type of a GCC
6468 builtin and then its argument prototype would still apply. */
6469 char dlpi_walk ();
6470 int
6471 main (void)
6472 {
6473 return dlpi_walk ();
6474 ;
6475 return 0;
6476 }
6477 _ACEOF
6478 if ac_fn_c_try_link "$LINENO"
6479 then :
6480 ac_cv_lib_dlpi_dlpi_walk=yes
6481 else $as_nop
6482 ac_cv_lib_dlpi_dlpi_walk=no
6483 fi
6484 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6485 conftest$ac_exeext conftest.$ac_ext
6486 LIBS=$ac_check_lib_save_LIBS
6487 fi
6488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6489 printf "%s\n" "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6490 if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes
6491 then :
6492 LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
6493 fi
6494
6495 ;;
6496 esac
6497 fi
6498
6499 LIBS="$libpcap $LIBS"
6500
6501 ac_fn_c_check_func "$LINENO" "pcap_loop" "ac_cv_func_pcap_loop"
6502 if test "x$ac_cv_func_pcap_loop" = xyes
6503 then :
6504
6505 else $as_nop
6506
6507 as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING.md and include the
6508 config.log file in your report. If you have downloaded libpcap from
6509 tcpdump.org, and built it yourself, please also include the config.log
6510 file from the libpcap source directory, the Makefile from the libpcap
6511 source directory, and the output of the make process for libpcap, as
6512 this could be a problem with the libpcap that was built, and we will
6513 not be able to determine why this is happening, and thus will not be
6514 able to fix it, without that information, as we have not been able to
6515 reproduce this problem ourselves." "$LINENO" 5
6516
6517 fi
6518
6519
6520
6521 #
6522 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
6523 # libraries (e.g., "-lsocket -lnsl" on Solaris).
6524 #
6525 # You are in a twisty little maze of UN*Xes, all different.
6526 # Some might not have ether_ntohost().
6527 # Some might have it and declare it in <net/ethernet.h>.
6528 # Some might have it and declare it in <netinet/ether.h>
6529 # Some might have it and declare it in <sys/ethernet.h>.
6530 # Some might have it and declare it in <arpa/inet.h>.
6531 # Some might have it and declare it in <netinet/if_ether.h>.
6532 # Some might have it and not declare it in any header file.
6533 #
6534 # Before you is a C compiler.
6535 #
6536
6537 for ac_func in ether_ntohost
6538 do :
6539 ac_fn_c_check_func "$LINENO" "ether_ntohost" "ac_cv_func_ether_ntohost"
6540 if test "x$ac_cv_func_ether_ntohost" = xyes
6541 then :
6542 printf "%s\n" "#define HAVE_ETHER_NTOHOST 1" >>confdefs.h
6543
6544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy ether_ntohost" >&5
6545 printf %s "checking for buggy ether_ntohost... " >&6; }
6546 if test ${ac_cv_buggy_ether_ntohost+y}
6547 then :
6548 printf %s "(cached) " >&6
6549 else $as_nop
6550
6551 if test "$cross_compiling" = yes
6552 then :
6553 ac_cv_buggy_ether_ntohost="not while cross-compiling"
6554 else $as_nop
6555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6556 /* end confdefs.h. */
6557
6558 #include <netdb.h>
6559 #include <netinet/ether.h>
6560 #include <stdlib.h>
6561 #include <sys/types.h>
6562 #include <sys/param.h>
6563 #include <sys/socket.h>
6564
6565 int
6566 main(int argc, char **argv)
6567 {
6568 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
6569 char name[MAXHOSTNAMELEN];
6570
6571 ether_ntohost(name, (struct ether_addr *)ea);
6572 exit(0);
6573 }
6574
6575 _ACEOF
6576 if ac_fn_c_try_run "$LINENO"
6577 then :
6578 ac_cv_buggy_ether_ntohost=no
6579 else $as_nop
6580 ac_cv_buggy_ether_ntohost=yes
6581 fi
6582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6583 conftest.$ac_objext conftest.beam conftest.$ac_ext
6584 fi
6585
6586 fi
6587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_ether_ntohost" >&5
6588 printf "%s\n" "$ac_cv_buggy_ether_ntohost" >&6; }
6589 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
6590
6591 printf "%s\n" "#define USE_ETHER_NTOHOST 1" >>confdefs.h
6592
6593 fi
6594
6595 fi
6596
6597 done
6598 if test "$ac_cv_func_ether_ntohost" = yes -a \
6599 "$ac_cv_buggy_ether_ntohost" = "no"; then
6600 #
6601 # OK, we have ether_ntohost(). Is it declared in <net/ethernet.h>?
6602 #
6603 # This test fails if we don't have <net/ethernet.h> or if we do
6604 # but it doesn't declare ether_ntohost().
6605 #
6606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
6607 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
6608 if test ${ac_cv_c_undeclared_builtin_options+y}
6609 then :
6610 printf %s "(cached) " >&6
6611 else $as_nop
6612 ac_save_CFLAGS=$CFLAGS
6613 ac_cv_c_undeclared_builtin_options='cannot detect'
6614 for ac_arg in '' -fno-builtin; do
6615 CFLAGS="$ac_save_CFLAGS $ac_arg"
6616 # This test program should *not* compile successfully.
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6618 /* end confdefs.h. */
6619
6620 int
6621 main (void)
6622 {
6623 (void) strchr;
6624 ;
6625 return 0;
6626 }
6627 _ACEOF
6628 if ac_fn_c_try_compile "$LINENO"
6629 then :
6630
6631 else $as_nop
6632 # This test program should compile successfully.
6633 # No library function is consistently available on
6634 # freestanding implementations, so test against a dummy
6635 # declaration. Include always-available headers on the
6636 # off chance that they somehow elicit warnings.
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638 /* end confdefs.h. */
6639 #include <float.h>
6640 #include <limits.h>
6641 #include <stdarg.h>
6642 #include <stddef.h>
6643 extern void ac_decl (int, char *);
6644
6645 int
6646 main (void)
6647 {
6648 (void) ac_decl (0, (char *) 0);
6649 (void) ac_decl;
6650
6651 ;
6652 return 0;
6653 }
6654 _ACEOF
6655 if ac_fn_c_try_compile "$LINENO"
6656 then :
6657 if test x"$ac_arg" = x
6658 then :
6659 ac_cv_c_undeclared_builtin_options='none needed'
6660 else $as_nop
6661 ac_cv_c_undeclared_builtin_options=$ac_arg
6662 fi
6663 break
6664 fi
6665 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6666 fi
6667 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6668 done
6669 CFLAGS=$ac_save_CFLAGS
6670
6671 fi
6672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
6673 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
6674 case $ac_cv_c_undeclared_builtin_options in #(
6675 'cannot detect') :
6676 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6677 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6678 as_fn_error $? "cannot make $CC report undeclared builtins
6679 See \`config.log' for more details" "$LINENO" 5; } ;; #(
6680 'none needed') :
6681 ac_c_undeclared_builtin_options='' ;; #(
6682 *) :
6683 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
6684 esac
6685
6686 ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6687 #include <net/ethernet.h>
6688
6689 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6690 if test "x$ac_cv_have_decl_ether_ntohost" = xyes
6691 then :
6692
6693
6694 printf "%s\n" "#define NET_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6695
6696
6697 fi
6698 #
6699 # Did that succeed?
6700 #
6701 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6702 #
6703 # No, how about <netinet/ether.h>, as on Linux?
6704 #
6705 # This test fails if we don't have <netinet/ether.h>
6706 # or if we do but it doesn't declare ether_ntohost().
6707 #
6708 # Unset ac_cv_have_decl_ether_ntohost so we don't
6709 # treat the previous failure as a cached value and
6710 # suppress the next test.
6711 #
6712 unset ac_cv_have_decl_ether_ntohost
6713 ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6714 #include <netinet/ether.h>
6715
6716 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6717 if test "x$ac_cv_have_decl_ether_ntohost" = xyes
6718 then :
6719
6720
6721 printf "%s\n" "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6722
6723
6724 fi
6725 fi
6726 #
6727 # Did that succeed?
6728 #
6729 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6730 #
6731 # No, how about <sys/ethernet.h>, as on Solaris 10
6732 # and later?
6733 #
6734 # This test fails if we don't have <sys/ethernet.h>
6735 # or if we do but it doesn't declare ether_ntohost().
6736 #
6737 # Unset ac_cv_have_decl_ether_ntohost so we don't
6738 # treat the previous failure as a cached value and
6739 # suppress the next test.
6740 #
6741 unset ac_cv_have_decl_ether_ntohost
6742 ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6743 #include <sys/ethernet.h>
6744
6745 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6746 if test "x$ac_cv_have_decl_ether_ntohost" = xyes
6747 then :
6748
6749
6750 printf "%s\n" "#define SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6751
6752
6753 fi
6754 fi
6755 #
6756 # Did that succeed?
6757 #
6758 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6759 #
6760 # No, how about <arpa/inet.h>, as in AIX?
6761 #
6762 # This test fails if we don't have <arpa/inet.h>
6763 # (if we have ether_ntohost(), we should have
6764 # networking, and if we have networking, we should
6765 # have <arpa/inet.h>) or if we do but it doesn't
6766 # declare ether_ntohost().
6767 #
6768 # Unset ac_cv_have_decl_ether_ntohost so we don't
6769 # treat the previous failure as a cached value and
6770 # suppress the next test.
6771 #
6772 unset ac_cv_have_decl_ether_ntohost
6773 ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6774 #include <arpa/inet.h>
6775
6776 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6777 if test "x$ac_cv_have_decl_ether_ntohost" = xyes
6778 then :
6779
6780
6781 printf "%s\n" "#define ARPA_INET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6782
6783
6784 fi
6785 fi
6786 #
6787 # Did that succeed?
6788 #
6789 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6790 #
6791 # No, how about <netinet/if_ether.h>?
6792 # On some platforms, it requires <net/if.h> and
6793 # <netinet/in.h>, and we always include it with
6794 # both of them, so test it with both of them.
6795 #
6796 # This test fails if we don't have <netinet/if_ether.h>
6797 # and the headers we include before it, or if we do but
6798 # <netinet/if_ether.h> doesn't declare ether_hostton().
6799 #
6800 # Unset ac_cv_have_decl_ether_ntohost so we don't
6801 # treat the previous failure as a cached value and
6802 # suppress the next test.
6803 #
6804 unset ac_cv_have_decl_ether_ntohost
6805 ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6806 #include <sys/types.h>
6807 #include <sys/socket.h>
6808 #include <net/if.h>
6809 #include <netinet/in.h>
6810 #include <netinet/if_ether.h>
6811
6812 " "$ac_c_undeclared_builtin_options" "CFLAGS"
6813 if test "x$ac_cv_have_decl_ether_ntohost" = xyes
6814 then :
6815
6816
6817 printf "%s\n" "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6818
6819
6820 fi
6821 fi
6822 #
6823 # After all that, is ether_ntohost() declared?
6824 #
6825 if test "$ac_cv_have_decl_ether_ntohost" = yes; then
6826 #
6827 # Yes.
6828 #
6829
6830 printf "%s\n" "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
6831
6832 else
6833 #
6834 # No, we'll have to declare it ourselves.
6835 # Do we have "struct ether_addr" if we include
6836 # <netinet/if_ether.h>?
6837 #
6838 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6839 #include <sys/types.h>
6840 #include <sys/socket.h>
6841 #include <net/if.h>
6842 #include <netinet/in.h>
6843 #include <netinet/if_ether.h>
6844
6845 "
6846 if test "x$ac_cv_type_struct_ether_addr" = xyes
6847 then :
6848
6849 printf "%s\n" "#define HAVE_STRUCT_ETHER_ADDR 1" >>confdefs.h
6850
6851
6852 fi
6853
6854 fi
6855 fi
6856
6857 ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
6858 if test "x$ac_cv_func_pcap_list_datalinks" = xyes
6859 then :
6860
6861
6862 printf "%s\n" "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h
6863
6864 ac_fn_c_check_func "$LINENO" "pcap_free_datalinks" "ac_cv_func_pcap_free_datalinks"
6865 if test "x$ac_cv_func_pcap_free_datalinks" = xyes
6866 then :
6867 printf "%s\n" "#define HAVE_PCAP_FREE_DATALINKS 1" >>confdefs.h
6868
6869 fi
6870
6871
6872 else $as_nop
6873
6874 case " $LIBOBJS " in
6875 *" datalinks.$ac_objext "* ) ;;
6876 *) LIBOBJS="$LIBOBJS datalinks.$ac_objext"
6877 ;;
6878 esac
6879
6880
6881 fi
6882
6883
6884 ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
6885 if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes
6886 then :
6887
6888
6889 printf "%s\n" "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h
6890
6891 ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description"
6892 if test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes
6893 then :
6894
6895 printf "%s\n" "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h
6896
6897 else $as_nop
6898
6899 case " $LIBOBJS " in
6900 *" dlnames.$ac_objext "* ) ;;
6901 *) LIBOBJS="$LIBOBJS dlnames.$ac_objext"
6902 ;;
6903 esac
6904
6905
6906 fi
6907
6908
6909 else $as_nop
6910
6911 case " $LIBOBJS " in
6912 *" dlnames.$ac_objext "* ) ;;
6913 *) LIBOBJS="$LIBOBJS dlnames.$ac_objext"
6914 ;;
6915 esac
6916
6917
6918 fi
6919
6920
6921 ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
6922 if test "x$ac_cv_func_pcap_set_datalink" = xyes
6923 then :
6924 printf "%s\n" "#define HAVE_PCAP_SET_DATALINK 1" >>confdefs.h
6925
6926 fi
6927
6928
6929 ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
6930 if test "x$ac_cv_func_pcap_breakloop" = xyes
6931 then :
6932 printf "%s\n" "#define HAVE_PCAP_BREAKLOOP 1" >>confdefs.h
6933
6934 fi
6935
6936
6937 #
6938 # Do we have the new open API? Check for pcap_create, and assume that,
6939 # if we do, we also have pcap_activate() and the other new routines
6940 # introduced in libpcap 1.0.0.
6941 #
6942 ac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create"
6943 if test "x$ac_cv_func_pcap_create" = xyes
6944 then :
6945 printf "%s\n" "#define HAVE_PCAP_CREATE 1" >>confdefs.h
6946
6947 fi
6948
6949 if test $ac_cv_func_pcap_create = "yes" ; then
6950 #
6951 # OK, do we have pcap_set_tstamp_type? If so, assume we have
6952 # pcap_list_tstamp_types and pcap_free_tstamp_types as well.
6953 #
6954 ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_type" "ac_cv_func_pcap_set_tstamp_type"
6955 if test "x$ac_cv_func_pcap_set_tstamp_type" = xyes
6956 then :
6957 printf "%s\n" "#define HAVE_PCAP_SET_TSTAMP_TYPE 1" >>confdefs.h
6958
6959 fi
6960
6961 #
6962 # And do we have pcap_set_tstamp_precision? If so, we assume
6963 # we also have pcap_open_offline_with_tstamp_precision.
6964 #
6965 ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_precision" "ac_cv_func_pcap_set_tstamp_precision"
6966 if test "x$ac_cv_func_pcap_set_tstamp_precision" = xyes
6967 then :
6968 printf "%s\n" "#define HAVE_PCAP_SET_TSTAMP_PRECISION 1" >>confdefs.h
6969
6970 fi
6971
6972 fi
6973
6974 #
6975 # Check for a miscellaneous collection of functions which we use
6976 # if we have them.
6977 #
6978 ac_fn_c_check_func "$LINENO" "pcap_findalldevs" "ac_cv_func_pcap_findalldevs"
6979 if test "x$ac_cv_func_pcap_findalldevs" = xyes
6980 then :
6981 printf "%s\n" "#define HAVE_PCAP_FINDALLDEVS 1" >>confdefs.h
6982
6983 fi
6984
6985 if test $ac_cv_func_pcap_findalldevs = "yes" ; then
6986 savedcppflags="$CPPFLAGS"
6987 CPPFLAGS="$CPPFLAGS $V_INCLS"
6988 ac_fn_c_check_type "$LINENO" "pcap_if_t" "ac_cv_type_pcap_if_t" "#include <pcap.h>
6989 "
6990 if test "x$ac_cv_type_pcap_if_t" = xyes
6991 then :
6992
6993 printf "%s\n" "#define HAVE_PCAP_IF_T 1" >>confdefs.h
6994
6995
6996 fi
6997
6998 CPPFLAGS="$savedcppflags"
6999 fi
7000 ac_fn_c_check_func "$LINENO" "pcap_dump_flush" "ac_cv_func_pcap_dump_flush"
7001 if test "x$ac_cv_func_pcap_dump_flush" = xyes
7002 then :
7003 printf "%s\n" "#define HAVE_PCAP_DUMP_FLUSH 1" >>confdefs.h
7004
7005 fi
7006 ac_fn_c_check_func "$LINENO" "pcap_lib_version" "ac_cv_func_pcap_lib_version"
7007 if test "x$ac_cv_func_pcap_lib_version" = xyes
7008 then :
7009 printf "%s\n" "#define HAVE_PCAP_LIB_VERSION 1" >>confdefs.h
7010
7011 fi
7012
7013 if test $ac_cv_func_pcap_lib_version = "no" ; then
7014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pcap_version is defined by libpcap" >&5
7015 printf %s "checking whether pcap_version is defined by libpcap... " >&6; }
7016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017 /* end confdefs.h. */
7018
7019 int
7020 main (void)
7021 {
7022
7023 extern char pcap_version[];
7024
7025 return (int)pcap_version;
7026
7027 ;
7028 return 0;
7029 }
7030 _ACEOF
7031 if ac_fn_c_try_link "$LINENO"
7032 then :
7033 ac_lbl_cv_pcap_version_defined=yes
7034 else $as_nop
7035 ac_lbl_cv_pcap_version_defined=no
7036 fi
7037 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7038 conftest$ac_exeext conftest.$ac_ext
7039 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
7040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7041 printf "%s\n" "yes" >&6; }
7042
7043 printf "%s\n" "#define HAVE_PCAP_VERSION 1" >>confdefs.h
7044
7045 else
7046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047 printf "%s\n" "no" >&6; }
7048 fi
7049 fi
7050 ac_fn_c_check_func "$LINENO" "pcap_setdirection" "ac_cv_func_pcap_setdirection"
7051 if test "x$ac_cv_func_pcap_setdirection" = xyes
7052 then :
7053 printf "%s\n" "#define HAVE_PCAP_SETDIRECTION 1" >>confdefs.h
7054
7055 fi
7056 ac_fn_c_check_func "$LINENO" "pcap_set_immediate_mode" "ac_cv_func_pcap_set_immediate_mode"
7057 if test "x$ac_cv_func_pcap_set_immediate_mode" = xyes
7058 then :
7059 printf "%s\n" "#define HAVE_PCAP_SET_IMMEDIATE_MODE 1" >>confdefs.h
7060
7061 fi
7062 ac_fn_c_check_func "$LINENO" "pcap_dump_ftell64" "ac_cv_func_pcap_dump_ftell64"
7063 if test "x$ac_cv_func_pcap_dump_ftell64" = xyes
7064 then :
7065 printf "%s\n" "#define HAVE_PCAP_DUMP_FTELL64 1" >>confdefs.h
7066
7067 fi
7068
7069 ac_fn_c_check_func "$LINENO" "pcap_open" "ac_cv_func_pcap_open"
7070 if test "x$ac_cv_func_pcap_open" = xyes
7071 then :
7072 printf "%s\n" "#define HAVE_PCAP_OPEN 1" >>confdefs.h
7073
7074 fi
7075 ac_fn_c_check_func "$LINENO" "pcap_findalldevs_ex" "ac_cv_func_pcap_findalldevs_ex"
7076 if test "x$ac_cv_func_pcap_findalldevs_ex" = xyes
7077 then :
7078 printf "%s\n" "#define HAVE_PCAP_FINDALLDEVS_EX 1" >>confdefs.h
7079
7080 fi
7081
7082 ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
7083 if test "x$ac_cv_func_pcap_dump_ftell" = xyes
7084 then :
7085 printf "%s\n" "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
7086
7087 else $as_nop
7088 case " $LIBOBJS " in
7089 *" pcap_dump_ftell.$ac_objext "* ) ;;
7090 *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
7091 ;;
7092 esac
7093
7094 fi
7095
7096
7097 #
7098 # Check for special debugging functions
7099 #
7100 ac_fn_c_check_func "$LINENO" "pcap_set_parser_debug" "ac_cv_func_pcap_set_parser_debug"
7101 if test "x$ac_cv_func_pcap_set_parser_debug" = xyes
7102 then :
7103 printf "%s\n" "#define HAVE_PCAP_SET_PARSER_DEBUG 1" >>confdefs.h
7104
7105 fi
7106
7107 if test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then
7108 #
7109 # OK, we don't have pcap_set_parser_debug() to set the libpcap
7110 # filter expression parser debug flag; can we directly set the
7111 # flag?
7112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pcap_debug is defined by libpcap" >&5
7113 printf %s "checking whether pcap_debug is defined by libpcap... " >&6; }
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115 /* end confdefs.h. */
7116
7117 int
7118 main (void)
7119 {
7120
7121 extern int pcap_debug;
7122
7123 return pcap_debug;
7124
7125 ;
7126 return 0;
7127 }
7128 _ACEOF
7129 if ac_fn_c_try_link "$LINENO"
7130 then :
7131 ac_lbl_cv_pcap_debug_defined=yes
7132 else $as_nop
7133 ac_lbl_cv_pcap_debug_defined=no
7134 fi
7135 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7136 conftest$ac_exeext conftest.$ac_ext
7137 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
7138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7139 printf "%s\n" "yes" >&6; }
7140
7141 printf "%s\n" "#define HAVE_PCAP_DEBUG 1" >>confdefs.h
7142
7143 else
7144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7145 printf "%s\n" "no" >&6; }
7146 #
7147 # OK, what about "yydebug"?
7148 #
7149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yydebug is defined by libpcap" >&5
7150 printf %s "checking whether yydebug is defined by libpcap... " >&6; }
7151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152 /* end confdefs.h. */
7153
7154 int
7155 main (void)
7156 {
7157
7158 extern int yydebug;
7159
7160 return yydebug;
7161
7162 ;
7163 return 0;
7164 }
7165 _ACEOF
7166 if ac_fn_c_try_link "$LINENO"
7167 then :
7168 ac_lbl_cv_yydebug_defined=yes
7169 else $as_nop
7170 ac_lbl_cv_yydebug_defined=no
7171 fi
7172 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7173 conftest$ac_exeext conftest.$ac_ext
7174 if test "$ac_lbl_cv_yydebug_defined" = yes ; then
7175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7176 printf "%s\n" "yes" >&6; }
7177
7178 printf "%s\n" "#define HAVE_YYDEBUG 1" >>confdefs.h
7179
7180 else
7181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7182 printf "%s\n" "no" >&6; }
7183 fi
7184 fi
7185 fi
7186 ac_fn_c_check_func "$LINENO" "pcap_set_optimizer_debug" "ac_cv_func_pcap_set_optimizer_debug"
7187 if test "x$ac_cv_func_pcap_set_optimizer_debug" = xyes
7188 then :
7189 printf "%s\n" "#define HAVE_PCAP_SET_OPTIMIZER_DEBUG 1" >>confdefs.h
7190
7191 fi
7192
7193 ac_fn_c_check_func "$LINENO" "bpf_dump" "ac_cv_func_bpf_dump"
7194 if test "x$ac_cv_func_bpf_dump" = xyes
7195 then :
7196 printf "%s\n" "#define HAVE_BPF_DUMP 1" >>confdefs.h
7197
7198 else $as_nop
7199 case " $LIBOBJS " in
7200 *" bpf_dump.$ac_objext "* ) ;;
7201 *) LIBOBJS="$LIBOBJS bpf_dump.$ac_objext"
7202 ;;
7203 esac
7204
7205 fi
7206
7207 V_GROUP=0
7208 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
7209 V_GROUP=wheel
7210 fi
7211 #
7212 # Assume V7/BSD convention for man pages (file formats in section 5,
7213 # miscellaneous info in section 7).
7214 #
7215 MAN_FILE_FORMATS=5
7216 MAN_MISC_INFO=7
7217 case "$host_os" in
7218
7219 aix*)
7220
7221 printf "%s\n" "#define _SUN 1" >>confdefs.h
7222
7223 ;;
7224
7225 hpux*)
7226 #
7227 # Use System V conventions for man pages.
7228 #
7229 MAN_FILE_FORMATS=4
7230 MAN_MISC_INFO=5
7231 ;;
7232
7233 irix*)
7234 V_GROUP=sys
7235
7236 #
7237 # Use System V conventions for man pages.
7238 #
7239 MAN_FILE_FORMATS=4
7240 MAN_MISC_INFO=5
7241 ;;
7242
7243 osf*)
7244 V_GROUP=system
7245
7246 #
7247 # Use System V conventions for man pages.
7248 #
7249 MAN_FILE_FORMATS=4
7250 MAN_MISC_INFO=5
7251 ;;
7252
7253 solaris*)
7254 V_GROUP=sys
7255
7256 #
7257 # Use System V conventions for man pages.
7258 #
7259 MAN_FILE_FORMATS=4
7260 MAN_MISC_INFO=5
7261 ;;
7262 esac
7263
7264 if test -f /dev/bpf0 ; then
7265 V_GROUP=bpf
7266 fi
7267
7268 #
7269 # Make sure we have a definition for C99's uintptr_t (regardless of
7270 # whether the environment is a C99 environment or not).
7271 #
7272
7273 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
7274 if test "x$ac_cv_type_uintptr_t" = xyes
7275 then :
7276
7277 printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
7278
7279 else $as_nop
7280 for ac_type in 'unsigned int' 'unsigned long int' \
7281 'unsigned long long int'; do
7282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283 /* end confdefs.h. */
7284 $ac_includes_default
7285 int
7286 main (void)
7287 {
7288 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
7289 test_array [0] = 0;
7290 return test_array [0];
7291
7292 ;
7293 return 0;
7294 }
7295 _ACEOF
7296 if ac_fn_c_try_compile "$LINENO"
7297 then :
7298
7299 printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
7300
7301 ac_type=
7302 fi
7303 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7304 test -z "$ac_type" && break
7305 done
7306 fi
7307
7308
7309
7310 #
7311 # Check whether we have pcap/pcap-inttypes.h.
7312 # If we do, we use that to get the C99 types defined.
7313 #
7314 savedcppflags="$CPPFLAGS"
7315 CPPFLAGS="$CPPFLAGS $V_INCLS"
7316 ac_fn_c_check_header_compile "$LINENO" "pcap/pcap-inttypes.h" "ac_cv_header_pcap_pcap_inttypes_h" "$ac_includes_default"
7317 if test "x$ac_cv_header_pcap_pcap_inttypes_h" = xyes
7318 then :
7319 printf "%s\n" "#define HAVE_PCAP_PCAP_INTTYPES_H 1" >>confdefs.h
7320
7321 fi
7322
7323 CPPFLAGS="$savedcppflags"
7324
7325 #
7326 # Define the old BSD specified-width types in terms of the C99 types;
7327 # we may need them with libpcap include files.
7328 #
7329 ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
7330 #include <sys/types.h>
7331
7332 "
7333 if test "x$ac_cv_type_u_int8_t" = xyes
7334 then :
7335
7336 else $as_nop
7337
7338 printf "%s\n" "#define u_int8_t uint8_t" >>confdefs.h
7339
7340 fi
7341
7342 ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
7343 #include <sys/types.h>
7344
7345 "
7346 if test "x$ac_cv_type_u_int16_t" = xyes
7347 then :
7348
7349 else $as_nop
7350
7351 printf "%s\n" "#define u_int16_t uint16_t" >>confdefs.h
7352
7353 fi
7354
7355 ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
7356 #include <sys/types.h>
7357
7358 "
7359 if test "x$ac_cv_type_u_int32_t" = xyes
7360 then :
7361
7362 else $as_nop
7363
7364 printf "%s\n" "#define u_int32_t uint32_t" >>confdefs.h
7365
7366 fi
7367
7368 ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
7369 #include <sys/types.h>
7370
7371 "
7372 if test "x$ac_cv_type_u_int64_t" = xyes
7373 then :
7374
7375 else $as_nop
7376
7377 printf "%s\n" "#define u_int64_t uint64_t" >>confdefs.h
7378
7379 fi
7380
7381
7382 if test -n "$ac_tool_prefix"; then
7383 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7384 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7386 printf %s "checking for $ac_word... " >&6; }
7387 if test ${ac_cv_prog_RANLIB+y}
7388 then :
7389 printf %s "(cached) " >&6
7390 else $as_nop
7391 if test -n "$RANLIB"; then
7392 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7393 else
7394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395 for as_dir in $PATH
7396 do
7397 IFS=$as_save_IFS
7398 case $as_dir in #(((
7399 '') as_dir=./ ;;
7400 */) ;;
7401 *) as_dir=$as_dir/ ;;
7402 esac
7403 for ac_exec_ext in '' $ac_executable_extensions; do
7404 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7405 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7406 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7407 break 2
7408 fi
7409 done
7410 done
7411 IFS=$as_save_IFS
7412
7413 fi
7414 fi
7415 RANLIB=$ac_cv_prog_RANLIB
7416 if test -n "$RANLIB"; then
7417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7418 printf "%s\n" "$RANLIB" >&6; }
7419 else
7420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421 printf "%s\n" "no" >&6; }
7422 fi
7423
7424
7425 fi
7426 if test -z "$ac_cv_prog_RANLIB"; then
7427 ac_ct_RANLIB=$RANLIB
7428 # Extract the first word of "ranlib", so it can be a program name with args.
7429 set dummy ranlib; ac_word=$2
7430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7431 printf %s "checking for $ac_word... " >&6; }
7432 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7433 then :
7434 printf %s "(cached) " >&6
7435 else $as_nop
7436 if test -n "$ac_ct_RANLIB"; then
7437 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7438 else
7439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440 for as_dir in $PATH
7441 do
7442 IFS=$as_save_IFS
7443 case $as_dir in #(((
7444 '') as_dir=./ ;;
7445 */) ;;
7446 *) as_dir=$as_dir/ ;;
7447 esac
7448 for ac_exec_ext in '' $ac_executable_extensions; do
7449 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7450 ac_cv_prog_ac_ct_RANLIB="ranlib"
7451 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7452 break 2
7453 fi
7454 done
7455 done
7456 IFS=$as_save_IFS
7457
7458 fi
7459 fi
7460 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7461 if test -n "$ac_ct_RANLIB"; then
7462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7463 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7464 else
7465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466 printf "%s\n" "no" >&6; }
7467 fi
7468
7469 if test "x$ac_ct_RANLIB" = x; then
7470 RANLIB=":"
7471 else
7472 case $cross_compiling:$ac_tool_warned in
7473 yes:)
7474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7475 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7476 ac_tool_warned=yes ;;
7477 esac
7478 RANLIB=$ac_ct_RANLIB
7479 fi
7480 else
7481 RANLIB="$ac_cv_prog_RANLIB"
7482 fi
7483
7484 if test -n "$ac_tool_prefix"; then
7485 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7486 set dummy ${ac_tool_prefix}ar; ac_word=$2
7487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7488 printf %s "checking for $ac_word... " >&6; }
7489 if test ${ac_cv_prog_AR+y}
7490 then :
7491 printf %s "(cached) " >&6
7492 else $as_nop
7493 if test -n "$AR"; then
7494 ac_cv_prog_AR="$AR" # Let the user override the test.
7495 else
7496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497 for as_dir in $PATH
7498 do
7499 IFS=$as_save_IFS
7500 case $as_dir in #(((
7501 '') as_dir=./ ;;
7502 */) ;;
7503 *) as_dir=$as_dir/ ;;
7504 esac
7505 for ac_exec_ext in '' $ac_executable_extensions; do
7506 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7507 ac_cv_prog_AR="${ac_tool_prefix}ar"
7508 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7509 break 2
7510 fi
7511 done
7512 done
7513 IFS=$as_save_IFS
7514
7515 fi
7516 fi
7517 AR=$ac_cv_prog_AR
7518 if test -n "$AR"; then
7519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7520 printf "%s\n" "$AR" >&6; }
7521 else
7522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7523 printf "%s\n" "no" >&6; }
7524 fi
7525
7526
7527 fi
7528 if test -z "$ac_cv_prog_AR"; then
7529 ac_ct_AR=$AR
7530 # Extract the first word of "ar", so it can be a program name with args.
7531 set dummy ar; ac_word=$2
7532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7533 printf %s "checking for $ac_word... " >&6; }
7534 if test ${ac_cv_prog_ac_ct_AR+y}
7535 then :
7536 printf %s "(cached) " >&6
7537 else $as_nop
7538 if test -n "$ac_ct_AR"; then
7539 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7540 else
7541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7542 for as_dir in $PATH
7543 do
7544 IFS=$as_save_IFS
7545 case $as_dir in #(((
7546 '') as_dir=./ ;;
7547 */) ;;
7548 *) as_dir=$as_dir/ ;;
7549 esac
7550 for ac_exec_ext in '' $ac_executable_extensions; do
7551 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7552 ac_cv_prog_ac_ct_AR="ar"
7553 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7554 break 2
7555 fi
7556 done
7557 done
7558 IFS=$as_save_IFS
7559
7560 fi
7561 fi
7562 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7563 if test -n "$ac_ct_AR"; then
7564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7565 printf "%s\n" "$ac_ct_AR" >&6; }
7566 else
7567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7568 printf "%s\n" "no" >&6; }
7569 fi
7570
7571 if test "x$ac_ct_AR" = x; then
7572 AR=""
7573 else
7574 case $cross_compiling:$ac_tool_warned in
7575 yes:)
7576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7577 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7578 ac_tool_warned=yes ;;
7579 esac
7580 AR=$ac_ct_AR
7581 fi
7582 else
7583 AR="$ac_cv_prog_AR"
7584 fi
7585
7586
7587 rm -f os-proto.h
7588 if test "${LBL_CFLAGS+set}" = set; then
7589 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
7590 fi
7591 if test -f .devel ; then
7592 #
7593 # Skip all the warning option stuff on some compilers.
7594 #
7595 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
7596
7597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
7598 printf %s "checking whether the compiler supports the -W option... " >&6; }
7599 save_CFLAGS="$CFLAGS"
7600 CFLAGS="$CFLAGS -W"
7601 #
7602 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7603 # but no mechanism is provided to turn AC_LANG_WERROR on
7604 # *and then turn it back off*, so that we *only* do it when
7605 # testing compiler options - 15 years after somebody asked
7606 # for it:
7607 #
7608 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7609 #
7610 save_ac_c_werror_flag="$ac_c_werror_flag"
7611 ac_c_werror_flag=yes
7612 #
7613 # We use AC_LANG_SOURCE() so that we can control the complete
7614 # content of the program being compiled. We do not, for example,
7615 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7616 # as it will generate a warning with -Wold-style-definition, meaning
7617 # that we would treat it as not working, as the test will fail if
7618 # *any* error output, including a warning due to the flag we're
7619 # testing, is generated; see
7620 #
7621 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7622 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7623 #
7624 # This may, as per those two messages, be fixed in autoconf 2.70,
7625 # but we only require 2.64 or newer for now.
7626 #
7627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7628 /* end confdefs.h. */
7629 int main(void) { return 0; }
7630 _ACEOF
7631 if ac_fn_c_try_compile "$LINENO"
7632 then :
7633
7634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7635 printf "%s\n" "yes" >&6; }
7636 CFLAGS="$save_CFLAGS"
7637 V_CCOPT="$V_CCOPT -W"
7638
7639 else $as_nop
7640
7641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7642 printf "%s\n" "no" >&6; }
7643 CFLAGS="$save_CFLAGS"
7644
7645 fi
7646 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7647 ac_c_werror_flag="$save_ac_c_werror_flag"
7648
7649
7650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
7651 printf %s "checking whether the compiler supports the -Wall option... " >&6; }
7652 save_CFLAGS="$CFLAGS"
7653 CFLAGS="$CFLAGS -Wall"
7654 #
7655 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7656 # but no mechanism is provided to turn AC_LANG_WERROR on
7657 # *and then turn it back off*, so that we *only* do it when
7658 # testing compiler options - 15 years after somebody asked
7659 # for it:
7660 #
7661 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7662 #
7663 save_ac_c_werror_flag="$ac_c_werror_flag"
7664 ac_c_werror_flag=yes
7665 #
7666 # We use AC_LANG_SOURCE() so that we can control the complete
7667 # content of the program being compiled. We do not, for example,
7668 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7669 # as it will generate a warning with -Wold-style-definition, meaning
7670 # that we would treat it as not working, as the test will fail if
7671 # *any* error output, including a warning due to the flag we're
7672 # testing, is generated; see
7673 #
7674 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7675 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7676 #
7677 # This may, as per those two messages, be fixed in autoconf 2.70,
7678 # but we only require 2.64 or newer for now.
7679 #
7680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7681 /* end confdefs.h. */
7682 int main(void) { return 0; }
7683 _ACEOF
7684 if ac_fn_c_try_compile "$LINENO"
7685 then :
7686
7687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7688 printf "%s\n" "yes" >&6; }
7689 CFLAGS="$save_CFLAGS"
7690 V_CCOPT="$V_CCOPT -Wall"
7691
7692 else $as_nop
7693
7694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7695 printf "%s\n" "no" >&6; }
7696 CFLAGS="$save_CFLAGS"
7697
7698 fi
7699 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7700 ac_c_werror_flag="$save_ac_c_werror_flag"
7701
7702
7703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5
7704 printf %s "checking whether the compiler supports the -Wassign-enum option... " >&6; }
7705 save_CFLAGS="$CFLAGS"
7706 CFLAGS="$CFLAGS -Wassign-enum"
7707 #
7708 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7709 # but no mechanism is provided to turn AC_LANG_WERROR on
7710 # *and then turn it back off*, so that we *only* do it when
7711 # testing compiler options - 15 years after somebody asked
7712 # for it:
7713 #
7714 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7715 #
7716 save_ac_c_werror_flag="$ac_c_werror_flag"
7717 ac_c_werror_flag=yes
7718 #
7719 # We use AC_LANG_SOURCE() so that we can control the complete
7720 # content of the program being compiled. We do not, for example,
7721 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7722 # as it will generate a warning with -Wold-style-definition, meaning
7723 # that we would treat it as not working, as the test will fail if
7724 # *any* error output, including a warning due to the flag we're
7725 # testing, is generated; see
7726 #
7727 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7728 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7729 #
7730 # This may, as per those two messages, be fixed in autoconf 2.70,
7731 # but we only require 2.64 or newer for now.
7732 #
7733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7734 /* end confdefs.h. */
7735 int main(void) { return 0; }
7736 _ACEOF
7737 if ac_fn_c_try_compile "$LINENO"
7738 then :
7739
7740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7741 printf "%s\n" "yes" >&6; }
7742 CFLAGS="$save_CFLAGS"
7743 V_CCOPT="$V_CCOPT -Wassign-enum"
7744
7745 else $as_nop
7746
7747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748 printf "%s\n" "no" >&6; }
7749 CFLAGS="$save_CFLAGS"
7750
7751 fi
7752 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7753 ac_c_werror_flag="$save_ac_c_werror_flag"
7754
7755
7756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
7757 printf %s "checking whether the compiler supports the -Wcast-qual option... " >&6; }
7758 save_CFLAGS="$CFLAGS"
7759 CFLAGS="$CFLAGS -Wcast-qual"
7760 #
7761 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7762 # but no mechanism is provided to turn AC_LANG_WERROR on
7763 # *and then turn it back off*, so that we *only* do it when
7764 # testing compiler options - 15 years after somebody asked
7765 # for it:
7766 #
7767 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7768 #
7769 save_ac_c_werror_flag="$ac_c_werror_flag"
7770 ac_c_werror_flag=yes
7771 #
7772 # We use AC_LANG_SOURCE() so that we can control the complete
7773 # content of the program being compiled. We do not, for example,
7774 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7775 # as it will generate a warning with -Wold-style-definition, meaning
7776 # that we would treat it as not working, as the test will fail if
7777 # *any* error output, including a warning due to the flag we're
7778 # testing, is generated; see
7779 #
7780 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7781 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7782 #
7783 # This may, as per those two messages, be fixed in autoconf 2.70,
7784 # but we only require 2.64 or newer for now.
7785 #
7786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7787 /* end confdefs.h. */
7788 int main(void) { return 0; }
7789 _ACEOF
7790 if ac_fn_c_try_compile "$LINENO"
7791 then :
7792
7793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7794 printf "%s\n" "yes" >&6; }
7795 CFLAGS="$save_CFLAGS"
7796 V_CCOPT="$V_CCOPT -Wcast-qual"
7797
7798 else $as_nop
7799
7800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801 printf "%s\n" "no" >&6; }
7802 CFLAGS="$save_CFLAGS"
7803
7804 fi
7805 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7806 ac_c_werror_flag="$save_ac_c_werror_flag"
7807
7808
7809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
7810 printf %s "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
7811 save_CFLAGS="$CFLAGS"
7812 CFLAGS="$CFLAGS -Wmissing-prototypes"
7813 #
7814 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7815 # but no mechanism is provided to turn AC_LANG_WERROR on
7816 # *and then turn it back off*, so that we *only* do it when
7817 # testing compiler options - 15 years after somebody asked
7818 # for it:
7819 #
7820 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7821 #
7822 save_ac_c_werror_flag="$ac_c_werror_flag"
7823 ac_c_werror_flag=yes
7824 #
7825 # We use AC_LANG_SOURCE() so that we can control the complete
7826 # content of the program being compiled. We do not, for example,
7827 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7828 # as it will generate a warning with -Wold-style-definition, meaning
7829 # that we would treat it as not working, as the test will fail if
7830 # *any* error output, including a warning due to the flag we're
7831 # testing, is generated; see
7832 #
7833 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7834 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7835 #
7836 # This may, as per those two messages, be fixed in autoconf 2.70,
7837 # but we only require 2.64 or newer for now.
7838 #
7839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7840 /* end confdefs.h. */
7841 int main(void) { return 0; }
7842 _ACEOF
7843 if ac_fn_c_try_compile "$LINENO"
7844 then :
7845
7846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7847 printf "%s\n" "yes" >&6; }
7848 CFLAGS="$save_CFLAGS"
7849 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
7850
7851 else $as_nop
7852
7853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854 printf "%s\n" "no" >&6; }
7855 CFLAGS="$save_CFLAGS"
7856
7857 fi
7858 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7859 ac_c_werror_flag="$save_ac_c_werror_flag"
7860
7861
7862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
7863 printf %s "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
7864 save_CFLAGS="$CFLAGS"
7865 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
7866 #
7867 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7868 # but no mechanism is provided to turn AC_LANG_WERROR on
7869 # *and then turn it back off*, so that we *only* do it when
7870 # testing compiler options - 15 years after somebody asked
7871 # for it:
7872 #
7873 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7874 #
7875 save_ac_c_werror_flag="$ac_c_werror_flag"
7876 ac_c_werror_flag=yes
7877 #
7878 # We use AC_LANG_SOURCE() so that we can control the complete
7879 # content of the program being compiled. We do not, for example,
7880 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7881 # as it will generate a warning with -Wold-style-definition, meaning
7882 # that we would treat it as not working, as the test will fail if
7883 # *any* error output, including a warning due to the flag we're
7884 # testing, is generated; see
7885 #
7886 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7887 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7888 #
7889 # This may, as per those two messages, be fixed in autoconf 2.70,
7890 # but we only require 2.64 or newer for now.
7891 #
7892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7893 /* end confdefs.h. */
7894 int main(void) { return 0; }
7895 _ACEOF
7896 if ac_fn_c_try_compile "$LINENO"
7897 then :
7898
7899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7900 printf "%s\n" "yes" >&6; }
7901 CFLAGS="$save_CFLAGS"
7902 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
7903
7904 else $as_nop
7905
7906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907 printf "%s\n" "no" >&6; }
7908 CFLAGS="$save_CFLAGS"
7909
7910 fi
7911 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7912 ac_c_werror_flag="$save_ac_c_werror_flag"
7913
7914
7915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
7916 printf %s "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
7917 save_CFLAGS="$CFLAGS"
7918 CFLAGS="$CFLAGS -Wold-style-definition"
7919 #
7920 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7921 # but no mechanism is provided to turn AC_LANG_WERROR on
7922 # *and then turn it back off*, so that we *only* do it when
7923 # testing compiler options - 15 years after somebody asked
7924 # for it:
7925 #
7926 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7927 #
7928 save_ac_c_werror_flag="$ac_c_werror_flag"
7929 ac_c_werror_flag=yes
7930 #
7931 # We use AC_LANG_SOURCE() so that we can control the complete
7932 # content of the program being compiled. We do not, for example,
7933 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7934 # as it will generate a warning with -Wold-style-definition, meaning
7935 # that we would treat it as not working, as the test will fail if
7936 # *any* error output, including a warning due to the flag we're
7937 # testing, is generated; see
7938 #
7939 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7940 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7941 #
7942 # This may, as per those two messages, be fixed in autoconf 2.70,
7943 # but we only require 2.64 or newer for now.
7944 #
7945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7946 /* end confdefs.h. */
7947 int main(void) { return 0; }
7948 _ACEOF
7949 if ac_fn_c_try_compile "$LINENO"
7950 then :
7951
7952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7953 printf "%s\n" "yes" >&6; }
7954 CFLAGS="$save_CFLAGS"
7955 V_CCOPT="$V_CCOPT -Wold-style-definition"
7956
7957 else $as_nop
7958
7959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7960 printf "%s\n" "no" >&6; }
7961 CFLAGS="$save_CFLAGS"
7962
7963 fi
7964 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7965 ac_c_werror_flag="$save_ac_c_werror_flag"
7966
7967
7968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
7969 printf %s "checking whether the compiler supports the -Wpedantic option... " >&6; }
7970 save_CFLAGS="$CFLAGS"
7971 CFLAGS="$CFLAGS -Wpedantic"
7972 #
7973 # XXX - yes, this depends on the way AC_LANG_WERROR works,
7974 # but no mechanism is provided to turn AC_LANG_WERROR on
7975 # *and then turn it back off*, so that we *only* do it when
7976 # testing compiler options - 15 years after somebody asked
7977 # for it:
7978 #
7979 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7980 #
7981 save_ac_c_werror_flag="$ac_c_werror_flag"
7982 ac_c_werror_flag=yes
7983 #
7984 # We use AC_LANG_SOURCE() so that we can control the complete
7985 # content of the program being compiled. We do not, for example,
7986 # want the default "int main()" that AC_LANG_PROGRAM() generates,
7987 # as it will generate a warning with -Wold-style-definition, meaning
7988 # that we would treat it as not working, as the test will fail if
7989 # *any* error output, including a warning due to the flag we're
7990 # testing, is generated; see
7991 #
7992 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7993 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7994 #
7995 # This may, as per those two messages, be fixed in autoconf 2.70,
7996 # but we only require 2.64 or newer for now.
7997 #
7998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7999 /* end confdefs.h. */
8000 int main(void) { return 0; }
8001 _ACEOF
8002 if ac_fn_c_try_compile "$LINENO"
8003 then :
8004
8005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8006 printf "%s\n" "yes" >&6; }
8007 CFLAGS="$save_CFLAGS"
8008 V_CCOPT="$V_CCOPT -Wpedantic"
8009
8010 else $as_nop
8011
8012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8013 printf "%s\n" "no" >&6; }
8014 CFLAGS="$save_CFLAGS"
8015
8016 fi
8017 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8018 ac_c_werror_flag="$save_ac_c_werror_flag"
8019
8020
8021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
8022 printf %s "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
8023 save_CFLAGS="$CFLAGS"
8024 CFLAGS="$CFLAGS -Wpointer-arith"
8025 #
8026 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8027 # but no mechanism is provided to turn AC_LANG_WERROR on
8028 # *and then turn it back off*, so that we *only* do it when
8029 # testing compiler options - 15 years after somebody asked
8030 # for it:
8031 #
8032 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8033 #
8034 save_ac_c_werror_flag="$ac_c_werror_flag"
8035 ac_c_werror_flag=yes
8036 #
8037 # We use AC_LANG_SOURCE() so that we can control the complete
8038 # content of the program being compiled. We do not, for example,
8039 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8040 # as it will generate a warning with -Wold-style-definition, meaning
8041 # that we would treat it as not working, as the test will fail if
8042 # *any* error output, including a warning due to the flag we're
8043 # testing, is generated; see
8044 #
8045 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8046 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8047 #
8048 # This may, as per those two messages, be fixed in autoconf 2.70,
8049 # but we only require 2.64 or newer for now.
8050 #
8051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8052 /* end confdefs.h. */
8053 int main(void) { return 0; }
8054 _ACEOF
8055 if ac_fn_c_try_compile "$LINENO"
8056 then :
8057
8058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8059 printf "%s\n" "yes" >&6; }
8060 CFLAGS="$save_CFLAGS"
8061 V_CCOPT="$V_CCOPT -Wpointer-arith"
8062
8063 else $as_nop
8064
8065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8066 printf "%s\n" "no" >&6; }
8067 CFLAGS="$save_CFLAGS"
8068
8069 fi
8070 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8071 ac_c_werror_flag="$save_ac_c_werror_flag"
8072
8073
8074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
8075 printf %s "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
8076 save_CFLAGS="$CFLAGS"
8077 CFLAGS="$CFLAGS -Wpointer-sign"
8078 #
8079 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8080 # but no mechanism is provided to turn AC_LANG_WERROR on
8081 # *and then turn it back off*, so that we *only* do it when
8082 # testing compiler options - 15 years after somebody asked
8083 # for it:
8084 #
8085 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8086 #
8087 save_ac_c_werror_flag="$ac_c_werror_flag"
8088 ac_c_werror_flag=yes
8089 #
8090 # We use AC_LANG_SOURCE() so that we can control the complete
8091 # content of the program being compiled. We do not, for example,
8092 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8093 # as it will generate a warning with -Wold-style-definition, meaning
8094 # that we would treat it as not working, as the test will fail if
8095 # *any* error output, including a warning due to the flag we're
8096 # testing, is generated; see
8097 #
8098 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8099 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8100 #
8101 # This may, as per those two messages, be fixed in autoconf 2.70,
8102 # but we only require 2.64 or newer for now.
8103 #
8104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105 /* end confdefs.h. */
8106 int main(void) { return 0; }
8107 _ACEOF
8108 if ac_fn_c_try_compile "$LINENO"
8109 then :
8110
8111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8112 printf "%s\n" "yes" >&6; }
8113 CFLAGS="$save_CFLAGS"
8114 V_CCOPT="$V_CCOPT -Wpointer-sign"
8115
8116 else $as_nop
8117
8118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8119 printf "%s\n" "no" >&6; }
8120 CFLAGS="$save_CFLAGS"
8121
8122 fi
8123 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8124 ac_c_werror_flag="$save_ac_c_werror_flag"
8125
8126
8127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
8128 printf %s "checking whether the compiler supports the -Wshadow option... " >&6; }
8129 save_CFLAGS="$CFLAGS"
8130 CFLAGS="$CFLAGS -Wshadow"
8131 #
8132 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8133 # but no mechanism is provided to turn AC_LANG_WERROR on
8134 # *and then turn it back off*, so that we *only* do it when
8135 # testing compiler options - 15 years after somebody asked
8136 # for it:
8137 #
8138 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8139 #
8140 save_ac_c_werror_flag="$ac_c_werror_flag"
8141 ac_c_werror_flag=yes
8142 #
8143 # We use AC_LANG_SOURCE() so that we can control the complete
8144 # content of the program being compiled. We do not, for example,
8145 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8146 # as it will generate a warning with -Wold-style-definition, meaning
8147 # that we would treat it as not working, as the test will fail if
8148 # *any* error output, including a warning due to the flag we're
8149 # testing, is generated; see
8150 #
8151 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8152 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8153 #
8154 # This may, as per those two messages, be fixed in autoconf 2.70,
8155 # but we only require 2.64 or newer for now.
8156 #
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h. */
8159 int main(void) { return 0; }
8160 _ACEOF
8161 if ac_fn_c_try_compile "$LINENO"
8162 then :
8163
8164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8165 printf "%s\n" "yes" >&6; }
8166 CFLAGS="$save_CFLAGS"
8167 V_CCOPT="$V_CCOPT -Wshadow"
8168
8169 else $as_nop
8170
8171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172 printf "%s\n" "no" >&6; }
8173 CFLAGS="$save_CFLAGS"
8174
8175 fi
8176 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8177 ac_c_werror_flag="$save_ac_c_werror_flag"
8178
8179
8180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
8181 printf %s "checking whether the compiler supports the -Wsign-compare option... " >&6; }
8182 save_CFLAGS="$CFLAGS"
8183 CFLAGS="$CFLAGS -Wsign-compare"
8184 #
8185 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8186 # but no mechanism is provided to turn AC_LANG_WERROR on
8187 # *and then turn it back off*, so that we *only* do it when
8188 # testing compiler options - 15 years after somebody asked
8189 # for it:
8190 #
8191 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8192 #
8193 save_ac_c_werror_flag="$ac_c_werror_flag"
8194 ac_c_werror_flag=yes
8195 #
8196 # We use AC_LANG_SOURCE() so that we can control the complete
8197 # content of the program being compiled. We do not, for example,
8198 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8199 # as it will generate a warning with -Wold-style-definition, meaning
8200 # that we would treat it as not working, as the test will fail if
8201 # *any* error output, including a warning due to the flag we're
8202 # testing, is generated; see
8203 #
8204 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8205 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8206 #
8207 # This may, as per those two messages, be fixed in autoconf 2.70,
8208 # but we only require 2.64 or newer for now.
8209 #
8210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8211 /* end confdefs.h. */
8212 int main(void) { return 0; }
8213 _ACEOF
8214 if ac_fn_c_try_compile "$LINENO"
8215 then :
8216
8217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8218 printf "%s\n" "yes" >&6; }
8219 CFLAGS="$save_CFLAGS"
8220 V_CCOPT="$V_CCOPT -Wsign-compare"
8221
8222 else $as_nop
8223
8224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8225 printf "%s\n" "no" >&6; }
8226 CFLAGS="$save_CFLAGS"
8227
8228 fi
8229 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8230 ac_c_werror_flag="$save_ac_c_werror_flag"
8231
8232
8233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
8234 printf %s "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
8235 save_CFLAGS="$CFLAGS"
8236 CFLAGS="$CFLAGS -Wstrict-prototypes"
8237 #
8238 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8239 # but no mechanism is provided to turn AC_LANG_WERROR on
8240 # *and then turn it back off*, so that we *only* do it when
8241 # testing compiler options - 15 years after somebody asked
8242 # for it:
8243 #
8244 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8245 #
8246 save_ac_c_werror_flag="$ac_c_werror_flag"
8247 ac_c_werror_flag=yes
8248 #
8249 # We use AC_LANG_SOURCE() so that we can control the complete
8250 # content of the program being compiled. We do not, for example,
8251 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8252 # as it will generate a warning with -Wold-style-definition, meaning
8253 # that we would treat it as not working, as the test will fail if
8254 # *any* error output, including a warning due to the flag we're
8255 # testing, is generated; see
8256 #
8257 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8258 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8259 #
8260 # This may, as per those two messages, be fixed in autoconf 2.70,
8261 # but we only require 2.64 or newer for now.
8262 #
8263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8264 /* end confdefs.h. */
8265 int main(void) { return 0; }
8266 _ACEOF
8267 if ac_fn_c_try_compile "$LINENO"
8268 then :
8269
8270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8271 printf "%s\n" "yes" >&6; }
8272 CFLAGS="$save_CFLAGS"
8273 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
8274
8275 else $as_nop
8276
8277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278 printf "%s\n" "no" >&6; }
8279 CFLAGS="$save_CFLAGS"
8280
8281 fi
8282 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8283 ac_c_werror_flag="$save_ac_c_werror_flag"
8284
8285
8286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5
8287 printf %s "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; }
8288 save_CFLAGS="$CFLAGS"
8289 CFLAGS="$CFLAGS -Wunreachable-code-return"
8290 #
8291 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8292 # but no mechanism is provided to turn AC_LANG_WERROR on
8293 # *and then turn it back off*, so that we *only* do it when
8294 # testing compiler options - 15 years after somebody asked
8295 # for it:
8296 #
8297 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8298 #
8299 save_ac_c_werror_flag="$ac_c_werror_flag"
8300 ac_c_werror_flag=yes
8301 #
8302 # We use AC_LANG_SOURCE() so that we can control the complete
8303 # content of the program being compiled. We do not, for example,
8304 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8305 # as it will generate a warning with -Wold-style-definition, meaning
8306 # that we would treat it as not working, as the test will fail if
8307 # *any* error output, including a warning due to the flag we're
8308 # testing, is generated; see
8309 #
8310 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8311 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8312 #
8313 # This may, as per those two messages, be fixed in autoconf 2.70,
8314 # but we only require 2.64 or newer for now.
8315 #
8316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8317 /* end confdefs.h. */
8318 int main(void) { return 0; }
8319 _ACEOF
8320 if ac_fn_c_try_compile "$LINENO"
8321 then :
8322
8323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8324 printf "%s\n" "yes" >&6; }
8325 CFLAGS="$save_CFLAGS"
8326 V_CCOPT="$V_CCOPT -Wunreachable-code-return"
8327
8328 else $as_nop
8329
8330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8331 printf "%s\n" "no" >&6; }
8332 CFLAGS="$save_CFLAGS"
8333
8334 fi
8335 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8336 ac_c_werror_flag="$save_ac_c_werror_flag"
8337
8338
8339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
8340 printf %s "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
8341 save_CFLAGS="$CFLAGS"
8342 CFLAGS="$CFLAGS -Wused-but-marked-unused"
8343 #
8344 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8345 # but no mechanism is provided to turn AC_LANG_WERROR on
8346 # *and then turn it back off*, so that we *only* do it when
8347 # testing compiler options - 15 years after somebody asked
8348 # for it:
8349 #
8350 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8351 #
8352 save_ac_c_werror_flag="$ac_c_werror_flag"
8353 ac_c_werror_flag=yes
8354 #
8355 # We use AC_LANG_SOURCE() so that we can control the complete
8356 # content of the program being compiled. We do not, for example,
8357 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8358 # as it will generate a warning with -Wold-style-definition, meaning
8359 # that we would treat it as not working, as the test will fail if
8360 # *any* error output, including a warning due to the flag we're
8361 # testing, is generated; see
8362 #
8363 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8364 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8365 #
8366 # This may, as per those two messages, be fixed in autoconf 2.70,
8367 # but we only require 2.64 or newer for now.
8368 #
8369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8370 /* end confdefs.h. */
8371 int main(void) { return 0; }
8372 _ACEOF
8373 if ac_fn_c_try_compile "$LINENO"
8374 then :
8375
8376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8377 printf "%s\n" "yes" >&6; }
8378 CFLAGS="$save_CFLAGS"
8379 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
8380
8381 else $as_nop
8382
8383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384 printf "%s\n" "no" >&6; }
8385 CFLAGS="$save_CFLAGS"
8386
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8389 ac_c_werror_flag="$save_ac_c_werror_flag"
8390
8391
8392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
8393 printf %s "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
8394 save_CFLAGS="$CFLAGS"
8395 CFLAGS="$CFLAGS -Wwrite-strings"
8396 #
8397 # XXX - yes, this depends on the way AC_LANG_WERROR works,
8398 # but no mechanism is provided to turn AC_LANG_WERROR on
8399 # *and then turn it back off*, so that we *only* do it when
8400 # testing compiler options - 15 years after somebody asked
8401 # for it:
8402 #
8403 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
8404 #
8405 save_ac_c_werror_flag="$ac_c_werror_flag"
8406 ac_c_werror_flag=yes
8407 #
8408 # We use AC_LANG_SOURCE() so that we can control the complete
8409 # content of the program being compiled. We do not, for example,
8410 # want the default "int main()" that AC_LANG_PROGRAM() generates,
8411 # as it will generate a warning with -Wold-style-definition, meaning
8412 # that we would treat it as not working, as the test will fail if
8413 # *any* error output, including a warning due to the flag we're
8414 # testing, is generated; see
8415 #
8416 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8417 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
8418 #
8419 # This may, as per those two messages, be fixed in autoconf 2.70,
8420 # but we only require 2.64 or newer for now.
8421 #
8422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423 /* end confdefs.h. */
8424 int main(void) { return 0; }
8425 _ACEOF
8426 if ac_fn_c_try_compile "$LINENO"
8427 then :
8428
8429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8430 printf "%s\n" "yes" >&6; }
8431 CFLAGS="$save_CFLAGS"
8432 V_CCOPT="$V_CCOPT -Wwrite-strings"
8433
8434 else $as_nop
8435
8436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8437 printf "%s\n" "no" >&6; }
8438 CFLAGS="$save_CFLAGS"
8439
8440 fi
8441 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8442 ac_c_werror_flag="$save_ac_c_werror_flag"
8443
8444 fi
8445
8446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
8447 printf %s "checking whether the compiler supports generating dependencies... " >&6; }
8448 if test "$GCC" = yes ; then
8449 #
8450 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
8451 # though it's not); we assume that, in this case, the flag
8452 # would be -M.
8453 #
8454 ac_lbl_dependency_flag="-M"
8455 else
8456 #
8457 # Not GCC or a compiler deemed to be GCC; what platform is
8458 # this? (We're assuming that if the compiler isn't GCC
8459 # it's the compiler from the vendor of the OS; that won't
8460 # necessarily be true for x86 platforms, where it might be
8461 # the Intel C compiler.)
8462 #
8463 case "$host_os" in
8464
8465 irix*|osf*|darwin*)
8466 #
8467 # MIPS C for IRIX, DEC C, and clang all use -M.
8468 #
8469 ac_lbl_dependency_flag="-M"
8470 ;;
8471
8472 solaris*)
8473 #
8474 # Sun C uses -xM.
8475 #
8476 ac_lbl_dependency_flag="-xM"
8477 ;;
8478
8479 hpux*)
8480 #
8481 # HP's older C compilers don't support this.
8482 # HP's newer C compilers support this with
8483 # either +M or +Make; the older compilers
8484 # interpret +M as something completely
8485 # different, so we use +Make so we don't
8486 # think it works with the older compilers.
8487 #
8488 ac_lbl_dependency_flag="+Make"
8489 ;;
8490
8491 *)
8492 #
8493 # Not one of the above; assume no support for
8494 # generating dependencies.
8495 #
8496 ac_lbl_dependency_flag=""
8497 ;;
8498 esac
8499 fi
8500
8501 #
8502 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
8503 # complain about it?
8504 #
8505 # Note: clang doesn't seem to exit with an error status when handed
8506 # an unknown non-warning error, even if you pass it
8507 # -Werror=unknown-warning-option. However, it always supports
8508 # -M, so the fact that this test always succeeds with clang
8509 # isn't an issue.
8510 #
8511 if test ! -z "$ac_lbl_dependency_flag"; then
8512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8513 /* end confdefs.h. */
8514 int main(void) { return 0; }
8515 _ACEOF
8516 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
8517 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
8518 ac_status=$?
8519 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8520 test $ac_status = 0; }; then
8521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
8522 printf "%s\n" "yes, with $ac_lbl_dependency_flag" >&6; }
8523 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
8524 MKDEP='${top_srcdir}/mkdep'
8525 else
8526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8527 printf "%s\n" "no" >&6; }
8528 #
8529 # We can't run mkdep, so have "make depend" do
8530 # nothing.
8531 #
8532 MKDEP=:
8533 fi
8534 rm -rf conftest*
8535 else
8536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 printf "%s\n" "no" >&6; }
8538 #
8539 # We can't run mkdep, so have "make depend" do
8540 # nothing.
8541 #
8542 MKDEP=:
8543 fi
8544
8545
8546
8547 #
8548 # We used to set -n32 for IRIX 6 when not using GCC (presumed
8549 # to mean that we're using MIPS C or MIPSpro C); it specified
8550 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
8551 # not sure why that would be something to do *only* with a
8552 # .devel file; why should the ABI for which we produce code
8553 # depend on .devel?
8554 #
8555 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
8556 name="lbl/os-$os.h"
8557 if test -f $name ; then
8558 ln -s $name os-proto.h
8559
8560 printf "%s\n" "#define HAVE_OS_PROTO_H 1" >>confdefs.h
8561
8562 else
8563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
8564 printf "%s\n" "$as_me: WARNING: can't find $name" >&2;}
8565 fi
8566 fi
8567
8568 # Check for OpenSSL/libressl libcrypto
8569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL/libressl libcrypto" >&5
8570 printf %s "checking whether to use OpenSSL/libressl libcrypto... " >&6; }
8571 # Specify location for both includes and libraries.
8572 want_libcrypto=ifavailable
8573
8574 # Check whether --with-crypto was given.
8575 if test ${with_crypto+y}
8576 then :
8577 withval=$with_crypto;
8578 if test $withval = no
8579 then
8580 # User doesn't want to link with libcrypto.
8581 want_libcrypto=no
8582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8583 printf "%s\n" "no" >&6; }
8584 elif test $withval = yes
8585 then
8586 # User wants to link with libcrypto but hasn't specified
8587 # a directory.
8588 want_libcrypto=yes
8589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8590 printf "%s\n" "yes" >&6; }
8591 else
8592 # User wants to link with libcrypto and has specified
8593 # a directory, so use the provided value.
8594 want_libcrypto=yes
8595 libcrypto_root=$withval
8596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, using the version installed in $withval" >&5
8597 printf "%s\n" "yes, using the version installed in $withval" >&6; }
8598
8599 #
8600 # Put the subdirectories of the libcrypto root directory
8601 # at the front of the header and library search path.
8602 #
8603 CFLAGS="-I$withval/include $CFLAGS"
8604 LIBS="-L$withval/lib $LIBS"
8605 fi
8606
8607 else $as_nop
8608
8609 #
8610 # Use libcrypto if it's present, otherwise don't; no directory
8611 # was specified.
8612 #
8613 want_libcrypto=ifavailable
8614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
8615 printf "%s\n" "yes, if available" >&6; }
8616
8617 fi
8618
8619 if test "$want_libcrypto" != "no"; then
8620 #
8621 # Don't check for libcrypto unless we have its headers;
8622 # Apple, bless their pointy little heads, apparently ship
8623 # libcrypto as a library, but not the header files, in
8624 # El Capitan, probably because they don't want you writing
8625 # nasty portable code that could run on other UN*Xes, they
8626 # want you writing code that uses their Shiny New Crypto
8627 # Library and that only runs on macOS.
8628 #
8629 ac_fn_c_check_header_compile "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
8630 if test "x$ac_cv_header_openssl_crypto_h" = xyes
8631 then :
8632
8633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
8634 printf %s "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
8635 if test ${ac_cv_lib_crypto_DES_cbc_encrypt+y}
8636 then :
8637 printf %s "(cached) " >&6
8638 else $as_nop
8639 ac_check_lib_save_LIBS=$LIBS
8640 LIBS="-lcrypto $LIBS"
8641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8642 /* end confdefs.h. */
8643
8644 /* Override any GCC internal prototype to avoid an error.
8645 Use char because int might match the return type of a GCC
8646 builtin and then its argument prototype would still apply. */
8647 char DES_cbc_encrypt ();
8648 int
8649 main (void)
8650 {
8651 return DES_cbc_encrypt ();
8652 ;
8653 return 0;
8654 }
8655 _ACEOF
8656 if ac_fn_c_try_link "$LINENO"
8657 then :
8658 ac_cv_lib_crypto_DES_cbc_encrypt=yes
8659 else $as_nop
8660 ac_cv_lib_crypto_DES_cbc_encrypt=no
8661 fi
8662 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8663 conftest$ac_exeext conftest.$ac_ext
8664 LIBS=$ac_check_lib_save_LIBS
8665 fi
8666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
8667 printf "%s\n" "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
8668 if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = xyes
8669 then :
8670 printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h
8671
8672 LIBS="-lcrypto $LIBS"
8673
8674 fi
8675
8676 if test "$ac_cv_lib_crypto_DES_cbc_encrypt" = "yes"; then
8677 ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
8678 if test "x$ac_cv_header_openssl_evp_h" = xyes
8679 then :
8680 printf "%s\n" "#define HAVE_OPENSSL_EVP_H 1" >>confdefs.h
8681
8682 fi
8683
8684 #
8685 # OK, then:
8686 #
8687 # 1) do we have EVP_CIPHER_CTX_new?
8688 # If so, we use it to allocate an
8689 # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be
8690 # opaque; otherwise, we allocate it ourselves.
8691 #
8692 # 2) do we have EVP_DecryptInit_ex()?
8693 # If so, we use it, because we need to be
8694 # able to make two "initialize the cipher"
8695 # calls, one with the cipher and key, and
8696 # one with the IV, and, as of OpenSSL 1.1,
8697 # You Can't Do That with EVP_DecryptInit(),
8698 # because a call to EVP_DecryptInit() will
8699 # unconditionally clear the context, and
8700 # if you don't supply a cipher, it'll
8701 # clear the cipher, rendering the context
8702 # unusable and causing a crash.
8703 #
8704 ac_fn_c_check_func "$LINENO" "EVP_CIPHER_CTX_new" "ac_cv_func_EVP_CIPHER_CTX_new"
8705 if test "x$ac_cv_func_EVP_CIPHER_CTX_new" = xyes
8706 then :
8707 printf "%s\n" "#define HAVE_EVP_CIPHER_CTX_NEW 1" >>confdefs.h
8708
8709 fi
8710 ac_fn_c_check_func "$LINENO" "EVP_DecryptInit_ex" "ac_cv_func_EVP_DecryptInit_ex"
8711 if test "x$ac_cv_func_EVP_DecryptInit_ex" = xyes
8712 then :
8713 printf "%s\n" "#define HAVE_EVP_DECRYPTINIT_EX 1" >>confdefs.h
8714
8715 fi
8716
8717 fi
8718
8719 fi
8720
8721 fi
8722
8723 # Check for libcap-ng
8724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use libcap-ng" >&5
8725 printf %s "checking whether to use libcap-ng... " >&6; }
8726 # Specify location for both includes and libraries.
8727 want_libcap_ng=ifavailable
8728
8729 # Check whether --with-cap_ng was given.
8730 if test ${with_cap_ng+y}
8731 then :
8732 withval=$with_cap_ng;
8733 if test $withval = no
8734 then
8735 want_libcap_ng=no
8736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8737 printf "%s\n" "no" >&6; }
8738 elif test $withval = yes
8739 then
8740 want_libcap_ng=yes
8741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8742 printf "%s\n" "yes" >&6; }
8743 fi
8744
8745 else $as_nop
8746
8747 #
8748 # Use libcap-ng if it's present, otherwise don't.
8749 #
8750 want_libcap_ng=ifavailable
8751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
8752 printf "%s\n" "yes, if available" >&6; }
8753
8754 fi
8755
8756 if test "$want_libcap_ng" != "no"; then
8757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capng_change_id in -lcap-ng" >&5
8758 printf %s "checking for capng_change_id in -lcap-ng... " >&6; }
8759 if test ${ac_cv_lib_cap_ng_capng_change_id+y}
8760 then :
8761 printf %s "(cached) " >&6
8762 else $as_nop
8763 ac_check_lib_save_LIBS=$LIBS
8764 LIBS="-lcap-ng $LIBS"
8765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8766 /* end confdefs.h. */
8767
8768 /* Override any GCC internal prototype to avoid an error.
8769 Use char because int might match the return type of a GCC
8770 builtin and then its argument prototype would still apply. */
8771 char capng_change_id ();
8772 int
8773 main (void)
8774 {
8775 return capng_change_id ();
8776 ;
8777 return 0;
8778 }
8779 _ACEOF
8780 if ac_fn_c_try_link "$LINENO"
8781 then :
8782 ac_cv_lib_cap_ng_capng_change_id=yes
8783 else $as_nop
8784 ac_cv_lib_cap_ng_capng_change_id=no
8785 fi
8786 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8787 conftest$ac_exeext conftest.$ac_ext
8788 LIBS=$ac_check_lib_save_LIBS
8789 fi
8790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_ng_capng_change_id" >&5
8791 printf "%s\n" "$ac_cv_lib_cap_ng_capng_change_id" >&6; }
8792 if test "x$ac_cv_lib_cap_ng_capng_change_id" = xyes
8793 then :
8794 printf "%s\n" "#define HAVE_LIBCAP_NG 1" >>confdefs.h
8795
8796 LIBS="-lcap-ng $LIBS"
8797
8798 fi
8799
8800 ac_fn_c_check_header_compile "$LINENO" "cap-ng.h" "ac_cv_header_cap_ng_h" "$ac_includes_default"
8801 if test "x$ac_cv_header_cap_ng_h" = xyes
8802 then :
8803 printf "%s\n" "#define HAVE_CAP_NG_H 1" >>confdefs.h
8804
8805 fi
8806
8807 fi
8808
8809 if test "$missing_includes" = "yes"; then
8810 CPPFLAGS="$CPPFLAGS -I$srcdir/missing"
8811 V_INCLS="$V_INCLS -I$srcdir/missing"
8812 fi
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824 # Find a good install program. We prefer a C program (faster),
8825 # so one script is as good as another. But avoid the broken or
8826 # incompatible versions:
8827 # SysV /etc/install, /usr/sbin/install
8828 # SunOS /usr/etc/install
8829 # IRIX /sbin/install
8830 # AIX /bin/install
8831 # AmigaOS /C/install, which installs bootblocks on floppy discs
8832 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8833 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8834 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8835 # OS/2's system install, which has a completely different semantic
8836 # ./install, which can be erroneously created by make from ./install.sh.
8837 # Reject install programs that cannot install multiple files.
8838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8839 printf %s "checking for a BSD-compatible install... " >&6; }
8840 if test -z "$INSTALL"; then
8841 if test ${ac_cv_path_install+y}
8842 then :
8843 printf %s "(cached) " >&6
8844 else $as_nop
8845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8846 for as_dir in $PATH
8847 do
8848 IFS=$as_save_IFS
8849 case $as_dir in #(((
8850 '') as_dir=./ ;;
8851 */) ;;
8852 *) as_dir=$as_dir/ ;;
8853 esac
8854 # Account for fact that we put trailing slashes in our PATH walk.
8855 case $as_dir in #((
8856 ./ | /[cC]/* | \
8857 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8858 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
8859 /usr/ucb/* ) ;;
8860 *)
8861 # OSF1 and SCO ODT 3.0 have their own names for install.
8862 # Don't use installbsd from OSF since it installs stuff as root
8863 # by default.
8864 for ac_prog in ginstall scoinst install; do
8865 for ac_exec_ext in '' $ac_executable_extensions; do
8866 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
8867 if test $ac_prog = install &&
8868 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8869 # AIX install. It has an incompatible calling convention.
8870 :
8871 elif test $ac_prog = install &&
8872 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8873 # program-specific install script used by HP pwplus--don't use.
8874 :
8875 else
8876 rm -rf conftest.one conftest.two conftest.dir
8877 echo one > conftest.one
8878 echo two > conftest.two
8879 mkdir conftest.dir
8880 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
8881 test -s conftest.one && test -s conftest.two &&
8882 test -s conftest.dir/conftest.one &&
8883 test -s conftest.dir/conftest.two
8884 then
8885 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
8886 break 3
8887 fi
8888 fi
8889 fi
8890 done
8891 done
8892 ;;
8893 esac
8894
8895 done
8896 IFS=$as_save_IFS
8897
8898 rm -rf conftest.one conftest.two conftest.dir
8899
8900 fi
8901 if test ${ac_cv_path_install+y}; then
8902 INSTALL=$ac_cv_path_install
8903 else
8904 # As a last resort, use the slow shell script. Don't cache a
8905 # value for INSTALL within a source directory, because that will
8906 # break other packages using the cache if that directory is
8907 # removed, or if the value is a relative name.
8908 INSTALL=$ac_install_sh
8909 fi
8910 fi
8911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
8912 printf "%s\n" "$INSTALL" >&6; }
8913
8914 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8915 # It thinks the first close brace ends the variable substitution.
8916 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8917
8918 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8919
8920 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8921
8922
8923 ac_config_headers="$ac_config_headers config.h"
8924
8925
8926 ac_config_commands="$ac_config_commands default-1"
8927
8928 ac_config_files="$ac_config_files Makefile tcpdump.1"
8929
8930 cat >confcache <<\_ACEOF
8931 # This file is a shell script that caches the results of configure
8932 # tests run on this system so they can be shared between configure
8933 # scripts and configure runs, see configure's option --config-cache.
8934 # It is not useful on other systems. If it contains results you don't
8935 # want to keep, you may remove or edit it.
8936 #
8937 # config.status only pays attention to the cache file if you give it
8938 # the --recheck option to rerun configure.
8939 #
8940 # `ac_cv_env_foo' variables (set or unset) will be overridden when
8941 # loading this file, other *unset* `ac_cv_foo' will be assigned the
8942 # following values.
8943
8944 _ACEOF
8945
8946 # The following way of writing the cache mishandles newlines in values,
8947 # but we know of no workaround that is simple, portable, and efficient.
8948 # So, we kill variables containing newlines.
8949 # Ultrix sh set writes to stderr and can't be redirected directly,
8950 # and sets the high bit in the cache file unless we assign to the vars.
8951 (
8952 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
8953 eval ac_val=\$$ac_var
8954 case $ac_val in #(
8955 *${as_nl}*)
8956 case $ac_var in #(
8957 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
8958 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
8959 esac
8960 case $ac_var in #(
8961 _ | IFS | as_nl) ;; #(
8962 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8963 *) { eval $ac_var=; unset $ac_var;} ;;
8964 esac ;;
8965 esac
8966 done
8967
8968 (set) 2>&1 |
8969 case $as_nl`(ac_space=' '; set) 2>&1` in #(
8970 *${as_nl}ac_space=\ *)
8971 # `set' does not quote correctly, so add quotes: double-quote
8972 # substitution turns \\\\ into \\, and sed turns \\ into \.
8973 sed -n \
8974 "s/'/'\\\\''/g;
8975 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8976 ;; #(
8977 *)
8978 # `set' quotes correctly as required by POSIX, so do not add quotes.
8979 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
8980 ;;
8981 esac |
8982 sort
8983 ) |
8984 sed '
8985 /^ac_cv_env_/b end
8986 t clear
8987 :clear
8988 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
8989 t end
8990 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8991 :end' >>confcache
8992 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
8993 if test -w "$cache_file"; then
8994 if test "x$cache_file" != "x/dev/null"; then
8995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8996 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
8997 if test ! -f "$cache_file" || test -h "$cache_file"; then
8998 cat confcache >"$cache_file"
8999 else
9000 case $cache_file in #(
9001 */* | ?:*)
9002 mv -f confcache "$cache_file"$$ &&
9003 mv -f "$cache_file"$$ "$cache_file" ;; #(
9004 *)
9005 mv -f confcache "$cache_file" ;;
9006 esac
9007 fi
9008 fi
9009 else
9010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9011 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
9012 fi
9013 fi
9014 rm -f confcache
9015
9016 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9017 # Let make expand exec_prefix.
9018 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9019
9020 DEFS=-DHAVE_CONFIG_H
9021
9022 ac_libobjs=
9023 ac_ltlibobjs=
9024 U=
9025 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9026 # 1. Remove the extension, and $U if already installed.
9027 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9028 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
9029 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
9030 # will be set to the directory where LIBOBJS objects are built.
9031 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9032 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9033 done
9034 LIBOBJS=$ac_libobjs
9035
9036 LTLIBOBJS=$ac_ltlibobjs
9037
9038
9039
9040 : "${CONFIG_STATUS=./config.status}"
9041 ac_write_fail=0
9042 ac_clean_files_save=$ac_clean_files
9043 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9045 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
9046 as_write_fail=0
9047 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9048 #! $SHELL
9049 # Generated by $as_me.
9050 # Run this file to recreate the current configuration.
9051 # Compiler output produced by configure, useful for debugging
9052 # configure, is in config.log if it exists.
9053
9054 debug=false
9055 ac_cs_recheck=false
9056 ac_cs_silent=false
9057
9058 SHELL=\${CONFIG_SHELL-$SHELL}
9059 export SHELL
9060 _ASEOF
9061 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9062 ## -------------------- ##
9063 ## M4sh Initialization. ##
9064 ## -------------------- ##
9065
9066 # Be more Bourne compatible
9067 DUALCASE=1; export DUALCASE # for MKS sh
9068 as_nop=:
9069 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
9070 then :
9071 emulate sh
9072 NULLCMD=:
9073 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9074 # is contrary to our usage. Disable this feature.
9075 alias -g '${1+"$@"}'='"$@"'
9076 setopt NO_GLOB_SUBST
9077 else $as_nop
9078 case `(set -o) 2>/dev/null` in #(
9079 *posix*) :
9080 set -o posix ;; #(
9081 *) :
9082 ;;
9083 esac
9084 fi
9085
9086
9087
9088 # Reset variables that may have inherited troublesome values from
9089 # the environment.
9090
9091 # IFS needs to be set, to space, tab, and newline, in precisely that order.
9092 # (If _AS_PATH_WALK were called with IFS unset, it would have the
9093 # side effect of setting IFS to empty, thus disabling word splitting.)
9094 # Quoting is to prevent editors from complaining about space-tab.
9095 as_nl='
9096 '
9097 export as_nl
9098 IFS=" "" $as_nl"
9099
9100 PS1='$ '
9101 PS2='> '
9102 PS4='+ '
9103
9104 # Ensure predictable behavior from utilities with locale-dependent output.
9105 LC_ALL=C
9106 export LC_ALL
9107 LANGUAGE=C
9108 export LANGUAGE
9109
9110 # We cannot yet rely on "unset" to work, but we need these variables
9111 # to be unset--not just set to an empty or harmless value--now, to
9112 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
9113 # also avoids known problems related to "unset" and subshell syntax
9114 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
9115 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
9116 do eval test \${$as_var+y} \
9117 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9118 done
9119
9120 # Ensure that fds 0, 1, and 2 are open.
9121 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
9122 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
9123 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
9124
9125 # The user is always right.
9126 if ${PATH_SEPARATOR+false} :; then
9127 PATH_SEPARATOR=:
9128 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9129 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9130 PATH_SEPARATOR=';'
9131 }
9132 fi
9133
9134
9135 # Find who we are. Look in the path if we contain no directory separator.
9136 as_myself=
9137 case $0 in #((
9138 *[\\/]* ) as_myself=$0 ;;
9139 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140 for as_dir in $PATH
9141 do
9142 IFS=$as_save_IFS
9143 case $as_dir in #(((
9144 '') as_dir=./ ;;
9145 */) ;;
9146 *) as_dir=$as_dir/ ;;
9147 esac
9148 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
9149 done
9150 IFS=$as_save_IFS
9151
9152 ;;
9153 esac
9154 # We did not find ourselves, most probably we were run as `sh COMMAND'
9155 # in which case we are not to be found in the path.
9156 if test "x$as_myself" = x; then
9157 as_myself=$0
9158 fi
9159 if test ! -f "$as_myself"; then
9160 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9161 exit 1
9162 fi
9163
9164
9165
9166 # as_fn_error STATUS ERROR [LINENO LOG_FD]
9167 # ----------------------------------------
9168 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9169 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9170 # script with STATUS, using 1 if that was 0.
9171 as_fn_error ()
9172 {
9173 as_status=$1; test $as_status -eq 0 && as_status=1
9174 if test "$4"; then
9175 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9176 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9177 fi
9178 printf "%s\n" "$as_me: error: $2" >&2
9179 as_fn_exit $as_status
9180 } # as_fn_error
9181
9182
9183
9184 # as_fn_set_status STATUS
9185 # -----------------------
9186 # Set $? to STATUS, without forking.
9187 as_fn_set_status ()
9188 {
9189 return $1
9190 } # as_fn_set_status
9191
9192 # as_fn_exit STATUS
9193 # -----------------
9194 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9195 as_fn_exit ()
9196 {
9197 set +e
9198 as_fn_set_status $1
9199 exit $1
9200 } # as_fn_exit
9201
9202 # as_fn_unset VAR
9203 # ---------------
9204 # Portably unset VAR.
9205 as_fn_unset ()
9206 {
9207 { eval $1=; unset $1;}
9208 }
9209 as_unset=as_fn_unset
9210
9211 # as_fn_append VAR VALUE
9212 # ----------------------
9213 # Append the text in VALUE to the end of the definition contained in VAR. Take
9214 # advantage of any shell optimizations that allow amortized linear growth over
9215 # repeated appends, instead of the typical quadratic growth present in naive
9216 # implementations.
9217 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
9218 then :
9219 eval 'as_fn_append ()
9220 {
9221 eval $1+=\$2
9222 }'
9223 else $as_nop
9224 as_fn_append ()
9225 {
9226 eval $1=\$$1\$2
9227 }
9228 fi # as_fn_append
9229
9230 # as_fn_arith ARG...
9231 # ------------------
9232 # Perform arithmetic evaluation on the ARGs, and store the result in the
9233 # global $as_val. Take advantage of shells that can avoid forks. The arguments
9234 # must be portable across $(()) and expr.
9235 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
9236 then :
9237 eval 'as_fn_arith ()
9238 {
9239 as_val=$(( $* ))
9240 }'
9241 else $as_nop
9242 as_fn_arith ()
9243 {
9244 as_val=`expr "$@" || test $? -eq 1`
9245 }
9246 fi # as_fn_arith
9247
9248
9249 if expr a : '\(a\)' >/dev/null 2>&1 &&
9250 test "X`expr 00001 : '.*\(...\)'`" = X001; then
9251 as_expr=expr
9252 else
9253 as_expr=false
9254 fi
9255
9256 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9257 as_basename=basename
9258 else
9259 as_basename=false
9260 fi
9261
9262 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9263 as_dirname=dirname
9264 else
9265 as_dirname=false
9266 fi
9267
9268 as_me=`$as_basename -- "$0" ||
9269 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9270 X"$0" : 'X\(//\)$' \| \
9271 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9272 printf "%s\n" X/"$0" |
9273 sed '/^.*\/\([^/][^/]*\)\/*$/{
9274 s//\1/
9275 q
9276 }
9277 /^X\/\(\/\/\)$/{
9278 s//\1/
9279 q
9280 }
9281 /^X\/\(\/\).*/{
9282 s//\1/
9283 q
9284 }
9285 s/.*/./; q'`
9286
9287 # Avoid depending upon Character Ranges.
9288 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9289 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9290 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9291 as_cr_digits='0123456789'
9292 as_cr_alnum=$as_cr_Letters$as_cr_digits
9293
9294
9295 # Determine whether it's possible to make 'echo' print without a newline.
9296 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
9297 # for compatibility with existing Makefiles.
9298 ECHO_C= ECHO_N= ECHO_T=
9299 case `echo -n x` in #(((((
9300 -n*)
9301 case `echo 'xy\c'` in
9302 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
9303 xy) ECHO_C='\c';;
9304 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
9305 ECHO_T=' ';;
9306 esac;;
9307 *)
9308 ECHO_N='-n';;
9309 esac
9310
9311 # For backward compatibility with old third-party macros, we provide
9312 # the shell variables $as_echo and $as_echo_n. New code should use
9313 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
9314 as_echo='printf %s\n'
9315 as_echo_n='printf %s'
9316
9317 rm -f conf$$ conf$$.exe conf$$.file
9318 if test -d conf$$.dir; then
9319 rm -f conf$$.dir/conf$$.file
9320 else
9321 rm -f conf$$.dir
9322 mkdir conf$$.dir 2>/dev/null
9323 fi
9324 if (echo >conf$$.file) 2>/dev/null; then
9325 if ln -s conf$$.file conf$$ 2>/dev/null; then
9326 as_ln_s='ln -s'
9327 # ... but there are two gotchas:
9328 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9329 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9330 # In both cases, we have to default to `cp -pR'.
9331 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9332 as_ln_s='cp -pR'
9333 elif ln conf$$.file conf$$ 2>/dev/null; then
9334 as_ln_s=ln
9335 else
9336 as_ln_s='cp -pR'
9337 fi
9338 else
9339 as_ln_s='cp -pR'
9340 fi
9341 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9342 rmdir conf$$.dir 2>/dev/null
9343
9344
9345 # as_fn_mkdir_p
9346 # -------------
9347 # Create "$as_dir" as a directory, including parents if necessary.
9348 as_fn_mkdir_p ()
9349 {
9350
9351 case $as_dir in #(
9352 -*) as_dir=./$as_dir;;
9353 esac
9354 test -d "$as_dir" || eval $as_mkdir_p || {
9355 as_dirs=
9356 while :; do
9357 case $as_dir in #(
9358 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9359 *) as_qdir=$as_dir;;
9360 esac
9361 as_dirs="'$as_qdir' $as_dirs"
9362 as_dir=`$as_dirname -- "$as_dir" ||
9363 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9364 X"$as_dir" : 'X\(//\)[^/]' \| \
9365 X"$as_dir" : 'X\(//\)$' \| \
9366 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9367 printf "%s\n" X"$as_dir" |
9368 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9369 s//\1/
9370 q
9371 }
9372 /^X\(\/\/\)[^/].*/{
9373 s//\1/
9374 q
9375 }
9376 /^X\(\/\/\)$/{
9377 s//\1/
9378 q
9379 }
9380 /^X\(\/\).*/{
9381 s//\1/
9382 q
9383 }
9384 s/.*/./; q'`
9385 test -d "$as_dir" && break
9386 done
9387 test -z "$as_dirs" || eval "mkdir $as_dirs"
9388 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9389
9390
9391 } # as_fn_mkdir_p
9392 if mkdir -p . 2>/dev/null; then
9393 as_mkdir_p='mkdir -p "$as_dir"'
9394 else
9395 test -d ./-p && rmdir ./-p
9396 as_mkdir_p=false
9397 fi
9398
9399
9400 # as_fn_executable_p FILE
9401 # -----------------------
9402 # Test if FILE is an executable regular file.
9403 as_fn_executable_p ()
9404 {
9405 test -f "$1" && test -x "$1"
9406 } # as_fn_executable_p
9407 as_test_x='test -x'
9408 as_executable_p=as_fn_executable_p
9409
9410 # Sed expression to map a string onto a valid CPP name.
9411 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9412
9413 # Sed expression to map a string onto a valid variable name.
9414 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9415
9416
9417 exec 6>&1
9418 ## ----------------------------------- ##
9419 ## Main body of $CONFIG_STATUS script. ##
9420 ## ----------------------------------- ##
9421 _ASEOF
9422 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9423
9424 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9425 # Save the log message, to keep $0 and so on meaningful, and to
9426 # report actual input values of CONFIG_FILES etc. instead of their
9427 # values after options handling.
9428 ac_log="
9429 This file was extended by tcpdump $as_me 5.0.0-PRE-GIT, which was
9430 generated by GNU Autoconf 2.71. Invocation command line was
9431
9432 CONFIG_FILES = $CONFIG_FILES
9433 CONFIG_HEADERS = $CONFIG_HEADERS
9434 CONFIG_LINKS = $CONFIG_LINKS
9435 CONFIG_COMMANDS = $CONFIG_COMMANDS
9436 $ $0 $@
9437
9438 on `(hostname || uname -n) 2>/dev/null | sed 1q`
9439 "
9440
9441 _ACEOF
9442
9443 case $ac_config_files in *"
9444 "*) set x $ac_config_files; shift; ac_config_files=$*;;
9445 esac
9446
9447 case $ac_config_headers in *"
9448 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
9449 esac
9450
9451
9452 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9453 # Files that config.status was made for.
9454 config_files="$ac_config_files"
9455 config_headers="$ac_config_headers"
9456 config_commands="$ac_config_commands"
9457
9458 _ACEOF
9459
9460 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9461 ac_cs_usage="\
9462 \`$as_me' instantiates files and other configuration actions
9463 from templates according to the current configuration. Unless the files
9464 and actions are specified as TAGs, all are instantiated by default.
9465
9466 Usage: $0 [OPTION]... [TAG]...
9467
9468 -h, --help print this help, then exit
9469 -V, --version print version number and configuration settings, then exit
9470 --config print configuration, then exit
9471 -q, --quiet, --silent
9472 do not print progress messages
9473 -d, --debug don't remove temporary files
9474 --recheck update $as_me by reconfiguring in the same conditions
9475 --file=FILE[:TEMPLATE]
9476 instantiate the configuration file FILE
9477 --header=FILE[:TEMPLATE]
9478 instantiate the configuration header FILE
9479
9480 Configuration files:
9481 $config_files
9482
9483 Configuration headers:
9484 $config_headers
9485
9486 Configuration commands:
9487 $config_commands
9488
9489 Report bugs to the package provider."
9490
9491 _ACEOF
9492 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
9493 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
9494 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9495 ac_cs_config='$ac_cs_config_escaped'
9496 ac_cs_version="\\
9497 tcpdump config.status 5.0.0-PRE-GIT
9498 configured by $0, generated by GNU Autoconf 2.71,
9499 with options \\"\$ac_cs_config\\"
9500
9501 Copyright (C) 2021 Free Software Foundation, Inc.
9502 This config.status script is free software; the Free Software Foundation
9503 gives unlimited permission to copy, distribute and modify it."
9504
9505 ac_pwd='$ac_pwd'
9506 srcdir='$srcdir'
9507 INSTALL='$INSTALL'
9508 test -n "\$AWK" || AWK=awk
9509 _ACEOF
9510
9511 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9512 # The default lists apply if the user does not specify any file.
9513 ac_need_defaults=:
9514 while test $# != 0
9515 do
9516 case $1 in
9517 --*=?*)
9518 ac_option=`expr "X$1" : 'X\([^=]*\)='`
9519 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9520 ac_shift=:
9521 ;;
9522 --*=)
9523 ac_option=`expr "X$1" : 'X\([^=]*\)='`
9524 ac_optarg=
9525 ac_shift=:
9526 ;;
9527 *)
9528 ac_option=$1
9529 ac_optarg=$2
9530 ac_shift=shift
9531 ;;
9532 esac
9533
9534 case $ac_option in
9535 # Handling of the options.
9536 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9537 ac_cs_recheck=: ;;
9538 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9539 printf "%s\n" "$ac_cs_version"; exit ;;
9540 --config | --confi | --conf | --con | --co | --c )
9541 printf "%s\n" "$ac_cs_config"; exit ;;
9542 --debug | --debu | --deb | --de | --d | -d )
9543 debug=: ;;
9544 --file | --fil | --fi | --f )
9545 $ac_shift
9546 case $ac_optarg in
9547 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9548 '') as_fn_error $? "missing file argument" ;;
9549 esac
9550 as_fn_append CONFIG_FILES " '$ac_optarg'"
9551 ac_need_defaults=false;;
9552 --header | --heade | --head | --hea )
9553 $ac_shift
9554 case $ac_optarg in
9555 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9556 esac
9557 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
9558 ac_need_defaults=false;;
9559 --he | --h)
9560 # Conflict between --help and --header
9561 as_fn_error $? "ambiguous option: \`$1'
9562 Try \`$0 --help' for more information.";;
9563 --help | --hel | -h )
9564 printf "%s\n" "$ac_cs_usage"; exit ;;
9565 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9566 | -silent | --silent | --silen | --sile | --sil | --si | --s)
9567 ac_cs_silent=: ;;
9568
9569 # This is an error.
9570 -*) as_fn_error $? "unrecognized option: \`$1'
9571 Try \`$0 --help' for more information." ;;
9572
9573 *) as_fn_append ac_config_targets " $1"
9574 ac_need_defaults=false ;;
9575
9576 esac
9577 shift
9578 done
9579
9580 ac_configure_extra_args=
9581
9582 if $ac_cs_silent; then
9583 exec 6>/dev/null
9584 ac_configure_extra_args="$ac_configure_extra_args --silent"
9585 fi
9586
9587 _ACEOF
9588 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9589 if \$ac_cs_recheck; then
9590 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9591 shift
9592 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
9593 CONFIG_SHELL='$SHELL'
9594 export CONFIG_SHELL
9595 exec "\$@"
9596 fi
9597
9598 _ACEOF
9599 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9600 exec 5>>config.log
9601 {
9602 echo
9603 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9604 ## Running $as_me. ##
9605 _ASBOX
9606 printf "%s\n" "$ac_log"
9607 } >&5
9608
9609 _ACEOF
9610 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9611 #
9612 # INIT-COMMANDS
9613 #
9614
9615
9616 _ACEOF
9617
9618 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9619
9620 # Handling of arguments.
9621 for ac_config_target in $ac_config_targets
9622 do
9623 case $ac_config_target in
9624 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
9625 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
9626 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9627 "tcpdump.1") CONFIG_FILES="$CONFIG_FILES tcpdump.1" ;;
9628
9629 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9630 esac
9631 done
9632
9633
9634 # If the user did not use the arguments to specify the items to instantiate,
9635 # then the envvar interface is used. Set only those that are not.
9636 # We use the long form for the default assignment because of an extremely
9637 # bizarre bug on SunOS 4.1.3.
9638 if $ac_need_defaults; then
9639 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
9640 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
9641 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
9642 fi
9643
9644 # Have a temporary directory for convenience. Make it in the build tree
9645 # simply because there is no reason against having it here, and in addition,
9646 # creating and moving files from /tmp can sometimes cause problems.
9647 # Hook for its removal unless debugging.
9648 # Note that there is a small window in which the directory will not be cleaned:
9649 # after its creation but before its name has been assigned to `$tmp'.
9650 $debug ||
9651 {
9652 tmp= ac_tmp=
9653 trap 'exit_status=$?
9654 : "${ac_tmp:=$tmp}"
9655 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9656 ' 0
9657 trap 'as_fn_exit 1' 1 2 13 15
9658 }
9659 # Create a (secure) tmp directory for tmp files.
9660
9661 {
9662 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9663 test -d "$tmp"
9664 } ||
9665 {
9666 tmp=./conf$$-$RANDOM
9667 (umask 077 && mkdir "$tmp")
9668 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9669 ac_tmp=$tmp
9670
9671 # Set up the scripts for CONFIG_FILES section.
9672 # No need to generate them if there are no CONFIG_FILES.
9673 # This happens for instance with `./config.status config.h'.
9674 if test -n "$CONFIG_FILES"; then
9675
9676
9677 ac_cr=`echo X | tr X '\015'`
9678 # On cygwin, bash can eat \r inside `` if the user requested igncr.
9679 # But we know of no other shell where ac_cr would be empty at this
9680 # point, so we can use a bashism as a fallback.
9681 if test "x$ac_cr" = x; then
9682 eval ac_cr=\$\'\\r\'
9683 fi
9684 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9685 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9686 ac_cs_awk_cr='\\r'
9687 else
9688 ac_cs_awk_cr=$ac_cr
9689 fi
9690
9691 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9692 _ACEOF
9693
9694
9695 {
9696 echo "cat >conf$$subs.awk <<_ACEOF" &&
9697 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9698 echo "_ACEOF"
9699 } >conf$$subs.sh ||
9700 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9701 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9702 ac_delim='%!_!# '
9703 for ac_last_try in false false false false false :; do
9704 . ./conf$$subs.sh ||
9705 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9706
9707 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9708 if test $ac_delim_n = $ac_delim_num; then
9709 break
9710 elif $ac_last_try; then
9711 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9712 else
9713 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9714 fi
9715 done
9716 rm -f conf$$subs.sh
9717
9718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9719 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9720 _ACEOF
9721 sed -n '
9722 h
9723 s/^/S["/; s/!.*/"]=/
9724 p
9725 g
9726 s/^[^!]*!//
9727 :repl
9728 t repl
9729 s/'"$ac_delim"'$//
9730 t delim
9731 :nl
9732 h
9733 s/\(.\{148\}\)..*/\1/
9734 t more1
9735 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9736 p
9737 n
9738 b repl
9739 :more1
9740 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9741 p
9742 g
9743 s/.\{148\}//
9744 t nl
9745 :delim
9746 h
9747 s/\(.\{148\}\)..*/\1/
9748 t more2
9749 s/["\\]/\\&/g; s/^/"/; s/$/"/
9750 p
9751 b
9752 :more2
9753 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9754 p
9755 g
9756 s/.\{148\}//
9757 t delim
9758 ' <conf$$subs.awk | sed '
9759 /^[^""]/{
9760 N
9761 s/\n//
9762 }
9763 ' >>$CONFIG_STATUS || ac_write_fail=1
9764 rm -f conf$$subs.awk
9765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9766 _ACAWK
9767 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
9768 for (key in S) S_is_set[key] = 1
9769 FS = "\a"
9770
9771 }
9772 {
9773 line = $ 0
9774 nfields = split(line, field, "@")
9775 substed = 0
9776 len = length(field[1])
9777 for (i = 2; i < nfields; i++) {
9778 key = field[i]
9779 keylen = length(key)
9780 if (S_is_set[key]) {
9781 value = S[key]
9782 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9783 len += length(value) + length(field[++i])
9784 substed = 1
9785 } else
9786 len += 1 + keylen
9787 }
9788
9789 print line
9790 }
9791
9792 _ACAWK
9793 _ACEOF
9794 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9795 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9796 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9797 else
9798 cat
9799 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9800 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
9801 _ACEOF
9802
9803 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9804 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
9805 # trailing colons and then remove the whole line if VPATH becomes empty
9806 # (actually we leave an empty line to preserve line numbers).
9807 if test "x$srcdir" = x.; then
9808 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
9809 h
9810 s///
9811 s/^/:/
9812 s/[ ]*$/:/
9813 s/:\$(srcdir):/:/g
9814 s/:\${srcdir}:/:/g
9815 s/:@srcdir@:/:/g
9816 s/^:*//
9817 s/:*$//
9818 x
9819 s/\(=[ ]*\).*/\1/
9820 G
9821 s/\n//
9822 s/^[^=]*=[ ]*$//
9823 }'
9824 fi
9825
9826 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9827 fi # test -n "$CONFIG_FILES"
9828
9829 # Set up the scripts for CONFIG_HEADERS section.
9830 # No need to generate them if there are no CONFIG_HEADERS.
9831 # This happens for instance with `./config.status Makefile'.
9832 if test -n "$CONFIG_HEADERS"; then
9833 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
9834 BEGIN {
9835 _ACEOF
9836
9837 # Transform confdefs.h into an awk script `defines.awk', embedded as
9838 # here-document in config.status, that substitutes the proper values into
9839 # config.h.in to produce config.h.
9840
9841 # Create a delimiter string that does not exist in confdefs.h, to ease
9842 # handling of long lines.
9843 ac_delim='%!_!# '
9844 for ac_last_try in false false :; do
9845 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
9846 if test -z "$ac_tt"; then
9847 break
9848 elif $ac_last_try; then
9849 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
9850 else
9851 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9852 fi
9853 done
9854
9855 # For the awk script, D is an array of macro values keyed by name,
9856 # likewise P contains macro parameters if any. Preserve backslash
9857 # newline sequences.
9858
9859 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
9860 sed -n '
9861 s/.\{148\}/&'"$ac_delim"'/g
9862 t rset
9863 :rset
9864 s/^[ ]*#[ ]*define[ ][ ]*/ /
9865 t def
9866 d
9867 :def
9868 s/\\$//
9869 t bsnl
9870 s/["\\]/\\&/g
9871 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
9872 D["\1"]=" \3"/p
9873 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
9874 d
9875 :bsnl
9876 s/["\\]/\\&/g
9877 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
9878 D["\1"]=" \3\\\\\\n"\\/p
9879 t cont
9880 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
9881 t cont
9882 d
9883 :cont
9884 n
9885 s/.\{148\}/&'"$ac_delim"'/g
9886 t clear
9887 :clear
9888 s/\\$//
9889 t bsnlc
9890 s/["\\]/\\&/g; s/^/"/; s/$/"/p
9891 d
9892 :bsnlc
9893 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
9894 b cont
9895 ' <confdefs.h | sed '
9896 s/'"$ac_delim"'/"\\\
9897 "/g' >>$CONFIG_STATUS || ac_write_fail=1
9898
9899 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9900 for (key in D) D_is_set[key] = 1
9901 FS = "\a"
9902 }
9903 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
9904 line = \$ 0
9905 split(line, arg, " ")
9906 if (arg[1] == "#") {
9907 defundef = arg[2]
9908 mac1 = arg[3]
9909 } else {
9910 defundef = substr(arg[1], 2)
9911 mac1 = arg[2]
9912 }
9913 split(mac1, mac2, "(") #)
9914 macro = mac2[1]
9915 prefix = substr(line, 1, index(line, defundef) - 1)
9916 if (D_is_set[macro]) {
9917 # Preserve the white space surrounding the "#".
9918 print prefix "define", macro P[macro] D[macro]
9919 next
9920 } else {
9921 # Replace #undef with comments. This is necessary, for example,
9922 # in the case of _POSIX_SOURCE, which is predefined and required
9923 # on some systems where configure will not decide to define it.
9924 if (defundef == "undef") {
9925 print "/*", prefix defundef, macro, "*/"
9926 next
9927 }
9928 }
9929 }
9930 { print }
9931 _ACAWK
9932 _ACEOF
9933 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9934 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
9935 fi # test -n "$CONFIG_HEADERS"
9936
9937
9938 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
9939 shift
9940 for ac_tag
9941 do
9942 case $ac_tag in
9943 :[FHLC]) ac_mode=$ac_tag; continue;;
9944 esac
9945 case $ac_mode$ac_tag in
9946 :[FHL]*:*);;
9947 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
9948 :[FH]-) ac_tag=-:-;;
9949 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
9950 esac
9951 ac_save_IFS=$IFS
9952 IFS=:
9953 set x $ac_tag
9954 IFS=$ac_save_IFS
9955 shift
9956 ac_file=$1
9957 shift
9958
9959 case $ac_mode in
9960 :L) ac_source=$1;;
9961 :[FH])
9962 ac_file_inputs=
9963 for ac_f
9964 do
9965 case $ac_f in
9966 -) ac_f="$ac_tmp/stdin";;
9967 *) # Look for the file first in the build tree, then in the source tree
9968 # (if the path is not absolute). The absolute path cannot be DOS-style,
9969 # because $ac_f cannot contain `:'.
9970 test -f "$ac_f" ||
9971 case $ac_f in
9972 [\\/$]*) false;;
9973 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
9974 esac ||
9975 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
9976 esac
9977 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9978 as_fn_append ac_file_inputs " '$ac_f'"
9979 done
9980
9981 # Let's still pretend it is `configure' which instantiates (i.e., don't
9982 # use $as_me), people would be surprised to read:
9983 # /* config.h. Generated by config.status. */
9984 configure_input='Generated from '`
9985 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9986 `' by configure.'
9987 if test x"$ac_file" != x-; then
9988 configure_input="$ac_file. $configure_input"
9989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
9990 printf "%s\n" "$as_me: creating $ac_file" >&6;}
9991 fi
9992 # Neutralize special characters interpreted by sed in replacement strings.
9993 case $configure_input in #(
9994 *\&* | *\|* | *\\* )
9995 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
9996 sed 's/[\\\\&|]/\\\\&/g'`;; #(
9997 *) ac_sed_conf_input=$configure_input;;
9998 esac
9999
10000 case $ac_tag in
10001 *:-:* | *:-) cat >"$ac_tmp/stdin" \
10002 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
10003 esac
10004 ;;
10005 esac
10006
10007 ac_dir=`$as_dirname -- "$ac_file" ||
10008 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10009 X"$ac_file" : 'X\(//\)[^/]' \| \
10010 X"$ac_file" : 'X\(//\)$' \| \
10011 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10012 printf "%s\n" X"$ac_file" |
10013 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10014 s//\1/
10015 q
10016 }
10017 /^X\(\/\/\)[^/].*/{
10018 s//\1/
10019 q
10020 }
10021 /^X\(\/\/\)$/{
10022 s//\1/
10023 q
10024 }
10025 /^X\(\/\).*/{
10026 s//\1/
10027 q
10028 }
10029 s/.*/./; q'`
10030 as_dir="$ac_dir"; as_fn_mkdir_p
10031 ac_builddir=.
10032
10033 case "$ac_dir" in
10034 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10035 *)
10036 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
10037 # A ".." for each directory in $ac_dir_suffix.
10038 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10039 case $ac_top_builddir_sub in
10040 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10041 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10042 esac ;;
10043 esac
10044 ac_abs_top_builddir=$ac_pwd
10045 ac_abs_builddir=$ac_pwd$ac_dir_suffix
10046 # for backward compatibility:
10047 ac_top_builddir=$ac_top_build_prefix
10048
10049 case $srcdir in
10050 .) # We are building in place.
10051 ac_srcdir=.
10052 ac_top_srcdir=$ac_top_builddir_sub
10053 ac_abs_top_srcdir=$ac_pwd ;;
10054 [\\/]* | ?:[\\/]* ) # Absolute name.
10055 ac_srcdir=$srcdir$ac_dir_suffix;
10056 ac_top_srcdir=$srcdir
10057 ac_abs_top_srcdir=$srcdir ;;
10058 *) # Relative name.
10059 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10060 ac_top_srcdir=$ac_top_build_prefix$srcdir
10061 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10062 esac
10063 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10064
10065
10066 case $ac_mode in
10067 :F)
10068 #
10069 # CONFIG_FILE
10070 #
10071
10072 case $INSTALL in
10073 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
10074 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
10075 esac
10076 _ACEOF
10077
10078 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10079 # If the template does not know about datarootdir, expand it.
10080 # FIXME: This hack should be removed a few years after 2.60.
10081 ac_datarootdir_hack=; ac_datarootdir_seen=
10082 ac_sed_dataroot='
10083 /datarootdir/ {
10084 p
10085 q
10086 }
10087 /@datadir@/p
10088 /@docdir@/p
10089 /@infodir@/p
10090 /@localedir@/p
10091 /@mandir@/p'
10092 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10093 *datarootdir*) ac_datarootdir_seen=yes;;
10094 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10096 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10097 _ACEOF
10098 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10099 ac_datarootdir_hack='
10100 s&@datadir@&$datadir&g
10101 s&@docdir@&$docdir&g
10102 s&@infodir@&$infodir&g
10103 s&@localedir@&$localedir&g
10104 s&@mandir@&$mandir&g
10105 s&\\\${datarootdir}&$datarootdir&g' ;;
10106 esac
10107 _ACEOF
10108
10109 # Neutralize VPATH when `$srcdir' = `.'.
10110 # Shell code in configure.ac might set extrasub.
10111 # FIXME: do we really want to maintain this feature?
10112 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10113 ac_sed_extra="$ac_vpsub
10114 $extrasub
10115 _ACEOF
10116 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10117 :t
10118 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10119 s|@configure_input@|$ac_sed_conf_input|;t t
10120 s&@top_builddir@&$ac_top_builddir_sub&;t t
10121 s&@top_build_prefix@&$ac_top_build_prefix&;t t
10122 s&@srcdir@&$ac_srcdir&;t t
10123 s&@abs_srcdir@&$ac_abs_srcdir&;t t
10124 s&@top_srcdir@&$ac_top_srcdir&;t t
10125 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10126 s&@builddir@&$ac_builddir&;t t
10127 s&@abs_builddir@&$ac_abs_builddir&;t t
10128 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10129 s&@INSTALL@&$ac_INSTALL&;t t
10130 $ac_datarootdir_hack
10131 "
10132 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10133 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10134
10135 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10136 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10137 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
10138 "$ac_tmp/out"`; test -z "$ac_out"; } &&
10139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10140 which seems to be undefined. Please make sure it is defined" >&5
10141 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10142 which seems to be undefined. Please make sure it is defined" >&2;}
10143
10144 rm -f "$ac_tmp/stdin"
10145 case $ac_file in
10146 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10147 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10148 esac \
10149 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10150 ;;
10151 :H)
10152 #
10153 # CONFIG_HEADER
10154 #
10155 if test x"$ac_file" != x-; then
10156 {
10157 printf "%s\n" "/* $configure_input */" >&1 \
10158 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
10159 } >"$ac_tmp/config.h" \
10160 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10161 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
10162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
10163 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
10164 else
10165 rm -f "$ac_file"
10166 mv "$ac_tmp/config.h" "$ac_file" \
10167 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10168 fi
10169 else
10170 printf "%s\n" "/* $configure_input */" >&1 \
10171 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
10172 || as_fn_error $? "could not create -" "$LINENO" 5
10173 fi
10174 ;;
10175
10176 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
10177 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
10178 ;;
10179 esac
10180
10181
10182 case $ac_file$ac_mode in
10183 "default-1":C) if test -f .devel; then
10184 echo timestamp > stamp-h
10185 cat $srcdir/Makefile-devel-adds >> Makefile
10186 make depend || exit 1
10187 fi ;;
10188
10189 esac
10190 done # for ac_tag
10191
10192
10193 as_fn_exit 0
10194 _ACEOF
10195 ac_clean_files=$ac_clean_files_save
10196
10197 test $ac_write_fail = 0 ||
10198 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10199
10200
10201 # configure is writing to config.log, and then calls config.status.
10202 # config.status does its own redirection, appending to config.log.
10203 # Unfortunately, on DOS this fails, as config.log is still kept open
10204 # by configure, so config.status won't be able to write to it; its
10205 # output is simply discarded. So we exec the FD to /dev/null,
10206 # effectively closing config.log, so it can be properly (re)opened and
10207 # appended to by config.status. When coming back to configure, we
10208 # need to make the FD available again.
10209 if test "$no_create" != yes; then
10210 ac_cs_success=:
10211 ac_config_status_args=
10212 test "$silent" = yes &&
10213 ac_config_status_args="$ac_config_status_args --quiet"
10214 exec 5>/dev/null
10215 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10216 exec 5>>config.log
10217 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10218 # would make configure fail if this is the last instruction.
10219 $ac_cs_success || as_fn_exit 1
10220 fi
10221 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10223 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10224 fi
10225
10226 exit 0
10227